ETH Price: $3,475.36 (+2.19%)

Contract

0x7ca9B4BAb4e16bEbEDCfF403f7397935d905f0D3
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw From196271932024-04-10 19:03:47258 days ago1712775827IN
0x7ca9B4BA...5d905f0D3
0 ETH0.006595123.14070709
Mass Update Pool...141048242022-01-30 3:50:091060 days ago1643514609IN
0x7ca9B4BA...5d905f0D3
0 ETH0.0023118389.28771828

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CoreVault

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : COREVault.sol
pragma solidity 0.6.12;


import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/utils/EnumerableSet.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol";
import "./INBUNIERC20.sol";

interface IUniLPToken {
    function symbol() external view returns (string memory); // All UniV2LP tokens have that method
}

interface IRLPFactory {
    function createRLPToken() external returns (address); //Creates RLP token
}

interface IRLPToken {
    function initialize(string memory, string memory, uint256, address) external; // Initialized RLP token with, symbol, name, initial supply, baseLPToken
}

// Core Vault distributes fees equally amongst staked pools
// Have fun reading it. Hopefully it's bug-free. God bless.
contract CoreVault is OwnableUpgradeSafe {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many  tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of COREs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accCorePerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws  tokens to a pool. Here's what happens:
        //   1. The pool's `accCorePerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.

    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 token; // Address of  token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. COREs to distribute per block.
        uint256 accCorePerShare; // Accumulated COREs per share, times 1e12. See below.
        bool withdrawable; // Is this pool withdrawable?
        mapping(address => mapping(address => uint256)) allowance;

    }

    // The CORE TOKEN!
    INBUNIERC20 public core;
    // Dev address.
    address public devaddr;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes  tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Total allocation poitns. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint;

    //// pending rewards awaiting anyone to massUpdate
    uint256 public pendingRewards;

    uint256 public contractStartBlock;
    uint256 public epochCalculationStartBlock;
    uint256 public cumulativeRewardsSinceStart;
    uint256 public rewardsInThisEpoch;
    uint public epoch;
    
    mapping(uint => uint256) public epochRewards;
    uint16 DEV_FEE;
    uint256 pending_DEV_rewards;
    uint256 private coreBalance;
    address private _superAdmin;

    // === Start Upgrade 1 state ===

    IRLPFactory public immutable RLP_FACTORY;

    constructor(address rlpFactory) public {
        RLP_FACTORY = IRLPFactory(rlpFactory);
    }

    // === end upgrade 1 state ===

    // == start upgrade 1 functions ==

    // Switches all RLP for LP inside the vault
    function swapAllRLPForRLP() public onlyOwner {
        string [3] memory symbols = ["coreDAO/LP1", "coreDAO/LP2", "coreDAO/LP3"];
        string [3] memory names = ["coreDAO Voucher LP1", "coreDAO Voucher LP2", "coreDAO Voucher LP3"];
        // Migration steps 
        // - Create RLP tokens
        // - Initialize RLP tokens
        // - Send LP tokens for migration of liquidity pools
        // - Set RLP token as the new token for that pool
        // - Make sure the balance of RLP is the same as balance of LP was.
        uint256 len = poolInfo.length;
        require(len == 3, "Invalid number of pools");

        require(address(poolInfo[0].token) ==  0x32Ce7e48debdccbFE0CD037Cc89526E4382cb81b, "Already done"); // CORE-WETH UNI LP

        for (uint256 pid = 0; pid < len; ++pid) {
            IERC20 currentToken = poolInfo[pid].token;
            uint256 balToken = currentToken.balanceOf(address(this));
            IRLPToken rlpToken = IRLPToken(RLP_FACTORY.createRLPToken());
            rlpToken.initialize(names[pid], symbols[pid], balToken, address(currentToken)); // name, symbol initial supply (sent to initializer), addres of the token being consumed
            currentToken.safeTransfer(devaddr, balToken); // CORE multisig gets all LP to proceed with migration of floor to DAI
            require(IERC20(address(rlpToken)).balanceOf(address(this)) == balToken, "Did not get enough or RLP");
            poolInfo[pid].token = IERC20(address(rlpToken)); // We set the new token as RLP so everyone is migrated to the new one.
        }

    }


    // == end upgrade 1 functions ==

    // Returns fees generated since start of this contract
    function averageFeesPerBlockSinceStart() external view returns (uint averagePerBlock) {
        averagePerBlock = cumulativeRewardsSinceStart.add(rewardsInThisEpoch).div(block.number.sub(contractStartBlock));
    }        

    // Returns averge fees in this epoch
    function averageFeesPerBlockEpoch() external view returns (uint256 averagePerBlock) {
        averagePerBlock = rewardsInThisEpoch.div(block.number.sub(epochCalculationStartBlock));
    }

    // For easy graphing historical epoch rewards

    //Starts a new calculation epoch
    // Because averge since start will not be accurate
    function startNewEpoch() public {
        require(epochCalculationStartBlock + 50000 < block.number, "New epoch not ready yet"); // About a week
        epochRewards[epoch] = rewardsInThisEpoch;
        cumulativeRewardsSinceStart = cumulativeRewardsSinceStart.add(rewardsInThisEpoch);
        rewardsInThisEpoch = 0;
        epochCalculationStartBlock = block.number;
        ++epoch;
    }

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );
    event Approval(address indexed owner, address indexed spender, uint256 _pid, uint256 value);



    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }



    // Add a new token pool. Can only be called by the owner. 
    // Note contract owner is meant to be a governance contract allowing CORE governance consensus
    function add(
        uint256 _allocPoint,
        IERC20 _token,
        bool _withUpdate,
        bool _withdrawable
    ) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }

        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            require(poolInfo[pid].token != _token,"Error pool already added");
        }

        totalAllocPoint = totalAllocPoint.add(_allocPoint);


        poolInfo.push(
            PoolInfo({
                token: _token,
                allocPoint: _allocPoint,
                accCorePerShare: 0,
                withdrawable : _withdrawable
            })
        );
    }

    // Update the given pool's COREs allocation point. Can only be called by the owner.
        // Note contract owner is meant to be a governance contract allowing CORE governance consensus

    function set(
        uint256 _pid,
        uint256 _allocPoint,
        bool _withUpdate
    ) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
            _allocPoint
        );
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    // Update the given pool's ability to withdraw tokens
    // Note contract owner is meant to be a governance contract allowing CORE governance consensus
    function setPoolWithdrawable(
        uint256 _pid,
        bool _withdrawable
    ) public onlyOwner {
        poolInfo[_pid].withdrawable = _withdrawable;
    }



    // Sets the dev fee for this contract
    // defaults at 7.24%
    // Note contract owner is meant to be a governance contract allowing CORE governance consensus


    function setDevFee(uint16 _DEV_FEE) public onlyOwner {
        require(_DEV_FEE <= 1000, 'Dev fee clamped at 10%');
        DEV_FEE = _DEV_FEE;
    }
    
    function getPendingDevFeeRewards() public view returns (uint256) {
        return pending_DEV_rewards;
    }

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

        return user.amount.mul(accCorePerShare).div(1e12).sub(user.rewardDebt);
    }

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

        pendingRewards = pendingRewards.sub(allRewards);
    }

    // ----
    // Function that adds pending rewards, called by the CORE token.
    // ----
    function addPendingRewards(uint256 _) public {
        uint256 newRewards = core.balanceOf(address(this)).sub(coreBalance);
        
        if(newRewards > 0) {
            coreBalance = core.balanceOf(address(this)); // If there is no change the balance didn't change
            pendingRewards = pendingRewards.add(newRewards);
            rewardsInThisEpoch = rewardsInThisEpoch.add(newRewards);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) internal returns (uint256 coreRewardWhole) {
        PoolInfo storage pool = poolInfo[_pid];

        uint256 tokenSupply = pool.token.balanceOf(address(this));
        if (tokenSupply == 0) { // avoids division by 0 errors
            return 0;
        }
        coreRewardWhole = pendingRewards // Multiplies pending rewards by allocation point of this pool and then total allocation
            .mul(pool.allocPoint)        // getting the percent of total pending rewards this pool should get
            .div(totalAllocPoint);       // we can do this because pools are only mass updated
        uint256 coreRewardFee = coreRewardWhole.mul(DEV_FEE).div(10000);
        uint256 coreRewardToDistribute = coreRewardWhole.sub(coreRewardFee);

        pending_DEV_rewards = pending_DEV_rewards.add(coreRewardFee);

        pool.accCorePerShare = pool.accCorePerShare.add(
            coreRewardToDistribute.mul(1e12).div(tokenSupply)
        );

    }

    // Deposit  tokens to CoreVault for CORE allocation.
    function deposit(uint256 _pid, uint256 _amount) public {

        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        massUpdatePools();
        
        // Transfer pending tokens
        // to user
        updateAndPayOutPending(_pid, msg.sender);


        //Transfer in the amounts from user
        // save gas
        if(_amount > 0) {
            pool.token.safeTransferFrom(address(msg.sender), address(this), _amount);
            user.amount = user.amount.add(_amount);
        }

        user.rewardDebt = user.amount.mul(pool.accCorePerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Test coverage
    // [x] Does user get the deposited amounts?
    // [x] Does user that its deposited for update correcty?
    // [x] Does the depositor get their tokens decreased
    function depositFor(address depositFor, uint256 _pid, uint256 _amount) public {
        // requires no allowances
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][depositFor];

        massUpdatePools();
        
        // Transfer pending tokens
        // to user
        updateAndPayOutPending(_pid, depositFor); // Update the balances of person that amount is being deposited for

        if(_amount > 0) {
            pool.token.safeTransferFrom(address(msg.sender), address(this), _amount);
            user.amount = user.amount.add(_amount); // This is depositedFor address
        }

        user.rewardDebt = user.amount.mul(pool.accCorePerShare).div(1e12); /// This is deposited for address
        emit Deposit(depositFor, _pid, _amount);

    }

    // Test coverage
    // [x] Does allowance update correctly?
    function setAllowanceForPoolToken(address spender, uint256 _pid, uint256 value) public {
        PoolInfo storage pool = poolInfo[_pid];
        pool.allowance[msg.sender][spender] = value;
        emit Approval(msg.sender, spender, _pid, value);
    }

    // Test coverage
    // [x] Does allowance decrease?
    // [x] Do oyu need allowance
    // [x] Withdraws to correct address
    function withdrawFrom(address owner, uint256 _pid, uint256 _amount) public{
        
        PoolInfo storage pool = poolInfo[_pid];
        require(pool.allowance[owner][msg.sender] >= _amount, "withdraw: insufficient allowance");
        pool.allowance[owner][msg.sender] = pool.allowance[owner][msg.sender].sub(_amount);
        _withdraw(_pid, _amount, owner, msg.sender);

    }
    

    // Withdraw  tokens from CoreVault.
    function withdraw(uint256 _pid, uint256 _amount) public {

        _withdraw(_pid, _amount, msg.sender, msg.sender);

    }


    

    // Low level withdraw function
    function _withdraw(uint256 _pid, uint256 _amount, address from, address to) internal {
        PoolInfo storage pool = poolInfo[_pid];
        require(pool.withdrawable, "Withdrawing from this pool is disabled");
        UserInfo storage user = userInfo[_pid][from];
        require(user.amount >= _amount, "withdraw: not good");

        massUpdatePools();
        updateAndPayOutPending(_pid, from); // Update balances of from this is not withdrawal but claiming CORE farmed

        if(_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.token.safeTransfer(address(to), _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accCorePerShare).div(1e12);

        emit Withdraw(to, _pid, _amount);
    }

    function updateAndPayOutPending(uint256 _pid, address from) internal {
        UserInfo storage user = userInfo[_pid][from];

        if(user.amount == 0) return;
        PoolInfo storage pool = poolInfo[_pid];

        uint256 pending = user
            .amount
            .mul(pool.accCorePerShare)
            .div(1e12)
            .sub(user.rewardDebt);

        if(pending > 0) {
            safeCoreTransfer(from, pending);
        }

    }

    // function that lets owner/governance contract
    // approve allowance for any token inside this contract
    // This means all future UNI like airdrops are covered
    // And at the same time allows us to give allowance to strategy contracts.
    // Upcoming cYFI etc vaults strategy contracts will  se this function to manage and farm yield on value locked
    function setStrategyContractOrDistributionContractAllowance(address tokenAddress, uint256 _amount, address contractAddress) public onlySuperAdmin {
        require(isContract(contractAddress), "Recipent is not a smart contract, BAD");
        require(block.number > contractStartBlock.add(95_000), "Governance setup grace period not over"); // about 2weeks
        IERC20(tokenAddress).approve(contractAddress, _amount);
    }

    function isContract(address addr) public returns (bool) {
        uint size;
        assembly { size := extcodesize(addr) }
        return size > 0;
    }





    // Withdraw without caring about rewards. EMERGENCY ONLY.
    // !Caution this will remove all your pending rewards!
    function emergencyWithdraw(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        require(pool.withdrawable, "Withdrawing from this pool is disabled");
        UserInfo storage user = userInfo[_pid][msg.sender];
        pool.token.safeTransfer(address(msg.sender), user.amount);
        emit EmergencyWithdraw(msg.sender, _pid, user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
        // No mass update dont update pending rewards
    }

    // Safe core transfer function, just in case if rounding error causes pool to not have enough COREs.
    function safeCoreTransfer(address _to, uint256 _amount) internal {
        if(_amount == 0) return; 

        uint256 coreBal = core.balanceOf(address(this));
        if (_amount > coreBal) {
            core.transfer(_to, coreBal);
            coreBalance = core.balanceOf(address(this));

        } else {
            core.transfer(_to, _amount);
            coreBalance = core.balanceOf(address(this));

        }
        //Avoids possible recursion loop
        transferDevFee();
    }

    function transferDevFee() public {
        if(pending_DEV_rewards == 0) return;
        uint256 coreBal = core.balanceOf(address(this));
        if (pending_DEV_rewards > coreBal) {

            core.transfer(devaddr, coreBal);
            coreBalance = core.balanceOf(address(this));
        } else {
            core.transfer(devaddr, pending_DEV_rewards);
            coreBalance = core.balanceOf(address(this));
        }
        pending_DEV_rewards = 0;
    }

    // Update dev address by the previous dev.
    // Note onlyOwner functions are meant for the governance contract
    // allowing CORE governance token holders to do this functions.
    function setDevFeeReciever(address _devaddr) public onlyOwner {
        devaddr = _devaddr;
    }




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



    /**
     * @dev Returns the address of the current super admin
     */
    function superAdmin() public view returns (address) {
        return _superAdmin;
    }

    /**
     * @dev Throws if called by any account other than the superAdmin
     */
    modifier onlySuperAdmin() {
        require(_superAdmin == _msgSender(), "Super admin : caller is not super admin.");
        _;
    }

    // Assisns super admint to address 0, making it unreachable forever
    function burnSuperAdmin() public virtual onlySuperAdmin {
        emit SuperAdminTransfered(_superAdmin, address(0));
        _superAdmin = address(0);
    }

    // Super admin can transfer its powers to another address
    function newSuperAdmin(address newOwner) public virtual onlySuperAdmin {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit SuperAdminTransfered(_superAdmin, newOwner);
        _superAdmin = newOwner;
    }
}

File 2 of 10 : IERC20.sol
pragma solidity ^0.6.0;

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

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

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

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

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

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

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

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

File 3 of 10 : SafeERC20.sol
pragma solidity ^0.6.0;

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

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

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

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

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

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

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 4 of 10 : EnumerableSet.sol
pragma solidity ^0.6.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
 * (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint256(_at(set._inner, index)));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 5 of 10 : SafeMath.sol
pragma solidity ^0.6.0;

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

File 6 of 10 : Ownable.sol
pragma solidity ^0.6.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */

    function __Ownable_init() internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {


        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);

    }


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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

    uint256[49] private __gap;
}

File 7 of 10 : INBUNIERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

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

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

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

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

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

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

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


    event Log(string log);

}

File 8 of 10 : Address.sol
pragma solidity ^0.6.2;

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

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

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

File 9 of 10 : Context.sol
pragma solidity ^0.6.0;
import "../Initializable.sol";

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

    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {


    }


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

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

    uint256[50] private __gap;
}

File 10 of 10 : Initializable.sol
pragma solidity >=0.4.24 <0.7.0;


/**
 * @title Initializable
 *
 * @dev Helper contract to support initializer functions. To use it, replace
 * the constructor with a function that has the `initializer` modifier.
 * WARNING: Unlike constructors, initializer functions must be manually
 * invoked. This applies both to deploying an Initializable contract, as well
 * as extending an Initializable contract via inheritance.
 * WARNING: When used with inheritance, manual care must be taken to not invoke
 * a parent initializer twice, or ensure that all initializers are idempotent,
 * because this is not dealt with automatically as with constructors.
 */
contract Initializable {

  /**
   * @dev Indicates that the contract has been initialized.
   */
  bool private initialized;

  /**
   * @dev Indicates that the contract is in the process of being initialized.
   */
  bool private initializing;

  /**
   * @dev Modifier to use in the initializer function of a contract.
   */
  modifier initializer() {
    require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");

    bool isTopLevelCall = !initializing;
    if (isTopLevelCall) {
      initializing = true;
      initialized = true;
    }

    _;

    if (isTopLevelCall) {
      initializing = false;
    }
  }

  /// @dev Returns true if and only if the function is running in the constructor
  function isConstructor() private view returns (bool) {
    // extcodesize checks the size of the code stored in an address, and
    // address returns the current address. Since the code is still not
    // deployed when running a constructor, any checks on its code size will
    // yield zero, making it an effective way to detect if a contract is
    // under construction or not.
    address self = address(this);
    uint256 cs;
    assembly { cs := extcodesize(self) }
    return cs == 0;
  }

  // Reserved storage space to allow for layout changes in the future.
  uint256[50] private ______gap;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"rlpFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"SuperAdminTransfered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"RLP_FACTORY","outputs":[{"internalType":"contract IRLPFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"bool","name":"_withdrawable","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_","type":"uint256"}],"name":"addPendingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"averageFeesPerBlockEpoch","outputs":[{"internalType":"uint256","name":"averagePerBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"averageFeesPerBlockSinceStart","outputs":[{"internalType":"uint256","name":"averagePerBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnSuperAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractStartBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"core","outputs":[{"internalType":"contract INBUNIERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cumulativeRewardsSinceStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositFor","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devaddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochCalculationStartBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"epochRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPendingDevFeeRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"newSuperAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingCore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"accCorePerShare","type":"uint256"},{"internalType":"bool","name":"withdrawable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardsInThisEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setAllowanceForPoolToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_DEV_FEE","type":"uint16"}],"name":"setDevFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devaddr","type":"address"}],"name":"setDevFeeReciever","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"bool","name":"_withdrawable","type":"bool"}],"name":"setPoolWithdrawable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"}],"name":"setStrategyContractOrDistributionContractAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startNewEpoch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"superAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapAllRLPForRLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferDevFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561001057600080fd5b50604051612d71380380612d718339818101604052602081101561003357600080fd5b5051606081901b6001600160601b0319166080526001600160a01b0316612d0561006c60003980610a9d52806113ff5250612d056000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c806364482f7911610146578063a676860a116100c3578063dbe0901f11610087578063dbe0901f14610619578063e18cb4fe1461064b578063e2bbb1581461066c578063eded3fda1461068f578063f2f4eb2614610697578063f2fde38b1461069f5761025e565b8063a676860a14610571578063c401458814610597578063c507aeaa146105cd578063c8ffb87314610609578063d49e77cd146106115761025e565b8063900cf0cf1161010a578063900cf0cf146104e8578063934eaa50146104f057806393f1a40b146104f85780639dbc2d901461053d578063a4f00c82146105455761025e565b806364482f791461049d57806368ed2bdf146104c85780636952520a146104d0578063715018a6146104d85780638da5cb5b146104e05761025e565b806342c40484116101df5780634dc47d34116101a35780634dc47d34146104265780635207cc0d146104435780635312ea8e146104685780635d577c1814610485578063608c8d3a1461048d578063630b5ba1146104955761025e565b806342c40484146103b9578063434339f3146103c1578063441a3e70146103c957806349c5468d146103ec5780634cf5fbf5146103f45761025e565b806329575f6a1161022657806329575f6a146103165780632d6754e51461033a5780633a0967cd146103625780633aab0a6214610394578063423d6fa01461039c5761025e565b806303dec00914610263578063081e3eda1461027d5780631526fe271461028557806316279055146102d457806317caf6f11461030e575b600080fd5b61026b6106c5565b60408051918252519081900360200190f35b61026b6106ed565b6102a26004803603602081101561029b57600080fd5b50356106f3565b604080516001600160a01b03909516855260208501939093528383019190915215156060830152519081900360800190f35b6102fa600480360360208110156102ea57600080fd5b50356001600160a01b0316610737565b604080519115158252519081900360200190f35b61026b610741565b61031e610747565b604080516001600160a01b039092168252519081900360200190f35b6103606004803603602081101561035057600080fd5b50356001600160a01b0316610756565b005b6103606004803603606081101561037857600080fd5b506001600160a01b0381351690602081013590604001356107d0565b6103606108d7565b610360600480360360208110156103b257600080fd5b503561096b565b61031e610a9b565b610360610abf565b610360600480360360408110156103df57600080fd5b5080359060200135610d5f565b61026b610d6b565b6103606004803603606081101561040a57600080fd5b506001600160a01b038135169060208101359060400135610d71565b61026b6004803603602081101561043c57600080fd5b5035610e5c565b6103606004803603604081101561045957600080fd5b50803590602001351515610e6e565b6103606004803603602081101561047e57600080fd5b5035610efa565b61026b610fd9565b61026b610fdf565b610360610fe5565b610360600480360360608110156104b357600080fd5b50803590602081013590604001351515611026565b61026b6110f7565b6103606110fd565b610360611701565b61031e6117a3565b61026b6117b2565b6103606117b8565b6105246004803603604081101561050e57600080fd5b50803590602001356001600160a01b0316611856565b6040805192835260208301919091528051918290030190f35b61026b61187a565b61026b6004803603604081101561055b57600080fd5b50803590602001356001600160a01b03166118a3565b6103606004803603602081101561058757600080fd5b50356001600160a01b0316611920565b610360600480360360608110156105ad57600080fd5b506001600160a01b03813581169160208101359160409091013516611a15565b610360600480360360808110156105e357600080fd5b508035906001600160a01b03602082013516906040810135151590606001351515611b82565b61026b611d91565b61031e611d97565b6103606004803603606081101561062f57600080fd5b506001600160a01b038135169060208101359060400135611da6565b6103606004803603602081101561066157600080fd5b503561ffff16611e2a565b6103606004803603604081101561068257600080fd5b5080359060200135611eee565b61026b611fc0565b61031e611fc6565b610360600480360360208110156106b557600080fd5b50356001600160a01b0316611fd5565b60006106e86106df609e54436120ce90919063ffffffff16565b60a05490612117565b905090565b60995490565b6099818154811061070057fe5b600091825260209091206005909102018054600182015460028301546003909301546001600160a01b039092169350919060ff1684565b803b15155b919050565b609b5481565b60a6546001600160a01b031690565b61075e612159565b6065546001600160a01b039081169116146107ae576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b609880546001600160a01b0319166001600160a01b0392909216919091179055565b6000609983815481106107df57fe5b600091825260208083206001600160a01b038816845260046005909302019182018152604080842033855290915290912054909150821115610868576040805162461bcd60e51b815260206004820181905260248201527f77697468647261773a20696e73756666696369656e7420616c6c6f77616e6365604482015290519081900360640190fd5b6001600160a01b0384166000908152600482016020908152604080832033845290915290205461089890836120ce565b6001600160a01b03851660009081526004830160209081526040808320338085529252909120919091556108d19084908490879061215d565b50505050565b43609e5461c3500110610931576040805162461bcd60e51b815260206004820152601760248201527f4e65772065706f6368206e6f7420726561647920796574000000000000000000604482015290519081900360640190fd5b60a05460a154600090815260a260205260409020819055609f54610954916122d3565b609f55600060a05543609e5560a180546001019055565b60a554609754604080516370a0823160e01b815230600482015290516000936109f49390926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156109c257600080fd5b505afa1580156109d6573d6000803e3d6000fd5b505050506040513d60208110156109ec57600080fd5b5051906120ce565b90508015610a9757609754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610a4757600080fd5b505afa158015610a5b573d6000803e3d6000fd5b505050506040513d6020811015610a7157600080fd5b505160a555609c54610a8390826122d3565b609c5560a054610a9390826122d3565b60a0555b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60a454610acb57610d5d565b609754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610b1657600080fd5b505afa158015610b2a573d6000803e3d6000fd5b505050506040513d6020811015610b4057600080fd5b505160a454909150811015610c53576097546098546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018590529051919092169163a9059cbb9160448083019260209291908290030181600087803b158015610ba857600080fd5b505af1158015610bbc573d6000803e3d6000fd5b505050506040513d6020811015610bd257600080fd5b5050609754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610c1f57600080fd5b505afa158015610c33573d6000803e3d6000fd5b505050506040513d6020811015610c4957600080fd5b505160a555610d56565b60975460985460a4546040805163a9059cbb60e01b81526001600160a01b039384166004820152602481019290925251919092169163a9059cbb9160448083019260209291908290030181600087803b158015610caf57600080fd5b505af1158015610cc3573d6000803e3d6000fd5b505050506040513d6020811015610cd957600080fd5b5050609754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610d2657600080fd5b505afa158015610d3a573d6000803e3d6000fd5b505050506040513d6020811015610d5057600080fd5b505160a5555b50600060a4555b565b610a978282333361215d565b609d5481565b600060998381548110610d8057fe5b60009182526020808320868452609a825260408085206001600160a01b038a168652909252922060059091029091019150610db9610fe5565b610dc3848661232d565b8215610def578154610de0906001600160a01b03163330866123ba565b8054610dec90846122d3565b81555b60028201548154610e109164e8d4a5100091610e0a91612414565b90612117565b600182015560408051848152905185916001600160a01b038816917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b60a26020526000908152604090205481565b610e76612159565b6065546001600160a01b03908116911614610ec6576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b8060998381548110610ed457fe5b60009182526020909120600590910201600301805460ff19169115159190911790555050565b600060998281548110610f0957fe5b60009182526020909120600590910201600381015490915060ff16610f5f5760405162461bcd60e51b8152600401808060200182810382526026815260200180612c5a6026913960400191505060405180910390fd5b6000828152609a60209081526040808320338085529252909120805483549192610f92926001600160a01b03169161246d565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b609e5481565b60a05481565b6099546000805b8281101561101157611007611000826124c4565b83906122d3565b9150600101610fec565b50609c5461101f90826120ce565b609c555050565b61102e612159565b6065546001600160a01b0390811691161461107e576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b801561108c5761108c610fe5565b6110c9826110c3609986815481106110a057fe5b906000526020600020906005020160010154609b546120ce90919063ffffffff16565b906122d3565b609b8190555081609984815481106110dd57fe5b906000526020600020906005020160010181905550505050565b60a45490565b611105612159565b6065546001600160a01b03908116911614611155576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b61115d612b7e565b506040805160a081018252600b606082018181526a636f726544414f2f4c503160a81b60808401528252825180840184528181526a31b7b932a220a797a6281960a91b60208281019190915280840191909152835180850185529182526a636f726544414f2f4c503360a81b90820152918101919091526111dc612b7e565b506040805160a08101825260136060820181815272636f726544414f20566f7563686572204c503160681b60808401528252825180840184528181527231b7b932a220a7902b37bab1b432b91026281960691b602082810191909152808401919091528351808501855291825272636f726544414f20566f7563686572204c503360681b9082015291810191909152609954600381146112c3576040805162461bcd60e51b815260206004820152601760248201527f496e76616c6964206e756d626572206f6620706f6f6c73000000000000000000604482015290519081900360640190fd5b60996000815481106112d157fe5b60009182526020909120600590910201546001600160a01b03167332ce7e48debdccbfe0cd037cc89526e4382cb81b14611341576040805162461bcd60e51b815260206004820152600c60248201526b416c726561647920646f6e6560a01b604482015290519081900360640190fd5b60005b818110156108d15760006099828154811061135b57fe5b60009182526020808320600590920290910154604080516370a0823160e01b815230600482015290516001600160a01b03909216945084926370a0823192602480840193829003018186803b1580156113b357600080fd5b505afa1580156113c7573d6000803e3d6000fd5b505050506040513d60208110156113dd57600080fd5b50516040805163fcfe8f7f60e01b815290519192506000916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163fcfe8f7f91600480830192602092919082900301818787803b15801561144657600080fd5b505af115801561145a573d6000803e3d6000fd5b505050506040513d602081101561147057600080fd5b505190506001600160a01b03811663bd3a13f687866003811061148f57fe5b60200201518987600381106114a057fe5b602002015185876040518563ffffffff1660e01b8152600401808060200180602001858152602001846001600160a01b03168152602001838103835287818151815260200191508051906020019080838360005b8381101561150c5781810151838201526020016114f4565b50505050905090810190601f1680156115395780820380516001836020036101000a031916815260200191505b50838103825286518152865160209182019188019080838360005b8381101561156c578181015183820152602001611554565b50505050905090810190601f1680156115995780820380516001836020036101000a031916815260200191505b509650505050505050600060405180830381600087803b1580156115bc57600080fd5b505af11580156115d0573d6000803e3d6000fd5b50506098546115ee92506001600160a01b038681169250168461246d565b81816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561163c57600080fd5b505afa158015611650573d6000803e3d6000fd5b505050506040513d602081101561166657600080fd5b5051146116ba576040805162461bcd60e51b815260206004820152601960248201527f446964206e6f742067657420656e6f756768206f7220524c5000000000000000604482015290519081900360640190fd5b80609985815481106116c857fe5b6000918252602090912060059091020180546001600160a01b0319166001600160a01b0392909216919091179055505050600101611344565b611709612159565b6065546001600160a01b03908116911614611759576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606580546001600160a01b0319169055565b6065546001600160a01b031690565b60a15481565b6117c0612159565b60a6546001600160a01b0390811691161461180c5760405162461bcd60e51b8152600401808060200182810382526028815260200180612bf16028913960400191505060405180910390fd5b60a6546040516000916001600160a01b0316907ff564c40f4f45e62a2c1e6c22e8bfb46501f0f71fa1c72e5358903fa1115a4b64908390a360a680546001600160a01b0319169055565b609a6020908152600092835260408084209091529082529020805460019091015482565b60006106e8611894609d54436120ce90919063ffffffff16565b60a054609f54610e0a916122d3565b600080609984815481106118b357fe5b60009182526020808320878452609a825260408085206001600160a01b038916865290925292206002600590920290920190810154600183015483549294509091611914919061190e9064e8d4a5100090610e0a9086612414565b906120ce565b93505050505b92915050565b611928612159565b60a6546001600160a01b039081169116146119745760405162461bcd60e51b8152600401808060200182810382526028815260200180612bf16028913960400191505060405180910390fd5b6001600160a01b0381166119b95760405162461bcd60e51b8152600401808060200182810382526026815260200180612ba66026913960400191505060405180910390fd5b60a6546040516001600160a01b038084169216907ff564c40f4f45e62a2c1e6c22e8bfb46501f0f71fa1c72e5358903fa1115a4b6490600090a360a680546001600160a01b0319166001600160a01b0392909216919091179055565b611a1d612159565b60a6546001600160a01b03908116911614611a695760405162461bcd60e51b8152600401808060200182810382526028815260200180612bf16028913960400191505060405180910390fd5b611a7281610737565b611aad5760405162461bcd60e51b8152600401808060200182810382526025815260200180612bcc6025913960400191505060405180910390fd5b609d54611abd90620173186122d3565b4311611afa5760405162461bcd60e51b8152600401808060200182810382526026815260200180612c806026913960400191505060405180910390fd5b826001600160a01b031663095ea7b382846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611b5157600080fd5b505af1158015611b65573d6000803e3d6000fd5b505050506040513d6020811015611b7b57600080fd5b5050505050565b611b8a612159565b6065546001600160a01b03908116911614611bda576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b8115611be857611be8610fe5565b60995460005b81811015611c8257846001600160a01b031660998281548110611c0d57fe5b60009182526020909120600590910201546001600160a01b03161415611c7a576040805162461bcd60e51b815260206004820152601860248201527f4572726f7220706f6f6c20616c72656164792061646465640000000000000000604482015290519081900360640190fd5b600101611bee565b50609b54611c9090866122d3565b609b5550604080516080810182526001600160a01b0394851681526020810195865260009181018281529215156060820190815260998054600181018255935290517f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d00600590930292830180546001600160a01b031916919096161790945593517f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d01850155517f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d0284015550517f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d03909101805460ff1916911515919091179055565b609f5481565b6098546001600160a01b031681565b600060998381548110611db557fe5b60009182526020808320338085526005939093020160048101825260408085206001600160a01b038a1680875290845294819020879055805188815292830187905280519195507fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7928290030190a350505050565b611e32612159565b6065546001600160a01b03908116911614611e82576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b6103e88161ffff161115611ed6576040805162461bcd60e51b81526020600482015260166024820152754465762066656520636c616d7065642061742031302560501b604482015290519081900360640190fd5b60a3805461ffff191661ffff92909216919091179055565b600060998381548110611efd57fe5b60009182526020808320868452609a82526040808520338652909252922060059091029091019150611f2d610fe5565b611f37843361232d565b8215611f63578154611f54906001600160a01b03163330866123ba565b8054611f6090846122d3565b81555b60028201548154611f7e9164e8d4a5100091610e0a91612414565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b609c5481565b6097546001600160a01b031681565b611fdd612159565b6065546001600160a01b0390811691161461202d576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b6001600160a01b0381166120725760405162461bcd60e51b8152600401808060200182810382526026815260200180612ba66026913960400191505060405180910390fd5b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b600061211083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506125fd565b9392505050565b600061211083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612694565b3390565b60006099858154811061216c57fe5b60009182526020909120600590910201600381015490915060ff166121c25760405162461bcd60e51b8152600401808060200182810382526026815260200180612c5a6026913960400191505060405180910390fd5b6000858152609a602090815260408083206001600160a01b03871684529091529020805485111561222f576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b612237610fe5565b612241868561232d565b841561226b57805461225390866120ce565b8155815461226b906001600160a01b0316848761246d565b600282015481546122869164e8d4a5100091610e0a91612414565b600182015560408051868152905187916001600160a01b038616917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b600082820183811015612110576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000828152609a602090815260408083206001600160a01b03851684529091529020805461235b5750610a97565b60006099848154811061236a57fe5b9060005260206000209060050201905060006123a8836001015461190e64e8d4a51000610e0a8660020154886000015461241490919063ffffffff16565b90508015611b7b57611b7b84826126f9565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526108d190859061298a565b6000826124235750600061191a565b8282028284828161243057fe5b04146121105760405162461bcd60e51b8152600401808060200182810382526021815260200180612c196021913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526124bf90849061298a565b505050565b600080609983815481106124d457fe5b6000918252602080832060059092029091018054604080516370a0823160e01b815230600482015290519295506001600160a01b03909116926370a0823192602480840193829003018186803b15801561252d57600080fd5b505afa158015612541573d6000803e3d6000fd5b505050506040513d602081101561255757600080fd5b505190508061256b5760009250505061073c565b61258a609b54610e0a8460010154609c5461241490919063ffffffff16565b60a3549093506000906125aa9061271090610e0a90879061ffff16612414565b905060006125b885836120ce565b60a4549091506125c890836122d3565b60a4556125ec6125e184610e0a8464e8d4a51000612414565b6002860154906122d3565b846002018190555050505050919050565b6000818484111561268c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612651578181015183820152602001612639565b50505050905090810190601f16801561267e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836126e35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612651578181015183820152602001612639565b5060008385816126ef57fe5b0495945050505050565b8061270357610a97565b609754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561274e57600080fd5b505afa158015612762573d6000803e3d6000fd5b505050506040513d602081101561277857600080fd5b5051905080821115612885576097546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156127da57600080fd5b505af11580156127ee573d6000803e3d6000fd5b505050506040513d602081101561280457600080fd5b5050609754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561285157600080fd5b505afa158015612865573d6000803e3d6000fd5b505050506040513d602081101561287b57600080fd5b505160a555612982565b6097546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156128db57600080fd5b505af11580156128ef573d6000803e3d6000fd5b505050506040513d602081101561290557600080fd5b5050609754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561295257600080fd5b505afa158015612966573d6000803e3d6000fd5b505050506040513d602081101561297c57600080fd5b505160a5555b6124bf610abf565b61299c826001600160a01b0316612b42565b6129ed576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310612a2b5780518252601f199092019160209182019101612a0c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612a8d576040519150601f19603f3d011682016040523d82523d6000602084013e612a92565b606091505b509150915081612ae9576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156108d157808060200190516020811015612b0557600080fd5b50516108d15760405162461bcd60e51b815260040180806020018281038252602a815260200180612ca6602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612b7657508115155b949350505050565b60405180606001604052806003905b6060815260200190600190039081612b8d579050509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735265636970656e74206973206e6f74206120736d61727420636f6e74726163742c2042414453757065722061646d696e203a2063616c6c6572206973206e6f742073757065722061646d696e2e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725769746864726177696e672066726f6d207468697320706f6f6c2069732064697361626c6564476f7665726e616e636520736574757020677261636520706572696f64206e6f74206f7665725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122095fc46abae8ca621601b10851a85c84bb7d60569a58fa12a2effbd27661c79dd64736f6c634300060c0033000000000000000000000000904cf9487312f1034814056f1f99be49e74bcc70

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061025e5760003560e01c806364482f7911610146578063a676860a116100c3578063dbe0901f11610087578063dbe0901f14610619578063e18cb4fe1461064b578063e2bbb1581461066c578063eded3fda1461068f578063f2f4eb2614610697578063f2fde38b1461069f5761025e565b8063a676860a14610571578063c401458814610597578063c507aeaa146105cd578063c8ffb87314610609578063d49e77cd146106115761025e565b8063900cf0cf1161010a578063900cf0cf146104e8578063934eaa50146104f057806393f1a40b146104f85780639dbc2d901461053d578063a4f00c82146105455761025e565b806364482f791461049d57806368ed2bdf146104c85780636952520a146104d0578063715018a6146104d85780638da5cb5b146104e05761025e565b806342c40484116101df5780634dc47d34116101a35780634dc47d34146104265780635207cc0d146104435780635312ea8e146104685780635d577c1814610485578063608c8d3a1461048d578063630b5ba1146104955761025e565b806342c40484146103b9578063434339f3146103c1578063441a3e70146103c957806349c5468d146103ec5780634cf5fbf5146103f45761025e565b806329575f6a1161022657806329575f6a146103165780632d6754e51461033a5780633a0967cd146103625780633aab0a6214610394578063423d6fa01461039c5761025e565b806303dec00914610263578063081e3eda1461027d5780631526fe271461028557806316279055146102d457806317caf6f11461030e575b600080fd5b61026b6106c5565b60408051918252519081900360200190f35b61026b6106ed565b6102a26004803603602081101561029b57600080fd5b50356106f3565b604080516001600160a01b03909516855260208501939093528383019190915215156060830152519081900360800190f35b6102fa600480360360208110156102ea57600080fd5b50356001600160a01b0316610737565b604080519115158252519081900360200190f35b61026b610741565b61031e610747565b604080516001600160a01b039092168252519081900360200190f35b6103606004803603602081101561035057600080fd5b50356001600160a01b0316610756565b005b6103606004803603606081101561037857600080fd5b506001600160a01b0381351690602081013590604001356107d0565b6103606108d7565b610360600480360360208110156103b257600080fd5b503561096b565b61031e610a9b565b610360610abf565b610360600480360360408110156103df57600080fd5b5080359060200135610d5f565b61026b610d6b565b6103606004803603606081101561040a57600080fd5b506001600160a01b038135169060208101359060400135610d71565b61026b6004803603602081101561043c57600080fd5b5035610e5c565b6103606004803603604081101561045957600080fd5b50803590602001351515610e6e565b6103606004803603602081101561047e57600080fd5b5035610efa565b61026b610fd9565b61026b610fdf565b610360610fe5565b610360600480360360608110156104b357600080fd5b50803590602081013590604001351515611026565b61026b6110f7565b6103606110fd565b610360611701565b61031e6117a3565b61026b6117b2565b6103606117b8565b6105246004803603604081101561050e57600080fd5b50803590602001356001600160a01b0316611856565b6040805192835260208301919091528051918290030190f35b61026b61187a565b61026b6004803603604081101561055b57600080fd5b50803590602001356001600160a01b03166118a3565b6103606004803603602081101561058757600080fd5b50356001600160a01b0316611920565b610360600480360360608110156105ad57600080fd5b506001600160a01b03813581169160208101359160409091013516611a15565b610360600480360360808110156105e357600080fd5b508035906001600160a01b03602082013516906040810135151590606001351515611b82565b61026b611d91565b61031e611d97565b6103606004803603606081101561062f57600080fd5b506001600160a01b038135169060208101359060400135611da6565b6103606004803603602081101561066157600080fd5b503561ffff16611e2a565b6103606004803603604081101561068257600080fd5b5080359060200135611eee565b61026b611fc0565b61031e611fc6565b610360600480360360208110156106b557600080fd5b50356001600160a01b0316611fd5565b60006106e86106df609e54436120ce90919063ffffffff16565b60a05490612117565b905090565b60995490565b6099818154811061070057fe5b600091825260209091206005909102018054600182015460028301546003909301546001600160a01b039092169350919060ff1684565b803b15155b919050565b609b5481565b60a6546001600160a01b031690565b61075e612159565b6065546001600160a01b039081169116146107ae576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b609880546001600160a01b0319166001600160a01b0392909216919091179055565b6000609983815481106107df57fe5b600091825260208083206001600160a01b038816845260046005909302019182018152604080842033855290915290912054909150821115610868576040805162461bcd60e51b815260206004820181905260248201527f77697468647261773a20696e73756666696369656e7420616c6c6f77616e6365604482015290519081900360640190fd5b6001600160a01b0384166000908152600482016020908152604080832033845290915290205461089890836120ce565b6001600160a01b03851660009081526004830160209081526040808320338085529252909120919091556108d19084908490879061215d565b50505050565b43609e5461c3500110610931576040805162461bcd60e51b815260206004820152601760248201527f4e65772065706f6368206e6f7420726561647920796574000000000000000000604482015290519081900360640190fd5b60a05460a154600090815260a260205260409020819055609f54610954916122d3565b609f55600060a05543609e5560a180546001019055565b60a554609754604080516370a0823160e01b815230600482015290516000936109f49390926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156109c257600080fd5b505afa1580156109d6573d6000803e3d6000fd5b505050506040513d60208110156109ec57600080fd5b5051906120ce565b90508015610a9757609754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610a4757600080fd5b505afa158015610a5b573d6000803e3d6000fd5b505050506040513d6020811015610a7157600080fd5b505160a555609c54610a8390826122d3565b609c5560a054610a9390826122d3565b60a0555b5050565b7f000000000000000000000000904cf9487312f1034814056f1f99be49e74bcc7081565b60a454610acb57610d5d565b609754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610b1657600080fd5b505afa158015610b2a573d6000803e3d6000fd5b505050506040513d6020811015610b4057600080fd5b505160a454909150811015610c53576097546098546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018590529051919092169163a9059cbb9160448083019260209291908290030181600087803b158015610ba857600080fd5b505af1158015610bbc573d6000803e3d6000fd5b505050506040513d6020811015610bd257600080fd5b5050609754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610c1f57600080fd5b505afa158015610c33573d6000803e3d6000fd5b505050506040513d6020811015610c4957600080fd5b505160a555610d56565b60975460985460a4546040805163a9059cbb60e01b81526001600160a01b039384166004820152602481019290925251919092169163a9059cbb9160448083019260209291908290030181600087803b158015610caf57600080fd5b505af1158015610cc3573d6000803e3d6000fd5b505050506040513d6020811015610cd957600080fd5b5050609754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610d2657600080fd5b505afa158015610d3a573d6000803e3d6000fd5b505050506040513d6020811015610d5057600080fd5b505160a5555b50600060a4555b565b610a978282333361215d565b609d5481565b600060998381548110610d8057fe5b60009182526020808320868452609a825260408085206001600160a01b038a168652909252922060059091029091019150610db9610fe5565b610dc3848661232d565b8215610def578154610de0906001600160a01b03163330866123ba565b8054610dec90846122d3565b81555b60028201548154610e109164e8d4a5100091610e0a91612414565b90612117565b600182015560408051848152905185916001600160a01b038816917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b60a26020526000908152604090205481565b610e76612159565b6065546001600160a01b03908116911614610ec6576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b8060998381548110610ed457fe5b60009182526020909120600590910201600301805460ff19169115159190911790555050565b600060998281548110610f0957fe5b60009182526020909120600590910201600381015490915060ff16610f5f5760405162461bcd60e51b8152600401808060200182810382526026815260200180612c5a6026913960400191505060405180910390fd5b6000828152609a60209081526040808320338085529252909120805483549192610f92926001600160a01b03169161246d565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b609e5481565b60a05481565b6099546000805b8281101561101157611007611000826124c4565b83906122d3565b9150600101610fec565b50609c5461101f90826120ce565b609c555050565b61102e612159565b6065546001600160a01b0390811691161461107e576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b801561108c5761108c610fe5565b6110c9826110c3609986815481106110a057fe5b906000526020600020906005020160010154609b546120ce90919063ffffffff16565b906122d3565b609b8190555081609984815481106110dd57fe5b906000526020600020906005020160010181905550505050565b60a45490565b611105612159565b6065546001600160a01b03908116911614611155576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b61115d612b7e565b506040805160a081018252600b606082018181526a636f726544414f2f4c503160a81b60808401528252825180840184528181526a31b7b932a220a797a6281960a91b60208281019190915280840191909152835180850185529182526a636f726544414f2f4c503360a81b90820152918101919091526111dc612b7e565b506040805160a08101825260136060820181815272636f726544414f20566f7563686572204c503160681b60808401528252825180840184528181527231b7b932a220a7902b37bab1b432b91026281960691b602082810191909152808401919091528351808501855291825272636f726544414f20566f7563686572204c503360681b9082015291810191909152609954600381146112c3576040805162461bcd60e51b815260206004820152601760248201527f496e76616c6964206e756d626572206f6620706f6f6c73000000000000000000604482015290519081900360640190fd5b60996000815481106112d157fe5b60009182526020909120600590910201546001600160a01b03167332ce7e48debdccbfe0cd037cc89526e4382cb81b14611341576040805162461bcd60e51b815260206004820152600c60248201526b416c726561647920646f6e6560a01b604482015290519081900360640190fd5b60005b818110156108d15760006099828154811061135b57fe5b60009182526020808320600590920290910154604080516370a0823160e01b815230600482015290516001600160a01b03909216945084926370a0823192602480840193829003018186803b1580156113b357600080fd5b505afa1580156113c7573d6000803e3d6000fd5b505050506040513d60208110156113dd57600080fd5b50516040805163fcfe8f7f60e01b815290519192506000916001600160a01b037f000000000000000000000000904cf9487312f1034814056f1f99be49e74bcc70169163fcfe8f7f91600480830192602092919082900301818787803b15801561144657600080fd5b505af115801561145a573d6000803e3d6000fd5b505050506040513d602081101561147057600080fd5b505190506001600160a01b03811663bd3a13f687866003811061148f57fe5b60200201518987600381106114a057fe5b602002015185876040518563ffffffff1660e01b8152600401808060200180602001858152602001846001600160a01b03168152602001838103835287818151815260200191508051906020019080838360005b8381101561150c5781810151838201526020016114f4565b50505050905090810190601f1680156115395780820380516001836020036101000a031916815260200191505b50838103825286518152865160209182019188019080838360005b8381101561156c578181015183820152602001611554565b50505050905090810190601f1680156115995780820380516001836020036101000a031916815260200191505b509650505050505050600060405180830381600087803b1580156115bc57600080fd5b505af11580156115d0573d6000803e3d6000fd5b50506098546115ee92506001600160a01b038681169250168461246d565b81816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561163c57600080fd5b505afa158015611650573d6000803e3d6000fd5b505050506040513d602081101561166657600080fd5b5051146116ba576040805162461bcd60e51b815260206004820152601960248201527f446964206e6f742067657420656e6f756768206f7220524c5000000000000000604482015290519081900360640190fd5b80609985815481106116c857fe5b6000918252602090912060059091020180546001600160a01b0319166001600160a01b0392909216919091179055505050600101611344565b611709612159565b6065546001600160a01b03908116911614611759576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606580546001600160a01b0319169055565b6065546001600160a01b031690565b60a15481565b6117c0612159565b60a6546001600160a01b0390811691161461180c5760405162461bcd60e51b8152600401808060200182810382526028815260200180612bf16028913960400191505060405180910390fd5b60a6546040516000916001600160a01b0316907ff564c40f4f45e62a2c1e6c22e8bfb46501f0f71fa1c72e5358903fa1115a4b64908390a360a680546001600160a01b0319169055565b609a6020908152600092835260408084209091529082529020805460019091015482565b60006106e8611894609d54436120ce90919063ffffffff16565b60a054609f54610e0a916122d3565b600080609984815481106118b357fe5b60009182526020808320878452609a825260408085206001600160a01b038916865290925292206002600590920290920190810154600183015483549294509091611914919061190e9064e8d4a5100090610e0a9086612414565b906120ce565b93505050505b92915050565b611928612159565b60a6546001600160a01b039081169116146119745760405162461bcd60e51b8152600401808060200182810382526028815260200180612bf16028913960400191505060405180910390fd5b6001600160a01b0381166119b95760405162461bcd60e51b8152600401808060200182810382526026815260200180612ba66026913960400191505060405180910390fd5b60a6546040516001600160a01b038084169216907ff564c40f4f45e62a2c1e6c22e8bfb46501f0f71fa1c72e5358903fa1115a4b6490600090a360a680546001600160a01b0319166001600160a01b0392909216919091179055565b611a1d612159565b60a6546001600160a01b03908116911614611a695760405162461bcd60e51b8152600401808060200182810382526028815260200180612bf16028913960400191505060405180910390fd5b611a7281610737565b611aad5760405162461bcd60e51b8152600401808060200182810382526025815260200180612bcc6025913960400191505060405180910390fd5b609d54611abd90620173186122d3565b4311611afa5760405162461bcd60e51b8152600401808060200182810382526026815260200180612c806026913960400191505060405180910390fd5b826001600160a01b031663095ea7b382846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611b5157600080fd5b505af1158015611b65573d6000803e3d6000fd5b505050506040513d6020811015611b7b57600080fd5b5050505050565b611b8a612159565b6065546001600160a01b03908116911614611bda576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b8115611be857611be8610fe5565b60995460005b81811015611c8257846001600160a01b031660998281548110611c0d57fe5b60009182526020909120600590910201546001600160a01b03161415611c7a576040805162461bcd60e51b815260206004820152601860248201527f4572726f7220706f6f6c20616c72656164792061646465640000000000000000604482015290519081900360640190fd5b600101611bee565b50609b54611c9090866122d3565b609b5550604080516080810182526001600160a01b0394851681526020810195865260009181018281529215156060820190815260998054600181018255935290517f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d00600590930292830180546001600160a01b031916919096161790945593517f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d01850155517f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d0284015550517f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d03909101805460ff1916911515919091179055565b609f5481565b6098546001600160a01b031681565b600060998381548110611db557fe5b60009182526020808320338085526005939093020160048101825260408085206001600160a01b038a1680875290845294819020879055805188815292830187905280519195507fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7928290030190a350505050565b611e32612159565b6065546001600160a01b03908116911614611e82576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b6103e88161ffff161115611ed6576040805162461bcd60e51b81526020600482015260166024820152754465762066656520636c616d7065642061742031302560501b604482015290519081900360640190fd5b60a3805461ffff191661ffff92909216919091179055565b600060998381548110611efd57fe5b60009182526020808320868452609a82526040808520338652909252922060059091029091019150611f2d610fe5565b611f37843361232d565b8215611f63578154611f54906001600160a01b03163330866123ba565b8054611f6090846122d3565b81555b60028201548154611f7e9164e8d4a5100091610e0a91612414565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b609c5481565b6097546001600160a01b031681565b611fdd612159565b6065546001600160a01b0390811691161461202d576040805162461bcd60e51b81526020600482018190526024820152600080516020612c3a833981519152604482015290519081900360640190fd5b6001600160a01b0381166120725760405162461bcd60e51b8152600401808060200182810382526026815260200180612ba66026913960400191505060405180910390fd5b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b600061211083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506125fd565b9392505050565b600061211083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612694565b3390565b60006099858154811061216c57fe5b60009182526020909120600590910201600381015490915060ff166121c25760405162461bcd60e51b8152600401808060200182810382526026815260200180612c5a6026913960400191505060405180910390fd5b6000858152609a602090815260408083206001600160a01b03871684529091529020805485111561222f576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b612237610fe5565b612241868561232d565b841561226b57805461225390866120ce565b8155815461226b906001600160a01b0316848761246d565b600282015481546122869164e8d4a5100091610e0a91612414565b600182015560408051868152905187916001600160a01b038616917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b600082820183811015612110576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000828152609a602090815260408083206001600160a01b03851684529091529020805461235b5750610a97565b60006099848154811061236a57fe5b9060005260206000209060050201905060006123a8836001015461190e64e8d4a51000610e0a8660020154886000015461241490919063ffffffff16565b90508015611b7b57611b7b84826126f9565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526108d190859061298a565b6000826124235750600061191a565b8282028284828161243057fe5b04146121105760405162461bcd60e51b8152600401808060200182810382526021815260200180612c196021913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526124bf90849061298a565b505050565b600080609983815481106124d457fe5b6000918252602080832060059092029091018054604080516370a0823160e01b815230600482015290519295506001600160a01b03909116926370a0823192602480840193829003018186803b15801561252d57600080fd5b505afa158015612541573d6000803e3d6000fd5b505050506040513d602081101561255757600080fd5b505190508061256b5760009250505061073c565b61258a609b54610e0a8460010154609c5461241490919063ffffffff16565b60a3549093506000906125aa9061271090610e0a90879061ffff16612414565b905060006125b885836120ce565b60a4549091506125c890836122d3565b60a4556125ec6125e184610e0a8464e8d4a51000612414565b6002860154906122d3565b846002018190555050505050919050565b6000818484111561268c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612651578181015183820152602001612639565b50505050905090810190601f16801561267e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836126e35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612651578181015183820152602001612639565b5060008385816126ef57fe5b0495945050505050565b8061270357610a97565b609754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561274e57600080fd5b505afa158015612762573d6000803e3d6000fd5b505050506040513d602081101561277857600080fd5b5051905080821115612885576097546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156127da57600080fd5b505af11580156127ee573d6000803e3d6000fd5b505050506040513d602081101561280457600080fd5b5050609754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561285157600080fd5b505afa158015612865573d6000803e3d6000fd5b505050506040513d602081101561287b57600080fd5b505160a555612982565b6097546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156128db57600080fd5b505af11580156128ef573d6000803e3d6000fd5b505050506040513d602081101561290557600080fd5b5050609754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561295257600080fd5b505afa158015612966573d6000803e3d6000fd5b505050506040513d602081101561297c57600080fd5b505160a5555b6124bf610abf565b61299c826001600160a01b0316612b42565b6129ed576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310612a2b5780518252601f199092019160209182019101612a0c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612a8d576040519150601f19603f3d011682016040523d82523d6000602084013e612a92565b606091505b509150915081612ae9576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156108d157808060200190516020811015612b0557600080fd5b50516108d15760405162461bcd60e51b815260040180806020018281038252602a815260200180612ca6602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612b7657508115155b949350505050565b60405180606001604052806003905b6060815260200190600190039081612b8d579050509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735265636970656e74206973206e6f74206120736d61727420636f6e74726163742c2042414453757065722061646d696e203a2063616c6c6572206973206e6f742073757065722061646d696e2e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725769746864726177696e672066726f6d207468697320706f6f6c2069732064697361626c6564476f7665726e616e636520736574757020677261636520706572696f64206e6f74206f7665725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122095fc46abae8ca621601b10851a85c84bb7d60569a58fa12a2effbd27661c79dd64736f6c634300060c0033

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

000000000000000000000000904cf9487312f1034814056f1f99be49e74bcc70

-----Decoded View---------------
Arg [0] : rlpFactory (address): 0x904cF9487312f1034814056F1F99be49E74BCC70

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000904cf9487312f1034814056f1f99be49e74bcc70


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.