ETH Price: $3,450.43 (-1.06%)
Gas: 2 Gwei

Contract

0x594C62030eDbf4d09564bcE0efe2885b34B12e24
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60806040121199452021-03-27 7:59:481192 days ago1616831988IN
 Create: Astrodrop
0 ETH0.0675292686.00000145

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Astrodrop

Compiler Version
v0.8.1+commit.df193b15

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-03-27
*/

// SPDX-License-Identifier: MIT AND GPL-v3-or-later
pragma solidity 0.8.1;

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

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


abstract contract Ownable is Context {
    address private _owner;

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

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

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

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}


contract CloneFactory {
    function createClone(address target, bytes32 salt) internal returns (address result) {
        bytes20 targetBytes = bytes20(target);
        assembly {
            let clone := mload(0x40)
            mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(clone, 0x14), targetBytes)
            mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            result := create2(0, clone, 0x37, salt)
        }
  }
  
  function computeCloneAddress(address target, bytes32 salt) internal view returns (address) {
        bytes20 targetBytes = bytes20(target);
        bytes32 bytecodeHash;
        assembly {
            let clone := mload(0x40)
            mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(clone, 0x14), targetBytes)
            mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            bytecodeHash := keccak256(clone, 0x37)
        }
        bytes32 _data = keccak256(
            abi.encodePacked(bytes1(0xff), address(this), salt, bytecodeHash)
        );
        return address(bytes20(_data << 96));
    }
    
    function isClone(address target, address query) internal view returns (bool result) {
        bytes20 targetBytes = bytes20(target);
        assembly {
            let clone := mload(0x40)
            mstore(clone, 0x363d3d373d3d3d363d7300000000000000000000000000000000000000000000)
            mstore(add(clone, 0xa), targetBytes)
            mstore(add(clone, 0x1e), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            
            let other := add(clone, 0x40)
            extcodecopy(query, other, 0, 0x2d)
            result := and(
                eq(mload(clone), mload(other)),
                eq(mload(add(clone, 0xd)), mload(add(other, 0xd)))
            )
        }
    }
}


library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        bytes32 computedHash = leaf;

        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];

            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }
}


interface IERC20 {
    function transfer(address recipient, uint256 amount) external returns (bool);
    function balanceOf(address account) external view returns (uint256);
}


interface IERC721 {
    function safeTransferFrom(address from, address to, uint256 tokenId) external;
    function ownerOf(uint256 tokenId) external view returns (address owner);
}


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) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }
}


library SafeERC20 {
    using Address for address;

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

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

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

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

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


interface IAstrodrop {
    // Returns the address of the token distributed by this contract.
    function token() external view returns (address);
    // Returns the merkle root of the merkle tree containing account balances available to claim.
    function merkleRoot() external view returns (bytes32);
    // Returns true if the index has been marked claimed.
    function isClaimed(uint256 index) external view returns (bool);
    // Claim the given amount of the token to the given address. Reverts if the inputs are invalid.
    function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external;

    // This event is triggered whenever a call to #claim succeeds.
    event Claimed(uint256 index, address account, uint256 amount);
}


contract Astrodrop is IAstrodrop, Ownable {
    using SafeERC20 for IERC20;

    address public override token;
    bytes32 public override merkleRoot;
    bool public initialized;
    uint256 public expireTimestamp;

    // This is a packed array of booleans.
    mapping(uint256 => uint256) public claimedBitMap;

    function init(address owner_, address token_, bytes32 merkleRoot_, uint256 expireTimestamp_) external {
        require(!initialized, "Astrodrop: Initialized");
        initialized = true;

        token = token_;
        merkleRoot = merkleRoot_;
        expireTimestamp = expireTimestamp_;
        
        _transferOwnership(owner_);
    }

    function isClaimed(uint256 index) public view override returns (bool) {
        uint256 claimedWordIndex = index / 256;
        uint256 claimedBitIndex = index % 256;
        uint256 claimedWord = claimedBitMap[claimedWordIndex];
        uint256 mask = (1 << claimedBitIndex);
        return claimedWord & mask == mask;
    }

    function _setClaimed(uint256 index) private {
        uint256 claimedWordIndex = index / 256;
        uint256 claimedBitIndex = index % 256;
        claimedBitMap[claimedWordIndex] = claimedBitMap[claimedWordIndex] | (1 << claimedBitIndex);
    }

    function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external override {
        require(!isClaimed(index), 'MerkleDistributor: Drop already claimed.');

        // Verify the merkle proof.
        bytes32 node = keccak256(abi.encodePacked(index, account, amount));
        require(MerkleProof.verify(merkleProof, merkleRoot, node), 'Astrodrop: Invalid proof');

        // Mark it claimed and send the token.
        _setClaimed(index);
        IERC20(token).safeTransfer(account, amount);

        emit Claimed(index, account, amount);
    }

    function sweep(address token_, address target) external onlyOwner {
        require(block.timestamp >= expireTimestamp || token_ != token, "Astrodrop: Not expired");
        IERC20 tokenContract = IERC20(token_);
        uint256 balance = tokenContract.balanceOf(address(this));
        tokenContract.safeTransfer(target, balance);
    }
}


contract AstrodropERC721 is IAstrodrop, Ownable {
    using SafeERC20 for IERC20;

    address public override token;
    bytes32 public override merkleRoot;
    bool public initialized;
    uint256 public expireTimestamp;

    // This is a packed array of booleans.
    mapping(uint256 => uint256) public claimedBitMap;

    function init(address owner_, address token_, bytes32 merkleRoot_, uint256 expireTimestamp_) external {
        require(!initialized, "Astrodrop: Initialized");
        initialized = true;

        token = token_;
        merkleRoot = merkleRoot_;
        expireTimestamp = expireTimestamp_;
        
        _transferOwnership(owner_);
    }

    function isClaimed(uint256 index) public view override returns (bool) {
        uint256 claimedWordIndex = index / 256;
        uint256 claimedBitIndex = index % 256;
        uint256 claimedWord = claimedBitMap[claimedWordIndex];
        uint256 mask = (1 << claimedBitIndex);
        return claimedWord & mask == mask;
    }

    function _setClaimed(uint256 index) private {
        uint256 claimedWordIndex = index / 256;
        uint256 claimedBitIndex = index % 256;
        claimedBitMap[claimedWordIndex] = claimedBitMap[claimedWordIndex] | (1 << claimedBitIndex);
    }

    function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external override {
        require(!isClaimed(index), 'MerkleDistributor: Drop already claimed.');

        // Verify the merkle proof.
        bytes32 node = keccak256(abi.encodePacked(index, account, amount));
        require(MerkleProof.verify(merkleProof, merkleRoot, node), 'Astrodrop: Invalid proof');

        // Mark it claimed and send the token.
        _setClaimed(index);
        IERC721 tokenContract = IERC721(token);
        tokenContract.safeTransferFrom(tokenContract.ownerOf(amount), account, amount);

        emit Claimed(index, account, amount);
    }

    function sweep(address token_, address target) external onlyOwner {
        require(block.timestamp >= expireTimestamp || token_ != token, "Astrodrop: Not expired");
        IERC20 tokenContract = IERC20(token_);
        uint256 balance = tokenContract.balanceOf(address(this));
        tokenContract.safeTransfer(target, balance);
    }
}


contract AstrodropFactory is CloneFactory {
    event CreateAstrodrop(address astrodrop, bytes32 ipfsHash);

    function createAstrodrop(
        address template,
        address token,
        bytes32 merkleRoot,
        uint256 expireTimestamp,
        bytes32 salt,
        bytes32 ipfsHash
    ) external returns (Astrodrop drop) {
        drop = Astrodrop(createClone(template, salt));
        drop.init(msg.sender, token, merkleRoot, expireTimestamp);
        emit CreateAstrodrop(address(drop), ipfsHash);
    }

    function computeAstrodropAddress(
        address template,
        bytes32 salt
    ) external view returns (address) {
        return computeCloneAddress(template, salt);
    }
    
    function isAstrodrop(address template, address query) external view returns (bool) {
        return isClone(template, query);
    }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedBitMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expireTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"token_","type":"address"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"},{"internalType":"uint256","name":"expireTimestamp_","type":"uint256"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"address","name":"target","type":"address"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610d3d806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80638da5cb5b1161008c578063b8dc491b11610066578063b8dc491b1461016f578063ee25560b14610182578063f2fde38b14610195578063fc0c546a146101a8576100cf565b80638da5cb5b1461013f5780638f32d59b146101545780639e34070f1461015c576100cf565b8063158ef93e146100d45780632cde56c3146100f25780632e7ba6ef146101075780632eb4a7ab1461011a578063338b84c11461012f578063715018a614610137575b600080fd5b6100dc6101b0565b6040516100e99190610a5f565b60405180910390f35b6101056101003660046108a1565b6101b9565b005b610105610115366004610932565b610228565b61012261033d565b6040516100e99190610a6a565b610122610343565b610105610349565b6101476103b7565b6040516100e99190610a32565b6100dc6103c6565b6100dc61016a366004610902565b6103ea565b61010561017d36600461086f565b61042d565b610122610190366004610902565b610523565b6101056101a336600461084e565b610535565b610147610565565b60035460ff1681565b60035460ff16156101e55760405162461bcd60e51b81526004016101dc90610bd2565b60405180910390fd5b60038054600160ff19909116811790915580546001600160a01b0319166001600160a01b0385161790556002829055600481905561022284610574565b50505050565b610231856103ea565b1561024e5760405162461bcd60e51b81526004016101dc90610af0565b600085858560405160200161026593929190610a0a565b6040516020818303038152906040528051906020012090506102be8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060025491508490506105f5565b6102da5760405162461bcd60e51b81526004016101dc90610a73565b6102e3866106b0565b6001546102fa906001600160a01b031686866106ee565b7f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed02686868660405161032d93929190610c83565b60405180910390a1505050505050565b60025481565b60045481565b6103516103c6565b61036d5760405162461bcd60e51b81526004016101dc90610b6d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b600080546001600160a01b03166103db610749565b6001600160a01b031614905090565b6000806103f961010084610ca2565b9050600061040961010085610cdd565b60009283526005602052604090922054600190921b9182169091149150505b919050565b6104356103c6565b6104515760405162461bcd60e51b81526004016101dc90610b6d565b6004544210158061047057506001546001600160a01b03838116911614155b61048c5760405162461bcd60e51b81526004016101dc90610ba2565b6040516370a0823160e01b815282906000906001600160a01b038316906370a08231906104bd903090600401610a32565b60206040518083038186803b1580156104d557600080fd5b505afa1580156104e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050d919061091a565b90506102226001600160a01b03831684836106ee565b60056020526000908152604090205481565b61053d6103c6565b6105595760405162461bcd60e51b81526004016101dc90610b6d565b61056281610574565b50565b6001546001600160a01b031681565b6001600160a01b03811661059a5760405162461bcd60e51b81526004016101dc90610aaa565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081815b85518110156106a557600086828151811061062557634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116106665782816040516020016106499291906109c3565b604051602081830303815290604052805190602001209250610692565b80836040516020016106799291906109c3565b6040516020818303038152906040528051906020012092505b508061069d81610cb6565b9150506105fa565b509092149392505050565b60006106be61010083610ca2565b905060006106ce61010084610cdd565b6000928352600560205260409092208054600190931b9092179091555050565b6107448363a9059cbb60e01b848460405160240161070d929190610a46565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261074d565b505050565b3390565b61075f826001600160a01b0316610831565b61077b5760405162461bcd60e51b81526004016101dc90610c4c565b600080836001600160a01b03168360405161079691906109d1565b6000604051808303816000865af19150503d80600081146107d3576040519150601f19603f3d011682016040523d82523d6000602084013e6107d8565b606091505b5091509150816107fa5760405162461bcd60e51b81526004016101dc90610b38565b805115610222578080602001905181019061081591906108e2565b6102225760405162461bcd60e51b81526004016101dc90610c02565b3b151590565b80356001600160a01b038116811461042857600080fd5b60006020828403121561085f578081fd5b61086882610837565b9392505050565b60008060408385031215610881578081fd5b61088a83610837565b915061089860208401610837565b90509250929050565b600080600080608085870312156108b6578182fd5b6108bf85610837565b93506108cd60208601610837565b93969395505050506040820135916060013590565b6000602082840312156108f3578081fd5b81518015158114610868578182fd5b600060208284031215610913578081fd5b5035919050565b60006020828403121561092b578081fd5b5051919050565b600080600080600060808688031215610949578081fd5b8535945061095960208701610837565b935060408601359250606086013567ffffffffffffffff8082111561097c578283fd5b818801915088601f83011261098f578283fd5b81358181111561099d578384fd5b89602080830285010111156109b0578384fd5b9699959850939650602001949392505050565b918252602082015260400190565b60008251815b818110156109f157602081860181015185830152016109d7565b818111156109ff5782828501525b509190910192915050565b92835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b60208082526018908201527f417374726f64726f703a20496e76616c69642070726f6f660000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526028908201527f4d65726b6c654469737472696275746f723a2044726f7020616c72656164792060408201526731b630b4b6b2b21760c11b606082015260800190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260169082015275105cdd1c9bd91c9bdc0e88139bdd08195e1c1a5c995960521b604082015260600190565b602080825260169082015275105cdd1c9bd91c9bdc0e88125b9a5d1a585b1a5e995960521b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604082015260600190565b9283526001600160a01b03919091166020830152604082015260600190565b600082610cb157610cb1610cf1565b500490565b6000600019821415610cd657634e487b7160e01b81526011600452602481fd5b5060010190565b600082610cec57610cec610cf1565b500690565b634e487b7160e01b600052601260045260246000fdfea264697066735822122088605c3d702e1a656780d37ef4452c82cba501ccd36b34f9eeac0ad7fd77847564736f6c63430008010033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80638da5cb5b1161008c578063b8dc491b11610066578063b8dc491b1461016f578063ee25560b14610182578063f2fde38b14610195578063fc0c546a146101a8576100cf565b80638da5cb5b1461013f5780638f32d59b146101545780639e34070f1461015c576100cf565b8063158ef93e146100d45780632cde56c3146100f25780632e7ba6ef146101075780632eb4a7ab1461011a578063338b84c11461012f578063715018a614610137575b600080fd5b6100dc6101b0565b6040516100e99190610a5f565b60405180910390f35b6101056101003660046108a1565b6101b9565b005b610105610115366004610932565b610228565b61012261033d565b6040516100e99190610a6a565b610122610343565b610105610349565b6101476103b7565b6040516100e99190610a32565b6100dc6103c6565b6100dc61016a366004610902565b6103ea565b61010561017d36600461086f565b61042d565b610122610190366004610902565b610523565b6101056101a336600461084e565b610535565b610147610565565b60035460ff1681565b60035460ff16156101e55760405162461bcd60e51b81526004016101dc90610bd2565b60405180910390fd5b60038054600160ff19909116811790915580546001600160a01b0319166001600160a01b0385161790556002829055600481905561022284610574565b50505050565b610231856103ea565b1561024e5760405162461bcd60e51b81526004016101dc90610af0565b600085858560405160200161026593929190610a0a565b6040516020818303038152906040528051906020012090506102be8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060025491508490506105f5565b6102da5760405162461bcd60e51b81526004016101dc90610a73565b6102e3866106b0565b6001546102fa906001600160a01b031686866106ee565b7f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed02686868660405161032d93929190610c83565b60405180910390a1505050505050565b60025481565b60045481565b6103516103c6565b61036d5760405162461bcd60e51b81526004016101dc90610b6d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b600080546001600160a01b03166103db610749565b6001600160a01b031614905090565b6000806103f961010084610ca2565b9050600061040961010085610cdd565b60009283526005602052604090922054600190921b9182169091149150505b919050565b6104356103c6565b6104515760405162461bcd60e51b81526004016101dc90610b6d565b6004544210158061047057506001546001600160a01b03838116911614155b61048c5760405162461bcd60e51b81526004016101dc90610ba2565b6040516370a0823160e01b815282906000906001600160a01b038316906370a08231906104bd903090600401610a32565b60206040518083038186803b1580156104d557600080fd5b505afa1580156104e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050d919061091a565b90506102226001600160a01b03831684836106ee565b60056020526000908152604090205481565b61053d6103c6565b6105595760405162461bcd60e51b81526004016101dc90610b6d565b61056281610574565b50565b6001546001600160a01b031681565b6001600160a01b03811661059a5760405162461bcd60e51b81526004016101dc90610aaa565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081815b85518110156106a557600086828151811061062557634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116106665782816040516020016106499291906109c3565b604051602081830303815290604052805190602001209250610692565b80836040516020016106799291906109c3565b6040516020818303038152906040528051906020012092505b508061069d81610cb6565b9150506105fa565b509092149392505050565b60006106be61010083610ca2565b905060006106ce61010084610cdd565b6000928352600560205260409092208054600190931b9092179091555050565b6107448363a9059cbb60e01b848460405160240161070d929190610a46565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261074d565b505050565b3390565b61075f826001600160a01b0316610831565b61077b5760405162461bcd60e51b81526004016101dc90610c4c565b600080836001600160a01b03168360405161079691906109d1565b6000604051808303816000865af19150503d80600081146107d3576040519150601f19603f3d011682016040523d82523d6000602084013e6107d8565b606091505b5091509150816107fa5760405162461bcd60e51b81526004016101dc90610b38565b805115610222578080602001905181019061081591906108e2565b6102225760405162461bcd60e51b81526004016101dc90610c02565b3b151590565b80356001600160a01b038116811461042857600080fd5b60006020828403121561085f578081fd5b61086882610837565b9392505050565b60008060408385031215610881578081fd5b61088a83610837565b915061089860208401610837565b90509250929050565b600080600080608085870312156108b6578182fd5b6108bf85610837565b93506108cd60208601610837565b93969395505050506040820135916060013590565b6000602082840312156108f3578081fd5b81518015158114610868578182fd5b600060208284031215610913578081fd5b5035919050565b60006020828403121561092b578081fd5b5051919050565b600080600080600060808688031215610949578081fd5b8535945061095960208701610837565b935060408601359250606086013567ffffffffffffffff8082111561097c578283fd5b818801915088601f83011261098f578283fd5b81358181111561099d578384fd5b89602080830285010111156109b0578384fd5b9699959850939650602001949392505050565b918252602082015260400190565b60008251815b818110156109f157602081860181015185830152016109d7565b818111156109ff5782828501525b509190910192915050565b92835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b60208082526018908201527f417374726f64726f703a20496e76616c69642070726f6f660000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526028908201527f4d65726b6c654469737472696275746f723a2044726f7020616c72656164792060408201526731b630b4b6b2b21760c11b606082015260800190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260169082015275105cdd1c9bd91c9bdc0e88139bdd08195e1c1a5c995960521b604082015260600190565b602080825260169082015275105cdd1c9bd91c9bdc0e88125b9a5d1a585b1a5e995960521b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604082015260600190565b9283526001600160a01b03919091166020830152604082015260600190565b600082610cb157610cb1610cf1565b500490565b6000600019821415610cd657634e487b7160e01b81526011600452602481fd5b5060010190565b600082610cec57610cec610cf1565b500690565b634e487b7160e01b600052601260045260246000fdfea264697066735822122088605c3d702e1a656780d37ef4452c82cba501ccd36b34f9eeac0ad7fd77847564736f6c63430008010033

Deployed Bytecode Sourcemap

9405:2237:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9566:23;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;9736:351;;;;;;:::i;:::-;;:::i;:::-;;10692:597;;;;;;:::i;:::-;;:::i;9525:34::-;;;:::i;:::-;;;;;;;:::i;9596:30::-;;;:::i;1513:140::-;;;:::i;702:79::-;;;:::i;:::-;;;;;;;:::i;1068:94::-;;;:::i;10095:331::-;;;;;;:::i;:::-;;:::i;11297:342::-;;;;;;:::i;:::-;;:::i;9679:48::-;;;;;;:::i;:::-;;:::i;1808:109::-;;;;;;:::i;:::-;;:::i;9489:29::-;;;:::i;9566:23::-;;;;;;:::o;9736:351::-;9858:11;;;;9857:12;9849:47;;;;-1:-1:-1;;;9849:47:0;;;;;;;:::i;:::-;;;;;;;;;9907:11;:18;;9921:4;-1:-1:-1;;9907:18:0;;;;;;;;9938:14;;-1:-1:-1;;;;;;9938:14:0;-1:-1:-1;;;;;9938:14:0;;;;;-1:-1:-1;9963:24:0;;;9998:15;:34;;;10053:26;10072:6;10053:18;:26::i;:::-;9736:351;;;;:::o;10692:597::-;10825:16;10835:5;10825:9;:16::i;:::-;10824:17;10816:70;;;;-1:-1:-1;;;10816:70:0;;;;;;;:::i;:::-;10936:12;10978:5;10985:7;10994:6;10961:40;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;10951:51;;;;;;10936:66;;11021:49;11040:11;;11021:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11053:10:0;;;-1:-1:-1;11065:4:0;;-1:-1:-1;11021:18:0;:49::i;:::-;11013:86;;;;-1:-1:-1;;;11013:86:0;;;;;;;:::i;:::-;11160:18;11172:5;11160:11;:18::i;:::-;11196:5;;11189:43;;-1:-1:-1;;;;;11196:5:0;11216:7;11225:6;11189:26;:43::i;:::-;11250:31;11258:5;11265:7;11274:6;11250:31;;;;;;;;:::i;:::-;;;;;;;;10692:597;;;;;;:::o;9525:34::-;;;;:::o;9596:30::-;;;;:::o;1513:140::-;914:9;:7;:9::i;:::-;906:54;;;;-1:-1:-1;;;906:54:0;;;;;;;:::i;:::-;1612:1:::1;1596:6:::0;;1575:40:::1;::::0;-1:-1:-1;;;;;1596:6:0;;::::1;::::0;1575:40:::1;::::0;1612:1;;1575:40:::1;1643:1;1626:19:::0;;-1:-1:-1;;;;;;1626:19:0::1;::::0;;1513:140::o;702:79::-;740:7;767:6;-1:-1:-1;;;;;767:6:0;702:79;:::o;1068:94::-;1108:4;1148:6;;-1:-1:-1;;;;;1148:6:0;1132:12;:10;:12::i;:::-;-1:-1:-1;;;;;1132:22:0;;1125:29;;1068:94;:::o;10095:331::-;10159:4;;10203:11;10211:3;10203:5;:11;:::i;:::-;10176:38;-1:-1:-1;10225:23:0;10251:11;10259:3;10251:5;:11;:::i;:::-;10273:19;10295:31;;;:13;:31;;;;;;;10353:1;:20;;;10392:18;;;:26;;;;-1:-1:-1;;10095:331:0;;;;:::o;11297:342::-;914:9;:7;:9::i;:::-;906:54;;;;-1:-1:-1;;;906:54:0;;;;;;;:::i;:::-;11401:15:::1;;11382;:34;;:53;;;-1:-1:-1::0;11430:5:0::1;::::0;-1:-1:-1;;;;;11420:15:0;;::::1;11430:5:::0;::::1;11420:15;;11382:53;11374:88;;;;-1:-1:-1::0;;;11374:88:0::1;;;;;;;:::i;:::-;11539:38;::::0;-1:-1:-1;;;11539:38:0;;11503:6;;11473:20:::1;::::0;-1:-1:-1;;;;;11539:23:0;::::1;::::0;::::1;::::0;:38:::1;::::0;11571:4:::1;::::0;11539:38:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;11521:56:::0;-1:-1:-1;11588:43:0::1;-1:-1:-1::0;;;;;11588:26:0;::::1;11615:6:::0;11521:56;11588:26:::1;:43::i;9679:48::-:0;;;;;;;;;;;;;:::o;1808:109::-;914:9;:7;:9::i;:::-;906:54;;;;-1:-1:-1;;;906:54:0;;;;;;;:::i;:::-;1881:28:::1;1900:8;1881:18;:28::i;:::-;1808:109:::0;:::o;9489:29::-;;;-1:-1:-1;;;;;9489:29:0;;:::o;2023:229::-;-1:-1:-1;;;;;2097:22:0;;2089:73;;;;-1:-1:-1;;;2089:73:0;;;;;;;:::i;:::-;2199:6;;;2178:38;;-1:-1:-1;;;;;2178:38:0;;;;2199:6;;;2178:38;;;2227:6;:17;;-1:-1:-1;;;;;;2227:17:0;-1:-1:-1;;;;;2227:17:0;;;;;;;;;;2023:229::o;4643:796::-;4734:4;4774;4734;4791:525;4815:5;:12;4811:1;:16;4791:525;;;4849:20;4872:5;4878:1;4872:8;;;;;;-1:-1:-1;;;4872:8:0;;;;;;;;;;;;;;;4849:31;;4917:12;4901;:28;4897:408;;5071:12;5085;5054:44;;;;;;;;;:::i;:::-;;;;;;;;;;;;;5044:55;;;;;;5029:70;;4897:408;;;5261:12;5275;5244:44;;;;;;;;;:::i;:::-;;;;;;;;;;;;;5234:55;;;;;;5219:70;;4897:408;-1:-1:-1;4829:3:0;;;;:::i;:::-;;;;4791:525;;;-1:-1:-1;5411:20:0;;;;4643:796;-1:-1:-1;;;4643:796:0:o;10434:250::-;10489:24;10516:11;10524:3;10516:5;:11;:::i;:::-;10489:38;-1:-1:-1;10538:23:0;10564:11;10572:3;10564:5;:11;:::i;:::-;10620:31;;;;:13;:31;;;;;;;;10655:1;:20;;;10620:56;;;10586:90;;;-1:-1:-1;;10434:250:0:o;6922:176::-;7005:85;7024:5;7054:23;;;7079:2;7083:5;7031:58;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;7031:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;7031:58:0;-1:-1:-1;;;;;;7031:58:0;;;;;;;;;;7005:18;:85::i;:::-;6922:176;;;:::o;112:98::-;192:10;112:98;:::o;7489:1114::-;8093:27;8101:5;-1:-1:-1;;;;;8093:25:0;;:27::i;:::-;8085:71;;;;-1:-1:-1;;;8085:71:0;;;;;;;:::i;:::-;8230:12;8244:23;8279:5;-1:-1:-1;;;;;8271:19:0;8291:4;8271:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8229:67;;;;8315:7;8307:52;;;;-1:-1:-1;;;8307:52:0;;;;;;;:::i;:::-;8376:17;;:21;8372:224;;8518:10;8507:30;;;;;;;;;;;;:::i;:::-;8499:85;;;;-1:-1:-1;;;8499:85:0;;;;;;;:::i;6432:422::-;6799:20;6838:8;;;6432:422::o;14:175:1:-;84:20;;-1:-1:-1;;;;;133:31:1;;123:42;;113:2;;179:1;176;169:12;194:198;;306:2;294:9;285:7;281:23;277:32;274:2;;;327:6;319;312:22;274:2;355:31;376:9;355:31;:::i;:::-;345:41;264:128;-1:-1:-1;;;264:128:1:o;397:274::-;;;526:2;514:9;505:7;501:23;497:32;494:2;;;547:6;539;532:22;494:2;575:31;596:9;575:31;:::i;:::-;565:41;;625:40;661:2;650:9;646:18;625:40;:::i;:::-;615:50;;484:187;;;;;:::o;676:411::-;;;;;839:3;827:9;818:7;814:23;810:33;807:2;;;861:6;853;846:22;807:2;889:31;910:9;889:31;:::i;:::-;879:41;;939:40;975:2;964:9;960:18;939:40;:::i;:::-;797:290;;929:50;;-1:-1:-1;;;;1026:2:1;1011:18;;998:32;;1077:2;1062:18;1049:32;;797:290::o;1092:297::-;;1212:2;1200:9;1191:7;1187:23;1183:32;1180:2;;;1233:6;1225;1218:22;1180:2;1270:9;1264:16;1323:5;1316:13;1309:21;1302:5;1299:32;1289:2;;1350:6;1342;1335:22;1394:190;;1506:2;1494:9;1485:7;1481:23;1477:32;1474:2;;;1527:6;1519;1512:22;1474:2;-1:-1:-1;1555:23:1;;1464:120;-1:-1:-1;1464:120:1:o;1589:194::-;;1712:2;1700:9;1691:7;1687:23;1683:32;1680:2;;;1733:6;1725;1718:22;1680:2;-1:-1:-1;1761:16:1;;1670:113;-1:-1:-1;1670:113:1:o;1788:879::-;;;;;;1986:3;1974:9;1965:7;1961:23;1957:33;1954:2;;;2008:6;2000;1993:22;1954:2;2049:9;2036:23;2026:33;;2078:40;2114:2;2103:9;2099:18;2078:40;:::i;:::-;2068:50;;2165:2;2154:9;2150:18;2137:32;2127:42;;2220:2;2209:9;2205:18;2192:32;2243:18;2284:2;2276:6;2273:14;2270:2;;;2305:6;2297;2290:22;2270:2;2348:6;2337:9;2333:22;2323:32;;2393:7;2386:4;2382:2;2378:13;2374:27;2364:2;;2420:6;2412;2405:22;2364:2;2465;2452:16;2491:2;2483:6;2480:14;2477:2;;;2512:6;2504;2497:22;2477:2;2571:7;2566:2;2560;2552:6;2548:15;2544:2;2540:24;2536:33;2533:46;2530:2;;;2597:6;2589;2582:22;2530:2;1944:723;;;;-1:-1:-1;1944:723:1;;-1:-1:-1;2633:2:1;2625:11;;2655:6;1944:723;-1:-1:-1;;;1944:723:1:o;2672:247::-;2829:19;;;2873:2;2864:12;;2857:28;2910:2;2901:12;;2819:100::o;2924:430::-;;3091:6;3085:13;3116:3;3128:129;3142:6;3139:1;3136:13;3128:129;;;3240:4;3224:14;;;3220:25;;3214:32;3201:11;;;3194:53;3157:12;3128:129;;;3275:6;3272:1;3269:13;3266:2;;;3310:3;3301:6;3296:3;3292:16;3285:29;3266:2;-1:-1:-1;3332:16:1;;;;;3061:293;-1:-1:-1;;3061:293:1:o;3359:359::-;3544:19;;;3601:2;3597:15;;;;-1:-1:-1;;3593:53:1;3588:2;3579:12;;3572:75;3672:2;3663:12;;3656:28;3709:2;3700:12;;3534:184::o;3723:203::-;-1:-1:-1;;;;;3887:32:1;;;;3869:51;;3857:2;3842:18;;3824:102::o;3931:274::-;-1:-1:-1;;;;;4123:32:1;;;;4105:51;;4187:2;4172:18;;4165:34;4093:2;4078:18;;4060:145::o;4210:187::-;4375:14;;4368:22;4350:41;;4338:2;4323:18;;4305:92::o;4402:177::-;4548:25;;;4536:2;4521:18;;4503:76::o;4584:348::-;4786:2;4768:21;;;4825:2;4805:18;;;4798:30;4864:26;4859:2;4844:18;;4837:54;4923:2;4908:18;;4758:174::o;4937:402::-;5139:2;5121:21;;;5178:2;5158:18;;;5151:30;5217:34;5212:2;5197:18;;5190:62;-1:-1:-1;;;5283:2:1;5268:18;;5261:36;5329:3;5314:19;;5111:228::o;5344:404::-;5546:2;5528:21;;;5585:2;5565:18;;;5558:30;5624:34;5619:2;5604:18;;5597:62;-1:-1:-1;;;5690:2:1;5675:18;;5668:38;5738:3;5723:19;;5518:230::o;5753:356::-;5955:2;5937:21;;;5974:18;;;5967:30;6033:34;6028:2;6013:18;;6006:62;6100:2;6085:18;;5927:182::o;6114:356::-;6316:2;6298:21;;;6335:18;;;6328:30;6394:34;6389:2;6374:18;;6367:62;6461:2;6446:18;;6288:182::o;6475:346::-;6677:2;6659:21;;;6716:2;6696:18;;;6689:30;-1:-1:-1;;;6750:2:1;6735:18;;6728:52;6812:2;6797:18;;6649:172::o;6826:346::-;7028:2;7010:21;;;7067:2;7047:18;;;7040:30;-1:-1:-1;;;7101:2:1;7086:18;;7079:52;7163:2;7148:18;;7000:172::o;7177:406::-;7379:2;7361:21;;;7418:2;7398:18;;;7391:30;7457:34;7452:2;7437:18;;7430:62;-1:-1:-1;;;7523:2:1;7508:18;;7501:40;7573:3;7558:19;;7351:232::o;7588:355::-;7790:2;7772:21;;;7829:2;7809:18;;;7802:30;7868:33;7863:2;7848:18;;7841:61;7934:2;7919:18;;7762:181::o;8130:345::-;8332:25;;;-1:-1:-1;;;;;8393:32:1;;;;8388:2;8373:18;;8366:60;8457:2;8442:18;;8435:34;8320:2;8305:18;;8287:188::o;8480:120::-;;8546:1;8536:2;;8551:18;;:::i;:::-;-1:-1:-1;8585:9:1;;8526:74::o;8605:236::-;;-1:-1:-1;;8665:17:1;;8662:2;;;-1:-1:-1;;;8705:33:1;;8761:4;8758:1;8751:15;8791:4;8712:3;8779:17;8662:2;-1:-1:-1;8833:1:1;8822:13;;8652:189::o;8846:112::-;;8904:1;8894:2;;8909:18;;:::i;:::-;-1:-1:-1;8943:9:1;;8884:74::o;8963:127::-;9024:10;9019:3;9015:20;9012:1;9005:31;9055:4;9052:1;9045:15;9079:4;9076:1;9069:15

Swarm Source

ipfs://88605c3d702e1a656780d37ef4452c82cba501ccd36b34f9eeac0ad7fd778475

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.