MATIC Price: $0.708876 (-0.92%)
Gas: 30 GWei
 

Overview

Max Total Supply

0

Holders

0

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
Benis

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : Benis.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.6.12;

import '@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol';
import '@pancakeswap/pancake-swap-lib/contracts/token/BEP20/IBEP20.sol';
import '@pancakeswap/pancake-swap-lib/contracts/token/BEP20/SafeBEP20.sol';
import '@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol';

contract Benis is Ownable {
    using SafeMath for uint256;
    using SafeBEP20 for IBEP20;

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
        uint256 remainingWBANReward; // WBAN Tokens that weren't distributed for user per pool.
        //
        // We do some fancy math here. Basically, any point in time, the amount of WBAN
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accWBANPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws Staked tokens to a pool. Here's what happens:
        //   1. The pool's `accWBANPerShare` (and `lastRewardTime`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }
    // Info of each pool.
    struct PoolInfo {
        IBEP20 stakingToken; // Contract address of staked token
        uint256 stakingTokenTotalAmount; //Total amount of deposited tokens
        uint256 accWBANPerShare; // Accumulated wBAN per share, times 1e12. See below.
        uint32 lastRewardTime; // Last timestamp number that wBAN distribution occurs.
        uint16 allocPoint; // How many allocation points assigned to this pool. wBAN to distribute per second.
    }

    IBEP20 public immutable wban; // The wBAN TOKEN!!

    uint256 public wbanPerSecond; // wBAN tokens vested per second.

    PoolInfo[] public poolInfo; // Info of each pool.

    mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Info of each user that stakes tokens.

    uint256 public totalAllocPoint = 0; // Total allocation points. Must be the sum of all allocation points in all pools.

    uint32 public immutable startTime; // The timestamp when wBAN farming starts.

    uint32 public endTime; // Time on which the reward calculation should end

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);

    constructor(
        IBEP20 _wban,
        uint256 _wbanPerSecond,
        uint32 _startTime
    ) public {
        wban = _wban;

        wbanPerSecond = _wbanPerSecond;
        startTime = _startTime;
        endTime = _startTime;
    }

    function changeEndTime(uint32 addSeconds) external onlyOwner {
        endTime += addSeconds;
    }

    // Changes wBAN token reward per second. Use this function to moderate the `lockup amount`.
    // Essentially this function changes the amount of the reward which is entitled to the
    // user for his token staking by the time the `endTime` is passed.
    // Good practice to update pools without messing up the contract
    function setWBANPerSecond(uint256 _wbanPerSecond, bool _withUpdate) external onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        wbanPerSecond = _wbanPerSecond;
    }

    // How many pools are in the contract
    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    // Add a new staking token to the pool. Can only be called by the owner.
    // VERY IMPORTANT NOTICE
    // ----------- DO NOT add the same staking token more than once. Rewards will be messed up if you do. -------------
    // Good practice to update pools without messing up the contract
    function add(
        uint16 _allocPoint,
        IBEP20 _stakingToken,
        bool _withUpdate
    ) external onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardTime = block.timestamp > startTime ? block.timestamp : startTime;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(
            PoolInfo({
                stakingToken: _stakingToken,
                stakingTokenTotalAmount: 0,
                allocPoint: _allocPoint,
                lastRewardTime: uint32(lastRewardTime),
                accWBANPerShare: 0
            })
        );
    }

    // Update the given pool's wBAN allocation point. Can only be called by the owner.
    // Good practice to update pools without messing up the contract
    function set(
        uint256 _pid,
        uint16 _allocPoint,
        bool _withUpdate
    ) external onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    // Return reward multiplier over the given _from to _to time.
    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        _from = _from > startTime ? _from : startTime;
        if (_from > endTime || _to < startTime) {
            return 0;
        }
        if (_to > endTime) {
            return endTime - _from;
        }
        return _to - _from;
    }

    // View function to see pending wBAN on frontend.
    function pendingWBAN(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accWBANPerShare = pool.accWBANPerShare;

        if (block.timestamp > pool.lastRewardTime && pool.stakingTokenTotalAmount != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardTime, block.timestamp);
            uint256 wbanReward = multiplier.mul(wbanPerSecond).mul(pool.allocPoint).div(totalAllocPoint);
            accWBANPerShare = accWBANPerShare.add(wbanReward.mul(1e12).div(pool.stakingTokenTotalAmount));
        }
        return user.amount.mul(accWBANPerShare).div(1e12).sub(user.rewardDebt).add(user.remainingWBANReward);
    }

    // Update reward vairables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.timestamp <= pool.lastRewardTime) {
            return;
        }

        if (pool.stakingTokenTotalAmount == 0) {
            pool.lastRewardTime = uint32(block.timestamp);
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardTime, block.timestamp);
        uint256 wbanReward = multiplier.mul(wbanPerSecond).mul(pool.allocPoint).div(totalAllocPoint);
        pool.accWBANPerShare = pool.accWBANPerShare.add(wbanReward.mul(1e12).div(pool.stakingTokenTotalAmount));
        pool.lastRewardTime = uint32(block.timestamp);
    }

    // Deposit staking tokens to Benis for wBAN rewards.
    function deposit(uint256 _pid, uint256 _amount) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending =
                user.amount.mul(pool.accWBANPerShare).div(1e12).sub(user.rewardDebt).add(user.remainingWBANReward);
            user.remainingWBANReward = safeRewardTransfer(msg.sender, pending);
        }
        pool.stakingToken.safeTransferFrom(address(msg.sender), address(this), _amount);
        user.amount = user.amount.add(_amount);
        pool.stakingTokenTotalAmount = pool.stakingTokenTotalAmount.add(_amount);
        user.rewardDebt = user.amount.mul(pool.accWBANPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw staked tokens from Benis.
    function withdraw(uint256 _pid, uint256 _amount) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, 'Benis: not enough LP');
        updatePool(_pid);
        uint256 pending =
            user.amount.mul(pool.accWBANPerShare).div(1e12).sub(user.rewardDebt).add(user.remainingWBANReward);
        user.remainingWBANReward = safeRewardTransfer(msg.sender, pending);
        user.amount = user.amount.sub(_amount);
        pool.stakingTokenTotalAmount = pool.stakingTokenTotalAmount.sub(_amount);
        user.rewardDebt = user.amount.mul(pool.accWBANPerShare).div(1e12);
        pool.stakingToken.safeTransfer(address(msg.sender), _amount);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 userAmount = user.amount;
        pool.stakingTokenTotalAmount = pool.stakingTokenTotalAmount.sub(userAmount);
        delete userInfo[_pid][msg.sender];
        pool.stakingToken.safeTransfer(address(msg.sender), userAmount);
        emit EmergencyWithdraw(msg.sender, _pid, userAmount);
    }

    // Safe wBAN transfer function. Just in case if the pool does not have enough wBAN token,
    // The function returns the amount which is owed to the user
    function safeRewardTransfer(address _to, uint256 _amount) internal returns (uint256) {
        uint256 wbanBalance = wban.balanceOf(address(this));
        if (wbanBalance == 0) {
            //save some gas fee
            return _amount;
        }
        if (_amount > wbanBalance) {
            //save some gas fee
            wban.safeTransfer(_to, wbanBalance);
            return _amount.sub(wbanBalance);
        }
        wban.safeTransfer(_to, _amount);
        return 0;
    }
}

File 2 of 7 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, 'SafeMath: addition overflow');

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, 'SafeMath: subtraction overflow');
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, 'SafeMath: multiplication overflow');

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, 'SafeMath: division by zero');
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, 'SafeMath: modulo by zero');
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }

    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 3 of 7 : IBEP20.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

interface IBEP20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the token decimals.
     */
    function decimals() external view returns (uint8);

    /**
     * @dev Returns the token symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the token name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address _owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 7 : SafeBEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import './IBEP20.sol';
import '../../math/SafeMath.sol';
import '../../utils/Address.sol';

/**
 * @title SafeBEP20
 * @dev Wrappers around BEP20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeBEP20 for IBEP20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeBEP20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(
        IBEP20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IBEP20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IBEP20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IBEP20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            'SafeBEP20: approve from non-zero to non-zero allowance'
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IBEP20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IBEP20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(
            value,
            'SafeBEP20: decreased allowance below zero'
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IBEP20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, 'SafeBEP20: low-level call failed');
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), 'SafeBEP20: BEP20 operation did not succeed');
        }
    }
}

File 5 of 7 : Ownable.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

import '../GSN/Context.sol';

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), 'Ownable: caller is not the owner');
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), 'Ownable: new owner is the zero address');
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 6 of 7 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, 'Address: insufficient balance');

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{value: amount}('');
        require(success, 'Address: unable to send value, recipient may have reverted');
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, 'Address: low-level call failed');
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, 'Address: low-level call with value failed');
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, 'Address: insufficient balance for call');
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), 'Address: call to non-contract');

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 7 : Context.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor() internal {}

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IBEP20","name":"_wban","type":"address"},{"internalType":"uint256","name":"_wbanPerSecond","type":"uint256"},{"internalType":"uint32","name":"_startTime","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint16","name":"_allocPoint","type":"uint16"},{"internalType":"contract IBEP20","name":"_stakingToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"addSeconds","type":"uint32"}],"name":"changeEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingWBAN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IBEP20","name":"stakingToken","type":"address"},{"internalType":"uint256","name":"stakingTokenTotalAmount","type":"uint256"},{"internalType":"uint256","name":"accWBANPerShare","type":"uint256"},{"internalType":"uint32","name":"lastRewardTime","type":"uint32"},{"internalType":"uint16","name":"allocPoint","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint16","name":"_allocPoint","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wbanPerSecond","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"setWBANPerSecond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"remainingWBANReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wban","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wbanPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052600060045534801561001557600080fd5b506040516119cc3803806119cc8339818101604052606081101561003857600080fd5b508051602082015160409092015190919060006100536100e5565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060609290921b6001600160601b03191660805260015560e081901b6001600160e01b03191660a0526005805463ffffffff90921663ffffffff199092169190911790556100e9565b3390565b60805160601c60a05160e01c61189261013a60003980610937528061096c528061099952806109db5280610bfb5280610c2852508061042a52806111d3528061128f52806112d552506118926000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806378e97925116100b857806398ec8da61161007c57806398ec8da614610347578063c31df7631461037f578063cf42947b14610387578063d1c1b4a8146103aa578063e2bbb158146103d9578063f2fde38b146103fc57610142565b806378e979251461029e5780638da5cb5b146102a65780638dbb1e3a146102ae57806391669615146102d157806393f1a40b146102fd57610142565b8063441a3e701161010a578063441a3e701461020a5780634678132a1461022f57806351eb05a6146102545780635312ea8e14610271578063630b5ba11461028e578063715018a61461029657610142565b8063081e3eda146101475780630ef0b250146101615780631526fe271461018557806317caf6f1146101e15780633197cbb6146101e9575b600080fd5b61014f610422565b60408051918252519081900360200190f35b610169610428565b604080516001600160a01b039092168252519081900360200190f35b6101a26004803603602081101561019b57600080fd5b503561044c565b604080516001600160a01b03909616865260208601949094528484019290925263ffffffff16606084015261ffff166080830152519081900360a00190f35b61014f6104a1565b6101f16104a7565b6040805163ffffffff9092168252519081900360200190f35b61022d6004803603604081101561022057600080fd5b50803590602001356104b3565b005b61022d6004803603604081101561024557600080fd5b5080359060200135151561062f565b61022d6004803603602081101561026a57600080fd5b503561069b565b61022d6004803603602081101561028757600080fd5b50356107a0565b61022d610870565b61022d610893565b6101f1610935565b610169610959565b61014f600480360360408110156102c457600080fd5b5080359060200135610968565b61014f600480360360408110156102e757600080fd5b50803590602001356001600160a01b0316610a3d565b6103296004803603604081101561031357600080fd5b50803590602001356001600160a01b0316610b65565b60408051938452602084019290925282820152519081900360600190f35b61022d6004803603606081101561035d57600080fd5b5061ffff813516906001600160a01b0360208201351690604001351515610b91565b61014f610da0565b61022d6004803603602081101561039d57600080fd5b503563ffffffff16610da6565b61022d600480360360608110156103c057600080fd5b5080359061ffff60208201351690604001351515610e1f565b61022d600480360360408110156103ef57600080fd5b5080359060200135610f09565b61022d6004803603602081101561041257600080fd5b50356001600160a01b031661102f565b60025490565b7f000000000000000000000000000000000000000000000000000000000000000081565b6002818154811061045957fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919063ffffffff811690640100000000900461ffff1685565b60045481565b60055463ffffffff1681565b6000600283815481106104c257fe5b600091825260208083208684526003825260408085203386529092529220805460049092029092019250831115610537576040805162461bcd60e51b8152602060048201526014602482015273042656e69733a206e6f7420656e6f756768204c560641b604482015290519081900360640190fd5b6105408461069b565b60006105888260020154610582846001015461057c64e8d4a510006105768960020154896000015461109090919063ffffffff16565b906110f0565b90611132565b90611174565b905061059433826111ce565b600283015581546105a59085611132565b825560018301546105b69085611132565b6001840155600283015482546105d69164e8d4a510009161057691611090565b600183015582546105f1906001600160a01b03163386611306565b604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b61063761135d565b6000546001600160a01b03908116911614610687576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b801561069557610695610870565b50600155565b6000600282815481106106aa57fe5b60009182526020909120600490910201600381015490915063ffffffff1642116106d4575061079d565b60018101546106f857600301805463ffffffff19164263ffffffff1617905561079d565b60038101546000906107109063ffffffff1642610968565b9050600061074f6004546105768560030160049054906101000a900461ffff1661ffff166107496001548761109090919063ffffffff16565b90611090565b905061077f610774846001015461057664e8d4a510008561109090919063ffffffff16565b600285015490611174565b60028401555050600301805463ffffffff19164263ffffffff161790555b50565b6000600282815481106107af57fe5b600091825260208083208584526003825260408085203386529092529220805460049290920290920160018101549093506107ea9082611132565b600184810191909155600085815260036020908152604080832033808552925282208281559283018290556002909201558354610833916001600160a01b039091169083611306565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b60025460005b8181101561088f576108878161069b565b600101610876565b5050565b61089b61135d565b6000546001600160a01b039081169116146108eb576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031690565b60007f000000000000000000000000000000000000000000000000000000000000000063ffffffff1683116109c3577f000000000000000000000000000000000000000000000000000000000000000063ffffffff166109c5565b825b60055490935063ffffffff16831180610a0357507f000000000000000000000000000000000000000000000000000000000000000063ffffffff1682105b15610a1057506000610a37565b60055463ffffffff16821115610a32575060055463ffffffff16829003610a37565b508181035b92915050565b60008060028481548110610a4d57fe5b60009182526020808320878452600380835260408086206001600160a01b038a168752909352919093206002600490930290930191820154908201549193509063ffffffff1642118015610aa45750600183015415155b15610b2b576003830154600090610ac19063ffffffff1642610968565b90506000610afa6004546105768760030160049054906101000a900461ffff1661ffff166107496001548761109090919063ffffffff16565b9050610b26610b1f866001015461057664e8d4a510008561109090919063ffffffff16565b8490611174565b925050505b610b5b8260020154610582846001015461057c64e8d4a5100061057687896000015461109090919063ffffffff16565b9695505050505050565b600360209081526000928352604080842090915290825290208054600182015460029092015490919083565b610b9961135d565b6000546001600160a01b03908116911614610be9576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b8015610bf757610bf7610870565b60007f000000000000000000000000000000000000000000000000000000000000000063ffffffff164211610c52577f000000000000000000000000000000000000000000000000000000000000000063ffffffff16610c54565b425b600454909150610c689061ffff8616611174565b60049081556040805160a0810182526001600160a01b03958616815260006020820181815292820181815263ffffffff9586166060840190815261ffff998a166080850190815260028054600181018255945293517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9390960292830180546001600160a01b031916969099169590951790975591517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf83015594517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad082015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad19091018054945163ffffffff19909516919092161765ffff000000001916640100000000939094169290920292909217905550565b60015481565b610dae61135d565b6000546001600160a01b03908116911614610dfe576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b6005805463ffffffff19811663ffffffff9182169390930116919091179055565b610e2761135d565b6000546001600160a01b03908116911614610e77576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b8015610e8557610e85610870565b610ec58261ffff1661058260028681548110610e9d57fe5b6000918252602090912060049182020160030154905490640100000000900461ffff16611132565b6004819055508160028481548110610ed957fe5b906000526020600020906004020160030160046101000a81548161ffff021916908361ffff160217905550505050565b600060028381548110610f1857fe5b60009182526020808320868452600382526040808520338652909252922060049091029091019150610f498461069b565b805415610f99576000610f868260020154610582846001015461057c64e8d4a510006105768960020154896000015461109090919063ffffffff16565b9050610f9233826111ce565b6002830155505b8154610fb0906001600160a01b0316333086611361565b8054610fbc9084611174565b81556001820154610fcd9084611174565b600183015560028201548154610fed9164e8d4a510009161057691611090565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b61103761135d565b6000546001600160a01b03908116911614611087576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b61079d816113c1565b60008261109f57506000610a37565b828202828482816110ac57fe5b04146110e95760405162461bcd60e51b815260040180806020018281038252602181526020018061181c6021913960400191505060405180910390fd5b9392505050565b60006110e983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611461565b60006110e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611503565b6000828201838110156110e9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561123e57600080fd5b505afa158015611252573d6000803e3d6000fd5b505050506040513d602081101561126857600080fd5b505190508061127a5782915050610a37565b808311156112c8576112b66001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168583611306565b6112c08382611132565b915050610a37565b6112fc6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585611306565b5060009392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261135890849061155d565b505050565b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526113bb90859061155d565b50505050565b6001600160a01b0381166114065760405162461bcd60e51b81526004018080602001828103825260268152602001806117f66026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081836114ed5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114b257818101518382015260200161149a565b50505050905090810190601f1680156114df5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816114f957fe5b0495945050505050565b600081848411156115555760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156114b257818101518382015260200161149a565b505050900390565b60606115b2826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661160e9092919063ffffffff16565b805190915015611358578080602001905160208110156115d157600080fd5b50516113585760405162461bcd60e51b815260040180806020018281038252602a8152602001806117cc602a913960400191505060405180910390fd5b606061161d8484600085611625565b949350505050565b606061163085611792565b611681576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106116c05780518252601f1990920191602091820191016116a1565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611722576040519150601f19603f3d011682016040523d82523d6000602084013e611727565b606091505b5091509150811561173b57915061161d9050565b80511561174b5780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156114b257818101518382015260200161149a565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061161d57505015159291505056fe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220548b57bc187acb3e3814655f1acd9b9c2c3b95497bf37314c4573d0c559021f664736f6c634300060c0033000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a0340000000000000000000000000000000000000000000000000496d6d44eb1dc00000000000000000000000000000000000000000000000000000000006137bb37

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101425760003560e01c806378e97925116100b857806398ec8da61161007c57806398ec8da614610347578063c31df7631461037f578063cf42947b14610387578063d1c1b4a8146103aa578063e2bbb158146103d9578063f2fde38b146103fc57610142565b806378e979251461029e5780638da5cb5b146102a65780638dbb1e3a146102ae57806391669615146102d157806393f1a40b146102fd57610142565b8063441a3e701161010a578063441a3e701461020a5780634678132a1461022f57806351eb05a6146102545780635312ea8e14610271578063630b5ba11461028e578063715018a61461029657610142565b8063081e3eda146101475780630ef0b250146101615780631526fe271461018557806317caf6f1146101e15780633197cbb6146101e9575b600080fd5b61014f610422565b60408051918252519081900360200190f35b610169610428565b604080516001600160a01b039092168252519081900360200190f35b6101a26004803603602081101561019b57600080fd5b503561044c565b604080516001600160a01b03909616865260208601949094528484019290925263ffffffff16606084015261ffff166080830152519081900360a00190f35b61014f6104a1565b6101f16104a7565b6040805163ffffffff9092168252519081900360200190f35b61022d6004803603604081101561022057600080fd5b50803590602001356104b3565b005b61022d6004803603604081101561024557600080fd5b5080359060200135151561062f565b61022d6004803603602081101561026a57600080fd5b503561069b565b61022d6004803603602081101561028757600080fd5b50356107a0565b61022d610870565b61022d610893565b6101f1610935565b610169610959565b61014f600480360360408110156102c457600080fd5b5080359060200135610968565b61014f600480360360408110156102e757600080fd5b50803590602001356001600160a01b0316610a3d565b6103296004803603604081101561031357600080fd5b50803590602001356001600160a01b0316610b65565b60408051938452602084019290925282820152519081900360600190f35b61022d6004803603606081101561035d57600080fd5b5061ffff813516906001600160a01b0360208201351690604001351515610b91565b61014f610da0565b61022d6004803603602081101561039d57600080fd5b503563ffffffff16610da6565b61022d600480360360608110156103c057600080fd5b5080359061ffff60208201351690604001351515610e1f565b61022d600480360360408110156103ef57600080fd5b5080359060200135610f09565b61022d6004803603602081101561041257600080fd5b50356001600160a01b031661102f565b60025490565b7f000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a03481565b6002818154811061045957fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919063ffffffff811690640100000000900461ffff1685565b60045481565b60055463ffffffff1681565b6000600283815481106104c257fe5b600091825260208083208684526003825260408085203386529092529220805460049092029092019250831115610537576040805162461bcd60e51b8152602060048201526014602482015273042656e69733a206e6f7420656e6f756768204c560641b604482015290519081900360640190fd5b6105408461069b565b60006105888260020154610582846001015461057c64e8d4a510006105768960020154896000015461109090919063ffffffff16565b906110f0565b90611132565b90611174565b905061059433826111ce565b600283015581546105a59085611132565b825560018301546105b69085611132565b6001840155600283015482546105d69164e8d4a510009161057691611090565b600183015582546105f1906001600160a01b03163386611306565b604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b61063761135d565b6000546001600160a01b03908116911614610687576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b801561069557610695610870565b50600155565b6000600282815481106106aa57fe5b60009182526020909120600490910201600381015490915063ffffffff1642116106d4575061079d565b60018101546106f857600301805463ffffffff19164263ffffffff1617905561079d565b60038101546000906107109063ffffffff1642610968565b9050600061074f6004546105768560030160049054906101000a900461ffff1661ffff166107496001548761109090919063ffffffff16565b90611090565b905061077f610774846001015461057664e8d4a510008561109090919063ffffffff16565b600285015490611174565b60028401555050600301805463ffffffff19164263ffffffff161790555b50565b6000600282815481106107af57fe5b600091825260208083208584526003825260408085203386529092529220805460049290920290920160018101549093506107ea9082611132565b600184810191909155600085815260036020908152604080832033808552925282208281559283018290556002909201558354610833916001600160a01b039091169083611306565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b60025460005b8181101561088f576108878161069b565b600101610876565b5050565b61089b61135d565b6000546001600160a01b039081169116146108eb576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b7f000000000000000000000000000000000000000000000000000000006137bb3781565b6000546001600160a01b031690565b60007f000000000000000000000000000000000000000000000000000000006137bb3763ffffffff1683116109c3577f000000000000000000000000000000000000000000000000000000006137bb3763ffffffff166109c5565b825b60055490935063ffffffff16831180610a0357507f000000000000000000000000000000000000000000000000000000006137bb3763ffffffff1682105b15610a1057506000610a37565b60055463ffffffff16821115610a32575060055463ffffffff16829003610a37565b508181035b92915050565b60008060028481548110610a4d57fe5b60009182526020808320878452600380835260408086206001600160a01b038a168752909352919093206002600490930290930191820154908201549193509063ffffffff1642118015610aa45750600183015415155b15610b2b576003830154600090610ac19063ffffffff1642610968565b90506000610afa6004546105768760030160049054906101000a900461ffff1661ffff166107496001548761109090919063ffffffff16565b9050610b26610b1f866001015461057664e8d4a510008561109090919063ffffffff16565b8490611174565b925050505b610b5b8260020154610582846001015461057c64e8d4a5100061057687896000015461109090919063ffffffff16565b9695505050505050565b600360209081526000928352604080842090915290825290208054600182015460029092015490919083565b610b9961135d565b6000546001600160a01b03908116911614610be9576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b8015610bf757610bf7610870565b60007f000000000000000000000000000000000000000000000000000000006137bb3763ffffffff164211610c52577f000000000000000000000000000000000000000000000000000000006137bb3763ffffffff16610c54565b425b600454909150610c689061ffff8616611174565b60049081556040805160a0810182526001600160a01b03958616815260006020820181815292820181815263ffffffff9586166060840190815261ffff998a166080850190815260028054600181018255945293517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9390960292830180546001600160a01b031916969099169590951790975591517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf83015594517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad082015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad19091018054945163ffffffff19909516919092161765ffff000000001916640100000000939094169290920292909217905550565b60015481565b610dae61135d565b6000546001600160a01b03908116911614610dfe576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b6005805463ffffffff19811663ffffffff9182169390930116919091179055565b610e2761135d565b6000546001600160a01b03908116911614610e77576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b8015610e8557610e85610870565b610ec58261ffff1661058260028681548110610e9d57fe5b6000918252602090912060049182020160030154905490640100000000900461ffff16611132565b6004819055508160028481548110610ed957fe5b906000526020600020906004020160030160046101000a81548161ffff021916908361ffff160217905550505050565b600060028381548110610f1857fe5b60009182526020808320868452600382526040808520338652909252922060049091029091019150610f498461069b565b805415610f99576000610f868260020154610582846001015461057c64e8d4a510006105768960020154896000015461109090919063ffffffff16565b9050610f9233826111ce565b6002830155505b8154610fb0906001600160a01b0316333086611361565b8054610fbc9084611174565b81556001820154610fcd9084611174565b600183015560028201548154610fed9164e8d4a510009161057691611090565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b61103761135d565b6000546001600160a01b03908116911614611087576040805162461bcd60e51b8152602060048201819052602482015260008051602061183d833981519152604482015290519081900360640190fd5b61079d816113c1565b60008261109f57506000610a37565b828202828482816110ac57fe5b04146110e95760405162461bcd60e51b815260040180806020018281038252602181526020018061181c6021913960400191505060405180910390fd5b9392505050565b60006110e983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611461565b60006110e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611503565b6000828201838110156110e9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000807f000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a0346001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561123e57600080fd5b505afa158015611252573d6000803e3d6000fd5b505050506040513d602081101561126857600080fd5b505190508061127a5782915050610a37565b808311156112c8576112b66001600160a01b037f000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a034168583611306565b6112c08382611132565b915050610a37565b6112fc6001600160a01b037f000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a034168585611306565b5060009392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261135890849061155d565b505050565b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526113bb90859061155d565b50505050565b6001600160a01b0381166114065760405162461bcd60e51b81526004018080602001828103825260268152602001806117f66026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081836114ed5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114b257818101518382015260200161149a565b50505050905090810190601f1680156114df5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816114f957fe5b0495945050505050565b600081848411156115555760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156114b257818101518382015260200161149a565b505050900390565b60606115b2826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661160e9092919063ffffffff16565b805190915015611358578080602001905160208110156115d157600080fd5b50516113585760405162461bcd60e51b815260040180806020018281038252602a8152602001806117cc602a913960400191505060405180910390fd5b606061161d8484600085611625565b949350505050565b606061163085611792565b611681576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106116c05780518252601f1990920191602091820191016116a1565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611722576040519150601f19603f3d011682016040523d82523d6000602084013e611727565b606091505b5091509150811561173b57915061161d9050565b80511561174b5780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156114b257818101518382015260200161149a565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061161d57505015159291505056fe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220548b57bc187acb3e3814655f1acd9b9c2c3b95497bf37314c4573d0c559021f664736f6c634300060c0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a0340000000000000000000000000000000000000000000000000496d6d44eb1dc00000000000000000000000000000000000000000000000000000000006137bb37

-----Decoded View---------------
Arg [0] : _wban (address): 0xe20B9e246db5a0d21BF9209E4858Bc9A3ff7A034
Arg [1] : _wbanPerSecond (uint256): 330687830000000000
Arg [2] : _startTime (uint32): 1631042359

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a034
Arg [1] : 0000000000000000000000000000000000000000000000000496d6d44eb1dc00
Arg [2] : 000000000000000000000000000000000000000000000000000000006137bb37


Loading...
Loading
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.