ETH Price: $2,152.74 (+0.59%)

Contract

0x71c372ea5B3D3e64a9225F76fa2cC26c2B68024b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw168096382023-03-12 4:40:471105 days ago1678596047IN
Amplifi: ERC20 Staking Pool
0 ETH0.0013709527.41906298
Exit168096222023-03-12 4:37:351105 days ago1678595855IN
Amplifi: ERC20 Staking Pool
0 ETH0.0008486521.21643668
Stake168091182023-03-12 2:55:471105 days ago1678589747IN
Amplifi: ERC20 Staking Pool
0 ETH0.0017392418.57554786
Stake168068582023-03-11 19:16:471105 days ago1678562207IN
Amplifi: ERC20 Staking Pool
0 ETH0.0037482440.03212652
Stake168062042023-03-11 17:04:471105 days ago1678554287IN
Amplifi: ERC20 Staking Pool
0 ETH0.0039968442.68174361
Stake168058532023-03-11 15:53:351105 days ago1678550015IN
Amplifi: ERC20 Staking Pool
0 ETH0.0042631345.52536126
Stake168058442023-03-11 15:51:471105 days ago1678549907IN
Amplifi: ERC20 Staking Pool
0 ETH0.0040574443.3288958
Exit168053252023-03-11 14:05:591105 days ago1678543559IN
Amplifi: ERC20 Staking Pool
0 ETH0.0039864955.22919775
Get Reward168053252023-03-11 14:05:591105 days ago1678543559IN
Amplifi: ERC20 Staking Pool
0 ETH0.0053412155.22919775
Stake168046562023-03-11 11:50:471105 days ago1678535447IN
Amplifi: ERC20 Staking Pool
0 ETH0.0064004457.79549561
Stake168002332023-03-10 20:55:471106 days ago1678481747IN
Amplifi: ERC20 Staking Pool
0 ETH0.0049523444.7192529
Stake167981832023-03-10 14:00:231106 days ago1678456823IN
Amplifi: ERC20 Staking Pool
0 ETH0.0035728632.26619551
Stake167969672023-03-10 9:52:351106 days ago1678441955IN
Amplifi: ERC20 Staking Pool
0 ETH0.0030032221.12995123
Exit167951212023-03-10 3:36:111107 days ago1678419371IN
Amplifi: ERC20 Staking Pool
0 ETH0.0023593922.51564917
Stake167936522023-03-09 22:36:351107 days ago1678401395IN
Amplifi: ERC20 Staking Pool
0 ETH0.003639232.28561566
Exit167936382023-03-09 22:33:471107 days ago1678401227IN
Amplifi: ERC20 Staking Pool
0 ETH0.0033560832.65026188
Exit167897802023-03-09 9:32:471107 days ago1678354367IN
Amplifi: ERC20 Staking Pool
0 ETH0.0019327222.04065476
Stake167814932023-03-08 5:34:471108 days ago1678253687IN
Amplifi: ERC20 Staking Pool
0 ETH0.0025468123
Exit167810762023-03-08 4:10:231109 days ago1678248623IN
Amplifi: ERC20 Staking Pool
0 ETH0.0017426319.87287477
Get Reward167810692023-03-08 4:08:591109 days ago1678248539IN
Amplifi: ERC20 Staking Pool
0 ETH0.0016558120.7990748
Stake167807002023-03-08 2:53:351109 days ago1678244015IN
Amplifi: ERC20 Staking Pool
0 ETH0.0026975624.3587525
Stake167768112023-03-07 13:46:351109 days ago1678196795IN
Amplifi: ERC20 Staking Pool
0 ETH0.0028618925.84266113
Exit167723582023-03-06 22:45:351110 days ago1678142735IN
Amplifi: ERC20 Staking Pool
0 ETH0.0038265536.51680802
Exit167721752023-03-06 22:08:471110 days ago1678140527IN
Amplifi: ERC20 Staking Pool
0 ETH0.0036544841.67550904
Exit167720352023-03-06 21:40:351110 days ago1678138835IN
Amplifi: ERC20 Staking Pool
0 ETH0.0042717548.71484702
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ERC20StakingPool

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma experimental ABIEncoderV2;
pragma solidity ^0.8.13;

import {ERC20} from "solmate/tokens/ERC20.sol";
import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol";

import "openzeppelin-contracts/access/Ownable.sol";
import {FullMath} from "./external/FullMath.sol";
import {Multicall} from "./external/Multicall.sol";
import {SelfPermit} from "./external/SelfPermit.sol";

/// @title ERC20StakingPool
/// @author zefram.eth
/// @notice A modern, gas optimized staking pool contract for rewarding ERC20 stakers
/// with ERC20 tokens periodically and continuously
contract ERC20StakingPool is Ownable, Multicall, SelfPermit {
    /// -----------------------------------------------------------------------
    /// Library usage
    /// -----------------------------------------------------------------------

    using SafeTransferLib for ERC20;

    /// -----------------------------------------------------------------------
    /// Errors
    /// -----------------------------------------------------------------------

    error Error_ZeroOwner();
    error Error_AlreadyInitialized();
    error Error_NotRewardDistributor();
    error Error_AmountTooLarge();

    /// -----------------------------------------------------------------------
    /// Events
    /// -----------------------------------------------------------------------

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

    /// -----------------------------------------------------------------------
    /// Constants
    /// -----------------------------------------------------------------------

    uint256 internal constant PRECISION = 1e30;

    /// -----------------------------------------------------------------------
    /// Storage variables
    /// -----------------------------------------------------------------------

    /// @notice The last Unix timestamp (in seconds) when rewardPerTokenStored was updated
    uint64 public lastUpdateTime;
    /// @notice The Unix timestamp (in seconds) at which the current reward period ends
    uint64 public periodFinish;

    /// @notice The per-second rate at which rewardPerToken increases
    uint256 public rewardRate;
    /// @notice The last stored rewardPerToken value
    uint256 public rewardPerTokenStored;
    /// @notice The total tokens staked in the pool
    uint256 public totalSupply;

    /// @notice Tracks if an address can call notifyReward()
    mapping(address => bool) public isRewardDistributor;

    /// @notice The time this account started staking
    mapping(address => uint256) public startedStaking;
    /// @notice The amount of tokens staked by an account
    mapping(address => uint256) public balanceOf;
    /// @notice The rewardPerToken value when an account last staked/withdrew/withdrew rewards
    mapping(address => uint256) public userRewardPerTokenPaid;
    /// @notice The earned() value when an account last staked/withdrew/withdrew rewards
    mapping(address => uint256) public rewards;

    /// -----------------------------------------------------------------------
    /// Immutable parameters
    /// -----------------------------------------------------------------------

    /// @notice The token being rewarded to stakers
    ERC20 public immutable rewardToken;

    /// @notice The token being staked in the pool
    ERC20 public immutable stakeToken;

    /// @notice The length of each reward period, in seconds
    uint64 public immutable duration;

    /// -----------------------------------------------------------------------
    /// Initialization
    /// -----------------------------------------------------------------------

    /// @notice Initializes the contract
    /// @param _rewardToken The token to be rewarded to stakers
    /// @param _stakeToken The token to be staked by stakers
    /// @param _duration The duration of the staking
    constructor(
        ERC20 _rewardToken,
        ERC20 _stakeToken,
        uint64 _duration
    ) {
        rewardToken = _rewardToken;
        stakeToken = _stakeToken;
        duration = _duration;
        _transferOwnership(msg.sender);
    }

    /// -----------------------------------------------------------------------
    /// User actions
    /// -----------------------------------------------------------------------

    /// @notice Stakes tokens in the pool to earn rewards
    /// @param amount The amount of tokens to stake
    function stake(uint256 amount) external {
        /// -----------------------------------------------------------------------
        /// Validation
        /// -----------------------------------------------------------------------

        if (amount == 0) {
            return;
        }

        /// -----------------------------------------------------------------------
        /// Storage loads
        /// -----------------------------------------------------------------------

        uint256 accountBalance = balanceOf[msg.sender];
        uint64 lastTimeRewardApplicable_ = lastTimeRewardApplicable();
        uint256 totalSupply_ = totalSupply;
        uint256 rewardPerToken_ = _rewardPerToken(totalSupply_, lastTimeRewardApplicable_, rewardRate);

        /// -----------------------------------------------------------------------
        /// State updates
        /// -----------------------------------------------------------------------

        // accrue rewards
        rewardPerTokenStored = rewardPerToken_;
        lastUpdateTime = lastTimeRewardApplicable_;
        rewards[msg.sender] = _earned(msg.sender, accountBalance, rewardPerToken_, rewards[msg.sender]);
        userRewardPerTokenPaid[msg.sender] = rewardPerToken_;

        // stake
        totalSupply = totalSupply_ + amount;
        balanceOf[msg.sender] = accountBalance + amount;
        startedStaking[msg.sender] = block.timestamp;

        /// -----------------------------------------------------------------------
        /// Effects
        /// -----------------------------------------------------------------------

        stakeToken.safeTransferFrom(msg.sender, address(this), amount);

        emit Staked(msg.sender, amount);
    }

    /// @notice Withdraws staked tokens from the pool
    /// @param amount The amount of tokens to withdraw
    function withdraw(uint256 amount) external {
        /// -----------------------------------------------------------------------
        /// Validation
        /// -----------------------------------------------------------------------

        if (amount == 0) {
            return;
        }

        /// -----------------------------------------------------------------------
        /// Storage loads
        /// -----------------------------------------------------------------------

        uint256 accountBalance = balanceOf[msg.sender];
        uint64 lastTimeRewardApplicable_ = lastTimeRewardApplicable();
        uint256 totalSupply_ = totalSupply;
        uint256 rewardPerToken_ = _rewardPerToken(totalSupply_, lastTimeRewardApplicable_, rewardRate);

        /// -----------------------------------------------------------------------
        /// State updates
        /// -----------------------------------------------------------------------

        // accrue rewards
        rewardPerTokenStored = rewardPerToken_;
        lastUpdateTime = lastTimeRewardApplicable_;
        rewards[msg.sender] = _earned(msg.sender, accountBalance, rewardPerToken_, rewards[msg.sender]);
        userRewardPerTokenPaid[msg.sender] = rewardPerToken_;

        // withdraw stake
        balanceOf[msg.sender] = accountBalance - amount;
        // total supply has 1:1 relationship with staked amounts
        // so can't ever underflow
        unchecked {
            totalSupply = totalSupply_ - amount;
        }

        /// -----------------------------------------------------------------------
        /// Effects
        /// -----------------------------------------------------------------------

        stakeToken.safeTransfer(msg.sender, amount);

        emit Withdrawn(msg.sender, amount);
    }

    /// @notice Withdraws all staked tokens and earned rewards
    function exit() external {
        /// -----------------------------------------------------------------------
        /// Validation
        /// -----------------------------------------------------------------------

        uint256 accountBalance = balanceOf[msg.sender];

        /// -----------------------------------------------------------------------
        /// Storage loads
        /// -----------------------------------------------------------------------

        uint64 lastTimeRewardApplicable_ = lastTimeRewardApplicable();
        uint256 totalSupply_ = totalSupply;
        uint256 rewardPerToken_ = _rewardPerToken(totalSupply_, lastTimeRewardApplicable_, rewardRate);

        /// -----------------------------------------------------------------------
        /// State updates
        /// -----------------------------------------------------------------------

        // give rewards
        uint256 reward = _earned(msg.sender, accountBalance, rewardPerToken_, rewards[msg.sender]);
        if (reward > 0) {
            rewards[msg.sender] = 0;
        }

        // accrue rewards
        rewardPerTokenStored = rewardPerToken_;
        lastUpdateTime = lastTimeRewardApplicable_;
        userRewardPerTokenPaid[msg.sender] = rewardPerToken_;

        // withdraw stake
        balanceOf[msg.sender] = 0;
        // total supply has 1:1 relationship with staked amounts
        // so can't ever underflow
        unchecked {
            totalSupply = totalSupply_ - accountBalance;
        }

        /// -----------------------------------------------------------------------
        /// Effects
        /// -----------------------------------------------------------------------

        // transfer stake
        stakeToken.safeTransfer(msg.sender, accountBalance);
        emit Withdrawn(msg.sender, accountBalance);

        // transfer rewards
        if (reward > 0) {
            rewardToken.safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    /// @notice Withdraws all earned rewards
    function getReward() external {
        /// -----------------------------------------------------------------------
        /// Storage loads
        /// -----------------------------------------------------------------------

        uint256 accountBalance = balanceOf[msg.sender];
        uint64 lastTimeRewardApplicable_ = lastTimeRewardApplicable();
        uint256 totalSupply_ = totalSupply;
        uint256 rewardPerToken_ = _rewardPerToken(totalSupply_, lastTimeRewardApplicable_, rewardRate);

        /// -----------------------------------------------------------------------
        /// State updates
        /// -----------------------------------------------------------------------

        uint256 reward = _earned(msg.sender, accountBalance, rewardPerToken_, rewards[msg.sender]);

        // accrue rewards
        rewardPerTokenStored = rewardPerToken_;
        lastUpdateTime = lastTimeRewardApplicable_;
        userRewardPerTokenPaid[msg.sender] = rewardPerToken_;

        // withdraw rewards
        if (reward > 0) {
            rewards[msg.sender] = 0;

            /// -----------------------------------------------------------------------
            /// Effects
            /// -----------------------------------------------------------------------

            rewardToken.safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    /// -----------------------------------------------------------------------
    /// Getters
    /// -----------------------------------------------------------------------

    /// @notice The latest time at which stakers are earning rewards.
    function lastTimeRewardApplicable() public view returns (uint64) {
        return block.timestamp < periodFinish ? uint64(block.timestamp) : periodFinish;
    }

    /// @notice The amount of reward tokens each staked token has earned so far
    function rewardPerToken() external view returns (uint256) {
        return _rewardPerToken(totalSupply, lastTimeRewardApplicable(), rewardRate);
    }

    /// @notice The amount of reward tokens an account has accrued so far. Does not
    /// include already withdrawn rewards.
    function earned(address account) external view returns (uint256) {
        return
            _earned(
                account,
                balanceOf[account],
                _rewardPerToken(totalSupply, lastTimeRewardApplicable(), rewardRate),
                rewards[account]
            );
    }

    /// -----------------------------------------------------------------------
    /// Owner actions
    /// -----------------------------------------------------------------------

    /// @notice Lets a reward distributor start a new reward period. The reward tokens must have already
    /// been transferred to this contract before calling this function. If it is called
    /// when a reward period is still active, a new reward period will begin from the time
    /// of calling this function, using the leftover rewards from the old reward period plus
    /// the newly sent rewards as the reward.
    /// @dev If the reward amount will cause an overflow when computing rewardPerToken, then
    /// this function will revert.
    /// @param reward The amount of reward tokens to use in the new reward period.
    function notifyRewardAmount(uint256 reward) external {
        /// -----------------------------------------------------------------------
        /// Validation
        /// -----------------------------------------------------------------------

        if (reward == 0) {
            return;
        }
        if (!isRewardDistributor[msg.sender]) {
            revert Error_NotRewardDistributor();
        }

        /// -----------------------------------------------------------------------
        /// Storage loads
        /// -----------------------------------------------------------------------

        uint256 rewardRate_ = rewardRate;
        uint64 periodFinish_ = periodFinish;
        uint64 lastTimeRewardApplicable_ = block.timestamp < periodFinish_ ? uint64(block.timestamp) : periodFinish_;
        uint64 DURATION_ = duration;
        uint256 totalSupply_ = totalSupply;

        /// -----------------------------------------------------------------------
        /// State updates
        /// -----------------------------------------------------------------------

        // accrue rewards
        rewardPerTokenStored = _rewardPerToken(totalSupply_, lastTimeRewardApplicable_, rewardRate_);
        lastUpdateTime = lastTimeRewardApplicable_;

        // record new reward
        uint256 newRewardRate;
        if (block.timestamp >= periodFinish_) {
            newRewardRate = reward / DURATION_;
        } else {
            uint256 remaining = periodFinish_ - block.timestamp;
            uint256 leftover = remaining * rewardRate_;
            newRewardRate = (reward + leftover) / DURATION_;
        }
        // prevent overflow when computing rewardPerToken
        if (newRewardRate >= ((type(uint256).max / PRECISION) / DURATION_)) {
            revert Error_AmountTooLarge();
        }
        rewardRate = newRewardRate;
        lastUpdateTime = uint64(block.timestamp);
        periodFinish = uint64(block.timestamp + DURATION_);

        emit RewardAdded(reward);
    }

    /// @notice Lets the owner add/remove accounts from the list of reward distributors.
    /// Reward distributors can call notifyRewardAmount()
    /// @param rewardDistributor The account to add/remove
    /// @param isRewardDistributor_ True to add the account, false to remove the account
    function setRewardDistributor(address rewardDistributor, bool isRewardDistributor_) external onlyOwner {
        isRewardDistributor[rewardDistributor] = isRewardDistributor_;
    }

    /// -----------------------------------------------------------------------
    /// Internal functions
    /// -----------------------------------------------------------------------

    function _earned(
        address account,
        uint256 accountBalance,
        uint256 rewardPerToken_,
        uint256 accountRewards
    ) internal view returns (uint256) {
        return
            FullMath.mulDiv(accountBalance, rewardPerToken_ - userRewardPerTokenPaid[account], PRECISION) +
            accountRewards;
    }

    function _rewardPerToken(
        uint256 totalSupply_,
        uint256 lastTimeRewardApplicable_,
        uint256 rewardRate_
    ) internal view returns (uint256) {
        if (totalSupply_ == 0) {
            return rewardPerTokenStored;
        }
        return
            rewardPerTokenStored +
            FullMath.mulDiv((lastTimeRewardApplicable_ - lastUpdateTime) * PRECISION, rewardRate_, totalSupply_);
    }

    function withdrawETH(address _recipient) external onlyOwner {
        (bool success, ) = _recipient.call{value: address(this).balance}("");
        require(success, "Could not send ETH");
    }

    function withdrawToken(ERC20 _token, address _recipient) external onlyOwner {
        _token.transfer(_recipient, _token.balanceOf(address(this)));
    }
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool success;

        assembly {
            // Transfer the ETH and store if it succeeded or not.
            success := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(success, "ETH_TRANSFER_FAILED");
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument.
            mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)
            )
        }

        require(success, "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "APPROVE_FAILED");
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = a * b
            // Compute the product mod 2**256 and mod 2**256 - 1
            // then use the Chinese Remainder Theorem to reconstruct
            // the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2**256 + prod0
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(a, b, not(0))
                prod0 := mul(a, b)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division
            if (prod1 == 0) {
                require(denominator > 0);
                assembly {
                    result := div(prod0, denominator)
                }
                return result;
            }

            // Make sure the result is less than 2**256.
            // Also prevents denominator == 0
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0]
            // Compute remainder using mulmod
            uint256 remainder;
            assembly {
                remainder := mulmod(a, b, denominator)
            }
            // Subtract 256 bit number from 512 bit number
            assembly {
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator
            // Compute largest power of two divisor of denominator.
            // Always >= 1.
            uint256 twos = (type(uint256).max - denominator + 1) & denominator;
            // Divide denominator by power of two
            assembly {
                denominator := div(denominator, twos)
            }

            // Divide [prod1 prod0] by the factors of two
            assembly {
                prod0 := div(prod0, twos)
            }
            // Shift in bits from prod1 into prod0. For this we need
            // to flip `twos` such that it is 2**256 / twos.
            // If twos is zero, then it becomes one
            assembly {
                twos := add(div(sub(0, twos), twos), 1)
            }
            prod0 |= prod1 * twos;

            // Invert denominator mod 2**256
            // Now that denominator is an odd number, it has an inverse
            // modulo 2**256 such that denominator * inv = 1 mod 2**256.
            // Compute the inverse by starting with a seed that is correct
            // correct for four bits. That is, denominator * inv = 1 mod 2**4
            uint256 inv = (3 * denominator) ^ 2;
            // Now use Newton-Raphson iteration to improve the precision.
            // Thanks to Hensel's lifting lemma, this also works in modular
            // arithmetic, doubling the correct bits in each step.
            inv *= 2 - denominator * inv; // inverse mod 2**8
            inv *= 2 - denominator * inv; // inverse mod 2**16
            inv *= 2 - denominator * inv; // inverse mod 2**32
            inv *= 2 - denominator * inv; // inverse mod 2**64
            inv *= 2 - denominator * inv; // inverse mod 2**128
            inv *= 2 - denominator * inv; // inverse mod 2**256

            // Because the division is now exact we can divide by multiplying
            // with the modular inverse of denominator. This will give us the
            // correct result modulo 2**256. Since the precoditions guarantee
            // that the outcome is less than 2**256, this is the final result.
            // We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inv;
            return result;
        }
    }

    /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    function mulDivRoundingUp(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        result = mulDiv(a, b, denominator);
        unchecked {
            if (mulmod(a, b, denominator) > 0) {
                require(result < type(uint256).max);
                result++;
            }
        }
    }
}

File 6 of 8 : Multicall.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.4;

/// @title Multicall
/// @notice Enables calling multiple methods in a single call to the contract
abstract contract Multicall {
    function multicall(bytes[] calldata data) external payable returns (bytes[] memory results) {
        results = new bytes[](data.length);
        for (uint256 i = 0; i < data.length; i++) {
            (bool success, bytes memory result) = address(this).delegatecall(data[i]);

            if (!success) {
                // Next 5 lines from https://ethereum.stackexchange.com/a/83577
                if (result.length < 68) revert();
                assembly {
                    result := add(result, 0x04)
                }
                revert(abi.decode(result, (string)));
            }

            results[i] = result;
        }
    }
}

// SPDX-License-Identifier: AGPL-3.0
pragma solidity >=0.5.0;

import {ERC20} from "solmate/tokens/ERC20.sol";

/// @title Self Permit
/// @notice Functionality to call permit on any EIP-2612-compliant token for use in the route
/// @dev These functions are expected to be embedded in multicalls to allow EOAs to approve a contract and call a function
/// that requires an approval in a single transaction.
abstract contract SelfPermit {
    function selfPermit(
        ERC20 token,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public payable {
        token.permit(msg.sender, address(this), value, deadline, v, r, s);
    }

    function selfPermitIfNecessary(
        ERC20 token,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable {
        if (token.allowance(msg.sender, address(this)) < value) selfPermit(token, value, deadline, v, r, s);
    }
}

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

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "solenv/=lib/solenv/src/",
    "solidity-stringutils/=lib/solenv/lib/solidity-stringutils/src/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract ERC20","name":"_rewardToken","type":"address"},{"internalType":"contract ERC20","name":"_stakeToken","type":"address"},{"internalType":"uint64","name":"_duration","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Error_AlreadyInitialized","type":"error"},{"inputs":[],"name":"Error_AmountTooLarge","type":"error"},{"inputs":[],"name":"Error_NotRewardDistributor","type":"error"},{"inputs":[],"name":"Error_ZeroOwner","type":"error"},{"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"}],"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":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"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":[{"internalType":"address","name":"","type":"address"}],"name":"isRewardDistributor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"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":[],"name":"rewardToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"rewardDistributor","type":"address"},{"internalType":"bool","name":"isRewardDistributor_","type":"bool"}],"name":"setRewardDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"startedStaking","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"_token","type":"address"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b5060405162001bc138038062001bc18339810160408190526200003491620000e0565b6200003f3362000073565b6001600160a01b03808416608052821660a0526001600160401b03811660c0526200006a3362000073565b5050506200013a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000db57600080fd5b919050565b600080600060608486031215620000f657600080fd5b6200010184620000c3565b92506200011160208501620000c3565b60408501519092506001600160401b03811681146200012f57600080fd5b809150509250925092565b60805160a05160c051611a2d620001946000396000818161024301526108f101526000818161035c0152818161073401528181610dc501526110eb0152600081816105da01528181610b57015261115a0152611a2d6000f3fe6080604052600436106101cc5760003560e01c806380e59f8d116100f7578063c8f33c9111610095578063ebe2b12b11610064578063ebe2b12b14610575578063f2fde38b14610595578063f3995c67146105b5578063f7c618c1146105c857600080fd5b8063c8f33c911461050e578063cd3daf9d14610535578063df136d651461054a578063e9fad8ee1461056057600080fd5b80638da5cb5b116100d15780638da5cb5b1461049d578063a694fc3a146104bb578063ac9650d8146104db578063c2e3140a146104fb57600080fd5b806380e59f8d1461043b57806380faa57d1461045b5780638b8763471461047057600080fd5b80633c6b16ab1161016f57806370a082311161013e57806370a08231146103b6578063715018a6146103e35780637b0a47ee146103f85780637fe1ba631461040e57600080fd5b80633c6b16ab146103155780633d18b9121461033557806351ed6a301461034a578063690d83201461039657600080fd5b806316ed8525116101ab57806316ed85251461027d57806318160ddd146102bd5780632e1a7d4d146102d35780633aeac4e1146102f557600080fd5b80628cc262146101d15780630700037d146102045780630fb5a6b414610231575b600080fd5b3480156101dd57600080fd5b506101f16101ec3660046115b0565b6105fc565b6040519081526020015b60405180910390f35b34801561021057600080fd5b506101f161021f3660046115b0565b60096020526000908152604090205481565b34801561023d57600080fd5b506102657f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160401b0390911681526020016101fb565b34801561028957600080fd5b506102ad6102983660046115b0565b60056020526000908152604090205460ff1681565b60405190151581526020016101fb565b3480156102c957600080fd5b506101f160045481565b3480156102df57600080fd5b506102f36102ee3660046115cd565b61065f565b005b34801561030157600080fd5b506102f36103103660046115e6565b6107a0565b34801561032157600080fd5b506102f36103303660046115cd565b61088e565b34801561034157600080fd5b506102f3610aa4565b34801561035657600080fd5b5061037e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101fb565b3480156103a257600080fd5b506102f36103b13660046115b0565b610bbf565b3480156103c257600080fd5b506101f16103d13660046115b0565b60076020526000908152604090205481565b3480156103ef57600080fd5b506102f3610c68565b34801561040457600080fd5b506101f160025481565b34801561041a57600080fd5b506101f16104293660046115b0565b60066020526000908152604090205481565b34801561044757600080fd5b506102f361045636600461162d565b610c7c565b34801561046757600080fd5b50610265610caf565b34801561047c57600080fd5b506101f161048b3660046115b0565b60086020526000908152604090205481565b3480156104a957600080fd5b506000546001600160a01b031661037e565b3480156104c757600080fd5b506102f36104d63660046115cd565b610cdb565b6104ee6104e936600461165b565b610e27565b6040516101fb919061171f565b6102f3610509366004611781565b610f7e565b34801561051a57600080fd5b5060005461026590600160a01b90046001600160401b031681565b34801561054157600080fd5b506101f161100a565b34801561055657600080fd5b506101f160035481565b34801561056c57600080fd5b506102f361101a565b34801561058157600080fd5b50600154610265906001600160401b031681565b3480156105a157600080fd5b506102f36105b03660046115b0565b611181565b6102f36105c3366004611781565b6111fa565b3480156105d457600080fd5b5061037e7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b03811660009081526007602052604081205460045461065991849161063b9061062a610caf565b6001600160401b0316600254611286565b6001600160a01b0386166000908152600960205260409020546112f1565b92915050565b8060000361066a5750565b3360009081526007602052604081205490610683610caf565b90506000600454905060006106a482846001600160401b0316600254611286565b60038190556000805467ffffffffffffffff60a01b1916600160a01b6001600160401b038716021781553380825260096020526040909120549192506106ed91869084906112f1565b33600090815260096020908152604080832093909355600890522081905561071585856117f9565b33600081815260076020526040902091909155858303600455610763907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169087611342565b60405185815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a25050505050565b6107a86113c0565b6040516370a0823160e01b81523060048201526001600160a01b0383169063a9059cbb90839083906370a0823190602401602060405180830381865afa1580156107f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081a919061180c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610865573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108899190611825565b505050565b806000036108995750565b3360009081526005602052604090205460ff166108c95760405163434e91f160e01b815260040160405180910390fd5b6002546001546001600160401b031660004282116108e757816108e9565b425b6004549091507f000000000000000000000000000000000000000000000000000000000000000090610925816001600160401b03851687611286565b600355600080546001600160401b03808616600160a01b0267ffffffffffffffff60a01b19909216919091178255851642106109755761096e6001600160401b03841688611842565b90506109bd565b600061098a426001600160401b0388166117f9565b905060006109988883611864565b90506001600160401b0385166109ae828b611883565b6109b89190611842565b925050505b6001600160401b0383166109e06c0c9f2c9cd04674edea40000000600019611842565b6109ea9190611842565b8110610a09576040516398bb2e4560e01b815260040160405180910390fd5b6002819055600080546001600160401b0342818116600160a01b0267ffffffffffffffff60a01b1990931692909217909255610a4791851690611883565b6001805467ffffffffffffffff19166001600160401b03929092169190911790556040518781527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a150505050505050565b3360009081526007602052604081205490610abd610caf565b9050600060045490506000610ade82846001600160401b0316600254611286565b3360008181526009602052604081205492935091610b009190879085906112f1565b60038390556000805467ffffffffffffffff60a01b1916600160a01b6001600160401b0388160217815533815260086020526040902083905590508015610bb85733600081815260096020526040812055610b86907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083611342565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048690602001610791565b5050505050565b610bc76113c0565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610c14576040519150601f19603f3d011682016040523d82523d6000602084013e610c19565b606091505b5050905080610c645760405162461bcd60e51b8152602060048201526012602482015271086deead8c840dcdee840e6cadcc8408aa8960731b60448201526064015b60405180910390fd5b5050565b610c706113c0565b610c7a600061141a565b565b610c846113c0565b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6001546000906001600160401b03164210610cd457506001546001600160401b031690565b425b905090565b80600003610ce65750565b3360009081526007602052604081205490610cff610caf565b9050600060045490506000610d2082846001600160401b0316600254611286565b60038190556000805467ffffffffffffffff60a01b1916600160a01b6001600160401b03871602178155338082526009602052604090912054919250610d6991869084906112f1565b336000908152600960209081526040808320939093556008905220819055610d918583611883565b600455610d9e8585611883565b336000818152600760209081526040808320949094556006905291909120429055610df5907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690308861146a565b60405185815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90602001610791565b6060816001600160401b03811115610e4157610e41611896565b604051908082528060200260200182016040528015610e7457816020015b6060815260200190600190039081610e5f5790505b50905060005b82811015610f775760008030868685818110610e9857610e986118ac565b9050602002810190610eaa91906118c2565b604051610eb892919061190f565b600060405180830381855af49150503d8060008114610ef3576040519150601f19603f3d011682016040523d82523d6000602084013e610ef8565b606091505b509150915081610f4457604481511015610f1157600080fd5b60048101905080806020019051810190610f2b919061191f565b60405162461bcd60e51b8152600401610c5b91906119cb565b80848481518110610f5757610f576118ac565b602002602001018190525050508080610f6f906119de565b915050610e7a565b5092915050565b604051636eb1769f60e11b815233600482015230602482015285906001600160a01b0388169063dd62ed3e90604401602060405180830381865afa158015610fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fee919061180c565b1015611002576110028686868686866111fa565b505050505050565b6000610cd660045461062a610caf565b3360009081526007602052604081205490611033610caf565b905060006004549050600061105482846001600160401b0316600254611286565b33600081815260096020526040812054929350916110769190879085906112f1565b9050801561108f57336000908152600960205260408120555b60038290556000805467ffffffffffffffff60a01b1916600160a01b6001600160401b03871602178155338082526008602090815260408084208690556007909152822091909155858403600455611112906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169087611342565b60405185815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a28015610bb857610b866001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383611342565b6111896113c0565b6001600160a01b0381166111ee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c5b565b6111f78161141a565b50565b60405163d505accf60e01b8152336004820152306024820152604481018690526064810185905260ff8416608482015260a4810183905260c481018290526001600160a01b0387169063d505accf9060e401600060405180830381600087803b15801561126657600080fd5b505af115801561127a573d6000803e3d6000fd5b50505050505050505050565b60008360000361129957506003546112ea565b6000546112da906c0c9f2c9cd04674edea40000000906112c990600160a01b90046001600160401b0316866117f9565b6112d39190611864565b83866114ed565b6003546112e79190611883565b90505b9392505050565b6001600160a01b038416600090815260086020526040812054829061132f90869061131c90876117f9565b6c0c9f2c9cd04674edea400000006114ed565b6113399190611883565b95945050505050565b600060405163a9059cbb60e01b8152836004820152826024820152602060006044836000895af13d15601f3d11600160005114161716915050806113ba5760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606401610c5b565b50505050565b6000546001600160a01b03163314610c7a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c5b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006040516323b872dd60e01b81528460048201528360248201528260448201526020600060648360008a5af13d15601f3d1160016000511416171691505080610bb85760405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d19493d357d1905253115160621b6044820152606401610c5b565b6000808060001985870985870292508281108382030391505080600003611526576000841161151b57600080fd5b5082900490506112ea565b80841161153257600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6001600160a01b03811681146111f757600080fd5b6000602082840312156115c257600080fd5b81356112ea8161159b565b6000602082840312156115df57600080fd5b5035919050565b600080604083850312156115f957600080fd5b82356116048161159b565b915060208301356116148161159b565b809150509250929050565b80151581146111f757600080fd5b6000806040838503121561164057600080fd5b823561164b8161159b565b915060208301356116148161161f565b6000806020838503121561166e57600080fd5b82356001600160401b038082111561168557600080fd5b818501915085601f83011261169957600080fd5b8135818111156116a857600080fd5b8660208260051b85010111156116bd57600080fd5b60209290920196919550909350505050565b60005b838110156116ea5781810151838201526020016116d2565b50506000910152565b6000815180845261170b8160208601602086016116cf565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561177457603f198886030184526117628583516116f3565b94509285019290850190600101611746565b5092979650505050505050565b60008060008060008060c0878903121561179a57600080fd5b86356117a58161159b565b95506020870135945060408701359350606087013560ff811681146117c957600080fd5b9598949750929560808101359460a0909101359350915050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610659576106596117e3565b60006020828403121561181e57600080fd5b5051919050565b60006020828403121561183757600080fd5b81516112ea8161161f565b60008261185f57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561187e5761187e6117e3565b500290565b80820180821115610659576106596117e3565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126118d957600080fd5b8301803591506001600160401b038211156118f357600080fd5b60200191503681900382131561190857600080fd5b9250929050565b8183823760009101908152919050565b60006020828403121561193157600080fd5b81516001600160401b038082111561194857600080fd5b818401915084601f83011261195c57600080fd5b81518181111561196e5761196e611896565b604051601f8201601f19908116603f0116810190838211818310171561199657611996611896565b816040528281528760208487010111156119af57600080fd5b6119c08360208301602088016116cf565b979650505050505050565b6020815260006112ea60208301846116f3565b6000600182016119f0576119f06117e3565b506001019056fea26469706673582212206a68520c42ee60cd947544d81f8644fbfa1d33a267474582d893f09b52448b6e64736f6c63430008100033000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd9000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd90000000000000000000000000000000000000000000000000000000000ed4e00

Deployed Bytecode

0x6080604052600436106101cc5760003560e01c806380e59f8d116100f7578063c8f33c9111610095578063ebe2b12b11610064578063ebe2b12b14610575578063f2fde38b14610595578063f3995c67146105b5578063f7c618c1146105c857600080fd5b8063c8f33c911461050e578063cd3daf9d14610535578063df136d651461054a578063e9fad8ee1461056057600080fd5b80638da5cb5b116100d15780638da5cb5b1461049d578063a694fc3a146104bb578063ac9650d8146104db578063c2e3140a146104fb57600080fd5b806380e59f8d1461043b57806380faa57d1461045b5780638b8763471461047057600080fd5b80633c6b16ab1161016f57806370a082311161013e57806370a08231146103b6578063715018a6146103e35780637b0a47ee146103f85780637fe1ba631461040e57600080fd5b80633c6b16ab146103155780633d18b9121461033557806351ed6a301461034a578063690d83201461039657600080fd5b806316ed8525116101ab57806316ed85251461027d57806318160ddd146102bd5780632e1a7d4d146102d35780633aeac4e1146102f557600080fd5b80628cc262146101d15780630700037d146102045780630fb5a6b414610231575b600080fd5b3480156101dd57600080fd5b506101f16101ec3660046115b0565b6105fc565b6040519081526020015b60405180910390f35b34801561021057600080fd5b506101f161021f3660046115b0565b60096020526000908152604090205481565b34801561023d57600080fd5b506102657f0000000000000000000000000000000000000000000000000000000000ed4e0081565b6040516001600160401b0390911681526020016101fb565b34801561028957600080fd5b506102ad6102983660046115b0565b60056020526000908152604090205460ff1681565b60405190151581526020016101fb565b3480156102c957600080fd5b506101f160045481565b3480156102df57600080fd5b506102f36102ee3660046115cd565b61065f565b005b34801561030157600080fd5b506102f36103103660046115e6565b6107a0565b34801561032157600080fd5b506102f36103303660046115cd565b61088e565b34801561034157600080fd5b506102f3610aa4565b34801561035657600080fd5b5061037e7f000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd981565b6040516001600160a01b0390911681526020016101fb565b3480156103a257600080fd5b506102f36103b13660046115b0565b610bbf565b3480156103c257600080fd5b506101f16103d13660046115b0565b60076020526000908152604090205481565b3480156103ef57600080fd5b506102f3610c68565b34801561040457600080fd5b506101f160025481565b34801561041a57600080fd5b506101f16104293660046115b0565b60066020526000908152604090205481565b34801561044757600080fd5b506102f361045636600461162d565b610c7c565b34801561046757600080fd5b50610265610caf565b34801561047c57600080fd5b506101f161048b3660046115b0565b60086020526000908152604090205481565b3480156104a957600080fd5b506000546001600160a01b031661037e565b3480156104c757600080fd5b506102f36104d63660046115cd565b610cdb565b6104ee6104e936600461165b565b610e27565b6040516101fb919061171f565b6102f3610509366004611781565b610f7e565b34801561051a57600080fd5b5060005461026590600160a01b90046001600160401b031681565b34801561054157600080fd5b506101f161100a565b34801561055657600080fd5b506101f160035481565b34801561056c57600080fd5b506102f361101a565b34801561058157600080fd5b50600154610265906001600160401b031681565b3480156105a157600080fd5b506102f36105b03660046115b0565b611181565b6102f36105c3366004611781565b6111fa565b3480156105d457600080fd5b5061037e7f000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd981565b6001600160a01b03811660009081526007602052604081205460045461065991849161063b9061062a610caf565b6001600160401b0316600254611286565b6001600160a01b0386166000908152600960205260409020546112f1565b92915050565b8060000361066a5750565b3360009081526007602052604081205490610683610caf565b90506000600454905060006106a482846001600160401b0316600254611286565b60038190556000805467ffffffffffffffff60a01b1916600160a01b6001600160401b038716021781553380825260096020526040909120549192506106ed91869084906112f1565b33600090815260096020908152604080832093909355600890522081905561071585856117f9565b33600081815260076020526040902091909155858303600455610763907f000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd96001600160a01b03169087611342565b60405185815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a25050505050565b6107a86113c0565b6040516370a0823160e01b81523060048201526001600160a01b0383169063a9059cbb90839083906370a0823190602401602060405180830381865afa1580156107f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081a919061180c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610865573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108899190611825565b505050565b806000036108995750565b3360009081526005602052604090205460ff166108c95760405163434e91f160e01b815260040160405180910390fd5b6002546001546001600160401b031660004282116108e757816108e9565b425b6004549091507f0000000000000000000000000000000000000000000000000000000000ed4e0090610925816001600160401b03851687611286565b600355600080546001600160401b03808616600160a01b0267ffffffffffffffff60a01b19909216919091178255851642106109755761096e6001600160401b03841688611842565b90506109bd565b600061098a426001600160401b0388166117f9565b905060006109988883611864565b90506001600160401b0385166109ae828b611883565b6109b89190611842565b925050505b6001600160401b0383166109e06c0c9f2c9cd04674edea40000000600019611842565b6109ea9190611842565b8110610a09576040516398bb2e4560e01b815260040160405180910390fd5b6002819055600080546001600160401b0342818116600160a01b0267ffffffffffffffff60a01b1990931692909217909255610a4791851690611883565b6001805467ffffffffffffffff19166001600160401b03929092169190911790556040518781527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a150505050505050565b3360009081526007602052604081205490610abd610caf565b9050600060045490506000610ade82846001600160401b0316600254611286565b3360008181526009602052604081205492935091610b009190879085906112f1565b60038390556000805467ffffffffffffffff60a01b1916600160a01b6001600160401b0388160217815533815260086020526040902083905590508015610bb85733600081815260096020526040812055610b86907f000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd96001600160a01b03169083611342565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048690602001610791565b5050505050565b610bc76113c0565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610c14576040519150601f19603f3d011682016040523d82523d6000602084013e610c19565b606091505b5050905080610c645760405162461bcd60e51b8152602060048201526012602482015271086deead8c840dcdee840e6cadcc8408aa8960731b60448201526064015b60405180910390fd5b5050565b610c706113c0565b610c7a600061141a565b565b610c846113c0565b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6001546000906001600160401b03164210610cd457506001546001600160401b031690565b425b905090565b80600003610ce65750565b3360009081526007602052604081205490610cff610caf565b9050600060045490506000610d2082846001600160401b0316600254611286565b60038190556000805467ffffffffffffffff60a01b1916600160a01b6001600160401b03871602178155338082526009602052604090912054919250610d6991869084906112f1565b336000908152600960209081526040808320939093556008905220819055610d918583611883565b600455610d9e8585611883565b336000818152600760209081526040808320949094556006905291909120429055610df5907f000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd96001600160a01b031690308861146a565b60405185815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90602001610791565b6060816001600160401b03811115610e4157610e41611896565b604051908082528060200260200182016040528015610e7457816020015b6060815260200190600190039081610e5f5790505b50905060005b82811015610f775760008030868685818110610e9857610e986118ac565b9050602002810190610eaa91906118c2565b604051610eb892919061190f565b600060405180830381855af49150503d8060008114610ef3576040519150601f19603f3d011682016040523d82523d6000602084013e610ef8565b606091505b509150915081610f4457604481511015610f1157600080fd5b60048101905080806020019051810190610f2b919061191f565b60405162461bcd60e51b8152600401610c5b91906119cb565b80848481518110610f5757610f576118ac565b602002602001018190525050508080610f6f906119de565b915050610e7a565b5092915050565b604051636eb1769f60e11b815233600482015230602482015285906001600160a01b0388169063dd62ed3e90604401602060405180830381865afa158015610fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fee919061180c565b1015611002576110028686868686866111fa565b505050505050565b6000610cd660045461062a610caf565b3360009081526007602052604081205490611033610caf565b905060006004549050600061105482846001600160401b0316600254611286565b33600081815260096020526040812054929350916110769190879085906112f1565b9050801561108f57336000908152600960205260408120555b60038290556000805467ffffffffffffffff60a01b1916600160a01b6001600160401b03871602178155338082526008602090815260408084208690556007909152822091909155858403600455611112906001600160a01b037f000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd9169087611342565b60405185815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a28015610bb857610b866001600160a01b037f000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd9163383611342565b6111896113c0565b6001600160a01b0381166111ee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c5b565b6111f78161141a565b50565b60405163d505accf60e01b8152336004820152306024820152604481018690526064810185905260ff8416608482015260a4810183905260c481018290526001600160a01b0387169063d505accf9060e401600060405180830381600087803b15801561126657600080fd5b505af115801561127a573d6000803e3d6000fd5b50505050505050505050565b60008360000361129957506003546112ea565b6000546112da906c0c9f2c9cd04674edea40000000906112c990600160a01b90046001600160401b0316866117f9565b6112d39190611864565b83866114ed565b6003546112e79190611883565b90505b9392505050565b6001600160a01b038416600090815260086020526040812054829061132f90869061131c90876117f9565b6c0c9f2c9cd04674edea400000006114ed565b6113399190611883565b95945050505050565b600060405163a9059cbb60e01b8152836004820152826024820152602060006044836000895af13d15601f3d11600160005114161716915050806113ba5760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606401610c5b565b50505050565b6000546001600160a01b03163314610c7a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c5b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006040516323b872dd60e01b81528460048201528360248201528260448201526020600060648360008a5af13d15601f3d1160016000511416171691505080610bb85760405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d19493d357d1905253115160621b6044820152606401610c5b565b6000808060001985870985870292508281108382030391505080600003611526576000841161151b57600080fd5b5082900490506112ea565b80841161153257600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6001600160a01b03811681146111f757600080fd5b6000602082840312156115c257600080fd5b81356112ea8161159b565b6000602082840312156115df57600080fd5b5035919050565b600080604083850312156115f957600080fd5b82356116048161159b565b915060208301356116148161159b565b809150509250929050565b80151581146111f757600080fd5b6000806040838503121561164057600080fd5b823561164b8161159b565b915060208301356116148161161f565b6000806020838503121561166e57600080fd5b82356001600160401b038082111561168557600080fd5b818501915085601f83011261169957600080fd5b8135818111156116a857600080fd5b8660208260051b85010111156116bd57600080fd5b60209290920196919550909350505050565b60005b838110156116ea5781810151838201526020016116d2565b50506000910152565b6000815180845261170b8160208601602086016116cf565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561177457603f198886030184526117628583516116f3565b94509285019290850190600101611746565b5092979650505050505050565b60008060008060008060c0878903121561179a57600080fd5b86356117a58161159b565b95506020870135945060408701359350606087013560ff811681146117c957600080fd5b9598949750929560808101359460a0909101359350915050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610659576106596117e3565b60006020828403121561181e57600080fd5b5051919050565b60006020828403121561183757600080fd5b81516112ea8161161f565b60008261185f57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561187e5761187e6117e3565b500290565b80820180821115610659576106596117e3565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126118d957600080fd5b8301803591506001600160401b038211156118f357600080fd5b60200191503681900382131561190857600080fd5b9250929050565b8183823760009101908152919050565b60006020828403121561193157600080fd5b81516001600160401b038082111561194857600080fd5b818401915084601f83011261195c57600080fd5b81518181111561196e5761196e611896565b604051601f8201601f19908116603f0116810190838211818310171561199657611996611896565b816040528281528760208487010111156119af57600080fd5b6119c08360208301602088016116cf565b979650505050505050565b6020815260006112ea60208301846116f3565b6000600182016119f0576119f06117e3565b506001019056fea26469706673582212206a68520c42ee60cd947544d81f8644fbfa1d33a267474582d893f09b52448b6e64736f6c63430008100033

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

000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd9000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd90000000000000000000000000000000000000000000000000000000000ed4e00

-----Decoded View---------------
Arg [0] : _rewardToken (address): 0xD23367155B55d67492DFDC0FC7f8bB1dF7114fD9
Arg [1] : _stakeToken (address): 0xD23367155B55d67492DFDC0FC7f8bB1dF7114fD9
Arg [2] : _duration (uint64): 15552000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd9
Arg [1] : 000000000000000000000000d23367155b55d67492dfdc0fc7f8bb1df7114fd9
Arg [2] : 0000000000000000000000000000000000000000000000000000000000ed4e00


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.