ETH Price: $3,715.99 (+3.46%)

Contract

0xE51C19223e86a4e1fe1d803fE7B5727793EF158C
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

Transaction Hash
Method
Block
From
To
Claim Reward177701452023-07-25 12:35:35494 days ago1690288535IN
0xE51C1922...793EF158C
0 ETH0.0039153336.22089384
Claim Reward121312642021-03-29 1:49:581342 days ago1616982598IN
0xE51C1922...793EF158C
0 ETH0.0059699489
Claim Reward121011442021-03-24 10:57:511347 days ago1616583471IN
0xE51C1922...793EF158C
0 ETH0.01870788141.00000145
Claim Reward120971822021-03-23 20:10:491348 days ago1616530249IN
0xE51C1922...793EF158C
0 ETH0.02374972179
Claim Reward120787472021-03-20 23:38:521351 days ago1616283532IN
0xE51C1922...793EF158C
0 ETH0.012604695
Claim Reward120785012021-03-20 22:50:261351 days ago1616280626IN
0xE51C1922...793EF158C
0 ETH0.0155064105
Claim Reward120782992021-03-20 22:05:151351 days ago1616277915IN
0xE51C1922...793EF158C
0 ETH0.0067078100
Claim Reward120781202021-03-20 21:26:531351 days ago1616275613IN
0xE51C1922...793EF158C
0 ETH0.00900564117.42
Claim And Reinve...120573942021-03-17 16:57:491354 days ago1616000269IN
0xE51C1922...793EF158C
0 ETH0.08742716201
Claim Reward120555342021-03-17 10:04:481354 days ago1615975488IN
0xE51C1922...793EF158C
0 ETH0.02282096172
Claim Reward120530352021-03-17 0:53:071354 days ago1615942387IN
0xE51C1922...793EF158C
0 ETH0.01622302182.7
Claim Reward120497652021-03-16 13:00:321355 days ago1615899632IN
0xE51C1922...793EF158C
0 ETH0.01207625136.00000145
Claim Reward120483722021-03-16 7:42:121355 days ago1615880532IN
0xE51C1922...793EF158C
0 ETH0.01514276114.13
Claim Reward120472452021-03-16 3:24:021355 days ago1615865042IN
0xE51C1922...793EF158C
0 ETH0.0127955144.1
Claim And Reinve...120462632021-03-15 23:53:551356 days ago1615852435IN
0xE51C1922...793EF158C
0 ETH0.07872794181
Claim Reward120457032021-03-15 21:47:471356 days ago1615844867IN
0xE51C1922...793EF158C
0 ETH0.01513971170.5
Claim Reward120454972021-03-15 21:04:041356 days ago1615842244IN
0xE51C1922...793EF158C
0 ETH0.029536200
Claim Reward120454152021-03-15 20:46:491356 days ago1615841209IN
0xE51C1922...793EF158C
0 ETH0.01602946209
Claim Reward120445812021-03-15 17:40:591356 days ago1615830059IN
0xE51C1922...793EF158C
0 ETH0.0116994150
Claim Reward120438902021-03-15 15:08:241356 days ago1615820904IN
0xE51C1922...793EF158C
0 ETH0.01731522195
Claim Reward120429142021-03-15 11:29:511356 days ago1615807791IN
0xE51C1922...793EF158C
0 ETH0.01388568141
Claim Reward120428102021-03-15 11:08:131356 days ago1615806493IN
0xE51C1922...793EF158C
0 ETH0.026536200
Claim Reward120420242021-03-15 8:18:501356 days ago1615796330IN
0xE51C1922...793EF158C
0 ETH0.01633846184
Claim Reward120403622021-03-15 1:59:201356 days ago1615773560IN
0xE51C1922...793EF158C
0 ETH0.01189866134
Claim Reward120401852021-03-15 1:17:311356 days ago1615771051IN
0xE51C1922...793EF158C
0 ETH0.00924163144
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultBoardroom

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : VaultBoardroom.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IERC20} from '@openzeppelin/contracts/contracts/token/ERC20/IERC20.sol';
import {IVault} from '../../interfaces/IVault.sol';
import {SafeMath} from '@openzeppelin/contracts/contracts/math/SafeMath.sol';
import {ContractGuard} from '../../utils/ContractGuard.sol';
import {BaseBoardroom} from './BaseBoardroom.sol';

// import 'hardhat/console.sol';

contract VaultBoardroom is ContractGuard, BaseBoardroom {
    using SafeMath for uint256;

    // The vault which has state of the stakes.
    IVault public vault;
    uint256 public currentEpoch = 1;

    mapping(address => mapping(uint256 => BondingSnapshot))
        public bondingHistory;

    mapping(address => mapping(uint256 => uint256)) directorBalanceForEpoch;
    mapping(address => uint256) balanceCurrentEpoch;
    mapping(address => uint256) balanceLastEpoch;
    mapping(address => uint256) balanceBeforeLaunch;

    modifier directorExists {
        require(
            vault.balanceOf(msg.sender) > 0,
            'Boardroom: The director does not exist'
        );
        _;
    }

    modifier onlyVault {
        require(msg.sender == address(vault), 'Boardroom: not vault');
        _;
    }

    constructor(
        IERC20 token_,
        IVault vault_,
        address owner,
        address operator
    ) BaseBoardroom(token_) {
        vault = vault_;

        BoardSnapshot memory genesisSnapshot =
            BoardSnapshot({
                number: block.number,
                time: 0,
                rewardReceived: 0,
                rewardPerShare: 0
            });
        boardHistory.push(genesisSnapshot);

        transferOperator(operator);
        transferOwnership(owner);
    }

    function getBoardhistory(uint256 i)
        public
        view
        returns (BoardSnapshot memory)
    {
        return boardHistory[i];
    }

    function getBondingHistory(address who, uint256 epoch)
        public
        view
        returns (BondingSnapshot memory)
    {
        return bondingHistory[who][epoch];
    }

    // returns the balance as per the last epoch; if the user deposits/withdraws
    // in the current epoch, this value will not change unless another epoch passes
    function getBalanceFromLastEpoch(address who)
        public
        view
        returns (uint256)
    {
        // console.log('getBalanceFromLastEpoch who %s', who);
        // console.log('getBalanceFromLastEpoch currentEpoch %s', currentEpoch);
        if (currentEpoch == 1) return 0;

        // console.log(
        //     'getBalanceFromLastEpoch balanceLastEpoch[who] %s',
        //     balanceLastEpoch[who]
        // );
        // console.log(
        //     'getBalanceFromLastEpoch balanceCurrentEpoch[who] %s',
        //     balanceCurrentEpoch[who]
        // );

        if (balanceCurrentEpoch[who] == 0) {
            // console.log(
            //     'getBalanceFromLastEpoch balanceOf(who) %s',
            //     balanceOf(who)
            // );
            return balanceOf(who);
        }

        uint256 currentBalance =
            getBondingHistory(who, balanceCurrentEpoch[who]).balance;

        if (balanceCurrentEpoch[who] == currentEpoch) {
            // if boardroom was disconnected before then just return the old balance
            if (balanceLastEpoch[who] == 0) return balanceBeforeLaunch[who];
            return getBondingHistory(who, balanceLastEpoch[who]).balance;
        }

        if (balanceCurrentEpoch[who] < currentEpoch) {
            return currentBalance;
        }

        return 0;
    }

    function claimAndReinvestReward(IVault _vault) external virtual {
        uint256 reward = _claimReward(msg.sender);
        _vault.bondFor(msg.sender, reward);
    }

    function rewardPerShare() public view override returns (uint256) {
        return getLatestSnapshot().rewardPerShare;
    }

    function balanceOf(address who) public view returns (uint256) {
        uint256 unbondingAmount = vault.getStakedAmount(who);
        return vault.balanceOf(who).sub(unbondingAmount);
    }

    function earned(address director)
        public
        view
        virtual
        override
        returns (uint256)
    {
        uint256 latestRPS = getLatestSnapshot().rewardPerShare;
        uint256 storedRPS = getLastSnapshotOf(director).rewardPerShare;

        return
            getBalanceFromLastEpoch(director)
                .mul(latestRPS.sub(storedRPS))
                .div(1e18)
                .add(directors[director].rewardEarnedCurrEpoch);
    }

    function claimReward()
        public
        virtual
        override
        directorExists
        returns (uint256)
    {
        return _claimReward(msg.sender);
    }

    function allocateSeigniorage(uint256 amount)
        external
        override
        onlyOneBlock
        onlyOperator
    {
        require(amount > 0, 'Boardroom: Cannot allocate 0');

        uint256 totalSupply = vault.totalBondedSupply();

        // 'Boardroom: Cannot allocate when totalSupply is 0'
        if (totalSupply == 0) return;

        // Create & add new snapshot
        uint256 prevRPS = getLatestSnapshot().rewardPerShare;
        uint256 nextRPS = prevRPS.add(amount.mul(1e18).div(totalSupply));

        BoardSnapshot memory snap =
            BoardSnapshot({
                number: block.number,
                time: block.timestamp,
                rewardReceived: amount,
                rewardPerShare: nextRPS
            });
        boardHistory.push(snap);

        // console.log('allocateSeigniorage totalSupply: %s', totalSupply);
        // console.log('allocateSeigniorage time: %s', block.timestamp);
        // console.log('allocateSeigniorage rewardReceived: %s', amount);
        // console.log('allocateSeigniorage rewardPerShare: %s', nextRPS);

        token.transferFrom(msg.sender, address(this), amount);
        currentEpoch = currentEpoch.add(1);
        emit RewardAdded(msg.sender, amount);
    }

    function updateReward(address director)
        external
        virtual
        override
        onlyVault
    {
        _updateBalance(director);
    }

    function _claimReward(address who) internal returns (uint256) {
        _updateReward(who);

        uint256 reward = directors[who].rewardEarnedCurrEpoch;

        if (reward > 0) {
            directors[who].rewardEarnedCurrEpoch = 0;
            token.transfer(who, reward);
            emit RewardPaid(who, reward);

            if (balanceLastEpoch[who] == 0) {
                balanceBeforeLaunch[who] = balanceOf(who);
            }
        }

        return reward;
    }

    function setVault(IVault _vault) external onlyOwner {
        vault = _vault;
    }

    function _updateReward(address director) internal {
        Boardseat memory seat = directors[director];
        seat.rewardEarnedCurrEpoch = earned(director);
        seat.lastSnapshotIndex = latestSnapshotIndex();
        directors[director] = seat;
    }

    function _updateBalance(address who) internal {
        // console.log('updating balance for director at epoch: %s', currentEpoch);

        BondingSnapshot memory snap =
            BondingSnapshot({
                epoch: currentEpoch,
                when: block.timestamp,
                balance: balanceOf(who)
            });

        bondingHistory[who][currentEpoch] = snap;

        // update epoch counters if they need updating
        if (balanceCurrentEpoch[who] != currentEpoch) {
            balanceLastEpoch[who] = balanceCurrentEpoch[who];
            balanceCurrentEpoch[who] = currentEpoch;
        }

        // if (balanceLastEpoch[who] == 0) {
        //     require(
        //         earned(who) == 0,
        //         'Claim rewards once before depositing again'
        //     );
        // }

        if (balanceLastEpoch[who] == 0) {
            balanceLastEpoch[who] = 1;
        }

        _updateReward(who);
    }
}

File 2 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.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 16 : IVault.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IVault {
    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function totalBondedSupply() external view returns (uint256);

    function balanceWithoutBonded(address who) external view returns (uint256);

    function bond(uint256 amount) external;

    function bondFor(address who, uint256 amount) external;

    function unbond(uint256 amount) external;

    function withdraw() external;

    function getStakedAmount(address who) external view returns (uint256);
}

File 4 of 16 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

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

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

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

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 5 of 16 : ContractGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract ContractGuard {
    mapping(uint256 => mapping(address => bool)) private _status;

    function checkSameOriginReentranted() internal view returns (bool) {
        return _status[block.number][tx.origin];
    }

    function checkSameSenderReentranted() internal view returns (bool) {
        return _status[block.number][msg.sender];
    }

    modifier onlyOneBlock() {
        require(
            !checkSameOriginReentranted(),
            'ContractGuard: one block, one function'
        );
        require(
            !checkSameSenderReentranted(),
            'ContractGuard: one block, one function'
        );

        _;

        _status[block.number][tx.origin] = true;
        _status[block.number][msg.sender] = true;
    }
}

File 6 of 16 : BaseBoardroom.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IERC20} from '@openzeppelin/contracts/contracts/token/ERC20/IERC20.sol';
import {IVault} from '../../interfaces/IVault.sol';
import {SafeMath} from '@openzeppelin/contracts/contracts/math/SafeMath.sol';
import {Safe112} from '../../lib/Safe112.sol';
import {ContractGuard} from '../../utils/ContractGuard.sol';
import {Operator} from '../../owner/Operator.sol';
import {IBoardroom} from '../../interfaces/IBoardroom.sol';
import {IBasisAsset} from '../../interfaces/IBasisAsset.sol';
import {IVaultBoardroom} from '../../interfaces/IVaultBoardroom.sol';

abstract contract BaseBoardroom is Operator, IBoardroom {
    using Safe112 for uint112;
    using SafeMath for uint256;

    IERC20 public token;

    BoardSnapshot[] public boardHistory;
    mapping(address => Boardseat) public directors;

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

    constructor(IERC20 token_) {
        token = token_;
    }

    function getDirector(address who)
        external
        view
        override
        returns (Boardseat memory)
    {
        return directors[who];
    }

    function getLastSnapshotIndexOf(address director)
        external
        view
        override
        returns (uint256)
    {
        return directors[director].lastSnapshotIndex;
    }

    function getLastSnapshotOf(address director)
        public
        view
        returns (BoardSnapshot memory)
    {
        return boardHistory[directors[director].lastSnapshotIndex];
    }

    function latestSnapshotIndex() public view returns (uint256) {
        return boardHistory.length.sub(1);
    }

    function getLatestSnapshot() public view returns (BoardSnapshot memory) {
        return boardHistory[latestSnapshotIndex()];
    }

    function rewardPerShare() public view virtual returns (uint256) {
        return getLatestSnapshot().rewardPerShare;
    }

    function refundReward() external onlyOwner {
        token.transfer(msg.sender, token.balanceOf(address(this)));
    }
}

File 7 of 16 : Safe112.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library Safe112 {
    function add(uint112 a, uint112 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, 'Safe112: addition overflow');

        return c;
    }

    function sub(uint112 a, uint112 b) internal pure returns (uint256) {
        return sub(a, b, 'Safe112: subtraction overflow');
    }

    function sub(
        uint112 a,
        uint112 b,
        string memory errorMessage
    ) internal pure returns (uint112) {
        require(b <= a, errorMessage);
        uint112 c = a - b;

        return c;
    }

    function mul(uint112 a, uint112 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

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

        return c;
    }

    function div(uint112 a, uint112 b) internal pure returns (uint256) {
        return div(a, b, 'Safe112: division by zero');
    }

    function div(
        uint112 a,
        uint112 b,
        string memory errorMessage
    ) internal pure returns (uint112) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint112 c = a / b;

        return c;
    }

    function mod(uint112 a, uint112 b) internal pure returns (uint256) {
        return mod(a, b, 'Safe112: modulo by zero');
    }

    function mod(
        uint112 a,
        uint112 b,
        string memory errorMessage
    ) internal pure returns (uint112) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 8 of 16 : Operator.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import '@openzeppelin/contracts/contracts/GSN/Context.sol';
import '@openzeppelin/contracts/contracts/access/Ownable.sol';
import {IOperator} from '../interfaces/IOperator.sol';

abstract contract Operator is Context, Ownable, IOperator {
    address private _operator;

    event OperatorTransferred(
        address indexed previousOperator,
        address indexed newOperator
    );

    constructor() {
        _operator = _msgSender();

        emit OperatorTransferred(address(0), _operator);
    }

    function operator() public view override returns (address) {
        return _operator;
    }

    modifier onlyOperator() {
        require(
            _operator == msg.sender,
            'operator: caller is not the operator'
        );
        _;
    }

    function isOperator() public view override returns (bool) {
        return _msgSender() == _operator;
    }

    function transferOperator(address newOperator_) public override onlyOwner {
        _transferOperator(newOperator_);
    }

    function _transferOperator(address newOperator_) internal {
        require(
            newOperator_ != address(0),
            'operator: zero address given for new operator'
        );

        emit OperatorTransferred(address(0), newOperator_);

        _operator = newOperator_;
    }
}

File 9 of 16 : IBoardroom.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IOperator} from './IOperator.sol';

interface IBoardroom is IOperator {
    struct Boardseat {
        uint256 rewardClaimed;
        uint256 lastRPS;
        uint256 firstRPS;
        uint256 lastBoardSnapshotIndex;
        // // Pending reward from the previous epochs.
        // uint256 rewardPending;
        // Total reward earned in this epoch.
        uint256 rewardEarnedCurrEpoch;
        // Last time reward was claimed(not bound by current epoch).
        uint256 lastClaimedOn;
        // // The reward claimed in vesting period of this epoch.
        // uint256 rewardClaimedCurrEpoch;
        // // Snapshot of boardroom state when last epoch claimed.
        uint256 lastSnapshotIndex;
        // // Rewards claimable now in the current/next claim.
        // uint256 rewardClaimableNow;
        // // keep track of the current rps
        // uint256 claimedRPS;
        bool isFirstVaultActivityBeforeFirstEpoch;
        uint256 firstEpochWhenDoingVaultActivity;
    }

    struct BoardSnapshot {
        // Block number when recording a snapshot.
        uint256 number;
        // Block timestamp when recording a snapshot.
        uint256 time;
        // Amount of funds received.
        uint256 rewardReceived;
        // Equivalent amount per share staked.
        uint256 rewardPerShare;
    }

    struct BondingSnapshot {
        uint256 epoch;
        // Time when first bonding was made.
        uint256 when;
        // The snapshot index of when first bonded.
        uint256 balance;
    }

    // function updateReward(address director) external;

    function allocateSeigniorage(uint256 amount) external;

    function getDirector(address who) external view returns (Boardseat memory);

    function getLastSnapshotIndexOf(address director)
        external
        view
        returns (uint256);

    function earned(address director) external view returns (uint256);

    function claimReward() external returns (uint256);

    function updateReward(address director) external;
}

File 10 of 16 : IBasisAsset.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import {IERC20} from '@openzeppelin/contracts/contracts/token/ERC20/IERC20.sol';

interface IBasisAsset is IERC20 {
    function mint(address recipient, uint256 amount) external returns (bool);

    function burn(uint256 amount) external;

    function burnFrom(address from, uint256 amount) external;

    function isOperator() external returns (bool);

    function operator() external view returns (address);

    function transferOperator(address newOperator_) external;

    function transferOwnership(address newOwner) external;
}

File 11 of 16 : IVaultBoardroom.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IBoardroom} from './IBoardroom.sol';

interface IVaultBoardroom is IBoardroom {
    function bondingHistory(address who, uint256 epoch)
        external
        view
        returns (BondingSnapshot memory);

    function directors(address who) external view returns (Boardseat memory);
}

File 12 of 16 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 13 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        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;
    }
}

File 14 of 16 : IOperator.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IEpoch} from './IEpoch.sol';

interface IOperator {
    function operator() external view returns (address);

    function isOperator() external view returns (bool);

    function transferOperator(address newOperator_) external;
}

File 15 of 16 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with 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.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 16 of 16 : IEpoch.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IEpoch {
    function callable() external view returns (bool);

    function getLastEpoch() external view returns (uint256);

    function getCurrentEpoch() external view returns (uint256);

    function getNextEpoch() external view returns (uint256);

    function nextEpochPoint() external view returns (uint256);

    function getPeriod() external view returns (uint256);

    function getStartTime() external view returns (uint256);

    function setPeriod(uint256 _period) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"token_","type":"address"},{"internalType":"contract IVault","name":"vault_","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allocateSeigniorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"boardHistory","outputs":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"rewardReceived","type":"uint256"},{"internalType":"uint256","name":"rewardPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"bondingHistory","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"when","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IVault","name":"_vault","type":"address"}],"name":"claimAndReinvestReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"directors","outputs":[{"internalType":"uint256","name":"rewardClaimed","type":"uint256"},{"internalType":"uint256","name":"lastRPS","type":"uint256"},{"internalType":"uint256","name":"firstRPS","type":"uint256"},{"internalType":"uint256","name":"lastBoardSnapshotIndex","type":"uint256"},{"internalType":"uint256","name":"rewardEarnedCurrEpoch","type":"uint256"},{"internalType":"uint256","name":"lastClaimedOn","type":"uint256"},{"internalType":"uint256","name":"lastSnapshotIndex","type":"uint256"},{"internalType":"bool","name":"isFirstVaultActivityBeforeFirstEpoch","type":"bool"},{"internalType":"uint256","name":"firstEpochWhenDoingVaultActivity","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"director","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"getBalanceFromLastEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"}],"name":"getBoardhistory","outputs":[{"components":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"rewardReceived","type":"uint256"},{"internalType":"uint256","name":"rewardPerShare","type":"uint256"}],"internalType":"struct IBoardroom.BoardSnapshot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"},{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"getBondingHistory","outputs":[{"components":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"when","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct IBoardroom.BondingSnapshot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"getDirector","outputs":[{"components":[{"internalType":"uint256","name":"rewardClaimed","type":"uint256"},{"internalType":"uint256","name":"lastRPS","type":"uint256"},{"internalType":"uint256","name":"firstRPS","type":"uint256"},{"internalType":"uint256","name":"lastBoardSnapshotIndex","type":"uint256"},{"internalType":"uint256","name":"rewardEarnedCurrEpoch","type":"uint256"},{"internalType":"uint256","name":"lastClaimedOn","type":"uint256"},{"internalType":"uint256","name":"lastSnapshotIndex","type":"uint256"},{"internalType":"bool","name":"isFirstVaultActivityBeforeFirstEpoch","type":"bool"},{"internalType":"uint256","name":"firstEpochWhenDoingVaultActivity","type":"uint256"}],"internalType":"struct IBoardroom.Boardseat","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"director","type":"address"}],"name":"getLastSnapshotIndexOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"director","type":"address"}],"name":"getLastSnapshotOf","outputs":[{"components":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"rewardReceived","type":"uint256"},{"internalType":"uint256","name":"rewardPerShare","type":"uint256"}],"internalType":"struct IBoardroom.BoardSnapshot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestSnapshot","outputs":[{"components":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"rewardReceived","type":"uint256"},{"internalType":"uint256","name":"rewardPerShare","type":"uint256"}],"internalType":"struct IBoardroom.BoardSnapshot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestSnapshotIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refundReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IVault","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOperator_","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"director","type":"address"}],"name":"updateReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IVault","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405260016007553480156200001657600080fd5b50604051620020e6380380620020e6833981016040819052620000399162000383565b83600062000046620001e9565b600180546001600160a01b0319166001600160a01b03831690811790915560405191925090600090600080516020620020a6833981519152908290a3506200008d620001e9565b600280546001600160a01b0319166001600160a01b039283161790819055604051911690600090600080516020620020c6833981519152908290a3600380546001600160a01b03199081166001600160a01b0393841617909155600680549091169185169190911790556040805160808101825243815260006020820181815292820181815260608301828152600480546001810182559381905284517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b949091029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e90920191909155620001d382620001ed565b620001de836200024a565b5050505050620004c8565b3390565b620001f7620001e9565b6001600160a01b03166200020a62000304565b6001600160a01b0316146200023c5760405162461bcd60e51b815260040162000233906200047d565b60405180910390fd5b620002478162000313565b50565b62000254620001e9565b6001600160a01b03166200026762000304565b6001600160a01b031614620002905760405162461bcd60e51b815260040162000233906200047d565b6001600160a01b038116620002b95760405162461bcd60e51b81526004016200023390620003ea565b6001546040516001600160a01b03808416921690600080516020620020a683398151915290600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031690565b6001600160a01b0381166200033c5760405162461bcd60e51b8152600401620002339062000430565b6040516001600160a01b03821690600090600080516020620020c6833981519152908290a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000806080858703121562000399578384fd5b8451620003a681620004b2565b6020860151909450620003b981620004b2565b6040860151909350620003cc81620004b2565b6060860151909250620003df81620004b2565b939692955090935050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252602d908201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260408201526c103732bb9037b832b930ba37b960991b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6001600160a01b03811681146200024757600080fd5b611bce80620004d86000396000f3fe608060405234801561001057600080fd5b50600436106101ce5760003560e01c80638da5cb5b11610104578063c291818b116100a2578063f2fde38b11610071578063f2fde38b146103bd578063fbfa77cf146103d0578063fc0c546a146103d8578063fd147b7f146103e0576101ce565b8063c291818b14610367578063d518f2431461037a578063d7603ef714610382578063f0ec943014610395576101ce565b80639b2d6194116100de5780639b2d61941461030a578063b54076571461032c578063b6f3c6c01461033f578063b88a802f1461035f576101ce565b80638da5cb5b146102e757806396c86cfc146102ef57806397ffe1d7146102f7576101ce565b8063570ca7351161017157806370a082311161014b57806370a08231146102b1578063714b4658146102c4578063715018a6146102d757806376671808146102df576101ce565b8063570ca73514610276578063632447c91461028b5780636817031b1461029e576101ce565b806339344d9d116101ad57806339344d9d146102315780633f9e3f04146102515780634456eda214610259578063446a2ec81461026e576101ce565b80628cc262146101d357806304ab80fc146101fc57806329605e771461021c575b600080fd5b6101e66101e13660046116e1565b610403565b6040516101f39190611a84565b60405180910390f35b61020f61020a3660046116e1565b610484565b6040516101f391906119fc565b61022f61022a3660046116e1565b610512565b005b61024461023f3660046116fd565b610566565b6040516101f39190611a63565b6101e66105bc565b6102616105d2565b6040516101f391906117c9565b6101e66105f8565b61027e61060b565b6040516101f39190611778565b61022f6102993660046116e1565b61061a565b61022f6102ac3660046116e1565b61064d565b6101e66102bf3660046116e1565b6106ae565b6101e66102d23660046116e1565b6107c7565b61022f6107e5565b6101e661086e565b61027e610874565b61022f610883565b61022f610305366004611748565b6109bb565b61031d6103183660046116fd565b610cf0565b6040516101f393929190611a8d565b6101e661033a3660046116e1565b610d1c565b61035261034d3660046116e1565b610e4c565b6040516101f391906119d1565b6101e6610edb565b61022f6103753660046116e1565b610f86565b610352610ff8565b610352610390366004611748565b61106e565b6103a86103a33660046116e1565b611097565b6040516101f399989796959493929190611abe565b61022f6103cb3660046116e1565b6110e6565b61027e6111a7565b61027e6111b6565b6103f36103ee366004611748565b6111c5565b6040516101f39493929190611aa3565b60008061040e610ff8565b606001519050600061041f84610e4c565b606001516001600160a01b03851660009081526005602052604090206004015490915061047a90610474670de0b6b3a764000061046e61045f87876111ff565b6104688a610d1c565b9061120b565b90611217565b90611223565b925050505b919050565b61048c61164a565b506001600160a01b03166000908152600560208181526040928390208351610120810185528154815260018201549281019290925260028101549382019390935260038301546060820152600483015460808201529082015460a0820152600682015460c0820152600782015460ff16151560e082015260089091015461010082015290565b61051a61122f565b6001600160a01b031661052b610874565b6001600160a01b03161461055a5760405162461bcd60e51b81526004016105519061189e565b60405180910390fd5b61056381611233565b50565b61056e611698565b506001600160a01b0382166000908152600860209081526040808320848452825291829020825160608101845281548152600182015492810192909252600201549181019190915292915050565b6004546000906105cd9060016111ff565b905090565b6002546000906001600160a01b03166105e961122f565b6001600160a01b031614905090565b6000610602610ff8565b60600151905090565b6002546001600160a01b031690565b6006546001600160a01b031633146106445760405162461bcd60e51b81526004016105519061195d565b610563816112b1565b61065561122f565b6001600160a01b0316610666610874565b6001600160a01b03161461068c5760405162461bcd60e51b81526004016105519061189e565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6006546040516326d352ab60e11b815260009182916001600160a01b0390911690634da6a556906106e3908690600401611778565b60206040518083038186803b1580156106fb57600080fd5b505afa15801561070f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107339190611760565b6006546040516370a0823160e01b81529192506107c09183916001600160a01b0316906370a082319061076a908890600401611778565b60206040518083038186803b15801561078257600080fd5b505afa158015610796573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ba9190611760565b906111ff565b9392505050565b6001600160a01b031660009081526005602052604090206006015490565b6107ed61122f565b6001600160a01b03166107fe610874565b6001600160a01b0316146108245760405162461bcd60e51b81526004016105519061189e565b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b60075481565b6001546001600160a01b031690565b61088b61122f565b6001600160a01b031661089c610874565b6001600160a01b0316146108c25760405162461bcd60e51b81526004016105519061189e565b6003546040516370a0823160e01b81526001600160a01b039091169063a9059cbb90339083906370a08231906108fc903090600401611778565b60206040518083038186803b15801561091457600080fd5b505afa158015610928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094c9190611760565b6040518363ffffffff1660e01b81526004016109699291906117b0565b602060405180830381600087803b15801561098357600080fd5b505af1158015610997573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105639190611728565b6109c361139f565b156109e05760405162461bcd60e51b81526004016105519061198b565b6109e86113be565b15610a055760405162461bcd60e51b81526004016105519061198b565b6002546001600160a01b03163314610a2f5760405162461bcd60e51b8152600401610551906118d3565b60008111610a4f5760405162461bcd60e51b815260040161055190611867565b60065460408051633422f27b60e21b815290516000926001600160a01b03169163d08bc9ec916004808301926020929190829003018186803b158015610a9457600080fd5b505afa158015610aa8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acc9190611760565b905080610ad95750610cb4565b6000610ae3610ff8565b6060015190506000610b0b610b048461046e87670de0b6b3a764000061120b565b8390611223565b6040805160808101825243815242602082019081528183018881526060830185815260048054600181018255600082905285517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9183029182015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c85015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d840155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e9092019190915560035492516323b872dd60e01b815293945090926001600160a01b03909216916323b872dd91610c1191339130918b910161178c565b602060405180830381600087803b158015610c2b57600080fd5b505af1158015610c3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c639190611728565b50600754610c72906001611223565b60075560405133907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e2990610ca7908890611a84565b60405180910390a2505050505b50436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b600860209081526000928352604080842090915290825290208054600182015460029092015490919083565b600060075460011415610d315750600061047f565b6001600160a01b0382166000908152600a6020526040902054610d5e57610d57826106ae565b905061047f565b6001600160a01b0382166000908152600a6020526040812054610d82908490610566565b6040908101516007546001600160a01b0386166000908152600a60205292909220549092501415610e1a576001600160a01b0383166000908152600b6020526040902054610dea5750506001600160a01b0381166000908152600c602052604090205461047f565b6001600160a01b0383166000908152600b6020526040902054610e0e908490610566565b6040015191505061047f565b6007546001600160a01b0384166000908152600a60205260409020541015610e4357905061047f565b50600092915050565b610e546116b9565b6001600160a01b038216600090815260056020526040902060060154600480549091908110610e9357634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402016040518060800160405290816000820154815260200160018201548152602001600282015481526020016003820154815250509050919050565b6006546040516370a0823160e01b815260009182916001600160a01b03909116906370a0823190610f10903390600401611778565b60206040518083038186803b158015610f2857600080fd5b505afa158015610f3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f609190611760565b11610f7d5760405162461bcd60e51b815260040161055190611917565b6105cd336113dd565b6000610f91336113dd565b604051636082d19960e11b81529091506001600160a01b0383169063c105a33290610fc290339085906004016117b0565b600060405180830381600087803b158015610fdc57600080fd5b505af1158015610ff0573d6000803e3d6000fd5b505050505050565b6110006116b9565b600461100a6105bc565b8154811061102857634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050905090565b6110766116b9565b60048281548110610e9357634e487b7160e01b600052603260045260246000fd5b60056020819052600091825260409091208054600182015460028301546003840154600485015495850154600686015460078701546008909701549597949693959294939192909160ff169089565b6110ee61122f565b6001600160a01b03166110ff610874565b6001600160a01b0316146111255760405162461bcd60e51b81526004016105519061189e565b6001600160a01b03811661114b5760405162461bcd60e51b8152600401610551906117d4565b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b6003546001600160a01b031681565b600481815481106111d557600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919350919084565b60006107c08284611b56565b60006107c08284611b37565b60006107c08284611b17565b60006107c08284611aff565b3390565b6001600160a01b0381166112595760405162461bcd60e51b81526004016105519061181a565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000604051806060016040528060075481526020014281526020016112d5846106ae565b90526001600160a01b0383166000818152600860209081526040808320600780548552908352818420865181558387015160018201558287015160029091015554938352600a90915290205491925014611358576001600160a01b0382166000908152600a602081815260408084208054600b8452919094205560075491905290555b6001600160a01b0382166000908152600b6020526040902054611392576001600160a01b0382166000908152600b60205260409020600190555b61139b8261152d565b5050565b4360009081526020818152604080832032845290915290205460ff1690565b4360009081526020818152604080832033845290915290205460ff1690565b60006113e88261152d565b6001600160a01b0382166000908152600560205260409020600401548015611527576001600160a01b03808416600090815260056020526040808220600490810192909255600354905163a9059cbb60e01b815292169163a9059cbb916114539187918691016117b0565b602060405180830381600087803b15801561146d57600080fd5b505af1158015611481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a59190611728565b50826001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040516114df9190611a84565b60405180910390a26001600160a01b0383166000908152600b60205260409020546115275761150d836106ae565b6001600160a01b0384166000908152600c60205260409020555b92915050565b6001600160a01b0381166000908152600560208181526040928390208351610120810185528154815260018201549281019290925260028101549382019390935260038301546060820152600483015460808201529082015460a0820152600682015460c0820152600782015460ff16151560e08201526008909101546101008201526115b982610403565b60808201526115c66105bc565b60c082019081526001600160a01b039290921660009081526005602081815260409283902084518155908401516001820155918301516002830155606083015160038301556080830151600483015560a0830151908201559151600683015560e081015160078301805460ff19169115159190911790556101000151600890910155565b60405180610120016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600015158152602001600081525090565b60405180606001604052806000815260200160008152602001600081525090565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b6000602082840312156116f2578081fd5b81356107c081611b83565b6000806040838503121561170f578081fd5b823561171a81611b83565b946020939093013593505050565b600060208284031215611739578081fd5b815180151581146107c0578182fd5b600060208284031215611759578081fd5b5035919050565b600060208284031215611771578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252602d908201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260408201526c103732bb9037b832b930ba37b960991b606082015260800190565b6020808252601c908201527f426f617264726f6f6d3a2043616e6e6f7420616c6c6f63617465203000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b60208082526026908201527f426f617264726f6f6d3a20546865206469726563746f7220646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b602080825260149082015273109bd85c991c9bdbdb4e881b9bdd081d985d5b1d60621b604082015260600190565b60208082526026908201527f436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756040820152653731ba34b7b760d11b606082015260800190565b8151815260208083015190820152604080830151908201526060918201519181019190915260800190565b600061012082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e0830151151560e083015261010080840151818401525092915050565b81518152602080830151908201526040918201519181019190915260600190565b90815260200190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b988952602089019790975260408801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200190565b60008219821115611b1257611b12611b6d565b500190565b600082611b3257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b5157611b51611b6d565b500290565b600082821015611b6857611b68611b6d565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461056357600080fdfea264697066735822122047972c8b13898f8ae6c4f9a7defafddbc9a56f966fde3a6ab039cc758b1092ef64736f6c634300080000338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e074da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed0000000000000000000000000e3cc2c4fb9252d17d07c67135e48536071735d900000000000000000000000044811eff0f4dd2d7cb093a6d33bb6202eb2edf06000000000000000000000000ecce08c2636820a81fc0c805dbdc7d846636bbc40000000000000000000000002806e2e25480856432edb151e2975b6a49a5e079

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101ce5760003560e01c80638da5cb5b11610104578063c291818b116100a2578063f2fde38b11610071578063f2fde38b146103bd578063fbfa77cf146103d0578063fc0c546a146103d8578063fd147b7f146103e0576101ce565b8063c291818b14610367578063d518f2431461037a578063d7603ef714610382578063f0ec943014610395576101ce565b80639b2d6194116100de5780639b2d61941461030a578063b54076571461032c578063b6f3c6c01461033f578063b88a802f1461035f576101ce565b80638da5cb5b146102e757806396c86cfc146102ef57806397ffe1d7146102f7576101ce565b8063570ca7351161017157806370a082311161014b57806370a08231146102b1578063714b4658146102c4578063715018a6146102d757806376671808146102df576101ce565b8063570ca73514610276578063632447c91461028b5780636817031b1461029e576101ce565b806339344d9d116101ad57806339344d9d146102315780633f9e3f04146102515780634456eda214610259578063446a2ec81461026e576101ce565b80628cc262146101d357806304ab80fc146101fc57806329605e771461021c575b600080fd5b6101e66101e13660046116e1565b610403565b6040516101f39190611a84565b60405180910390f35b61020f61020a3660046116e1565b610484565b6040516101f391906119fc565b61022f61022a3660046116e1565b610512565b005b61024461023f3660046116fd565b610566565b6040516101f39190611a63565b6101e66105bc565b6102616105d2565b6040516101f391906117c9565b6101e66105f8565b61027e61060b565b6040516101f39190611778565b61022f6102993660046116e1565b61061a565b61022f6102ac3660046116e1565b61064d565b6101e66102bf3660046116e1565b6106ae565b6101e66102d23660046116e1565b6107c7565b61022f6107e5565b6101e661086e565b61027e610874565b61022f610883565b61022f610305366004611748565b6109bb565b61031d6103183660046116fd565b610cf0565b6040516101f393929190611a8d565b6101e661033a3660046116e1565b610d1c565b61035261034d3660046116e1565b610e4c565b6040516101f391906119d1565b6101e6610edb565b61022f6103753660046116e1565b610f86565b610352610ff8565b610352610390366004611748565b61106e565b6103a86103a33660046116e1565b611097565b6040516101f399989796959493929190611abe565b61022f6103cb3660046116e1565b6110e6565b61027e6111a7565b61027e6111b6565b6103f36103ee366004611748565b6111c5565b6040516101f39493929190611aa3565b60008061040e610ff8565b606001519050600061041f84610e4c565b606001516001600160a01b03851660009081526005602052604090206004015490915061047a90610474670de0b6b3a764000061046e61045f87876111ff565b6104688a610d1c565b9061120b565b90611217565b90611223565b925050505b919050565b61048c61164a565b506001600160a01b03166000908152600560208181526040928390208351610120810185528154815260018201549281019290925260028101549382019390935260038301546060820152600483015460808201529082015460a0820152600682015460c0820152600782015460ff16151560e082015260089091015461010082015290565b61051a61122f565b6001600160a01b031661052b610874565b6001600160a01b03161461055a5760405162461bcd60e51b81526004016105519061189e565b60405180910390fd5b61056381611233565b50565b61056e611698565b506001600160a01b0382166000908152600860209081526040808320848452825291829020825160608101845281548152600182015492810192909252600201549181019190915292915050565b6004546000906105cd9060016111ff565b905090565b6002546000906001600160a01b03166105e961122f565b6001600160a01b031614905090565b6000610602610ff8565b60600151905090565b6002546001600160a01b031690565b6006546001600160a01b031633146106445760405162461bcd60e51b81526004016105519061195d565b610563816112b1565b61065561122f565b6001600160a01b0316610666610874565b6001600160a01b03161461068c5760405162461bcd60e51b81526004016105519061189e565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6006546040516326d352ab60e11b815260009182916001600160a01b0390911690634da6a556906106e3908690600401611778565b60206040518083038186803b1580156106fb57600080fd5b505afa15801561070f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107339190611760565b6006546040516370a0823160e01b81529192506107c09183916001600160a01b0316906370a082319061076a908890600401611778565b60206040518083038186803b15801561078257600080fd5b505afa158015610796573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ba9190611760565b906111ff565b9392505050565b6001600160a01b031660009081526005602052604090206006015490565b6107ed61122f565b6001600160a01b03166107fe610874565b6001600160a01b0316146108245760405162461bcd60e51b81526004016105519061189e565b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b60075481565b6001546001600160a01b031690565b61088b61122f565b6001600160a01b031661089c610874565b6001600160a01b0316146108c25760405162461bcd60e51b81526004016105519061189e565b6003546040516370a0823160e01b81526001600160a01b039091169063a9059cbb90339083906370a08231906108fc903090600401611778565b60206040518083038186803b15801561091457600080fd5b505afa158015610928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094c9190611760565b6040518363ffffffff1660e01b81526004016109699291906117b0565b602060405180830381600087803b15801561098357600080fd5b505af1158015610997573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105639190611728565b6109c361139f565b156109e05760405162461bcd60e51b81526004016105519061198b565b6109e86113be565b15610a055760405162461bcd60e51b81526004016105519061198b565b6002546001600160a01b03163314610a2f5760405162461bcd60e51b8152600401610551906118d3565b60008111610a4f5760405162461bcd60e51b815260040161055190611867565b60065460408051633422f27b60e21b815290516000926001600160a01b03169163d08bc9ec916004808301926020929190829003018186803b158015610a9457600080fd5b505afa158015610aa8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acc9190611760565b905080610ad95750610cb4565b6000610ae3610ff8565b6060015190506000610b0b610b048461046e87670de0b6b3a764000061120b565b8390611223565b6040805160808101825243815242602082019081528183018881526060830185815260048054600181018255600082905285517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9183029182015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c85015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d840155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e9092019190915560035492516323b872dd60e01b815293945090926001600160a01b03909216916323b872dd91610c1191339130918b910161178c565b602060405180830381600087803b158015610c2b57600080fd5b505af1158015610c3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c639190611728565b50600754610c72906001611223565b60075560405133907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e2990610ca7908890611a84565b60405180910390a2505050505b50436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b600860209081526000928352604080842090915290825290208054600182015460029092015490919083565b600060075460011415610d315750600061047f565b6001600160a01b0382166000908152600a6020526040902054610d5e57610d57826106ae565b905061047f565b6001600160a01b0382166000908152600a6020526040812054610d82908490610566565b6040908101516007546001600160a01b0386166000908152600a60205292909220549092501415610e1a576001600160a01b0383166000908152600b6020526040902054610dea5750506001600160a01b0381166000908152600c602052604090205461047f565b6001600160a01b0383166000908152600b6020526040902054610e0e908490610566565b6040015191505061047f565b6007546001600160a01b0384166000908152600a60205260409020541015610e4357905061047f565b50600092915050565b610e546116b9565b6001600160a01b038216600090815260056020526040902060060154600480549091908110610e9357634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402016040518060800160405290816000820154815260200160018201548152602001600282015481526020016003820154815250509050919050565b6006546040516370a0823160e01b815260009182916001600160a01b03909116906370a0823190610f10903390600401611778565b60206040518083038186803b158015610f2857600080fd5b505afa158015610f3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f609190611760565b11610f7d5760405162461bcd60e51b815260040161055190611917565b6105cd336113dd565b6000610f91336113dd565b604051636082d19960e11b81529091506001600160a01b0383169063c105a33290610fc290339085906004016117b0565b600060405180830381600087803b158015610fdc57600080fd5b505af1158015610ff0573d6000803e3d6000fd5b505050505050565b6110006116b9565b600461100a6105bc565b8154811061102857634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050905090565b6110766116b9565b60048281548110610e9357634e487b7160e01b600052603260045260246000fd5b60056020819052600091825260409091208054600182015460028301546003840154600485015495850154600686015460078701546008909701549597949693959294939192909160ff169089565b6110ee61122f565b6001600160a01b03166110ff610874565b6001600160a01b0316146111255760405162461bcd60e51b81526004016105519061189e565b6001600160a01b03811661114b5760405162461bcd60e51b8152600401610551906117d4565b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b6003546001600160a01b031681565b600481815481106111d557600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919350919084565b60006107c08284611b56565b60006107c08284611b37565b60006107c08284611b17565b60006107c08284611aff565b3390565b6001600160a01b0381166112595760405162461bcd60e51b81526004016105519061181a565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000604051806060016040528060075481526020014281526020016112d5846106ae565b90526001600160a01b0383166000818152600860209081526040808320600780548552908352818420865181558387015160018201558287015160029091015554938352600a90915290205491925014611358576001600160a01b0382166000908152600a602081815260408084208054600b8452919094205560075491905290555b6001600160a01b0382166000908152600b6020526040902054611392576001600160a01b0382166000908152600b60205260409020600190555b61139b8261152d565b5050565b4360009081526020818152604080832032845290915290205460ff1690565b4360009081526020818152604080832033845290915290205460ff1690565b60006113e88261152d565b6001600160a01b0382166000908152600560205260409020600401548015611527576001600160a01b03808416600090815260056020526040808220600490810192909255600354905163a9059cbb60e01b815292169163a9059cbb916114539187918691016117b0565b602060405180830381600087803b15801561146d57600080fd5b505af1158015611481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a59190611728565b50826001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040516114df9190611a84565b60405180910390a26001600160a01b0383166000908152600b60205260409020546115275761150d836106ae565b6001600160a01b0384166000908152600c60205260409020555b92915050565b6001600160a01b0381166000908152600560208181526040928390208351610120810185528154815260018201549281019290925260028101549382019390935260038301546060820152600483015460808201529082015460a0820152600682015460c0820152600782015460ff16151560e08201526008909101546101008201526115b982610403565b60808201526115c66105bc565b60c082019081526001600160a01b039290921660009081526005602081815260409283902084518155908401516001820155918301516002830155606083015160038301556080830151600483015560a0830151908201559151600683015560e081015160078301805460ff19169115159190911790556101000151600890910155565b60405180610120016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600015158152602001600081525090565b60405180606001604052806000815260200160008152602001600081525090565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b6000602082840312156116f2578081fd5b81356107c081611b83565b6000806040838503121561170f578081fd5b823561171a81611b83565b946020939093013593505050565b600060208284031215611739578081fd5b815180151581146107c0578182fd5b600060208284031215611759578081fd5b5035919050565b600060208284031215611771578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252602d908201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260408201526c103732bb9037b832b930ba37b960991b606082015260800190565b6020808252601c908201527f426f617264726f6f6d3a2043616e6e6f7420616c6c6f63617465203000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b60208082526026908201527f426f617264726f6f6d3a20546865206469726563746f7220646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b602080825260149082015273109bd85c991c9bdbdb4e881b9bdd081d985d5b1d60621b604082015260600190565b60208082526026908201527f436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756040820152653731ba34b7b760d11b606082015260800190565b8151815260208083015190820152604080830151908201526060918201519181019190915260800190565b600061012082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e0830151151560e083015261010080840151818401525092915050565b81518152602080830151908201526040918201519181019190915260600190565b90815260200190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b988952602089019790975260408801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200190565b60008219821115611b1257611b12611b6d565b500190565b600082611b3257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b5157611b51611b6d565b500290565b600082821015611b6857611b68611b6d565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461056357600080fdfea264697066735822122047972c8b13898f8ae6c4f9a7defafddbc9a56f966fde3a6ab039cc758b1092ef64736f6c63430008000033

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

0000000000000000000000000e3cc2c4fb9252d17d07c67135e48536071735d900000000000000000000000044811eff0f4dd2d7cb093a6d33bb6202eb2edf06000000000000000000000000ecce08c2636820a81fc0c805dbdc7d846636bbc40000000000000000000000002806e2e25480856432edb151e2975b6a49a5e079

-----Decoded View---------------
Arg [0] : token_ (address): 0x0E3cC2c4FB9252d17d07C67135E48536071735D9
Arg [1] : vault_ (address): 0x44811EfF0f4dD2d7cB093A6d33bB6202Eb2eDF06
Arg [2] : owner (address): 0xeccE08c2636820a81FC0c805dBDC7D846636bbc4
Arg [3] : operator (address): 0x2806e2e25480856432edB151e2975b6A49a5E079

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000e3cc2c4fb9252d17d07c67135e48536071735d9
Arg [1] : 00000000000000000000000044811eff0f4dd2d7cb093a6d33bb6202eb2edf06
Arg [2] : 000000000000000000000000ecce08c2636820a81fc0c805dbdc7d846636bbc4
Arg [3] : 0000000000000000000000002806e2e25480856432edb151e2975b6a49a5e079


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.