ETH Price: $3,615.70 (-1.44%)

Contract

0x84654e35E504452769757AAe5a8C7C6599cBf954

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Governance1173781762024-03-13 18:38:49264 days ago1710355129IN
Yearn: Treasury
0 ETH0.0001050660610.0015001

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Treasury

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU AGPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at optimistic.etherscan.io on 2022-08-06
*/

// SPDX-License-Identifier: AGPL-3.0

pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

// Part: OpenZeppelin/[email protected]/Address

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

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data)
        internal
        returns (bytes memory)
    {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return
            functionCallWithValue(
                target,
                data,
                value,
                "Address: low-level call with value failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(
            address(this).balance >= value,
            "Address: insufficient balance for call"
        );
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) =
            target.call{value: weiValue}(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// Part: OpenZeppelin/[email protected]/IERC20

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

// Part: OpenZeppelin/[email protected]/ReentrancyGuard

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

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

    uint256 private _status;

    constructor() internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

// Part: OpenZeppelin/[email protected]/SafeMath

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

// Part: OpenZeppelin/[email protected]/SafeERC20

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

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

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.approve.selector, spender, value)
        );
    }

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

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

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

        bytes memory returndata =
            address(token).functionCall(
                data,
                "SafeERC20: low-level call failed"
            );
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(
                abi.decode(returndata, (bool)),
                "SafeERC20: ERC20 operation did not succeed"
            );
        }
    }
}

// File: Treasury.sol

contract Treasury is ReentrancyGuard {
    using SafeERC20 for IERC20;
    using Address for address;

    address public governance;
    address public pendingGovernance;

    event RetrieveToken(address token, uint256 amount);
    event RetrieveETH(uint256 amount);
    event PendingGovernance(address newPendingGov);
    event AcceptedGovernance(address newGov);
    event FailedETHSend(bytes returnedData);

    receive() external payable {}

    constructor() public {
        governance = msg.sender;
    }

    modifier onlyGovernance {
        require(msg.sender == governance, "!governance");
        _;
    }

    function setGovernance(address _newGov) external onlyGovernance {
        require(_newGov != address(0));
        pendingGovernance = _newGov;
        emit PendingGovernance(_newGov);
    }

    function acceptGovernance() external {
        require(msg.sender == pendingGovernance, "!pendingGovernance");
        governance = pendingGovernance;
        pendingGovernance = address(0);
        emit AcceptedGovernance(governance);
    }

    //Retrieve full balance of token in contract
    function retrieveToken(address _token) external onlyGovernance {
        retrieveTokenExact(_token, IERC20(_token).balanceOf(address(this)));
    }

    function retrieveTokenExact(address _token, uint256 _amount)
        public
        onlyGovernance
    {
        IERC20(_token).safeTransfer(governance, _amount);
        emit RetrieveToken(_token, _amount);
    }

    function retrieveETH() external onlyGovernance {
        retrieveETHExact(address(this).balance);
    }

    function retrieveETHExact(uint256 _amount)
        public
        onlyGovernance
        nonReentrant
    {
        (bool success, bytes memory returnData) =
            governance.call{value: _amount}("");
        if (!success) {
            emit FailedETHSend(returnData);
        }
        require(success, "Sending ETH failed");
        emit RetrieveETH(_amount);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newGov","type":"address"}],"name":"AcceptedGovernance","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"returnedData","type":"bytes"}],"name":"FailedETHSend","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newPendingGov","type":"address"}],"name":"PendingGovernance","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RetrieveETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RetrieveToken","type":"event"},{"inputs":[],"name":"acceptGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingGovernance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"retrieveETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"retrieveETHExact","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"retrieveToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"retrieveTokenExact","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newGov","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506001600081905580546001600160a01b03191633179055610a5b806100376000396000f3fe60806040526004361061007f5760003560e01c80635aa6e6751161004e5780635aa6e67514610102578063ab033ea91461012d578063d5b014c31461014d578063f39c38a01461016257610086565b80630b317bcb1461008b57806314127a3b146100ad5780631924c3be146100cd578063238efcbc146100ed57610086565b3661008657005b600080fd5b34801561009757600080fd5b506100ab6100a63660046107b2565b610177565b005b3480156100b957600080fd5b506100ab6100c8366004610790565b610201565b3480156100d957600080fd5b506100ab6100e83660046107fc565b6102ae565b3480156100f957600080fd5b506100ab610402565b34801561010e57600080fd5b5061011761048f565b6040516101249190610877565b60405180910390f35b34801561013957600080fd5b506100ab610148366004610790565b61049e565b34801561015957600080fd5b506100ab610531565b34801561016e57600080fd5b50610117610566565b6001546001600160a01b031633146101aa5760405162461bcd60e51b81526004016101a1906108b7565b60405180910390fd5b6001546101c4906001600160a01b03848116911683610575565b7fed03f54a50c611ac89863bc7a9e033d805d743265603c12cdbf1da71d5eef14d82826040516101f592919061088b565b60405180910390a15050565b6001546001600160a01b0316331461022b5760405162461bcd60e51b81526004016101a1906108b7565b6102ab81826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161025b9190610877565b60206040518083038186803b15801561027357600080fd5b505afa158015610287573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100a69190610814565b50565b6001546001600160a01b031633146102d85760405162461bcd60e51b81526004016101a1906108b7565b600260005414156102fb5760405162461bcd60e51b81526004016101a1906109b5565b600260009081556001546040516060916001600160a01b031690849061032090610874565b60006040518083038185875af1925050503d806000811461035d576040519150601f19603f3d011682016040523d82523d6000602084013e610362565b606091505b5091509150816103a4577f94d7693041d3666b4621e278c30a38b38bb409902d8f66eaca6f50a4634829018160405161039b91906108a4565b60405180910390a15b816103c15760405162461bcd60e51b81526004016101a1906108dc565b7fd6dbd685d5a6e3a3706e891d90bf04cfee45dbaba9fc992f4cf6c6c8a0fc9abf836040516103f091906109ec565b60405180910390a15050600160005550565b6002546001600160a01b0316331461042c5760405162461bcd60e51b81526004016101a190610908565b60028054600180546001600160a01b038084166001600160a01b0319928316179283905592169092556040517fb440d9cb378ad4a11b60cd4b7a419af86a1b366b0c0e4cf0b0ec6d107a6a3efc92610485921690610877565b60405180910390a1565b6001546001600160a01b031681565b6001546001600160a01b031633146104c85760405162461bcd60e51b81526004016101a1906108b7565b6001600160a01b0381166104db57600080fd5b600280546001600160a01b0319166001600160a01b0383161790556040517f3b993242201943fb861f1a018a7d246a1ad1d9bfdcde2be84c918dda5791af6d90610526908390610877565b60405180910390a150565b6001546001600160a01b0316331461055b5760405162461bcd60e51b81526004016101a1906108b7565b610564476102ae565b565b6002546001600160a01b031681565b6105cb8363a9059cbb60e01b848460405160240161059492919061088b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526105d0565b505050565b6060610625826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661065f9092919063ffffffff16565b8051909150156105cb578080602001905181019061064391906107dc565b6105cb5760405162461bcd60e51b81526004016101a19061096b565b606061066e8484600085610676565b949350505050565b60606106818561073a565b61069d5760405162461bcd60e51b81526004016101a190610934565b60006060866001600160a01b031685876040516106ba9190610858565b60006040518083038185875af1925050503d80600081146106f7576040519150601f19603f3d011682016040523d82523d6000602084013e6106fc565b606091505b5091509150811561071057915061066e9050565b8051156107205780518082602001fd5b8360405162461bcd60e51b81526004016101a191906108a4565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061066e575050151592915050565b80356001600160a01b038116811461078a57600080fd5b92915050565b6000602082840312156107a1578081fd5b6107ab8383610773565b9392505050565b600080604083850312156107c4578081fd5b6107ce8484610773565b946020939093013593505050565b6000602082840312156107ed578081fd5b815180151581146107ab578182fd5b60006020828403121561080d578081fd5b5035919050565b600060208284031215610825578081fd5b5051919050565b600081518084526108448160208601602086016109f5565b601f01601f19169290920160200192915050565b6000825161086a8184602087016109f5565b9190910192915050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6000602082526107ab602083018461082c565b6020808252600b908201526a21676f7665726e616e636560a81b604082015260600190565b60208082526012908201527114d95b991a5b99c81155120819985a5b195960721b604082015260600190565b6020808252601290820152712170656e64696e67476f7665726e616e636560701b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b90815260200190565b60005b83811015610a105781810151838201526020016109f8565b83811115610a1f576000848401525b5050505056fea264697066735822122058ae04eed1025411510eb2cb44315e287af07b6a4847788a2a11ffc15186e15964736f6c634300060c0033

Deployed Bytecode

0x60806040526004361061007f5760003560e01c80635aa6e6751161004e5780635aa6e67514610102578063ab033ea91461012d578063d5b014c31461014d578063f39c38a01461016257610086565b80630b317bcb1461008b57806314127a3b146100ad5780631924c3be146100cd578063238efcbc146100ed57610086565b3661008657005b600080fd5b34801561009757600080fd5b506100ab6100a63660046107b2565b610177565b005b3480156100b957600080fd5b506100ab6100c8366004610790565b610201565b3480156100d957600080fd5b506100ab6100e83660046107fc565b6102ae565b3480156100f957600080fd5b506100ab610402565b34801561010e57600080fd5b5061011761048f565b6040516101249190610877565b60405180910390f35b34801561013957600080fd5b506100ab610148366004610790565b61049e565b34801561015957600080fd5b506100ab610531565b34801561016e57600080fd5b50610117610566565b6001546001600160a01b031633146101aa5760405162461bcd60e51b81526004016101a1906108b7565b60405180910390fd5b6001546101c4906001600160a01b03848116911683610575565b7fed03f54a50c611ac89863bc7a9e033d805d743265603c12cdbf1da71d5eef14d82826040516101f592919061088b565b60405180910390a15050565b6001546001600160a01b0316331461022b5760405162461bcd60e51b81526004016101a1906108b7565b6102ab81826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161025b9190610877565b60206040518083038186803b15801561027357600080fd5b505afa158015610287573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100a69190610814565b50565b6001546001600160a01b031633146102d85760405162461bcd60e51b81526004016101a1906108b7565b600260005414156102fb5760405162461bcd60e51b81526004016101a1906109b5565b600260009081556001546040516060916001600160a01b031690849061032090610874565b60006040518083038185875af1925050503d806000811461035d576040519150601f19603f3d011682016040523d82523d6000602084013e610362565b606091505b5091509150816103a4577f94d7693041d3666b4621e278c30a38b38bb409902d8f66eaca6f50a4634829018160405161039b91906108a4565b60405180910390a15b816103c15760405162461bcd60e51b81526004016101a1906108dc565b7fd6dbd685d5a6e3a3706e891d90bf04cfee45dbaba9fc992f4cf6c6c8a0fc9abf836040516103f091906109ec565b60405180910390a15050600160005550565b6002546001600160a01b0316331461042c5760405162461bcd60e51b81526004016101a190610908565b60028054600180546001600160a01b038084166001600160a01b0319928316179283905592169092556040517fb440d9cb378ad4a11b60cd4b7a419af86a1b366b0c0e4cf0b0ec6d107a6a3efc92610485921690610877565b60405180910390a1565b6001546001600160a01b031681565b6001546001600160a01b031633146104c85760405162461bcd60e51b81526004016101a1906108b7565b6001600160a01b0381166104db57600080fd5b600280546001600160a01b0319166001600160a01b0383161790556040517f3b993242201943fb861f1a018a7d246a1ad1d9bfdcde2be84c918dda5791af6d90610526908390610877565b60405180910390a150565b6001546001600160a01b0316331461055b5760405162461bcd60e51b81526004016101a1906108b7565b610564476102ae565b565b6002546001600160a01b031681565b6105cb8363a9059cbb60e01b848460405160240161059492919061088b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526105d0565b505050565b6060610625826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661065f9092919063ffffffff16565b8051909150156105cb578080602001905181019061064391906107dc565b6105cb5760405162461bcd60e51b81526004016101a19061096b565b606061066e8484600085610676565b949350505050565b60606106818561073a565b61069d5760405162461bcd60e51b81526004016101a190610934565b60006060866001600160a01b031685876040516106ba9190610858565b60006040518083038185875af1925050503d80600081146106f7576040519150601f19603f3d011682016040523d82523d6000602084013e6106fc565b606091505b5091509150811561071057915061066e9050565b8051156107205780518082602001fd5b8360405162461bcd60e51b81526004016101a191906108a4565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061066e575050151592915050565b80356001600160a01b038116811461078a57600080fd5b92915050565b6000602082840312156107a1578081fd5b6107ab8383610773565b9392505050565b600080604083850312156107c4578081fd5b6107ce8484610773565b946020939093013593505050565b6000602082840312156107ed578081fd5b815180151581146107ab578182fd5b60006020828403121561080d578081fd5b5035919050565b600060208284031215610825578081fd5b5051919050565b600081518084526108448160208601602086016109f5565b601f01601f19169290920160200192915050565b6000825161086a8184602087016109f5565b9190910192915050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6000602082526107ab602083018461082c565b6020808252600b908201526a21676f7665726e616e636560a81b604082015260600190565b60208082526012908201527114d95b991a5b99c81155120819985a5b195960721b604082015260600190565b6020808252601290820152712170656e64696e67476f7665726e616e636560701b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b90815260200190565b60005b83811015610a105781810151838201526020016109f8565b83811115610a1f576000848401525b5050505056fea264697066735822122058ae04eed1025411510eb2cb44315e287af07b6a4847788a2a11ffc15186e15964736f6c634300060c0033

Deployed Bytecode Sourcemap

22201:2038:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23511:219;;;;;;;;;;-1:-1:-1;23511:219:0;;;;;:::i;:::-;;:::i;:::-;;23354:149;;;;;;;;;;-1:-1:-1;23354:149:0;;;;;:::i;:::-;;:::i;23851:385::-;;;;;;;;;;-1:-1:-1;23851:385:0;;;;;:::i;:::-;;:::i;23050:246::-;;;;;;;;;;;;;:::i;22312:25::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;22849:193;;;;;;;;;;-1:-1:-1;22849:193:0;;;;;:::i;:::-;;:::i;23738:105::-;;;;;;;;;;;;;:::i;22344:32::-;;;;;;;;;;;;;:::i;23511:219::-;22795:10;;-1:-1:-1;;;;;22795:10:0;22781;:24;22773:48;;;;-1:-1:-1;;;22773:48:0;;;;;;;:::i;:::-;;;;;;;;;23656:10:::1;::::0;23628:48:::1;::::0;-1:-1:-1;;;;;23628:27:0;;::::1;::::0;23656:10:::1;23668:7:::0;23628:27:::1;:48::i;:::-;23692:30;23706:6;23714:7;23692:30;;;;;;;:::i;:::-;;;;;;;;23511:219:::0;;:::o;23354:149::-;22795:10;;-1:-1:-1;;;;;22795:10:0;22781;:24;22773:48;;;;-1:-1:-1;;;22773:48:0;;;;;;;:::i;:::-;23428:67:::1;23447:6;23462;-1:-1:-1::0;;;;;23455:24:0::1;;23488:4;23455:39;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;23428:67::-;23354:149:::0;:::o;23851:385::-;22795:10;;-1:-1:-1;;;;;22795:10:0;22781;:24;22773:48;;;;-1:-1:-1;;;22773:48:0;;;;;;;:::i;:::-;11352:1:::1;11957:7;;:19;;11949:63;;;;-1:-1:-1::0;;;11949:63:0::1;;;;;;;:::i;:::-;11352:1;12090:7;:18:::0;;;24027:10:::2;::::0;:35:::2;::::0;23987:23:::2;::::0;-1:-1:-1;;;;;24027:10:0::2;::::0;24050:7;;24027:35:::2;::::0;::::2;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23972:90;;;;24078:7;24073:71;;24107:25;24121:10;24107:25;;;;;;:::i;:::-;;;;;;;;24073:71;24162:7;24154:38;;;;-1:-1:-1::0;;;24154:38:0::2;;;;;;;:::i;:::-;24208:20;24220:7;24208:20;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;;11308:1:0::1;12269:7;:22:::0;-1:-1:-1;23851:385:0:o;23050:246::-;23120:17;;-1:-1:-1;;;;;23120:17:0;23106:10;:31;23098:62;;;;-1:-1:-1;;;23098:62:0;;;;;;;:::i;:::-;23184:17;;;;23171:30;;-1:-1:-1;;;;;23184:17:0;;;-1:-1:-1;;;;;;23171:30:0;;;;;;;;23212;;;;;23258;;;;;;23277:10;;23258:30;:::i;:::-;;;;;;;;23050:246::o;22312:25::-;;;-1:-1:-1;;;;;22312:25:0;;:::o;22849:193::-;22795:10;;-1:-1:-1;;;;;22795:10:0;22781;:24;22773:48;;;;-1:-1:-1;;;22773:48:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;22932:21:0;::::1;22924:30;;;::::0;::::1;;22965:17;:27:::0;;-1:-1:-1;;;;;;22965:27:0::1;-1:-1:-1::0;;;;;22965:27:0;::::1;;::::0;;23008:26:::1;::::0;::::1;::::0;::::1;::::0;22965:27;;23008:26:::1;:::i;:::-;;;;;;;;22849:193:::0;:::o;23738:105::-;22795:10;;-1:-1:-1;;;;;22795:10:0;22781;:24;22773:48;;;;-1:-1:-1;;;22773:48:0;;;;;;;:::i;:::-;23796:39:::1;23813:21;23796:16;:39::i;:::-;23738:105::o:0;22344:32::-;;;-1:-1:-1;;;;;22344:32:0;;:::o;18394:248::-;18511:123;18545:5;18588:23;;;18613:2;18617:5;18565:58;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;18565:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;18565:58:0;-1:-1:-1;;;;;;18565:58:0;;;;;;;;;;18511:19;:123::i;:::-;18394:248;;;:::o;21284:885::-;21708:23;21747:118;21793:4;21747:118;;;;;;;;;;;;;;;;;21755:5;-1:-1:-1;;;;;21747:27:0;;;:118;;;;;:::i;:::-;21880:17;;21708:157;;-1:-1:-1;21880:21:0;21876:286;;22053:10;22042:30;;;;;;;;;;;;:::i;:::-;22016:134;;;;-1:-1:-1;;;22016:134:0;;;;;;;:::i;4092:230::-;4229:12;4261:53;4284:6;4292:4;4298:1;4301:12;4261:22;:53::i;:::-;4254:60;4092:230;-1:-1:-1;;;;4092:230:0:o;5713:1033::-;5886:12;5919:18;5930:6;5919:10;:18::i;:::-;5911:60;;;;-1:-1:-1;;;5911:60:0;;;;;;;:::i;:::-;6045:12;6059:23;6099:6;-1:-1:-1;;;;;6099:11:0;6118:8;6128:4;6099:34;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6044:89;;;;6148:7;6144:595;;;6179:10;-1:-1:-1;6172:17:0;;-1:-1:-1;6172:17:0;6144:595;6293:17;;:21;6289:439;;6556:10;6550:17;6617:15;6604:10;6600:2;6596:19;6589:44;6504:148;6699:12;6692:20;;-1:-1:-1;;;6692:20:0;;;;;;;;:::i;845:654::-;905:4;1399:20;;1229:66;1448:23;;;;;;:42;;-1:-1:-1;;1475:15:0;;;1440:51;-1:-1:-1;;845:654:0:o;5:130:-1:-;72:20;;-1:-1;;;;;11639:54;;12604:35;;12594:2;;12653:1;;12643:12;12594:2;57:78;;;;:::o;555:241::-;;659:2;647:9;638:7;634:23;630:32;627:2;;;-1:-1;;665:12;627:2;727:53;772:7;748:22;727:53;:::i;:::-;717:63;621:175;-1:-1;;;621:175::o;803:366::-;;;924:2;912:9;903:7;899:23;895:32;892:2;;;-1:-1;;930:12;892:2;992:53;1037:7;1013:22;992:53;:::i;:::-;982:63;1082:2;1121:22;;;;344:20;;-1:-1;;;886:283::o;1176:257::-;;1288:2;1276:9;1267:7;1263:23;1259:32;1256:2;;;-1:-1;;1294:12;1256:2;223:6;217:13;12750:5;11551:13;11544:21;12728:5;12725:32;12715:2;;-1:-1;;12761:12;1440:241;;1544:2;1532:9;1523:7;1519:23;1515:32;1512:2;;;-1:-1;;1550:12;1512:2;-1:-1;344:20;;1506:175;-1:-1;1506:175::o;1688:263::-;;1803:2;1791:9;1782:7;1778:23;1774:32;1771:2;;;-1:-1;;1809:12;1771:2;-1:-1;492:13;;1765:186;-1:-1;1765:186::o;2227:343::-;;2369:5;10721:12;11006:6;11001:3;10994:19;2462:52;2507:6;11043:4;11038:3;11034:14;11043:4;2488:5;2484:16;2462:52;:::i;:::-;12524:7;12508:14;-1:-1;;12504:28;2526:39;;;;11043:4;2526:39;;2317:253;-1:-1;;2317:253::o;5759:271::-;;2737:5;10721:12;2848:52;2893:6;2888:3;2881:4;2874:5;2870:16;2848:52;:::i;:::-;2912:16;;;;;5893:137;-1:-1;;5893:137::o;6037:379::-;6401:10;6225:191::o;6423:222::-;-1:-1;;;;;11639:54;;;;2178:37;;6550:2;6535:18;;6521:124::o;6897:333::-;-1:-1;;;;;11639:54;;;;2178:37;;7216:2;7201:18;;5710:37;7052:2;7037:18;;7023:207::o;7237:306::-;;7382:2;7403:17;7396:47;7457:76;7382:2;7371:9;7367:18;7519:6;7457:76;:::i;7867:416::-;8067:2;8081:47;;;3519:2;8052:18;;;10994:19;-1:-1;;;11034:14;;;3535:34;3588:12;;;8038:245::o;8290:416::-;8490:2;8504:47;;;3839:2;8475:18;;;10994:19;-1:-1;;;11034:14;;;3855:41;3915:12;;;8461:245::o;8713:416::-;8913:2;8927:47;;;4166:2;8898:18;;;10994:19;-1:-1;;;11034:14;;;4182:41;4242:12;;;8884:245::o;9136:416::-;9336:2;9350:47;;;4798:2;9321:18;;;10994:19;4834:31;11034:14;;;4814:52;4885:12;;;9307:245::o;9559:416::-;9759:2;9773:47;;;5136:2;9744:18;;;10994:19;5172:34;11034:14;;;5152:55;-1:-1;;;5227:12;;;5220:34;5273:12;;;9730:245::o;9982:416::-;10182:2;10196:47;;;5524:2;10167:18;;;10994:19;5560:33;11034:14;;;5540:54;5613:12;;;10153:245::o;10405:222::-;5710:37;;;10532:2;10517:18;;10503:124::o;12164:268::-;12229:1;12236:101;12250:6;12247:1;12244:13;12236:101;;;12317:11;;;12311:18;12298:11;;;12291:39;12272:2;12265:10;12236:101;;;12352:6;12349:1;12346:13;12343:2;;;12229:1;12408:6;12403:3;12399:16;12392:27;12343:2;;12213:219;;;:::o

Swarm Source

ipfs://58ae04eed1025411510eb2cb44315e287af07b6a4847788a2a11ffc15186e159

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
[ 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.