Contract 0x1f80C96ca521d7247a818A09b0b15C38E3e58a28 14

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xa26fae2e8190c228c22459f309b6209a4eaa6b750a69ee673c5ac20860143145Unstake2037373752024-04-22 18:13:446 hrs 54 mins ago0x68ac24f10e0c1619fd03d4fb7ef90c40aac50c46 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000125 0.01
0xe8a38acb28419383bc8ca20e999bf2d0edb66091e4ba5227ae49f95fd669f74cUnstake2037270982024-04-22 17:29:517 hrs 38 mins ago0xd847b3f9de5f1eb5eae5986b2dede50c414a3f80 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000175 0.014429
0x2f2b98d17ee7f95819e92342062e85907cb9df068b0e04403b77bb77eb52f909Unstake2036296382024-04-22 10:35:5314 hrs 32 mins ago0x5e351615f0495d81076f3fd62a5f192cdc73d2b2 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000132 0.01
0xed0a9f8b03dd8965f65c2044262e0564581e59a50ef5f597c7c619a32c051e82Claim2035287992024-04-22 3:31:0221 hrs 37 mins ago0xd83901bd980ea6271af6d0061adf931b00e156d8 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000088 0.01
0xac0235a2c30baec473a0bd2ea55211e4e7bea6803a1ae1a0f7891640cd2d5fc2Unstake2035286252024-04-22 3:30:1821 hrs 37 mins ago0xd83901bd980ea6271af6d0061adf931b00e156d8 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000107 0.01
0xfc488d09b6263ac01285d144c6b50efb283936b5ddabeacf0514ed499a6fb549Unstake2033497492024-04-21 14:58:261 day 10 hrs ago0xe819edaef316d4396c87a3f6157b7197869fa6f7 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000113 0.01
0xadda626bb45fadbd7980c15070bbc06df7f1c850c6b390c1e0f763dce91fca9cClaim2033495652024-04-21 14:57:411 day 10 hrs ago0xe819edaef316d4396c87a3f6157b7197869fa6f7 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000065 0.01
0x06534e7476d269fecea88bdac826df7c8cfdd3fa4a5653fcd7a31323a3e54afeClaim2033494992024-04-21 14:57:241 day 10 hrs ago0xe819edaef316d4396c87a3f6157b7197869fa6f7 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000114 0.01
0xafdcaec3211f9868d1e637373ff8074176b7790c74f6ed0dd19fe7a9f9921e00Unstake2031897032024-04-21 3:47:001 day 21 hrs ago0x4c3fcb1505686a99aa5767c8a98192d86a1e8604 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000125 0.01
0x09dea73875a0c6e2736f9b9e77e888b00cce022d1ff523c6a528d6cac3398f4bUnstake2030139942024-04-20 15:27:302 days 9 hrs ago0x5547753659dc2ed64ceb6356d1e0e04ff0189f47 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000111 0.01
0x4049e6523e9b28e91f51368af15dac92653155ae61199772724dfa0c9682de48Unstake2030021182024-04-20 14:37:432 days 10 hrs ago0x5be878e71008c5da57270255c414b458a2e113b3 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000116 0.01
0xbf3c31930ac02d4c9d036dcba9897f61bff8cdae72b58175499f3e9bd1fc55feUnstake2030020492024-04-20 14:37:252 days 10 hrs ago0xaa31ec5fe3414eb817de19450187cf502e0be808 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000116 0.01
0x2c7acb9e2f179cea9ecbb19a3155bd6ce961f493264f2765795a0cf8883792daUnstake2029915112024-04-20 13:53:232 days 11 hrs ago0xc406ec1b3b218725bd34cfefbe547b6c17a48174 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000115 0.01
0x9973799af90e95b347b09ff7179b5d4dac3b117c5c5dd26e6f5f220af1c1a5deUnstake2029910442024-04-20 13:51:252 days 11 hrs ago0x33ceefcfcfbf56db9e2711cadaa2ea7566eef28d IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000115 0.01
0x1b24ad05ac9ff805324be840995424ee5b35507b6d0920b7be032553894621e1Unstake2029900432024-04-20 13:47:152 days 11 hrs ago0x3527382cc7a9c0bbddb79da45166192ce35783de IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000104 0.01
0xac09d55e5513738c46b27289650c75aba961395ed182c8038c8ce55ad8161f8cClaim2029899092024-04-20 13:46:422 days 11 hrs ago0x3527382cc7a9c0bbddb79da45166192ce35783de IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000112 0.01
0xcac48683321b2a4f80ee23988b1d88ac21c281bd6c4d581482d08d5a36749c81Unstake2029880312024-04-20 13:38:472 days 11 hrs ago0xe9be1b83dee3c4e0b36a1a22de67fe658c7357ed IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000113 0.01
0x0e5e89dc74c13044b127549e4d1833d3ea61340708c1c509fabfcec99de04896Unstake2027686092024-04-19 22:14:443 days 2 hrs ago0xf6ccb29b73d238e65b3f71ba43863e75ba394a28 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000132 0.01
0xe605b6720b5e70c6d34a00db0473a174e746bdde3a2d8c85ce0d8cad0f93516bUnstake2027172742024-04-19 18:36:553 days 6 hrs ago0xe719c8f356b787b8d91aa45234ffb54456e1b1ce IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.00000128 0.01
0xd8f993a0cc9ae3a1fdc5c959951ff205de2de6a6af882abacf0a650c2558be73Unstake2025795942024-04-19 8:49:243 days 16 hrs ago0xeade710befea2c53a9cd6d202b82793b02bbb1c5 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.0000013 0.01
0xe3155c211066030e9678bb7eb972ba84f310bc7912b42a0d18f4a6326878eb28Claim2025747922024-04-19 8:29:063 days 16 hrs ago0x47cf2d6b0aa4fef03b61878ccfe6f982f1cd966d IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.000001060.01
0xc5de1178941e48345b75658854a3a01a1f3fa4e9c7277747d0072fb87507fd79Unstake2025744562024-04-19 8:27:423 days 16 hrs ago0x47cf2d6b0aa4fef03b61878ccfe6f982f1cd966d IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.000001470.01
0xbfc00aed0b25f3c19f3786d1f959b5042d4ee03952e9db4aee13548fa0f3388fClaim2025392132024-04-19 5:58:003 days 19 hrs ago0xb999ff4fbce0eb4906c82eeae70bae2c94b8ac26 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.000000640.01
0xce4acf895c4f97705eaf0c8543412d2ddce2945d7be8cd046c5e10efda7c9be6Claim2025391162024-04-19 5:57:353 days 19 hrs ago0xb999ff4fbce0eb4906c82eeae70bae2c94b8ac26 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.000000640.01
0xd84423f521b539a5ba5103e421adb446531caac25ea034db8435eeffd7e16179Claim2025389852024-04-19 5:57:023 days 19 hrs ago0xb999ff4fbce0eb4906c82eeae70bae2c94b8ac26 IN  Dopex: Staking Rewards (DPX/WETH)0 ETH0.000001130.01
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x398eb7df2d9ba99576fd50466bd5a9128d7fd3eca2e47177ca2f7a1fc08312bb720829612023-03-21 10:03:29398 days 15 hrs ago Dopex: Staking Rewards (DPX/WETH) Dopex: DPX Token0 ETH
0xf8b5831e979c72a75f8eca050f4fa47354d0e84d95cf4732db253b69929a11f1720828812023-03-21 10:03:08398 days 15 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0xd400e620b0dec6b429e86ccb3e126e2a04c50c2c7b6128edd0b221e0bb5f8eba720626012023-03-21 8:39:54398 days 16 hrs ago Dopex: Staking Rewards (DPX/WETH) Dopex: DPX Token0 ETH
0xf06a02087400813e39192203ffb5b6284d5c97813b40b86079dee857cf32159d720624262023-03-21 8:39:10398 days 16 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0x4a0a5b4243d0e870eca1d17da0b0ea852efa8d7b79e4e6445f500e0a87dfb32d720607182023-03-21 8:32:11398 days 16 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0x14d76c96cf4f2a02313aa8ef2e60db3cf4c06fb3f05cfc188b0a2663322566dd720561162023-03-21 8:13:23398 days 16 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0x57b2803c1efb4451f0b98880054fee5a93b7316254a8db0885ff7e04afb1f0d3720433472023-03-21 7:20:55398 days 17 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0x217c8cc72dfaa65a71f8850793b7d89ff0e7bbb69fb3a3d4061baabbdf720aba720418882023-03-21 7:14:59398 days 17 hrs ago Dopex: Staking Rewards (DPX/WETH) Dopex: DPX Token0 ETH
0x559dbb9d75f9171df71fd1770b7f9fa7e0251765e0e5ff095a9e83c43d5ddabd720417942023-03-21 7:14:36398 days 17 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0x3dc186438be6aaed12874d767061bf93c09c054c85447d2a8865160f515dd7f3720391872023-03-21 7:03:54398 days 18 hrs ago Dopex: Staking Rewards (DPX/WETH) Dopex: DPX Token0 ETH
0x9f30445c7eaa1ac9e27bd42bf76021e624d88d31a9faaa7fbdce71c7791464a7720385562023-03-21 7:01:16398 days 18 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0xa4807c920422c9b563a711b82952d555746ba698ea6c16c1647b4c8363270749720316572023-03-21 6:33:02398 days 18 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0xec9419928e7ef22e2d93d360ce95dc192fa642a8b097b68f998fa3ea3a2d3ce2720174212023-03-21 5:34:25398 days 19 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0x826ee7f27c3f2073eda855c8da5ff3511c85ab60fb911e1b4d07a52be021906c720172932023-03-21 5:33:53398 days 19 hrs ago Dopex: Staking Rewards (DPX/WETH) Dopex: DPX Token0 ETH
0x53291c04d4e4230c6e61a35903f340c94a495875a46b8265aa7cdd09956e837a720165522023-03-21 5:30:46398 days 19 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0xd249c80c5ddbe6194508265665a2da3ef0ea29ee46771995a93bf7343588f439720051092023-03-21 4:43:33398 days 20 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0x0162238478aca26aec12a6fffbb594548c8c8e4242358c7d4a5684c689117ab8720037582023-03-21 4:37:58398 days 20 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0xd674e8efe2833ebb2cce0c4629a765c39053dee9affecb35af7658ef54651064719973112023-03-21 4:11:05398 days 20 hrs ago Dopex: Staking Rewards (DPX/WETH) Dopex: DPX Token0 ETH
0xb2fd320af2411a5ddaedb878935336a29efe0bb1a1b939d93e243f2cbfb94da4719966642023-03-21 4:08:21398 days 20 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0xcc49b6ff78121fe10942055124d3646de64de48202f730c57ba62806fa70261d719956032023-03-21 4:03:58398 days 21 hrs ago Dopex: Staking Rewards (DPX/WETH) Dopex: DPX Token0 ETH
0x0cbf702d97be03172dcd643e713ec97871f1e311dc3ce147b846ad56fb6a4f41719955302023-03-21 4:03:40398 days 21 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0xa52393aaa3946e44eb645dc2987271a3b41e794c26be64de62a55355faeeb9d5719955092023-03-21 4:03:34398 days 21 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0xd31265b7c77f340c7fd3826b32389a8a2737284c301b6a63801750f7e6c8c586719926712023-03-21 3:51:49398 days 21 hrs ago Dopex: Staking Rewards (DPX/WETH) Dopex: DPX Token0 ETH
0xf8a8239aa1acb56bba3e9af92299835c2dc4b681712dc677e3adb12746bf6e61719925822023-03-21 3:51:27398 days 21 hrs ago Dopex: Staking Rewards (DPX/WETH) Sushiswap: DPX0 ETH
0xec9c113ba6239b6f2c5562ecd19ae310dca8c414bc543719844d0ba3ee417dc7719793492023-03-21 2:56:37398 days 22 hrs ago Dopex: Staking Rewards (DPX/WETH) Dopex: DPX Token0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DpxEthLpFarm

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Unlicense license
File 1 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/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.
 */
abstract 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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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 virtual onlyOwner {
        _transferOwnership(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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 2 of 12 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 3 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @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() {
        _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 making 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;
    }
}

File 4 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 5 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @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 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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.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 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.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 8 of 12 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @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.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a / b + (a % b == 0 ? 0 : 1);
    }
}

File 9 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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 (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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) {
        return a + b;
    }

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

    /**
     * @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) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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 a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 10 of 12 : ContractWhitelist.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

/// @title ContractWhitelist
/// @author witherblock
/// @notice A helper contract that lets you add a list of whitelisted contracts that should be able to interact with restricited functions
abstract contract ContractWhitelist {
    /// @dev contract => whitelisted or not
    mapping(address => bool) public whitelistedContracts;

    /*==== SETTERS ====*/

    /// @dev add to the contract whitelist
    /// @param _contract the address of the contract to add to the contract whitelist
    function _addToContractWhitelist(address _contract) internal {
        require(isContract(_contract), "Address must be a contract");
        require(
            !whitelistedContracts[_contract],
            "Contract already whitelisted"
        );

        whitelistedContracts[_contract] = true;

        emit AddToContractWhitelist(_contract);
    }

    /// @dev remove from  the contract whitelist
    /// @param _contract the address of the contract to remove from the contract whitelist
    function _removeFromContractWhitelist(address _contract) internal {
        require(whitelistedContracts[_contract], "Contract not whitelisted");

        whitelistedContracts[_contract] = false;

        emit RemoveFromContractWhitelist(_contract);
    }

    // modifier is eligible sender modifier
    function _isEligibleSender() internal view {
        // the below condition checks whether the caller is a contract or not
        if (msg.sender != tx.origin)
            require(
                whitelistedContracts[msg.sender],
                "Contract must be whitelisted"
            );
    }

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

    /// @dev checks for contract or eoa addresses
    /// @param addr the address to check
    /// @return bool whether the passed address is a contract address
    function isContract(address addr) public view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(addr)
        }
        return size > 0;
    }

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

    event AddToContractWhitelist(address indexed _contract);

    event RemoveFromContractWhitelist(address indexed _contract);
}

File 11 of 12 : DpxEthLpFarm.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

import { StakingRewardsV3 } from "../StakingRewardsV3.sol";

contract DpxEthLpFarm is StakingRewardsV3 {
  constructor()
    StakingRewardsV3(
      0x6C2C06790b3E3E3c38e12Ee22F8183b37a13EE55, // rewardToken: DPX
      0x0C1Cf6883efA1B496B01f654E247B9b419873054, // stakingToken: DPX/WETH SLP
      86400 * 30, // Reward Duration: 1 Month
      0, // Boost Duration
      1 // Boost
    )
  {}
}

File 12 of 12 : StakingRewardsV3.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

// Interfaces
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

// Libraries
import { Math } from "@openzeppelin/contracts/utils/math/Math.sol";
import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

// Contracts
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Pausable } from "@openzeppelin/contracts/security/Pausable.sol";
import { ContractWhitelist } from "./ContractWhitelist.sol";

contract StakingRewardsV3 is
  ReentrancyGuard,
  Ownable,
  Pausable,
  ContractWhitelist
{
  using SafeMath for uint256;
  using SafeERC20 for IERC20;

  /* ========== STATE VARIABLES ========== */

  IERC20 public rewardToken;
  IERC20 public stakingToken;

  uint256 public boost;
  uint256 public periodFinish;
  uint256 public boostedFinish;
  uint256 public rewardRate;
  uint256 public rewardDuration;
  uint256 public lastUpdateTime;
  uint256 public rewardPerTokenStored;
  uint256 public boostedTimePeriod;

  uint256 private _totalSupply;

  mapping(address => uint256) public userRewardPerTokenPaid;
  mapping(address => uint256) public rewardEarned;

  mapping(address => uint256) private _balances;

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

  constructor(
    address _rewardToken,
    address _stakingToken,
    uint256 _rewardsDuration,
    uint256 _boostedTimePeriod,
    uint256 _boost
  ) {
    rewardToken = IERC20(_rewardToken);
    stakingToken = IERC20(_stakingToken);
    rewardDuration = _rewardsDuration;
    boostedTimePeriod = _boostedTimePeriod;
    boost = _boost;
  }

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

  /// @notice Returns the total balance of the staking token in the contract
  function totalSupply() external view returns (uint256) {
    return _totalSupply;
  }

  /// @notice Returns a users deposit of the staking token in the contract
  /// @param account address of the account
  function balanceOf(address account) external view returns (uint256) {
    return _balances[account];
  }

  /// @notice Returns the last time when a reward was applicable
  function lastTimeRewardApplicable() public view returns (uint256) {
    uint256 timeApp = Math.min(block.timestamp, periodFinish);
    return timeApp;
  }

  /// @notice Returns the reward per staking token
  function rewardPerToken() public view returns (uint256 perTokenRate) {
    if (_totalSupply == 0) {
      perTokenRate = rewardPerTokenStored;
      return perTokenRate;
    }
    if (block.timestamp < boostedFinish) {
      perTokenRate = rewardPerTokenStored.add(
        lastTimeRewardApplicable()
          .sub(lastUpdateTime)
          .mul(rewardRate.mul(boost))
          .mul(1e18)
          .div(_totalSupply)
      );
      return perTokenRate;
    } else {
      if (lastUpdateTime < boostedFinish) {
        perTokenRate = rewardPerTokenStored
          .add(
            boostedFinish
              .sub(lastUpdateTime)
              .mul(rewardRate.mul(boost))
              .mul(1e18)
              .div(_totalSupply)
          )
          .add(
            lastTimeRewardApplicable()
              .sub(boostedFinish)
              .mul(rewardRate)
              .mul(1e18)
              .div(_totalSupply)
          );
        return perTokenRate;
      } else {
        perTokenRate = rewardPerTokenStored.add(
          lastTimeRewardApplicable()
            .sub(lastUpdateTime)
            .mul(rewardRate)
            .mul(1e18)
            .div(_totalSupply)
        );
        return perTokenRate;
      }
    }
  }

  /// @notice Returns the amount of rewards earned by an account
  /// @param account address of the account
  function earned(address account) public view returns (uint256 tokensEarned) {
    uint256 perTokenRate = rewardPerToken();
    tokensEarned = _balances[account]
      .mul(perTokenRate.sub(userRewardPerTokenPaid[account]))
      .div(1e18)
      .add(rewardEarned[account]);
  }

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

  /// @notice Allows to stake the staking token into the contract for rewards
  /// @param amount amount of staking token to stake
  function stake(uint256 amount)
    external
    whenNotPaused
    nonReentrant
    updateReward(msg.sender)
  {
    _isEligibleSender();
    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);
  }

  /// @notice Allows to unstake the staking token from the contract
  /// @param amount amount of staking token to unstake
  function unstake(uint256 amount)
    public
    whenNotPaused
    nonReentrant
    updateReward(msg.sender)
  {
    _isEligibleSender();
    require(amount > 0, "Cannot withdraw 0");
    require(amount <= _balances[msg.sender], "Insufficent balance");
    _totalSupply = _totalSupply.sub(amount);
    _balances[msg.sender] = _balances[msg.sender].sub(amount);
    stakingToken.safeTransfer(msg.sender, amount);
    emit Unstaked(msg.sender, amount);
  }

  /// @notice Allows to claim rewards from the contract for staking
  function claim() public whenNotPaused nonReentrant updateReward(msg.sender) {
    _isEligibleSender();
    uint256 _rewardEarned = rewardEarned[msg.sender];
    if (_rewardEarned > 0) {
      rewardEarned[msg.sender] = 0;
      rewardToken.safeTransfer(msg.sender, _rewardEarned);
    }

    emit RewardPaid(msg.sender, _rewardEarned);
  }

  /// @notice Allows to exit the contract by unstaking all staked tokens and claiming rewards
  function exit() external {
    unstake(_balances[msg.sender]);
    claim();
  }

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

  /// @notice Transfers all funds to msg.sender
  /// @dev Can only be called by the owner
  /// @param tokens The list of erc20 tokens to withdraw
  /// @param transferNative Whether should transfer the native currency
  function emergencyWithdraw(address[] calldata tokens, bool transferNative)
    external
    onlyOwner
    returns (bool)
  {
    if (transferNative) payable(msg.sender).transfer(address(this).balance);

    IERC20 token;

    for (uint256 i = 0; i < tokens.length; i++) {
      token = IERC20(tokens[i]);
      token.safeTransfer(msg.sender, token.balanceOf(address(this)));
    }

    emit EmergencyWithdraw(msg.sender);

    return true;
  }

  /// @notice Ends the current rewards
  /// @dev Can only be called by the owner
  function endRewards() public onlyOwner returns (uint256) {
    uint256 _rewards = rewardToken.balanceOf(address(this));
    if (stakingToken == rewardToken) {
      _rewards = _rewards.sub(_totalSupply);
    }
    periodFinish = block.timestamp;
    IERC20(rewardToken).safeTransfer(msg.sender, _rewards);
    return _rewards;
  }

  /// @notice Start a new reward period by sending rewards
  /// @dev Can only be called by the owner
  /// @param rewardAmount the amount of rewards to be distributed
  function notifyRewardAmount(uint256 rewardAmount)
    external
    updateReward(address(0))
    onlyOwner
  {
    rewardToken.safeTransferFrom(msg.sender, address(this), rewardAmount);

    if (block.timestamp >= periodFinish) {
      rewardRate = rewardAmount.div(rewardDuration.add(boostedTimePeriod));
      boostedFinish = block.timestamp.add(boostedTimePeriod);
    } else {
      uint256 remaining = periodFinish.sub(block.timestamp);
      uint256 leftoverReward = remaining.mul(rewardRate);
      rewardRate = rewardAmount.add(leftoverReward).div(rewardDuration);
    }

    lastUpdateTime = block.timestamp;
    periodFinish = block.timestamp.add(rewardDuration);

    emit RewardAdded(rewardAmount);
  }

  /// @notice Update the rewards duration
  /// @dev Can only be called by the owner
  /// @param _rewardDuration the rewards duration
  function updateRewardDuration(uint256 _rewardDuration) external onlyOwner {
    rewardDuration = _rewardDuration;

    emit RewardDurationUpdated(_rewardDuration);
  }

  /// @notice Update the boosted time period
  /// @dev Can only be called by the owner
  /// @param _boostedTimePeriod the boosted time period
  function updateBoostedTimePeriod(uint256 _boostedTimePeriod)
    external
    onlyOwner
  {
    boostedTimePeriod = _boostedTimePeriod;

    emit BoostedTimePeriodUpdated(_boostedTimePeriod);
  }

  /// @notice Update the boost
  /// @dev Can only be called by the owner
  /// @param _boost the boost
  function updateBoost(uint256 _boost) external onlyOwner {
    boost = _boost;

    emit BoostUpdated(_boost);
  }

  /// @notice Adds to the contract whitelist
  /// @dev Can only be called by the owner
  /// @param _contract the contract to be added to the whitelist
  function addToContractWhitelist(address _contract) external onlyOwner {
    _addToContractWhitelist(_contract);
  }

  /// @notice Removes from the contract whitelist
  /// @dev Can only be called by the owner
  /// @param _contract the contract to be removed from the whitelist
  function removeFromContractWhitelist(address _contract) external onlyOwner {
    _removeFromContractWhitelist(_contract);
  }

  /// @notice Pauses the contract
  /// @dev Can only be called by the owner
  function pause() external onlyOwner {
    _pause();
  }

  /// @notice Unpauses the contract
  /// @dev Can only be called by the owner
  function unpause() external onlyOwner {
    _unpause();
  }

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

  // Modifier *Update Reward modifier*
  modifier updateReward(address account) {
    rewardPerTokenStored = rewardPerToken();
    lastUpdateTime = lastTimeRewardApplicable();
    if (account != address(0)) {
      rewardEarned[account] = earned(account);
      userRewardPerTokenPaid[account] = rewardPerTokenStored;
    }
    _;
  }

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

  event EmergencyWithdraw(address sender);
  event RewardDurationUpdated(uint256 rewardDuration);
  event BoostedTimePeriodUpdated(uint256 boostedTimePeriod);
  event BoostUpdated(uint256 boost);
  event RewardAdded(uint256 rewardAmount);
  event Staked(address indexed user, uint256 amount);
  event Unstaked(address indexed user, uint256 amount);
  event RewardPaid(address indexed user, uint256 reward);
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_contract","type":"address"}],"name":"AddToContractWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"boost","type":"uint256"}],"name":"BoostUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"boostedTimePeriod","type":"uint256"}],"name":"BoostedTimePeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_contract","type":"address"}],"name":"RemoveFromContractWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardDuration","type":"uint256"}],"name":"RewardDurationUpdated","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"addToContractWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostedFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostedTimePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"tokensEarned","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"bool","name":"transferNative","type":"bool"}],"name":"emergencyWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"removeFromContractWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"perTokenRate","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":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","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":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_boost","type":"uint256"}],"name":"updateBoost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_boostedTimePeriod","type":"uint256"}],"name":"updateBoostedTimePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardDuration","type":"uint256"}],"name":"updateRewardDuration","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":"whitelistedContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060016000818155736c2c06790b3e3e3c38e12ee22f8183b37a13ee5591730c1cf6883efa1b496b01f654e247b9b4198730549162278d0091610052336100a0565b6001805460ff60a01b19169055600380546001600160a01b039687166001600160a01b0319918216179091556004805495909616941693909317909355600955600c919091556005556100f2565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611b5e806101016000396000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c80638456cb5911610130578063c8f33c91116100b8578063e9fad8ee1161007c578063e9fad8ee14610472578063ebe2b12b1461047a578063f2fde38b14610483578063f520e7e514610496578063f7c618c11461049f57600080fd5b8063c8f33c9114610447578063c9b6b2b114610450578063cd3daf9d14610459578063d9cd1ca014610461578063df136d651461046957600080fd5b8063a694fc3a116100ff578063a694fc3a146103f2578063a81cc9ac14610405578063ac2c541314610418578063acc3a00614610421578063c3d9ed391461043457600080fd5b80638456cb59146103b05780638b876347146103b85780638da5cb5b146103d8578063a66f42c0146103e957600080fd5b80633f4ba83a116101b3578063715018a611610182578063715018a61461035957806372f702f3146103615780637b0a47ee1461038c5780637c4b52cb1461039557806380faa57d146103a857600080fd5b80633f4ba83a1461030e5780634e71d92d146103165780635c975abb1461031e57806370a082311461033057600080fd5b806316ba6bf3116101fa57806316ba6bf31461029d57806318160ddd146102bd5780632e17de78146102c5578063391feebb146102d85780633c6b16ab146102fb57600080fd5b80628cc2621461022b578063070a888f146102515780631627905514610266578063169db4ab1461028a575b600080fd5b61023e610239366004611854565b6104b2565b6040519081526020015b60405180910390f35b61026461025f36600461187d565b610538565b005b61027a610274366004611854565b3b151590565b6040519015158152602001610248565b61026461029836600461187d565b6105a7565b61023e6102ab366004611854565b600f6020526000908152604090205481565b600d5461023e565b6102646102d336600461187d565b610606565b61027a6102e6366004611854565b60026020526000908152604090205460ff1681565b61026461030936600461187d565b6107e9565b61026461095a565b61026461098e565b600154600160a01b900460ff1661027a565b61023e61033e366004611854565b6001600160a01b031660009081526010602052604090205490565b610264610ab4565b600454610374906001600160a01b031681565b6040516001600160a01b039091168152602001610248565b61023e60085481565b61027a6103a33660046118a4565b610ae8565b61023e610c5e565b610264610c73565b61023e6103c6366004611854565b600e6020526000908152604090205481565b6001546001600160a01b0316610374565b61023e60055481565b61026461040036600461187d565b610ca5565b61026461041336600461187d565b610e24565b61023e60075481565b61026461042f366004611854565b610e83565b610264610442366004611854565b610eb9565b61023e600a5481565b61023e600c5481565b61023e610eec565b61023e610ffd565b61023e600b5481565b6102646110ee565b61023e60065481565b610264610491366004611854565b61110f565b61023e60095481565b600354610374906001600160a01b031681565b6000806104bd610eec565b6001600160a01b0384166000908152600f6020908152604080832054600e909252909120549192506105319161052b90670de0b6b3a764000090610525906105069087906111a7565b6001600160a01b038916600090815260106020526040902054906111b3565b906111bf565b906111cb565b9392505050565b6001546001600160a01b0316331461056b5760405162461bcd60e51b81526004016105629061192a565b60405180910390fd5b60098190556040518181527ffeece2f615b2fecca6c26deadea49416a6ba6b52b2cd2613065fd6a787cf1240906020015b60405180910390a150565b6001546001600160a01b031633146105d15760405162461bcd60e51b81526004016105629061192a565b60058190556040518181527fd70f5934cda3f49f14c8c57e9c866d50ca598643b5f3a27e31e8be098103b1df9060200161059c565b600154600160a01b900460ff16156106305760405162461bcd60e51b81526004016105629061195f565b600260005414156106535760405162461bcd60e51b815260040161056290611989565b600260005533610661610eec565b600b5561066c610c5e565b600a556001600160a01b038116156106b357610687816104b2565b6001600160a01b0382166000908152600f6020908152604080832093909355600b54600e909152919020555b6106bb6111d7565b600082116106ff5760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b6044820152606401610562565b336000908152601060205260409020548211156107545760405162461bcd60e51b8152602060048201526013602482015272496e737566666963656e742062616c616e636560681b6044820152606401610562565b600d5461076190836111a7565b600d553360009081526010602052604090205461077e90836111a7565b336000818152601060205260409020919091556004546107aa916001600160a01b03909116908461123d565b60405182815233907f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75906020015b60405180910390a250506001600055565b60006107f3610eec565b600b556107fe610c5e565b600a556001600160a01b0381161561084557610819816104b2565b6001600160a01b0382166000908152600f6020908152604080832093909355600b54600e909152919020555b6001546001600160a01b0316331461086f5760405162461bcd60e51b81526004016105629061192a565b600354610887906001600160a01b03163330856112a5565b60065442106108ca576108b16108aa600c546009546111cb90919063ffffffff16565b83906111bf565b600855600c546108c29042906111cb565b60075561090d565b6006546000906108da90426111a7565b905060006108f3600854836111b390919063ffffffff16565b6009549091506109079061052586846111cb565b60085550505b42600a81905560095461092091906111cb565b6006556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a15050565b6001546001600160a01b031633146109845760405162461bcd60e51b81526004016105629061192a565b61098c6112e3565b565b600154600160a01b900460ff16156109b85760405162461bcd60e51b81526004016105629061195f565b600260005414156109db5760405162461bcd60e51b815260040161056290611989565b6002600055336109e9610eec565b600b556109f4610c5e565b600a556001600160a01b03811615610a3b57610a0f816104b2565b6001600160a01b0382166000908152600f6020908152604080832093909355600b54600e909152919020555b610a436111d7565b336000908152600f60205260409020548015610a8257336000818152600f6020526040812055600354610a82916001600160a01b03909116908361123d565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486906020016107d8565b6001546001600160a01b03163314610ade5760405162461bcd60e51b81526004016105629061192a565b61098c6000611380565b6001546000906001600160a01b03163314610b155760405162461bcd60e51b81526004016105629061192a565b8115610b495760405133904780156108fc02916000818181858888f19350505050158015610b47573d6000803e3d6000fd5b505b6000805b84811015610c1f57858582818110610b6757610b676119c0565b9050602002016020810190610b7c9190611854565b6040516370a0823160e01b8152306004820152909250610c0d9033906001600160a01b038516906370a082319060240160206040518083038186803b158015610bc457600080fd5b505afa158015610bd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfc91906119d6565b6001600160a01b038516919061123d565b80610c1781611a05565b915050610b4d565b506040513381527f5e7b34819cd91b239220bec92fcfd3c10da2214ba13e4e2b1f6c9cfdbd68a9a29060200160405180910390a1506001949350505050565b600080610c6d426006546113d2565b92915050565b6001546001600160a01b03163314610c9d5760405162461bcd60e51b81526004016105629061192a565b61098c6113e8565b600154600160a01b900460ff1615610ccf5760405162461bcd60e51b81526004016105629061195f565b60026000541415610cf25760405162461bcd60e51b815260040161056290611989565b600260005533610d00610eec565b600b55610d0b610c5e565b600a556001600160a01b03811615610d5257610d26816104b2565b6001600160a01b0382166000908152600f6020908152604080832093909355600b54600e909152919020555b610d5a6111d7565b60008211610d9b5760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b6044820152606401610562565b600d54610da890836111cb565b600d5533600090815260106020526040902054610dc590836111cb565b33600081815260106020526040902091909155600454610df2916001600160a01b039091169030856112a5565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906020016107d8565b6001546001600160a01b03163314610e4e5760405162461bcd60e51b81526004016105629061192a565b600c8190556040518181527ff93a50a66d32c098d21788f6934787a8162146b63c21bdd9b52e0e89ad28ee6d9060200161059c565b6001546001600160a01b03163314610ead5760405162461bcd60e51b81526004016105629061192a565b610eb68161144d565b50565b6001546001600160a01b03163314610ee35760405162461bcd60e51b81526004016105629061192a565b610eb681611550565b6000600d5460001415610f005750600b5490565b600754421015610f6157610f5c610f53600d54610525670de0b6b3a7640000610f4d610f396005546008546111b390919063ffffffff16565b610f4d600a54610f47610c5e565b906111a7565b906111b3565b600b54906111cb565b905090565b600754600a541015610fd457610f5c610f96600d54610525670de0b6b3a7640000610f4d600854610f4d600754610f47610c5e565b61052b610f53600d54610525670de0b6b3a7640000610f4d610fc56005546008546111b390919063ffffffff16565b600a54600754610f4d916111a7565b610f5c610f53600d54610525670de0b6b3a7640000610f4d600854610f4d600a54610f47610c5e565b6001546000906001600160a01b0316331461102a5760405162461bcd60e51b81526004016105629061192a565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561106e57600080fd5b505afa158015611082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a691906119d6565b6003546004549192506001600160a01b03918216911614156110d357600d546110d09082906111a7565b90505b42600655600354610f5c906001600160a01b0316338361123d565b3360009081526010602052604090205461110790610606565b61098c61098e565b6001546001600160a01b031633146111395760405162461bcd60e51b81526004016105629061192a565b6001600160a01b03811661119e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610562565b610eb681611380565b60006105318284611a20565b60006105318284611a37565b60006105318284611a56565b60006105318284611a78565b33321461098c573360009081526002602052604090205460ff1661098c5760405162461bcd60e51b815260206004820152601c60248201527f436f6e7472616374206d7573742062652077686974656c6973746564000000006044820152606401610562565b6040516001600160a01b0383166024820152604481018290526112a090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611601565b505050565b6040516001600160a01b03808516602483015283166044820152606481018290526112dd9085906323b872dd60e01b90608401611269565b50505050565b600154600160a01b900460ff166113335760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610562565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008183106113e15781610531565b5090919050565b600154600160a01b900460ff16156114125760405162461bcd60e51b81526004016105629061195f565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586113633390565b803b61149b5760405162461bcd60e51b815260206004820152601a60248201527f41646472657373206d757374206265206120636f6e74726163740000000000006044820152606401610562565b6001600160a01b03811660009081526002602052604090205460ff16156115045760405162461bcd60e51b815260206004820152601c60248201527f436f6e747261637420616c72656164792077686974656c6973746564000000006044820152606401610562565b6001600160a01b038116600081815260026020526040808220805460ff19166001179055517ffbd3cde7ff522a917e485c8ed2a6e87590887ab399f5ac312307903f498543079190a250565b6001600160a01b03811660009081526002602052604090205460ff166115b85760405162461bcd60e51b815260206004820152601860248201527f436f6e7472616374206e6f742077686974656c697374656400000000000000006044820152606401610562565b6001600160a01b038116600081815260026020526040808220805460ff19169055517f8e81447740597754af5db3e176253a36f7981a9549f48ace3f0cb233913f9d859190a250565b6000611656826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116d39092919063ffffffff16565b8051909150156112a057808060200190518101906116749190611a90565b6112a05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610562565b60606116e284846000856116ea565b949350505050565b60608247101561174b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610562565b6001600160a01b0385163b6117a25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610562565b600080866001600160a01b031685876040516117be9190611ad9565b60006040518083038185875af1925050503d80600081146117fb576040519150601f19603f3d011682016040523d82523d6000602084013e611800565b606091505b509150915061181082828661181b565b979650505050505050565b6060831561182a575081610531565b82511561183a5782518084602001fd5b8160405162461bcd60e51b81526004016105629190611af5565b60006020828403121561186657600080fd5b81356001600160a01b038116811461053157600080fd5b60006020828403121561188f57600080fd5b5035919050565b8015158114610eb657600080fd5b6000806000604084860312156118b957600080fd5b833567ffffffffffffffff808211156118d157600080fd5b818601915086601f8301126118e557600080fd5b8135818111156118f457600080fd5b8760208260051b850101111561190957600080fd5b6020928301955093505084013561191f81611896565b809150509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156119e857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611a1957611a196119ef565b5060010190565b600082821015611a3257611a326119ef565b500390565b6000816000190483118215151615611a5157611a516119ef565b500290565b600082611a7357634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611a8b57611a8b6119ef565b500190565b600060208284031215611aa257600080fd5b815161053181611896565b60005b83811015611ac8578181015183820152602001611ab0565b838111156112dd5750506000910152565b60008251611aeb818460208701611aad565b9190910192915050565b6020815260008251806020840152611b14816040850160208701611aad565b601f01601f1916919091016040019291505056fea26469706673582212205e172d42eb1d763767e21ecd56eaa14c4daa55ac9ea2b6c5af2056bde5c9da1164736f6c63430008090033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102265760003560e01c80638456cb5911610130578063c8f33c91116100b8578063e9fad8ee1161007c578063e9fad8ee14610472578063ebe2b12b1461047a578063f2fde38b14610483578063f520e7e514610496578063f7c618c11461049f57600080fd5b8063c8f33c9114610447578063c9b6b2b114610450578063cd3daf9d14610459578063d9cd1ca014610461578063df136d651461046957600080fd5b8063a694fc3a116100ff578063a694fc3a146103f2578063a81cc9ac14610405578063ac2c541314610418578063acc3a00614610421578063c3d9ed391461043457600080fd5b80638456cb59146103b05780638b876347146103b85780638da5cb5b146103d8578063a66f42c0146103e957600080fd5b80633f4ba83a116101b3578063715018a611610182578063715018a61461035957806372f702f3146103615780637b0a47ee1461038c5780637c4b52cb1461039557806380faa57d146103a857600080fd5b80633f4ba83a1461030e5780634e71d92d146103165780635c975abb1461031e57806370a082311461033057600080fd5b806316ba6bf3116101fa57806316ba6bf31461029d57806318160ddd146102bd5780632e17de78146102c5578063391feebb146102d85780633c6b16ab146102fb57600080fd5b80628cc2621461022b578063070a888f146102515780631627905514610266578063169db4ab1461028a575b600080fd5b61023e610239366004611854565b6104b2565b6040519081526020015b60405180910390f35b61026461025f36600461187d565b610538565b005b61027a610274366004611854565b3b151590565b6040519015158152602001610248565b61026461029836600461187d565b6105a7565b61023e6102ab366004611854565b600f6020526000908152604090205481565b600d5461023e565b6102646102d336600461187d565b610606565b61027a6102e6366004611854565b60026020526000908152604090205460ff1681565b61026461030936600461187d565b6107e9565b61026461095a565b61026461098e565b600154600160a01b900460ff1661027a565b61023e61033e366004611854565b6001600160a01b031660009081526010602052604090205490565b610264610ab4565b600454610374906001600160a01b031681565b6040516001600160a01b039091168152602001610248565b61023e60085481565b61027a6103a33660046118a4565b610ae8565b61023e610c5e565b610264610c73565b61023e6103c6366004611854565b600e6020526000908152604090205481565b6001546001600160a01b0316610374565b61023e60055481565b61026461040036600461187d565b610ca5565b61026461041336600461187d565b610e24565b61023e60075481565b61026461042f366004611854565b610e83565b610264610442366004611854565b610eb9565b61023e600a5481565b61023e600c5481565b61023e610eec565b61023e610ffd565b61023e600b5481565b6102646110ee565b61023e60065481565b610264610491366004611854565b61110f565b61023e60095481565b600354610374906001600160a01b031681565b6000806104bd610eec565b6001600160a01b0384166000908152600f6020908152604080832054600e909252909120549192506105319161052b90670de0b6b3a764000090610525906105069087906111a7565b6001600160a01b038916600090815260106020526040902054906111b3565b906111bf565b906111cb565b9392505050565b6001546001600160a01b0316331461056b5760405162461bcd60e51b81526004016105629061192a565b60405180910390fd5b60098190556040518181527ffeece2f615b2fecca6c26deadea49416a6ba6b52b2cd2613065fd6a787cf1240906020015b60405180910390a150565b6001546001600160a01b031633146105d15760405162461bcd60e51b81526004016105629061192a565b60058190556040518181527fd70f5934cda3f49f14c8c57e9c866d50ca598643b5f3a27e31e8be098103b1df9060200161059c565b600154600160a01b900460ff16156106305760405162461bcd60e51b81526004016105629061195f565b600260005414156106535760405162461bcd60e51b815260040161056290611989565b600260005533610661610eec565b600b5561066c610c5e565b600a556001600160a01b038116156106b357610687816104b2565b6001600160a01b0382166000908152600f6020908152604080832093909355600b54600e909152919020555b6106bb6111d7565b600082116106ff5760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b6044820152606401610562565b336000908152601060205260409020548211156107545760405162461bcd60e51b8152602060048201526013602482015272496e737566666963656e742062616c616e636560681b6044820152606401610562565b600d5461076190836111a7565b600d553360009081526010602052604090205461077e90836111a7565b336000818152601060205260409020919091556004546107aa916001600160a01b03909116908461123d565b60405182815233907f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75906020015b60405180910390a250506001600055565b60006107f3610eec565b600b556107fe610c5e565b600a556001600160a01b0381161561084557610819816104b2565b6001600160a01b0382166000908152600f6020908152604080832093909355600b54600e909152919020555b6001546001600160a01b0316331461086f5760405162461bcd60e51b81526004016105629061192a565b600354610887906001600160a01b03163330856112a5565b60065442106108ca576108b16108aa600c546009546111cb90919063ffffffff16565b83906111bf565b600855600c546108c29042906111cb565b60075561090d565b6006546000906108da90426111a7565b905060006108f3600854836111b390919063ffffffff16565b6009549091506109079061052586846111cb565b60085550505b42600a81905560095461092091906111cb565b6006556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a15050565b6001546001600160a01b031633146109845760405162461bcd60e51b81526004016105629061192a565b61098c6112e3565b565b600154600160a01b900460ff16156109b85760405162461bcd60e51b81526004016105629061195f565b600260005414156109db5760405162461bcd60e51b815260040161056290611989565b6002600055336109e9610eec565b600b556109f4610c5e565b600a556001600160a01b03811615610a3b57610a0f816104b2565b6001600160a01b0382166000908152600f6020908152604080832093909355600b54600e909152919020555b610a436111d7565b336000908152600f60205260409020548015610a8257336000818152600f6020526040812055600354610a82916001600160a01b03909116908361123d565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486906020016107d8565b6001546001600160a01b03163314610ade5760405162461bcd60e51b81526004016105629061192a565b61098c6000611380565b6001546000906001600160a01b03163314610b155760405162461bcd60e51b81526004016105629061192a565b8115610b495760405133904780156108fc02916000818181858888f19350505050158015610b47573d6000803e3d6000fd5b505b6000805b84811015610c1f57858582818110610b6757610b676119c0565b9050602002016020810190610b7c9190611854565b6040516370a0823160e01b8152306004820152909250610c0d9033906001600160a01b038516906370a082319060240160206040518083038186803b158015610bc457600080fd5b505afa158015610bd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfc91906119d6565b6001600160a01b038516919061123d565b80610c1781611a05565b915050610b4d565b506040513381527f5e7b34819cd91b239220bec92fcfd3c10da2214ba13e4e2b1f6c9cfdbd68a9a29060200160405180910390a1506001949350505050565b600080610c6d426006546113d2565b92915050565b6001546001600160a01b03163314610c9d5760405162461bcd60e51b81526004016105629061192a565b61098c6113e8565b600154600160a01b900460ff1615610ccf5760405162461bcd60e51b81526004016105629061195f565b60026000541415610cf25760405162461bcd60e51b815260040161056290611989565b600260005533610d00610eec565b600b55610d0b610c5e565b600a556001600160a01b03811615610d5257610d26816104b2565b6001600160a01b0382166000908152600f6020908152604080832093909355600b54600e909152919020555b610d5a6111d7565b60008211610d9b5760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b6044820152606401610562565b600d54610da890836111cb565b600d5533600090815260106020526040902054610dc590836111cb565b33600081815260106020526040902091909155600454610df2916001600160a01b039091169030856112a5565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906020016107d8565b6001546001600160a01b03163314610e4e5760405162461bcd60e51b81526004016105629061192a565b600c8190556040518181527ff93a50a66d32c098d21788f6934787a8162146b63c21bdd9b52e0e89ad28ee6d9060200161059c565b6001546001600160a01b03163314610ead5760405162461bcd60e51b81526004016105629061192a565b610eb68161144d565b50565b6001546001600160a01b03163314610ee35760405162461bcd60e51b81526004016105629061192a565b610eb681611550565b6000600d5460001415610f005750600b5490565b600754421015610f6157610f5c610f53600d54610525670de0b6b3a7640000610f4d610f396005546008546111b390919063ffffffff16565b610f4d600a54610f47610c5e565b906111a7565b906111b3565b600b54906111cb565b905090565b600754600a541015610fd457610f5c610f96600d54610525670de0b6b3a7640000610f4d600854610f4d600754610f47610c5e565b61052b610f53600d54610525670de0b6b3a7640000610f4d610fc56005546008546111b390919063ffffffff16565b600a54600754610f4d916111a7565b610f5c610f53600d54610525670de0b6b3a7640000610f4d600854610f4d600a54610f47610c5e565b6001546000906001600160a01b0316331461102a5760405162461bcd60e51b81526004016105629061192a565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561106e57600080fd5b505afa158015611082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a691906119d6565b6003546004549192506001600160a01b03918216911614156110d357600d546110d09082906111a7565b90505b42600655600354610f5c906001600160a01b0316338361123d565b3360009081526010602052604090205461110790610606565b61098c61098e565b6001546001600160a01b031633146111395760405162461bcd60e51b81526004016105629061192a565b6001600160a01b03811661119e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610562565b610eb681611380565b60006105318284611a20565b60006105318284611a37565b60006105318284611a56565b60006105318284611a78565b33321461098c573360009081526002602052604090205460ff1661098c5760405162461bcd60e51b815260206004820152601c60248201527f436f6e7472616374206d7573742062652077686974656c6973746564000000006044820152606401610562565b6040516001600160a01b0383166024820152604481018290526112a090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611601565b505050565b6040516001600160a01b03808516602483015283166044820152606481018290526112dd9085906323b872dd60e01b90608401611269565b50505050565b600154600160a01b900460ff166113335760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610562565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008183106113e15781610531565b5090919050565b600154600160a01b900460ff16156114125760405162461bcd60e51b81526004016105629061195f565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586113633390565b803b61149b5760405162461bcd60e51b815260206004820152601a60248201527f41646472657373206d757374206265206120636f6e74726163740000000000006044820152606401610562565b6001600160a01b03811660009081526002602052604090205460ff16156115045760405162461bcd60e51b815260206004820152601c60248201527f436f6e747261637420616c72656164792077686974656c6973746564000000006044820152606401610562565b6001600160a01b038116600081815260026020526040808220805460ff19166001179055517ffbd3cde7ff522a917e485c8ed2a6e87590887ab399f5ac312307903f498543079190a250565b6001600160a01b03811660009081526002602052604090205460ff166115b85760405162461bcd60e51b815260206004820152601860248201527f436f6e7472616374206e6f742077686974656c697374656400000000000000006044820152606401610562565b6001600160a01b038116600081815260026020526040808220805460ff19169055517f8e81447740597754af5db3e176253a36f7981a9549f48ace3f0cb233913f9d859190a250565b6000611656826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116d39092919063ffffffff16565b8051909150156112a057808060200190518101906116749190611a90565b6112a05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610562565b60606116e284846000856116ea565b949350505050565b60608247101561174b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610562565b6001600160a01b0385163b6117a25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610562565b600080866001600160a01b031685876040516117be9190611ad9565b60006040518083038185875af1925050503d80600081146117fb576040519150601f19603f3d011682016040523d82523d6000602084013e611800565b606091505b509150915061181082828661181b565b979650505050505050565b6060831561182a575081610531565b82511561183a5782518084602001fd5b8160405162461bcd60e51b81526004016105629190611af5565b60006020828403121561186657600080fd5b81356001600160a01b038116811461053157600080fd5b60006020828403121561188f57600080fd5b5035919050565b8015158114610eb657600080fd5b6000806000604084860312156118b957600080fd5b833567ffffffffffffffff808211156118d157600080fd5b818601915086601f8301126118e557600080fd5b8135818111156118f457600080fd5b8760208260051b850101111561190957600080fd5b6020928301955093505084013561191f81611896565b809150509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156119e857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611a1957611a196119ef565b5060010190565b600082821015611a3257611a326119ef565b500390565b6000816000190483118215151615611a5157611a516119ef565b500290565b600082611a7357634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611a8b57611a8b6119ef565b500190565b600060208284031215611aa257600080fd5b815161053181611896565b60005b83811015611ac8578181015183820152602001611ab0565b838111156112dd5750506000910152565b60008251611aeb818460208701611aad565b9190910192915050565b6020815260008251806020840152611b14816040850160208701611aad565b601f01601f1916919091016040019291505056fea26469706673582212205e172d42eb1d763767e21ecd56eaa14c4daa55ac9ea2b6c5af2056bde5c9da1164736f6c63430008090033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.