ETH Price: $2,973.94 (-4.19%)
Gas: 2 Gwei

Contract

0x09a5F6f9474337DDd091A5DeF9944AA5283EB259
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x61171561120288372021-03-13 7:35:281210 days ago1615620928IN
 Create: Compound
0 ETH0.13954962105.00000145

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Compound

Compiler Version
v0.6.10+commit.00c0fcaf

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : Compound.sol
/*
    Copyright 2021 Set Labs Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    SPDX-License-Identifier: Apache License, Version 2.0
*/

pragma solidity 0.6.10;

import { ISetToken } from "../../../interfaces/ISetToken.sol";
import { ICErc20 } from "../../../interfaces/external/ICErc20.sol";
import { IComptroller } from "../../../interfaces/external/IComptroller.sol";

/**
 * @title Compound
 * @author Set Protocol
 *
 * Collection of helper functions for interacting with Compound integrations
 */
library Compound {
    /* ============ External ============ */

    /**
     * Get enter markets calldata from SetToken
     */
    function getEnterMarketsCalldata(
        ICErc20 _cToken,
        IComptroller _comptroller
    )
        public
        pure
        returns (address, uint256, bytes memory)
    {
        address[] memory marketsToEnter = new address[](1);
        marketsToEnter[0] = address(_cToken);

        // Compound's enter market function signature is: enterMarkets(address[] _cTokens)
        bytes memory callData = abi.encodeWithSignature("enterMarkets(address[])", marketsToEnter);

        return (address(_comptroller), 0, callData);
    }

    /**
     * Invoke enter markets from SetToken
     */
    function invokeEnterMarkets(ISetToken _setToken, ICErc20 _cToken, IComptroller _comptroller) external {
        ( , , bytes memory enterMarketsCalldata) = getEnterMarketsCalldata(_cToken, _comptroller);

        uint256[] memory returnValues = abi.decode(_setToken.invoke(address(_comptroller), 0, enterMarketsCalldata), (uint256[]));
        require(returnValues[0] == 0, "Entering failed");
    }

    /**
     * Get exit market calldata from SetToken
     */
    function getExitMarketCalldata(
        ICErc20 _cToken,
        IComptroller _comptroller
    )
        public
        pure
        returns (address, uint256, bytes memory)
    {
        // Compound's exit market function signature is: exitMarket(address _cToken)
        bytes memory callData = abi.encodeWithSignature("exitMarket(address)", address(_cToken));

        return (address(_comptroller), 0, callData);
    }

    /**
     * Invoke exit market from SetToken
     */
    function invokeExitMarket(ISetToken _setToken, ICErc20 _cToken, IComptroller _comptroller) external {
        ( , , bytes memory exitMarketCalldata) = getExitMarketCalldata(_cToken, _comptroller);
        require(
            abi.decode(_setToken.invoke(address(_comptroller), 0, exitMarketCalldata), (uint256)) == 0,
            "Exiting failed"
        );
    }

    /**
     * Get mint cEther calldata from SetToken
     */
    function getMintCEtherCalldata(
       ICErc20 _cEther,
       uint256 _mintNotional
    )
        public
        pure
        returns (address, uint256, bytes memory)
    {
        // Compound's mint cEther function signature is: mint(). No return, reverts on error.
        bytes memory callData = abi.encodeWithSignature("mint()");

        return (address(_cEther), _mintNotional, callData);
    }

    /**
     * Invoke mint cEther from the SetToken
     */
    function invokeMintCEther(ISetToken _setToken, ICErc20 _cEther, uint256 _mintNotional) external {
        ( , , bytes memory mintCEtherCalldata) = getMintCEtherCalldata(_cEther, _mintNotional);

        _setToken.invoke(address(_cEther), _mintNotional, mintCEtherCalldata);
    }

    /**
     * Get mint cToken calldata from SetToken
     */
    function getMintCTokenCalldata(
       ICErc20 _cToken,
       uint256 _mintNotional
    )
        public
        pure
        returns (address, uint256, bytes memory)
    {
        // Compound's mint cToken function signature is: mint(uint256 _mintAmount). Returns 0 if success
        bytes memory callData = abi.encodeWithSignature("mint(uint256)", _mintNotional);

        return (address(_cToken), _mintNotional, callData);
    }

    /**
     * Invoke mint from the SetToken. Mints the specified cToken from the underlying of the specified notional quantity
     */
    function invokeMintCToken(ISetToken _setToken, ICErc20 _cToken, uint256 _mintNotional) external {
        ( , , bytes memory mintCTokenCalldata) = getMintCTokenCalldata(_cToken, _mintNotional);

        require(
            abi.decode(_setToken.invoke(address(_cToken), 0, mintCTokenCalldata), (uint256)) == 0,
            "Mint failed"
        );
    }

    /**
     * Get redeem calldata
     */
    function getRedeemUnderlyingCalldata(
       ICErc20 _cToken,
       uint256 _redeemNotional
    )
        public
        pure
        returns (address, uint256, bytes memory)
    {
        // Compound's redeem function signature is: redeemUnderlying(uint256 _underlyingAmount)
        bytes memory callData = abi.encodeWithSignature("redeemUnderlying(uint256)", _redeemNotional);

        return (address(_cToken), _redeemNotional, callData);
    }

    /**
     * Invoke redeem underlying from the SetToken
     */
    function invokeRedeemUnderlying(ISetToken _setToken, ICErc20 _cToken, uint256 _redeemNotional) external {
        ( , , bytes memory redeemUnderlyingCalldata) = getRedeemUnderlyingCalldata(_cToken, _redeemNotional);
        
        require(
            abi.decode(_setToken.invoke(address(_cToken), 0, redeemUnderlyingCalldata), (uint256)) == 0,
            "Redeem failed"
        );
    }

    /**
     * Get repay borrow calldata
     */
    function getRepayBorrowCEtherCalldata(
       ICErc20 _cToken,
       uint256 _repayNotional
    )
        public
        pure
        returns (address, uint256, bytes memory)
    {
        // Compound's repay ETH function signature is: repayBorrow(). No return, revert on fail
        bytes memory callData = abi.encodeWithSignature("repayBorrow()");

        return (address(_cToken), _repayNotional, callData);
    }

    /**
     * Invoke repay cEther from the SetToken
     */
    function invokeRepayBorrowCEther(ISetToken _setToken, ICErc20 _cEther, uint256 _repayNotional) external {
        ( , , bytes memory repayBorrowCalldata) = getRepayBorrowCEtherCalldata(_cEther, _repayNotional);
        _setToken.invoke(address(_cEther), _repayNotional, repayBorrowCalldata);
    }

    /**
     * Get repay borrow calldata
     */
    function getRepayBorrowCTokenCalldata(
       ICErc20 _cToken,
       uint256 _repayNotional
    )
        public
        pure
        returns (address, uint256, bytes memory)
    {
        // Compound's repay asset function signature is: repayBorrow(uint256 _repayAmount)
        bytes memory callData = abi.encodeWithSignature("repayBorrow(uint256)", _repayNotional);

        return (address(_cToken), _repayNotional, callData);
    }

    /**
     * Invoke repay cToken from the SetToken
     */
    function invokeRepayBorrowCToken(ISetToken _setToken, ICErc20 _cToken, uint256 _repayNotional) external {
        ( , , bytes memory repayBorrowCalldata) = getRepayBorrowCTokenCalldata(_cToken, _repayNotional);
        require(
            abi.decode(_setToken.invoke(address(_cToken), 0, repayBorrowCalldata), (uint256)) == 0,
            "Repay failed"
        );
    }

    /**
     * Get borrow calldata
     */
    function getBorrowCalldata(
       ICErc20 _cToken,
       uint256 _notionalBorrowQuantity
    )
        public
        pure
        returns (address, uint256, bytes memory)
    {
        // Compound's borrow function signature is: borrow(uint256 _borrowAmount). Note: Notional borrow quantity is in units of underlying asset
        bytes memory callData = abi.encodeWithSignature("borrow(uint256)", _notionalBorrowQuantity);

        return (address(_cToken), 0, callData);
    }

    /**
     * Invoke the SetToken to interact with the specified cToken to borrow the cToken's underlying of the specified borrowQuantity.
     */
    function invokeBorrow(ISetToken _setToken, ICErc20 _cToken, uint256 _notionalBorrowQuantity) external {
        ( , , bytes memory borrowCalldata) = getBorrowCalldata(_cToken, _notionalBorrowQuantity);
        require(
            abi.decode(_setToken.invoke(address(_cToken), 0, borrowCalldata), (uint256)) == 0,
            "Borrow failed"
        );
    }
}

File 2 of 5 : ISetToken.sol
/*
    Copyright 2020 Set Labs Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    SPDX-License-Identifier: Apache License, Version 2.0
*/
pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";

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

/**
 * @title ISetToken
 * @author Set Protocol
 *
 * Interface for operating with SetTokens.
 */
interface ISetToken is IERC20 {

    /* ============ Enums ============ */

    enum ModuleState {
        NONE,
        PENDING,
        INITIALIZED
    }

    /* ============ Structs ============ */
    /**
     * The base definition of a SetToken Position
     *
     * @param component           Address of token in the Position
     * @param module              If not in default state, the address of associated module
     * @param unit                Each unit is the # of components per 10^18 of a SetToken
     * @param positionState       Position ENUM. Default is 0; External is 1
     * @param data                Arbitrary data
     */
    struct Position {
        address component;
        address module;
        int256 unit;
        uint8 positionState;
        bytes data;
    }

    /**
     * A struct that stores a component's cash position details and external positions
     * This data structure allows O(1) access to a component's cash position units and 
     * virtual units.
     *
     * @param virtualUnit               Virtual value of a component's DEFAULT position. Stored as virtual for efficiency
     *                                  updating all units at once via the position multiplier. Virtual units are achieved
     *                                  by dividing a "real" value by the "positionMultiplier"
     * @param componentIndex            
     * @param externalPositionModules   List of external modules attached to each external position. Each module
     *                                  maps to an external position
     * @param externalPositions         Mapping of module => ExternalPosition struct for a given component
     */
    struct ComponentPosition {
      int256 virtualUnit;
      address[] externalPositionModules;
      mapping(address => ExternalPosition) externalPositions;
    }

    /**
     * A struct that stores a component's external position details including virtual unit and any
     * auxiliary data.
     *
     * @param virtualUnit       Virtual value of a component's EXTERNAL position.
     * @param data              Arbitrary data
     */
    struct ExternalPosition {
      int256 virtualUnit;
      bytes data;
    }


    /* ============ Functions ============ */
    
    function addComponent(address _component) external;
    function removeComponent(address _component) external;
    function editDefaultPositionUnit(address _component, int256 _realUnit) external;
    function addExternalPositionModule(address _component, address _positionModule) external;
    function removeExternalPositionModule(address _component, address _positionModule) external;
    function editExternalPositionUnit(address _component, address _positionModule, int256 _realUnit) external;
    function editExternalPositionData(address _component, address _positionModule, bytes calldata _data) external;

    function invoke(address _target, uint256 _value, bytes calldata _data) external returns(bytes memory);

    function editPositionMultiplier(int256 _newMultiplier) external;

    function mint(address _account, uint256 _quantity) external;
    function burn(address _account, uint256 _quantity) external;

    function lock() external;
    function unlock() external;

    function addModule(address _module) external;
    function removeModule(address _module) external;
    function initializeModule() external;

    function setManager(address _manager) external;

    function manager() external view returns (address);
    function moduleStates(address _module) external view returns (ModuleState);
    function getModules() external view returns (address[] memory);
    
    function getDefaultPositionRealUnit(address _component) external view returns(int256);
    function getExternalPositionRealUnit(address _component, address _positionModule) external view returns(int256);
    function getComponents() external view returns(address[] memory);
    function getExternalPositionModules(address _component) external view returns(address[] memory);
    function getExternalPositionData(address _component, address _positionModule) external view returns(bytes memory);
    function isExternalPositionModule(address _component, address _module) external view returns(bool);
    function isComponent(address _component) external view returns(bool);
    
    function positionMultiplier() external view returns (int256);
    function getPositions() external view returns (Position[] memory);
    function getTotalComponentRealUnits(address _component) external view returns(int256);

    function isInitializedModule(address _module) external view returns(bool);
    function isPendingModule(address _module) external view returns(bool);
    function isLocked() external view returns (bool);
}

File 3 of 5 : ICErc20.sol
/*
    Copyright 2020 Set Labs Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

pragma solidity 0.6.10;

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


/**
 * @title ICErc20
 * @author Set Protocol
 *
 * Interface for interacting with Compound cErc20 tokens (e.g. Dai, USDC)
 */
interface ICErc20 is IERC20 {

    function borrowBalanceCurrent(address _account) external returns (uint256);

    function borrowBalanceStored(address _account) external view returns (uint256);

    /**
     * Calculates the exchange rate from the underlying to the CToken
     *
     * @notice Accrue interest then return the up-to-date exchange rate
     * @return Calculated exchange rate scaled by 1e18
     */
    function exchangeRateCurrent() external returns (uint256);

    function exchangeRateStored() external view returns (uint256);

    function underlying() external returns (address);

    /**
     * Sender supplies assets into the market and receives cTokens in exchange
     *
     * @notice Accrues interest whether or not the operation succeeds, unless reverted
     * @param _mintAmount The amount of the underlying asset to supply
     * @return uint256 0=success, otherwise a failure
     */
    function mint(uint256 _mintAmount) external returns (uint256);

    /**
     * @notice Sender redeems cTokens in exchange for the underlying asset
     * @dev Accrues interest whether or not the operation succeeds, unless reverted
     * @param _redeemTokens The number of cTokens to redeem into underlying
     * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function redeem(uint256 _redeemTokens) external returns (uint256);

    /**
     * @notice Sender redeems cTokens in exchange for a specified amount of underlying asset
     * @dev Accrues interest whether or not the operation succeeds, unless reverted
     * @param _redeemAmount The amount of underlying to redeem
     * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function redeemUnderlying(uint256 _redeemAmount) external returns (uint256);

    /**
      * @notice Sender borrows assets from the protocol to their own address
      * @param _borrowAmount The amount of the underlying asset to borrow
      * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)
      */
    function borrow(uint256 _borrowAmount) external returns (uint256);

    /**
     * @notice Sender repays their own borrow
     * @param _repayAmount The amount to repay
     * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function repayBorrow(uint256 _repayAmount) external returns (uint256);
}

File 4 of 5 : IComptroller.sol
/*
    Copyright 2021 Set Labs Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

pragma solidity 0.6.10;

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


/**
 * @title IComptroller
 * @author Set Protocol
 *
 * Interface for interacting with Compound Comptroller
 */
interface IComptroller {

    /**
     * @notice Add assets to be included in account liquidity calculation
     * @param cTokens The list of addresses of the cToken markets to be enabled
     * @return Success indicator for whether each corresponding market was entered
     */
    function enterMarkets(address[] memory cTokens) external returns (uint[] memory);

    /**
     * @notice Removes asset from sender's account liquidity calculation
     * @dev Sender must not have an outstanding borrow balance in the asset,
     *  or be providing neccessary collateral for an outstanding borrow.
     * @param cTokenAddress The address of the asset to be removed
     * @return Whether or not the account successfully exited the market
     */
    function exitMarket(address cTokenAddress) external returns (uint);

    function getAllMarkets() external view returns (ICErc20[] memory);

    function claimComp(address holder) external;
}

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

pragma solidity >=0.6.0 <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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ICErc20","name":"_cToken","type":"ICErc20"},{"internalType":"uint256","name":"_notionalBorrowQuantity","type":"uint256"}],"name":"getBorrowCalldata","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract ICErc20","name":"_cToken","type":"ICErc20"},{"internalType":"contract IComptroller","name":"_comptroller","type":"IComptroller"}],"name":"getEnterMarketsCalldata","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract ICErc20","name":"_cToken","type":"ICErc20"},{"internalType":"contract IComptroller","name":"_comptroller","type":"IComptroller"}],"name":"getExitMarketCalldata","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract ICErc20","name":"_cEther","type":"ICErc20"},{"internalType":"uint256","name":"_mintNotional","type":"uint256"}],"name":"getMintCEtherCalldata","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract ICErc20","name":"_cToken","type":"ICErc20"},{"internalType":"uint256","name":"_mintNotional","type":"uint256"}],"name":"getMintCTokenCalldata","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract ICErc20","name":"_cToken","type":"ICErc20"},{"internalType":"uint256","name":"_redeemNotional","type":"uint256"}],"name":"getRedeemUnderlyingCalldata","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract ICErc20","name":"_cToken","type":"ICErc20"},{"internalType":"uint256","name":"_repayNotional","type":"uint256"}],"name":"getRepayBorrowCEtherCalldata","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract ICErc20","name":"_cToken","type":"ICErc20"},{"internalType":"uint256","name":"_repayNotional","type":"uint256"}],"name":"getRepayBorrowCTokenCalldata","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"}]

611715610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061010a5760003560e01c80636d4aada5116100a1578063aed2dfc911610070578063aed2dfc91461041b578063b17faf1c1461045e578063beee4b4b146104a3578063fa872cfa146104e65761010a565b80636d4aada51461036b5780639653f87914610397578063a2ca57e0146103c3578063a753734e146103ef5761010a565b80633c77439c116100dd5780633c77439c1461028b57806343472132146102b95780635d202591146102e5578063690f6561146103285761010a565b806301fd16b21461010f57806309c09c90146101d357806309c8202b1461021a5780632c66b57e1461025d575b600080fd5b61013b6004803603604081101561012557600080fd5b506001600160a01b038135169060200135610529565b60405180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561019657818101518382015260200161017e565b50505050905090810190601f1680156101c35780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b8180156101df57600080fd5b50610218600480360360608110156101f657600080fd5b506001600160a01b038135811691602081013582169160409091013516610567565b005b81801561022657600080fd5b506102186004803603606081101561023d57600080fd5b506001600160a01b0381358116916020810135909116906040013561078c565b61013b6004803603604081101561027357600080fd5b506001600160a01b03813581169160200135166109a8565b61013b600480360360408110156102a157600080fd5b506001600160a01b0381358116916020013516610a80565b61013b600480360360408110156102cf57600080fd5b506001600160a01b038135169060200135610acb565b8180156102f157600080fd5b506102186004803603606081101561030857600080fd5b506001600160a01b03813581169160208101359091169060400135610afb565b81801561033457600080fd5b506102186004803603606081101561034b57600080fd5b506001600160a01b03813581169160208101359091169060400135610cc7565b61013b6004803603604081101561038157600080fd5b506001600160a01b038135169060200135610ccf565b61013b600480360360408110156103ad57600080fd5b506001600160a01b038135169060200135610cff565b61013b600480360360408110156103d957600080fd5b506001600160a01b038135169060200135610d3e565b61013b6004803603604081101561040557600080fd5b506001600160a01b038135169060200135610d7d565b81801561042757600080fd5b506102186004803603606081101561043e57600080fd5b506001600160a01b03813581169160208101359091169060400135610dbc565b81801561046a57600080fd5b506102186004803603606081101561048157600080fd5b506001600160a01b038135811691602081013582169160409091013516610fda565b8180156104af57600080fd5b50610218600480360360608110156104c657600080fd5b506001600160a01b038135811691602081013590911690604001356112a4565b8180156104f257600080fd5b506102186004803603606081101561050957600080fd5b506001600160a01b038135811691602081013590911690604001356114c2565b604080516024808201939093528151808203909301835260440190526020810180516001600160e01b031663317afabb60e21b179052909160009190565b60606105738383610a80565b92505050836001600160a01b0316638f6f0332836000846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156105f45781810151838201526020016105dc565b50505050905090810190601f1680156106215780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561064257600080fd5b505af1158015610656573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561067f57600080fd5b8101908080516040519392919084600160201b82111561069e57600080fd5b9083019060208201858111156106b357600080fd5b8251600160201b8111828201881017156106cc57600080fd5b82525081516020918201929091019080838360005b838110156106f95781810151838201526020016106e1565b50505050905090810190601f1680156107265780820380516001836020036101000a031916815260200191505b50604052505050806020019051602081101561074157600080fd5b505115610786576040805162461bcd60e51b815260206004820152600e60248201526d115e1a5d1a5b99c819985a5b195960921b604482015290519081900360640190fd5b50505050565b60606107988383610cff565b92505050836001600160a01b0316638f6f0332846000846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610819578181015183820152602001610801565b50505050905090810190601f1680156108465780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561086757600080fd5b505af115801561087b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156108a457600080fd5b8101908080516040519392919084600160201b8211156108c357600080fd5b9083019060208201858111156108d857600080fd5b8251600160201b8111828201881017156108f157600080fd5b82525081516020918201929091019080838360005b8381101561091e578181015183820152602001610906565b50505050905090810190601f16801561094b5780820380516001836020036101000a031916815260200191505b50604052505050806020019051602081101561096657600080fd5b505115610786576040805162461bcd60e51b815260206004820152600b60248201526a135a5b9d0819985a5b195960aa1b604482015290519081900360640190fd5b60408051600180825281830190925260009182916060918291906020808301908036833701905050905085816000815181106109e057fe5b6001600160a01b039092166020928302919091018201526040516024810182815283516044830152835160609385938392606490910191858101910280838360005b83811015610a3a578181015183820152602001610a22565b50506040805193909501838103601f1901845290945250602081018051631853304760e31b6001600160e01b039091161790529a9c60009c509950505050505050505050565b604080516001600160a01b039390931660248085019190915281518085039091018152604490930190526020820180516001600160e01b0316630ede4edd60e41b1790529160009190565b6040805160048152602481019091526020810180516001600160e01b0316632726cff560e11b1790529192909190565b6060610b078383610acb565b92505050836001600160a01b0316638f6f03328484846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610b87578181015183820152602001610b6f565b50505050905090810190601f168015610bb45780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610bd557600080fd5b505af1158015610be9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610c1257600080fd5b8101908080516040519392919084600160201b821115610c3157600080fd5b908301906020820185811115610c4657600080fd5b8251600160201b811182820188101715610c5f57600080fd5b82525081516020918201929091019080838360005b83811015610c8c578181015183820152602001610c74565b50505050905090810190601f168015610cb95780820380516001836020036101000a031916815260200191505b506040525050505050505050565b6060610b0783835b6040805160048152602481019091526020810180516001600160e01b0316631249c58b60e01b1790529192909190565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663140e25ad60e31b1790529192909190565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663852a12e360e01b1790529192909190565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663073a938160e11b1790529192909190565b6060610dc88383610d3e565b92505050836001600160a01b0316638f6f0332846000846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e49578181015183820152602001610e31565b50505050905090810190601f168015610e765780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610e9757600080fd5b505af1158015610eab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610ed457600080fd5b8101908080516040519392919084600160201b821115610ef357600080fd5b908301906020820185811115610f0857600080fd5b8251600160201b811182820188101715610f2157600080fd5b82525081516020918201929091019080838360005b83811015610f4e578181015183820152602001610f36565b50505050905090810190601f168015610f7b5780820380516001836020036101000a031916815260200191505b506040525050508060200190516020811015610f9657600080fd5b505115610786576040805162461bcd60e51b815260206004820152600d60248201526c14995919595b4819985a5b1959609a1b604482015290519081900360640190fd5b6060610fe683836109a8565b925050506060846001600160a01b0316638f6f0332846000856040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611069578181015183820152602001611051565b50505050905090810190601f1680156110965780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156110b757600080fd5b505af11580156110cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156110f457600080fd5b8101908080516040519392919084600160201b82111561111357600080fd5b90830190602082018581111561112857600080fd5b8251600160201b81118282018810171561114157600080fd5b82525081516020918201929091019080838360005b8381101561116e578181015183820152602001611156565b50505050905090810190601f16801561119b5780820380516001836020036101000a031916815260200191505b5060405250505080602001905160208110156111b657600080fd5b8101908080516040519392919084600160201b8211156111d557600080fd5b9083019060208201858111156111ea57600080fd5b82518660208202830111600160201b8211171561120657600080fd5b82525081516020918201928201910280838360005b8381101561123357818101518382015260200161121b565b5050505090500160405250505090508060008151811061124f57fe5b602002602001015160001461129d576040805162461bcd60e51b815260206004820152600f60248201526e115b9d195c9a5b99c819985a5b1959608a1b604482015290519081900360640190fd5b5050505050565b60606112b08383610529565b92505050836001600160a01b0316638f6f0332846000846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611331578181015183820152602001611319565b50505050905090810190601f16801561135e5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561137f57600080fd5b505af1158015611393573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156113bc57600080fd5b8101908080516040519392919084600160201b8211156113db57600080fd5b9083019060208201858111156113f057600080fd5b8251600160201b81118282018810171561140957600080fd5b82525081516020918201929091019080838360005b8381101561143657818101518382015260200161141e565b50505050905090810190601f1680156114635780820380516001836020036101000a031916815260200191505b50604052505050806020019051602081101561147e57600080fd5b505115610786576040805162461bcd60e51b815260206004820152600d60248201526c109bdc9c9bddc819985a5b1959609a1b604482015290519081900360640190fd5b60606114ce8383610d7d565b92505050836001600160a01b0316638f6f0332846000846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561154f578181015183820152602001611537565b50505050905090810190601f16801561157c5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561159d57600080fd5b505af11580156115b1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156115da57600080fd5b8101908080516040519392919084600160201b8211156115f957600080fd5b90830190602082018581111561160e57600080fd5b8251600160201b81118282018810171561162757600080fd5b82525081516020918201929091019080838360005b8381101561165457818101518382015260200161163c565b50505050905090810190601f1680156116815780820380516001836020036101000a031916815260200191505b50604052505050806020019051602081101561169c57600080fd5b505115610786576040805162461bcd60e51b815260206004820152600c60248201526b14995c185e4819985a5b195960a21b604482015290519081900360640190fdfea26469706673582212204b8d35e6b653f59acec7844b2b0417b9d788036daf42dfb1de87ac86b855b52564736f6c634300060a0033

Deployed Bytecode

0x7309a5f6f9474337ddd091a5def9944aa5283eb259301460806040526004361061010a5760003560e01c80636d4aada5116100a1578063aed2dfc911610070578063aed2dfc91461041b578063b17faf1c1461045e578063beee4b4b146104a3578063fa872cfa146104e65761010a565b80636d4aada51461036b5780639653f87914610397578063a2ca57e0146103c3578063a753734e146103ef5761010a565b80633c77439c116100dd5780633c77439c1461028b57806343472132146102b95780635d202591146102e5578063690f6561146103285761010a565b806301fd16b21461010f57806309c09c90146101d357806309c8202b1461021a5780632c66b57e1461025d575b600080fd5b61013b6004803603604081101561012557600080fd5b506001600160a01b038135169060200135610529565b60405180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561019657818101518382015260200161017e565b50505050905090810190601f1680156101c35780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b8180156101df57600080fd5b50610218600480360360608110156101f657600080fd5b506001600160a01b038135811691602081013582169160409091013516610567565b005b81801561022657600080fd5b506102186004803603606081101561023d57600080fd5b506001600160a01b0381358116916020810135909116906040013561078c565b61013b6004803603604081101561027357600080fd5b506001600160a01b03813581169160200135166109a8565b61013b600480360360408110156102a157600080fd5b506001600160a01b0381358116916020013516610a80565b61013b600480360360408110156102cf57600080fd5b506001600160a01b038135169060200135610acb565b8180156102f157600080fd5b506102186004803603606081101561030857600080fd5b506001600160a01b03813581169160208101359091169060400135610afb565b81801561033457600080fd5b506102186004803603606081101561034b57600080fd5b506001600160a01b03813581169160208101359091169060400135610cc7565b61013b6004803603604081101561038157600080fd5b506001600160a01b038135169060200135610ccf565b61013b600480360360408110156103ad57600080fd5b506001600160a01b038135169060200135610cff565b61013b600480360360408110156103d957600080fd5b506001600160a01b038135169060200135610d3e565b61013b6004803603604081101561040557600080fd5b506001600160a01b038135169060200135610d7d565b81801561042757600080fd5b506102186004803603606081101561043e57600080fd5b506001600160a01b03813581169160208101359091169060400135610dbc565b81801561046a57600080fd5b506102186004803603606081101561048157600080fd5b506001600160a01b038135811691602081013582169160409091013516610fda565b8180156104af57600080fd5b50610218600480360360608110156104c657600080fd5b506001600160a01b038135811691602081013590911690604001356112a4565b8180156104f257600080fd5b506102186004803603606081101561050957600080fd5b506001600160a01b038135811691602081013590911690604001356114c2565b604080516024808201939093528151808203909301835260440190526020810180516001600160e01b031663317afabb60e21b179052909160009190565b60606105738383610a80565b92505050836001600160a01b0316638f6f0332836000846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156105f45781810151838201526020016105dc565b50505050905090810190601f1680156106215780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561064257600080fd5b505af1158015610656573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561067f57600080fd5b8101908080516040519392919084600160201b82111561069e57600080fd5b9083019060208201858111156106b357600080fd5b8251600160201b8111828201881017156106cc57600080fd5b82525081516020918201929091019080838360005b838110156106f95781810151838201526020016106e1565b50505050905090810190601f1680156107265780820380516001836020036101000a031916815260200191505b50604052505050806020019051602081101561074157600080fd5b505115610786576040805162461bcd60e51b815260206004820152600e60248201526d115e1a5d1a5b99c819985a5b195960921b604482015290519081900360640190fd5b50505050565b60606107988383610cff565b92505050836001600160a01b0316638f6f0332846000846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610819578181015183820152602001610801565b50505050905090810190601f1680156108465780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561086757600080fd5b505af115801561087b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156108a457600080fd5b8101908080516040519392919084600160201b8211156108c357600080fd5b9083019060208201858111156108d857600080fd5b8251600160201b8111828201881017156108f157600080fd5b82525081516020918201929091019080838360005b8381101561091e578181015183820152602001610906565b50505050905090810190601f16801561094b5780820380516001836020036101000a031916815260200191505b50604052505050806020019051602081101561096657600080fd5b505115610786576040805162461bcd60e51b815260206004820152600b60248201526a135a5b9d0819985a5b195960aa1b604482015290519081900360640190fd5b60408051600180825281830190925260009182916060918291906020808301908036833701905050905085816000815181106109e057fe5b6001600160a01b039092166020928302919091018201526040516024810182815283516044830152835160609385938392606490910191858101910280838360005b83811015610a3a578181015183820152602001610a22565b50506040805193909501838103601f1901845290945250602081018051631853304760e31b6001600160e01b039091161790529a9c60009c509950505050505050505050565b604080516001600160a01b039390931660248085019190915281518085039091018152604490930190526020820180516001600160e01b0316630ede4edd60e41b1790529160009190565b6040805160048152602481019091526020810180516001600160e01b0316632726cff560e11b1790529192909190565b6060610b078383610acb565b92505050836001600160a01b0316638f6f03328484846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610b87578181015183820152602001610b6f565b50505050905090810190601f168015610bb45780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610bd557600080fd5b505af1158015610be9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610c1257600080fd5b8101908080516040519392919084600160201b821115610c3157600080fd5b908301906020820185811115610c4657600080fd5b8251600160201b811182820188101715610c5f57600080fd5b82525081516020918201929091019080838360005b83811015610c8c578181015183820152602001610c74565b50505050905090810190601f168015610cb95780820380516001836020036101000a031916815260200191505b506040525050505050505050565b6060610b0783835b6040805160048152602481019091526020810180516001600160e01b0316631249c58b60e01b1790529192909190565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663140e25ad60e31b1790529192909190565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663852a12e360e01b1790529192909190565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663073a938160e11b1790529192909190565b6060610dc88383610d3e565b92505050836001600160a01b0316638f6f0332846000846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e49578181015183820152602001610e31565b50505050905090810190601f168015610e765780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610e9757600080fd5b505af1158015610eab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610ed457600080fd5b8101908080516040519392919084600160201b821115610ef357600080fd5b908301906020820185811115610f0857600080fd5b8251600160201b811182820188101715610f2157600080fd5b82525081516020918201929091019080838360005b83811015610f4e578181015183820152602001610f36565b50505050905090810190601f168015610f7b5780820380516001836020036101000a031916815260200191505b506040525050508060200190516020811015610f9657600080fd5b505115610786576040805162461bcd60e51b815260206004820152600d60248201526c14995919595b4819985a5b1959609a1b604482015290519081900360640190fd5b6060610fe683836109a8565b925050506060846001600160a01b0316638f6f0332846000856040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611069578181015183820152602001611051565b50505050905090810190601f1680156110965780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156110b757600080fd5b505af11580156110cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156110f457600080fd5b8101908080516040519392919084600160201b82111561111357600080fd5b90830190602082018581111561112857600080fd5b8251600160201b81118282018810171561114157600080fd5b82525081516020918201929091019080838360005b8381101561116e578181015183820152602001611156565b50505050905090810190601f16801561119b5780820380516001836020036101000a031916815260200191505b5060405250505080602001905160208110156111b657600080fd5b8101908080516040519392919084600160201b8211156111d557600080fd5b9083019060208201858111156111ea57600080fd5b82518660208202830111600160201b8211171561120657600080fd5b82525081516020918201928201910280838360005b8381101561123357818101518382015260200161121b565b5050505090500160405250505090508060008151811061124f57fe5b602002602001015160001461129d576040805162461bcd60e51b815260206004820152600f60248201526e115b9d195c9a5b99c819985a5b1959608a1b604482015290519081900360640190fd5b5050505050565b60606112b08383610529565b92505050836001600160a01b0316638f6f0332846000846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611331578181015183820152602001611319565b50505050905090810190601f16801561135e5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561137f57600080fd5b505af1158015611393573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156113bc57600080fd5b8101908080516040519392919084600160201b8211156113db57600080fd5b9083019060208201858111156113f057600080fd5b8251600160201b81118282018810171561140957600080fd5b82525081516020918201929091019080838360005b8381101561143657818101518382015260200161141e565b50505050905090810190601f1680156114635780820380516001836020036101000a031916815260200191505b50604052505050806020019051602081101561147e57600080fd5b505115610786576040805162461bcd60e51b815260206004820152600d60248201526c109bdc9c9bddc819985a5b1959609a1b604482015290519081900360640190fd5b60606114ce8383610d7d565b92505050836001600160a01b0316638f6f0332846000846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561154f578181015183820152602001611537565b50505050905090810190601f16801561157c5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561159d57600080fd5b505af11580156115b1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156115da57600080fd5b8101908080516040519392919084600160201b8211156115f957600080fd5b90830190602082018581111561160e57600080fd5b8251600160201b81118282018810171561162757600080fd5b82525081516020918201929091019080838360005b8381101561165457818101518382015260200161163c565b50505050905090810190601f1680156116815780820380516001836020036101000a031916815260200191505b50604052505050806020019051602081101561169c57600080fd5b505115610786576040805162461bcd60e51b815260206004820152600c60248201526b14995c185e4819985a5b195960a21b604482015290519081900360640190fdfea26469706673582212204b8d35e6b653f59acec7844b2b0417b9d788036daf42dfb1de87ac86b855b52564736f6c634300060a0033

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.