Contract 0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d

Txn Hash
Block
From
To
Value [Txn Fee]
0x7479d1dcb98fbb8e8416177d2abae6d87100f866558d38b1c9fb79742ff4ae7a57147702021-06-18 17:40:3817 mins ago0xf7cd1406c23a340401a13f29b2df0a1b46e9ea47 IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000072343
0xed94c122e1482c3af23c32ecb4b25d82b6746d54cccd3708d83da52538e6956057141912021-06-18 17:11:4146 mins ago0x65dadfa4ce0f50384bb1212f288ddbf80104954d IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000083143
0x6da05ee2eeca5418549c871aeaae1e94b8a45db35be6b3bc9e1dfad2f99b08de57139102021-06-18 16:57:381 hr ago0x78e9485e4b1e6dc60e49426f11ab375e8acbb37b IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000083143
0x85793d65b05d28c9c0afb7a5bf2aac127ac1570b06728d7147ec5721a6dcf2c257137612021-06-18 16:50:111 hr 8 mins ago0xe00e04700cc508df96a389b884f1d29b9e0dde8a IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000115293
0xa11a970affc11460a4d7fd08829e562fcf66a9cf93332a22e30121db6ea7b9a057136922021-06-18 16:46:441 hr 11 mins ago0xe00e04700cc508df96a389b884f1d29b9e0dde8a IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000072343
0x29ba3a0723539c48e4dc5399777cfb13863df2df261a9c977157252399012c0f57136372021-06-18 16:43:591 hr 14 mins ago0xf07bc921d549dd9fa47013b6e7433695f2b8263d IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000115305
0x7cbf9bb9fc16c23ac720ee16aa2efd15431d08908889cccb067b79bfd45642bb57136082021-06-18 16:42:321 hr 15 mins ago0x4a3ebf290c7d983e1d9cda0437c39b61073cd392 IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000072343
0xe693bc1087a68485c01503a9f2a7996b5136660fe9ae2be74764b564029b712a57135752021-06-18 16:40:531 hr 17 mins ago0xf07bc921d549dd9fa47013b6e7433695f2b8263d IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000072343
0x55c41f15d270e840105fb4c25bd5d98b6962021c0288cd77fcf4fac54904bc3657133672021-06-18 16:30:291 hr 28 mins ago0x226d298b91bcc4fc58120afb98dcd27505c6485f IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000072343
0x25be2c847360d48f572bf5cbcc1b3f864d3400ccf014e0eafe276134693a953d57133442021-06-18 16:29:201 hr 29 mins ago0x226d298b91bcc4fc58120afb98dcd27505c6485f IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.00100305
0xb7fa29992bcd00cdffceaa3ee3dc06b049bacfd8d30914edd6f1976fbfd6bb2e57132702021-06-18 16:25:381 hr 32 mins ago0x745d46eb3983a7b80a8a54cc2d73b382daf8785f IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000072343
0x36ca575dc20e5c497d3a5d75363155e9b2515541175275cfb2b3a8d745f04af657130562021-06-18 16:14:561 hr 43 mins ago0x6ef50b0970602105fb106fa9a9bbb3d3f7477d99 IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000115305
0x8632c5e8ab68cab7e001528958d6868991f0755ae22006c1e4d7901d9655eafc57129932021-06-18 16:11:471 hr 46 mins ago0x4fa5bb116d34bccb0ff17eeda9db9cbd18081f7c IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000083143
0x80990c98cf10cd718701847e7e22dca25b4d2f50a14f5e81e71b6578431d5a7757129902021-06-18 16:11:381 hr 46 mins ago0x6ef50b0970602105fb106fa9a9bbb3d3f7477d99 IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000087343
0x25fdb60ae8261207d12b8792cf6135e96c0be77030e1f6682515823fa6c0908b57126212021-06-18 15:53:112 hrs 5 mins ago0x90c875851bb0d2149cd4bb1a731c826de426c59c IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000083143
0xc8eb806127276071ca517fd842d585c5b9b0f6d235105ca3874b1b1eb68b04da57125072021-06-18 15:47:292 hrs 11 mins ago0xf459d33e47c5a45272bca33540ae72b7e8c8129d IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000070385
0xb637bc62f34004f6a000e380a3f3f765cef19c6e2f92de7908e85496dc820b4457125062021-06-18 15:47:262 hrs 11 mins ago0xf459d33e47c5a45272bca33540ae72b7e8c8129d IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000083143
0x5fdbdb2d5d395f889229e70ac51e959ee6070692c06379ed5bfa7368d568eebc57125022021-06-18 15:47:142 hrs 11 mins ago0x61db9b1f9a7d6cd4a958088b362068778eea18a6 IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000072343
0xd21b54b40e1e683d448e7db07ec21bf765a5d105d746ac4ed9a96b3e5e4fcfdd57123812021-06-18 15:41:112 hrs 17 mins ago0x12c7c4a2e142f7ed3f384189bd614081e8a7eec1 IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000083143
0x976d5c935fc3f4739cb48187bbe206591797a11005de895389ec88f085b5e4e757115732021-06-18 15:00:472 hrs 57 mins ago0x4399ba50620063e91bfd344b2619351bcaea7bd2 IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000083143
0x7f024a74c614a0018985101245637742ee99a78b6e5bc9726a83b21d8209d0e657113742021-06-18 14:50:503 hrs 7 mins ago0x226d298b91bcc4fc58120afb98dcd27505c6485f IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.00115293
0x326d857bc0f728af1338703290b6e23c7ed4b7ea9b98469a09fc9e19b878d56957109642021-06-18 14:30:203 hrs 28 mins ago0x817ddeea7e95756454bf1eadb3f8400a560f119e IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.00115293
0x9b210cd275dd248a85077299b0c3e9b63531fcdff329c95a1f55a88cb4bbc04e57109332021-06-18 14:28:473 hrs 29 mins ago0x817ddeea7e95756454bf1eadb3f8400a560f119e IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000087343
0x6b2f7d923d038b66b81874bb270d3861e7d2fc7db0e86b60f53e0ee66618404857108752021-06-18 14:25:533 hrs 32 mins ago0x4f43a312cdcdfb8c85d12bb7729e6c8ff8a438d7 IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000098143
0x0cee04783da55f0d897fb0a0f9c64833b842632d81a2be805f86815c3e588da357108102021-06-18 14:22:383 hrs 35 mins ago0xe7b24557aaed488c9ac6fad6fc1a2f4255d5deeb IN  0xc2e386d745ddfd2177cdd08ea92f16ae0b9f5b6d0 HT0.000083143
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingPool

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at hecoinfo.com on 2021-05-11
*/

/**
 *Submitted for verification at hecoinfo.com on 2021-03-22
*/

// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

/**
 * @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 {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor(address theOwner) public {
        _owner = theOwner;
    }

    /**
     * @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 == msg.sender, "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 virtual 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 virtual onlyOwner {
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) internal {
        require(
            newOwner != address(0),
            "Ownable: new owner is the zero address"
        );
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + (((a % 2) + (b % 2)) / 2);
    }
}

/**
 * @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;
    }
}

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @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
    );
}

/**
 * @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) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @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"
        );
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) =
            target.call{value: value}(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data)
        internal
        view
        returns (bytes memory)
    {
        return
            functionStaticCall(
                target,
                data,
                "Address: low-level static call failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        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);
            }
        }
    }
}

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 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 SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

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

    function safeTransferFrom(
        IERC20 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
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 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),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.approve.selector, spender, value)
        );
    }

    function safeIncreaseAllowance(
        IERC20 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(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance =
            token.allowance(address(this), spender).sub(
                value,
                "SafeERC20: 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(IERC20 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,
                "SafeERC20: low-level call failed"
            );
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(
                abi.decode(returndata, (bool)),
                "SafeERC20: ERC20 operation did not succeed"
            );
        }
    }
}

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

contract StakingPool is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    /* ========== STATE VARIABLES ========== */
    IERC20 public rewardsToken;
    IERC20 public stakingToken;
    uint256 public periodFinish;
    uint256 public rewardRate;
    uint256 public rewardsDuration;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;

    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public userRewardWithdraw;
    mapping(address => uint256) public rewards;

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

    /* ========== CONSTRUCTOR ========== */

    constructor(
        address newOwner,
        address _stakingToken,
        address _rewardsToken
    ) public Ownable(newOwner) {
        stakingToken = IERC20(_stakingToken);
        rewardsToken = IERC20(_rewardsToken);
    }

    /* ========== VIEWS ========== */

    function totalSupply() external view returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) external view returns (uint256) {
        return _balances[account];
    }

    function lastTimeRewardApplicable() public view returns (uint256) {
        return Math.min(block.timestamp, periodFinish);
    }

    function rewardPerToken() public view returns (uint256) {
        if (_totalSupply == 0) {
            return rewardPerTokenStored;
        }
        return
            rewardPerTokenStored.add(
                lastTimeRewardApplicable()
                    .sub(lastUpdateTime)
                    .mul(rewardRate)
                    .mul(1e18)
                    .div(_totalSupply)
            );
    }

    function earned(address account) public view returns (uint256) {
        return
            _balances[account]
                .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
                .div(1e18)
                .add(rewards[account]);
    }

    function getRewardForDuration() external view returns (uint256) {
        return rewardRate.mul(rewardsDuration);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function stake(uint256 amount)
        external
        nonReentrant
        updateReward(msg.sender)
    {
        require(amount > 0, "Cannot stake 0");
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        emit Staked(msg.sender, amount);
    }

    function withdraw(uint256 amount)
        public
        nonReentrant
        updateReward(msg.sender)
    {
        require(amount > 0, "Cannot withdraw 0");
        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = _balances[msg.sender].sub(amount);
        stakingToken.safeTransfer(msg.sender, amount);
        emit Withdrawn(msg.sender, amount);
    }

    function getReward() public nonReentrant updateReward(msg.sender) {
        uint256 reward = rewards[msg.sender];
        if (reward > 0) {
            rewards[msg.sender] = 0;
            userRewardWithdraw[msg.sender] = userRewardWithdraw[msg.sender].add(
                reward
            );
            rewardsToken.safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    function exit() external {
        withdraw(_balances[msg.sender]);
        getReward();
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function setupPool(uint256 reward, uint256 duration)
        external
        onlyOwner
        updateReward(address(0))
    {
        if (block.timestamp >= periodFinish) {
            rewardRate = reward.div(duration);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardRate = reward.add(leftover).div(duration);
        }

        // Ensure the provided reward amount is not more than the balance in the contract.
        // This keeps the reward rate in the right range, preventing overflows due to
        // very high values of rewardRate in the earned and rewardsPerToken functions;
        // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
        uint256 balance = rewardsToken.balanceOf(address(this));
        require(
            rewardRate <= balance.div(duration),
            "Provided reward too high"
        );

        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(duration);
        rewardsDuration = duration;
        emit RewardAdded(reward, duration);
    }

    /* ========== MODIFIERS ========== */

    modifier updateReward(address account) {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (account != address(0)) {
            rewards[account] = earned(account);
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

    /* ========== EVENTS ========== */

    event RewardAdded(uint256 reward, uint256 duration);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"setupPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060405161147d38038061147d8339818101604052606081101561003357600080fd5b5080516020820151604090920151600080546001600160a01b039384166001600160a01b0319918216179091556001805560038054948416948216949094179093556002805492909116919092161790556113ea806100936000396000f3fe608060405234801561001057600080fd5b50600436106101575760003560e01c806380faa57d116100c3578063cd3daf9d1161007c578063cd3daf9d146102f7578063d1af0c7d146102ff578063df136d6514610307578063e9fad8ee1461030f578063ebe2b12b14610317578063f2fde38b1461031f57610157565b806380faa57d146102765780638b6486bb1461027e5780638b876347146102a45780638da5cb5b146102ca578063a694fc3a146102d2578063c8f33c91146102ef57610157565b8063386a952511610115578063386a95251461020c5780633d18b9121461021457806370a082311461021c578063715018a61461024257806372f702f31461024a5780637b0a47ee1461026e57610157565b80628cc2621461015c5780630700037d146101945780630c4df93a146101ba57806318160ddd146101df5780631c1f78eb146101e75780632e1a7d4d146101ef575b600080fd5b6101826004803603602081101561017257600080fd5b50356001600160a01b0316610345565b60408051918252519081900360200190f35b610182600480360360208110156101aa57600080fd5b50356001600160a01b03166103c3565b6101dd600480360360408110156101d057600080fd5b50803590602001356103d5565b005b61018261061c565b610182610623565b6101dd6004803603602081101561020557600080fd5b5035610641565b6101826107d6565b6101dd6107dc565b6101826004803603602081101561023257600080fd5b50356001600160a01b031661093c565b6101dd610957565b610252610a00565b604080516001600160a01b039092168252519081900360200190f35b610182610a0f565b610182610a15565b6101826004803603602081101561029457600080fd5b50356001600160a01b0316610a23565b610182600480360360208110156102ba57600080fd5b50356001600160a01b0316610a35565b610252610a47565b6101dd600480360360208110156102e857600080fd5b5035610a56565b610182610be9565b610182610bef565b610252610c3d565b610182610c4c565b6101dd610c52565b610182610c75565b6101dd6004803603602081101561033557600080fd5b50356001600160a01b0316610c7b565b6001600160a01b0381166000908152600b602090815260408083205460099092528220546103bd91906103b790670de0b6b3a7640000906103b1906103929061038c610bef565b90610ce6565b6001600160a01b0388166000908152600d602052604090205490610d2f565b90610d88565b90610dca565b92915050565b600b6020526000908152604090205481565b6000546001600160a01b03163314610434576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600061043e610bef565b600855610449610a15565b6007556001600160a01b038116156104905761046481610345565b6001600160a01b0382166000908152600b60209081526040808320939093556008546009909152919020555b60045442106104ab576104a38383610d88565b6005556104ea565b6004546000906104bb9042610ce6565b905060006104d460055483610d2f90919063ffffffff16565b90506104e4846103b18784610dca565b60055550505b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561053557600080fd5b505afa158015610549573d6000803e3d6000fd5b505050506040513d602081101561055f57600080fd5b5051905061056d8184610d88565b60055411156105c3576040805162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b4260078190556105d39084610dca565b6004556006839055604080518581526020810185905281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a150505050565b600c545b90565b600061063c600654600554610d2f90919063ffffffff16565b905090565b60026001541415610699576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155336106a7610bef565b6008556106b2610a15565b6007556001600160a01b038116156106f9576106cd81610345565b6001600160a01b0382166000908152600b60209081526040808320939093556008546009909152919020555b60008211610742576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600c5461074f9083610ce6565b600c55336000908152600d602052604090205461076c9083610ce6565b336000818152600d6020526040902091909155600354610798916001600160a01b039091169084610e24565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505060018055565b60065481565b60026001541415610834576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015533610842610bef565b60085561084d610a15565b6007556001600160a01b038116156108945761086881610345565b6001600160a01b0382166000908152600b60209081526040808320939093556008546009909152919020555b336000908152600b6020526040902054801561093457336000908152600b60209081526040808320839055600a9091529020546108d19082610dca565b336000818152600a60205260409020919091556002546108fd916001600160a01b039091169083610e24565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505060018055565b6001600160a01b03166000908152600d602052604090205490565b6000546001600160a01b031633146109b6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6003546001600160a01b031681565b60055481565b600061063c42600454610e7b565b600a6020526000908152604090205481565b60096020526000908152604090205481565b6000546001600160a01b031690565b60026001541415610aae576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015533610abc610bef565b600855610ac7610a15565b6007556001600160a01b03811615610b0e57610ae281610345565b6001600160a01b0382166000908152600b60209081526040808320939093556008546009909152919020555b60008211610b54576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600c54610b619083610dca565b600c55336000908152600d6020526040902054610b7e9083610dca565b336000818152600d6020526040902091909155600354610bab916001600160a01b03909116903085610e91565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505060018055565b60075481565b6000600c5460001415610c055750600854610620565b61063c610c34600c546103b1670de0b6b3a7640000610c2e600554610c2e60075461038c610a15565b90610d2f565b60085490610dca565b6002546001600160a01b031681565b60085481565b336000908152600d6020526040902054610c6b90610641565b610c736107dc565b565b60045481565b6000546001600160a01b03163314610cda576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610ce381610ef1565b50565b6000610d2883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f91565b9392505050565b600082610d3e575060006103bd565b82820282848281610d4b57fe5b0414610d285760405162461bcd60e51b815260040180806020018281038252602181526020018061136a6021913960400191505060405180910390fd5b6000610d2883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611028565b600082820183811015610d28576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610e7690849061108d565b505050565b6000818310610e8a5781610d28565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610eeb90859061108d565b50505050565b6001600160a01b038116610f365760405162461bcd60e51b815260040180806020018281038252602681526020018061131e6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081848411156110205760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610fe5578181015183820152602001610fcd565b50505050905090810190601f1680156110125780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836110775760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610fe5578181015183820152602001610fcd565b50600083858161108357fe5b0495945050505050565b60606110e2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661113e9092919063ffffffff16565b805190915015610e765780806020019051602081101561110157600080fd5b5051610e765760405162461bcd60e51b815260040180806020018281038252602a81526020018061138b602a913960400191505060405180910390fd5b606061114d8484600085611155565b949350505050565b6060824710156111965760405162461bcd60e51b81526004018080602001828103825260268152602001806113446026913960400191505060405180910390fd5b61119f856112b1565b6111f0576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061122f5780518252601f199092019160209182019101611210565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611291576040519150601f19603f3d011682016040523d82523d6000602084013e611296565b606091505b50915091506112a68282866112b7565b979650505050505050565b3b151590565b606083156112c6575081610d28565b8251156112d65782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315610fe5578181015183820152602001610fcd56fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220529e8f63da51770d860be9ef495d1b0c5ff95ee60bee5c5e5da0a6563c9f989a64736f6c634300060c0033000000000000000000000000ea144b492980ee619f5413672fdac2d14aee926b00000000000000000000000043fb1b8c6347023f4779d2e817f249aff71e0ecb00000000000000000000000080c66d460e2bb9d31a8de54b4016fca986d0811f

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

000000000000000000000000ea144b492980ee619f5413672fdac2d14aee926b00000000000000000000000043fb1b8c6347023f4779d2e817f249aff71e0ecb00000000000000000000000080c66d460e2bb9d31a8de54b4016fca986d0811f

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000ea144b492980ee619f5413672fdac2d14aee926b
Arg [1] : 00000000000000000000000043fb1b8c6347023f4779d2e817f249aff71e0ecb
Arg [2] : 00000000000000000000000080c66d460e2bb9d31a8de54b4016fca986d0811f


Deployed ByteCode Sourcemap

25826:5500:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27631:265;;;;;;;;;;;;;;;;-1:-1:-1;27631:265:0;-1:-1:-1;;;;;27631:265:0;;:::i;:::-;;;;;;;;;;;;;;;;26372:42;;;;;;;;;;;;;;;;-1:-1:-1;26372:42:0;-1:-1:-1;;;;;26372:42:0;;:::i;29491:1169::-;;;;;;;;;;;;;;;;-1:-1:-1;29491:1169:0;;;;;;;:::i;:::-;;26845:93;;;:::i;27904:121::-;;;:::i;28496:389::-;;;;;;;;;;;;;;;;-1:-1:-1;28496:389:0;;:::i;26131:30::-;;;:::i;28893:429::-;;;:::i;26946:112::-;;;;;;;;;;;;;;;;-1:-1:-1;26946:112:0;-1:-1:-1;;;;;26946:112:0;;:::i;1703:148::-;;;:::i;26032:26::-;;;:::i;:::-;;;;-1:-1:-1;;;;;26032:26:0;;;;;;;;;;;;;;26099:25;;;:::i;27066:131::-;;;:::i;26312:53::-;;;;;;;;;;;;;;;;-1:-1:-1;26312:53:0;-1:-1:-1;;;;;26312:53:0;;:::i;26248:57::-;;;;;;;;;;;;;;;;-1:-1:-1;26248:57:0;-1:-1:-1;;;;;26248:57:0;;:::i;1063:79::-;;;:::i;28087:401::-;;;;;;;;;;;;;;;;-1:-1:-1;28087:401:0;;:::i;26168:29::-;;;:::i;27205:418::-;;;:::i;25999:26::-;;;:::i;26204:35::-;;;:::i;29330:97::-;;;:::i;26065:27::-;;;:::i;2006:108::-;;;;;;;;;;;;;;;;-1:-1:-1;2006:108:0;-1:-1:-1;;;;;2006:108:0;;:::i;27631:265::-;-1:-1:-1;;;;;27871:16:0;;27685:7;27871:16;;;:7;:16;;;;;;;;;27787:22;:31;;;;;;27725:163;;27871:16;27725:123;;27843:4;;27725:95;;27766:53;;:16;:14;:16::i;:::-;:20;;:53::i;:::-;-1:-1:-1;;;;;27725:18:0;;;;;;:9;:18;;;;;;;:40;:95::i;:::-;:117;;:123::i;:::-;:145;;:163::i;:::-;27705:183;27631:265;-1:-1:-1;;27631:265:0:o;26372:42::-;;;;;;;;;;;;;:::o;29491:1169::-;1275:6;;-1:-1:-1;;;;;1275:6:0;1285:10;1275:20;1267:65;;;;;-1:-1:-1;;;1267:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29611:1:::1;30786:16;:14;:16::i;:::-;30763:20;:39:::0;30830:26:::1;:24;:26::i;:::-;30813:14;:43:::0;-1:-1:-1;;;;;30871:21:0;::::1;::::0;30867:157:::1;;30928:15;30935:7;30928:6;:15::i;:::-;-1:-1:-1::0;;;;;30909:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;30992:20:::1;::::0;30958:22:::1;:31:::0;;;;;;:54;30867:157:::1;29654:12:::2;;29635:15;:31;29631:304;;29696:20;:6:::0;29707:8;29696:10:::2;:20::i;:::-;29683:10;:33:::0;29631:304:::2;;;29769:12;::::0;29749:17:::2;::::0;29769:33:::2;::::0;29786:15:::2;29769:16;:33::i;:::-;29749:53;;29817:16;29836:25;29850:10;;29836:9;:13;;:25;;;;:::i;:::-;29817:44:::0;-1:-1:-1;29889:34:0::2;29914:8:::0;29889:20:::2;:6:::0;29817:44;29889:10:::2;:20::i;:34::-;29876:10;:47:::0;-1:-1:-1;;29631:304:0::2;30313:12;::::0;:37:::2;::::0;;-1:-1:-1;;;30313:37:0;;30344:4:::2;30313:37;::::0;::::2;::::0;;;30295:15:::2;::::0;-1:-1:-1;;;;;30313:12:0::2;::::0;:22:::2;::::0;:37;;;;;::::2;::::0;;;;;;;;:12;:37;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;30313:37:0;;-1:-1:-1;30397:21:0::2;30313:37:::0;30409:8;30397:11:::2;:21::i;:::-;30383:10;;:35;;30361:109;;;::::0;;-1:-1:-1;;;30361:109:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;::::2;::::0;;;;;;;;;;;;;::::2;;30500:15;30483:14;:32:::0;;;30541:29:::2;::::0;30561:8;30541:19:::2;:29::i;:::-;30526:12;:44:::0;30581:15:::2;:26:::0;;;30623:29:::2;::::0;;;;;::::2;::::0;::::2;::::0;;;;;::::2;::::0;;;;;;;;;::::2;31034:1;1343::::1;29491:1169:::0;;:::o;26845:93::-;26918:12;;26845:93;;:::o;27904:121::-;27959:7;27986:31;28001:15;;27986:10;;:14;;:31;;;;:::i;:::-;27979:38;;27904:121;:::o;28496:389::-;24872:1;25477:7;;:19;;25469:63;;;;;-1:-1:-1;;;25469:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;24872:1;25610:7;:18;28590:10:::1;30786:16;:14;:16::i;:::-;30763:20;:39:::0;30830:26:::1;:24;:26::i;:::-;30813:14;:43:::0;-1:-1:-1;;;;;30871:21:0;::::1;::::0;30867:157:::1;;30928:15;30935:7;30928:6;:15::i;:::-;-1:-1:-1::0;;;;;30909:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;30992:20:::1;::::0;30958:22:::1;:31:::0;;;;;;:54;30867:157:::1;28635:1:::2;28626:6;:10;28618:40;;;::::0;;-1:-1:-1;;;28618:40:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;28618:40:0;;;;;;;;;;;;;::::2;;28684:12;::::0;:24:::2;::::0;28701:6;28684:16:::2;:24::i;:::-;28669:12;:39:::0;28753:10:::2;28743:21;::::0;;;:9:::2;:21;::::0;;;;;:33:::2;::::0;28769:6;28743:25:::2;:33::i;:::-;28729:10;28719:21;::::0;;;:9:::2;:21;::::0;;;;:57;;;;28787:12:::2;::::0;:45:::2;::::0;-1:-1:-1;;;;;28787:12:0;;::::2;::::0;28825:6;28787:25:::2;:45::i;:::-;28848:29;::::0;;;;;;;28858:10:::2;::::0;28848:29:::2;::::0;;;;;::::2;::::0;;::::2;-1:-1:-1::0;;24828:1:0;25789:22;;28496:389::o;26131:30::-;;;;:::o;28893:429::-;24872:1;25477:7;;:19;;25469:63;;;;;-1:-1:-1;;;25469:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;24872:1;25610:7;:18;28947:10:::1;30786:16;:14;:16::i;:::-;30763:20;:39:::0;30830:26:::1;:24;:26::i;:::-;30813:14;:43:::0;-1:-1:-1;;;;;30871:21:0;::::1;::::0;30867:157:::1;;30928:15;30935:7;30928:6;:15::i;:::-;-1:-1:-1::0;;;;;30909:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;30992:20:::1;::::0;30958:22:::1;:31:::0;;;;;;:54;30867:157:::1;28995:10:::2;28970:14;28987:19:::0;;;:7:::2;:19;::::0;;;;;29021:10;;29017:298:::2;;29056:10;29070:1;29048:19:::0;;;:7:::2;:19;::::0;;;;;;;:23;;;29119:18:::2;:30:::0;;;;;;:74:::2;::::0;29172:6;29119:34:::2;:74::i;:::-;29105:10;29086:30;::::0;;;:18:::2;:30;::::0;;;;:107;;;;29208:12:::2;::::0;:45:::2;::::0;-1:-1:-1;;;;;29208:12:0;;::::2;::::0;29246:6;29208:25:::2;:45::i;:::-;29273:30;::::0;;;;;;;29284:10:::2;::::0;29273:30:::2;::::0;;;;;::::2;::::0;;::::2;29017:298;-1:-1:-1::0;;24828:1:0;25789:22;;28893:429::o;26946:112::-;-1:-1:-1;;;;;27032:18:0;27005:7;27032:18;;;:9;:18;;;;;;;26946:112::o;1703:148::-;1275:6;;-1:-1:-1;;;;;1275:6:0;1285:10;1275:20;1267:65;;;;;-1:-1:-1;;;1267:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1810:1:::1;1794:6:::0;;1773:40:::1;::::0;-1:-1:-1;;;;;1794:6:0;;::::1;::::0;1773:40:::1;::::0;1810:1;;1773:40:::1;1841:1;1824:19:::0;;-1:-1:-1;;;;;;1824:19:0::1;::::0;;1703:148::o;26032:26::-;;;-1:-1:-1;;;;;26032:26:0;;:::o;26099:25::-;;;;:::o;27066:131::-;27123:7;27150:39;27159:15;27176:12;;27150:8;:39::i;26312:53::-;;;;;;;;;;;;;:::o;26248:57::-;;;;;;;;;;;;;:::o;1063:79::-;1101:7;1128:6;-1:-1:-1;;;;;1128:6:0;1063:79;:::o;28087:401::-;24872:1;25477:7;;:19;;25469:63;;;;;-1:-1:-1;;;25469:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;24872:1;25610:7;:18;28180:10:::1;30786:16;:14;:16::i;:::-;30763:20;:39:::0;30830:26:::1;:24;:26::i;:::-;30813:14;:43:::0;-1:-1:-1;;;;;30871:21:0;::::1;::::0;30867:157:::1;;30928:15;30935:7;30928:6;:15::i;:::-;-1:-1:-1::0;;;;;30909:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;30992:20:::1;::::0;30958:22:::1;:31:::0;;;;;;:54;30867:157:::1;28225:1:::2;28216:6;:10;28208:37;;;::::0;;-1:-1:-1;;;28208:37:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;28208:37:0;;;;;;;;;;;;;::::2;;28271:12;::::0;:24:::2;::::0;28288:6;28271:16:::2;:24::i;:::-;28256:12;:39:::0;28340:10:::2;28330:21;::::0;;;:9:::2;:21;::::0;;;;;:33:::2;::::0;28356:6;28330:25:::2;:33::i;:::-;28316:10;28306:21;::::0;;;:9:::2;:21;::::0;;;;:57;;;;28374:12:::2;::::0;:64:::2;::::0;-1:-1:-1;;;;;28374:12:0;;::::2;::::0;28424:4:::2;28431:6:::0;28374:29:::2;:64::i;:::-;28454:26;::::0;;;;;;;28461:10:::2;::::0;28454:26:::2;::::0;;;;;::::2;::::0;;::::2;-1:-1:-1::0;;24828:1:0;25789:22;;28087:401::o;26168:29::-;;;;:::o;27205:418::-;27252:7;27276:12;;27292:1;27276:17;27272:77;;;-1:-1:-1;27317:20:0;;27310:27;;27272:77;27379:236;27422:178;27587:12;;27422:138;27555:4;27422:106;27517:10;;27422:68;27475:14;;27422:26;:24;:26::i;:68::-;:94;;:106::i;:178::-;27379:20;;;:24;:236::i;25999:26::-;;;-1:-1:-1;;;;;25999:26:0;;:::o;26204:35::-;;;;:::o;29330:97::-;29385:10;29375:21;;;;:9;:21;;;;;;29366:31;;:8;:31::i;:::-;29408:11;:9;:11::i;:::-;29330:97::o;26065:27::-;;;;:::o;2006:108::-;1275:6;;-1:-1:-1;;;;;1275:6:0;1285:10;1275:20;1267:65;;;;;-1:-1:-1;;;1267:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2087:19:::1;2097:8;2087:9;:19::i;:::-;2006:108:::0;:::o;4466:136::-;4524:7;4551:43;4555:1;4558;4551:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;4544:50;4466:136;-1:-1:-1;;;4466:136:0:o;5390:471::-;5448:7;5693:6;5689:47;;-1:-1:-1;5723:1:0;5716:8;;5689:47;5760:5;;;5764:1;5760;:5;:1;5784:5;;;;;:10;5776:56;;;;-1:-1:-1;;;5776:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6337:132;6395:7;6422:39;6426:1;6429;6422:39;;;;;;;;;;;;;;;;;:3;:39::i;4002:181::-;4060:7;4092:5;;;4116:6;;;;4108:46;;;;;-1:-1:-1;;;4108:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;19439:248;19610:58;;;-1:-1:-1;;;;;19610:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19610:58:0;-1:-1:-1;;;19610:58:0;;;19556:123;;19590:5;;19556:19;:123::i;:::-;19439:248;;;:::o;2733:106::-;2791:7;2822:1;2818;:5;:13;;2830:1;2818:13;;;-1:-1:-1;2826:1:0;;2733:106;-1:-1:-1;2733:106:0:o;19695:285::-;19893:68;;;-1:-1:-1;;;;;19893:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19893:68:0;-1:-1:-1;;;19893:68:0;;;19839:133;;19873:5;;19839:19;:133::i;:::-;19695:285;;;;:::o;2122:257::-;-1:-1:-1;;;;;2201:22:0;;2179:110;;;;-1:-1:-1;;;2179:110:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2326:6;;;2305:38;;-1:-1:-1;;;;;2305:38:0;;;;2326:6;;;2305:38;;;2354:6;:17;;-1:-1:-1;;;;;;2354:17:0;-1:-1:-1;;;;;2354:17:0;;;;;;;;;;2122:257::o;4905:226::-;5025:7;5061:12;5053:6;;;;5045:29;;;;-1:-1:-1;;;5045:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5097:5:0;;;4905:226::o;6965:312::-;7085:7;7120:12;7113:5;7105:28;;;;-1:-1:-1;;;7105:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7144:9;7160:1;7156;:5;;;;;;;6965:312;-1:-1:-1;;;;;6965:312:0:o;22329:885::-;22753:23;22792:118;22838:4;22792:118;;;;;;;;;;;;;;;;;22800:5;-1:-1:-1;;;;;22792:27:0;;;:118;;;;;:::i;:::-;22925:17;;22753:157;;-1:-1:-1;22925:21:0;22921:286;;23098:10;23087:30;;;;;;;;;;;;;;;-1:-1:-1;23087:30:0;23061:134;;;;-1:-1:-1;;;23061:134:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15108:229;15245:12;15277:52;15299:6;15307:4;15313:1;15316:12;15277:21;:52::i;:::-;15270:59;15108:229;-1:-1:-1;;;;15108:229:0:o;16324:621::-;16494:12;16566:5;16541:21;:30;;16519:118;;;;-1:-1:-1;;;16519:118:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16656:18;16667:6;16656:10;:18::i;:::-;16648:60;;;;;-1:-1:-1;;;16648:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;16782:12;16796:23;16836:6;-1:-1:-1;;;;;16836:11:0;16855:5;16862:4;16836:31;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16836:31:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16781:86;;;;16885:52;16903:7;16912:10;16924:12;16885:17;:52::i;:::-;16878:59;16324:621;-1:-1:-1;;;;;;;16324:621:0:o;12071:444::-;12451:20;12499:8;;;12071:444::o;18096:777::-;18246:12;18275:7;18271:595;;;-1:-1:-1;18306:10:0;18299:17;;18271:595;18420:17;;:21;18416:439;;18683:10;18677:17;18744:15;18731:10;18727:2;18723:19;18716:44;18631:148;18819:20;;-1:-1:-1;;;18819:20:0;;;;;;;;;;;;;;;;;18826:12;;18819:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://529e8f63da51770d860be9ef495d1b0c5ff95ee60bee5c5e5da0a6563c9f989a
Block Transaction Gas Used Reward
Age Block Fee Address Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading