false
false

Contract Address Details

0x6720006105df2731a4eB5BD018EF4d1889326b39

Contract Name
MerkleClaimERC20
Creator
0xd57d84–53a139 at 0xf4ef62–3f0190
Balance
0 SYS ( )
Tokens
Fetching tokens...
Transactions
12 Transactions
Transfers
6 Transfers
Gas Used
506,003
Last Balance Update
896593
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
MerkleClaimERC20




Optimization enabled
true
Compiler version
v0.8.20+commit.a1b79de6




Optimization runs
200
EVM Version
paris




Verified at
2023-11-25T06:41:26.395406Z

contracts/airdrop.sol

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.20;

/// ============ Imports ============

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // Solmate: ERC20
import { MerkleProof } from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // OZ: MerkleProof

/// @title MerkleClaimERC20
/// @notice ERC20 claimable by members of a merkle tree

contract MerkleClaimERC20 {

  /// ============ Immutable storage ============

  /// @notice ERC20-claimee inclusion root
  mapping(address => bytes32) public merkleRoots;
  address public immutable owner;
  /// ============ Mutable storage ============

  /// @notice Mapping of addresses who have claimed tokens
  mapping(address => mapping(address => bool)) public hasClaimed;

  /// ============ Errors ============

  /// @notice Thrown if address has already claimed
  error AlreadyClaimed();
  /// @notice Thrown if address/amount are not part of Merkle tree
  error NotInMerkle();

  /// ============ Constructor ============

  /// @notice Creates a new MerkleClaimERC20 contract for already existing ERC20
  /// @param _tokenAddresses of claimable tokens
  /// @param _merkleRoots of claimees
  constructor(
    address[]  memory _tokenAddresses,
    bytes32[] memory _merkleRoots
  ) {
    require(_tokenAddresses.length == _merkleRoots.length , "Need as many merkle Roots as tokens");
    owner = msg.sender;
    for (uint8 i =0; i< _tokenAddresses.length; i++){
        merkleRoots[_tokenAddresses[i]] = _merkleRoots[i]; // Update root 
    }
    
  }

  /// ============ Events ============

  /// @notice Emitted after a successful token claim
  /// @param to recipient of claim
  /// @param amount of tokens claimed
  event Claim(address indexed to, uint256 amount);

  /// ============ Functions ============

  /// @notice Allows claiming tokens if address is part of merkle tree
  /// @param to address of claimee
  /// @param amount of tokens owed to claimee
  /// @param proof merkle proof to prove address and amount are in tree
  function claim(address token, address to, uint256 amount, bytes32[] calldata proof) external {
    // Throw if address has already claimed tokens
    if (hasClaimed[token][to]) revert AlreadyClaimed();

    // Verify merkle proof, or revert if not in tree
    bytes32 leaf = keccak256(abi.encodePacked(to, amount));
    bool isValidLeaf = MerkleProof.verify(proof, merkleRoots[token], leaf);
    if (!isValidLeaf) revert NotInMerkle();

    // Set address to claimed
    hasClaimed[token][to] = true;

    // Send tokens to address
    IERC20(token).transfer(to, amount);

    // Emit claim event
    emit Claim(to, amount);
  }

  function protocolFallback(IERC20 token, uint256 amount) external {
    require(msg.sender == owner);
    // Send tokens back to owner
    token.transfer(owner, amount);
  }

  function setRoot(address[]  memory _tokenAddresses, bytes32[] memory _merkleRoots) external {
    require(msg.sender == owner);
    require(_tokenAddresses.length == _merkleRoots.length , "Need as many merkle Roots as tokens");
    for (uint8 i =0; i< _tokenAddresses.length; i++){
      merkleRoots[_tokenAddresses[i]] = _merkleRoots[i]; // Update root
    }
  }
}
        

/contracts/utils/cryptography/MerkleProof.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.20;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @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) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Sorts the pair (a, b) and hashes the result.
     */
    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}
          

/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

Compiler Settings

{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"paris","compilationTarget":{"contracts/airdrop.sol":"MerkleClaimERC20"}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address[]","name":"_tokenAddresses","internalType":"address[]"},{"type":"bytes32[]","name":"_merkleRoots","internalType":"bytes32[]"}]},{"type":"error","name":"AlreadyClaimed","inputs":[]},{"type":"error","name":"NotInMerkle","inputs":[]},{"type":"event","name":"Claim","inputs":[{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"bytes32[]","name":"proof","internalType":"bytes32[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasClaimed","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"merkleRoots","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"protocolFallback","inputs":[{"type":"address","name":"token","internalType":"contract IERC20"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRoot","inputs":[{"type":"address[]","name":"_tokenAddresses","internalType":"address[]"},{"type":"bytes32[]","name":"_merkleRoots","internalType":"bytes32[]"}]}]
              

Contract Creation Code

0x60a06040523480156200001157600080fd5b5060405162000ca838038062000ca8833981016040819052620000349162000212565b8051825114620000965760405162461bcd60e51b815260206004820152602360248201527f4e656564206173206d616e79206d65726b6c6520526f6f747320617320746f6b604482015262656e7360e81b606482015260840160405180910390fd5b3360805260005b82518160ff1610156200012757818160ff1681518110620000c257620000c2620002f0565b6020026020010151600080858460ff1681518110620000e557620000e5620002f0565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555080806200011e9062000306565b9150506200009d565b50505062000334565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000171576200017162000130565b604052919050565b60006001600160401b0382111562000195576200019562000130565b5060051b60200190565b600082601f830112620001b157600080fd5b81516020620001ca620001c48362000179565b62000146565b82815260059290921b84018101918181019086841115620001ea57600080fd5b8286015b84811015620002075780518352918301918301620001ee565b509695505050505050565b600080604083850312156200022657600080fd5b82516001600160401b03808211156200023e57600080fd5b818501915085601f8301126200025357600080fd5b8151602062000266620001c48362000179565b82815260059290921b840181019181810190898411156200028657600080fd5b948201945b83861015620002bd5785516001600160a01b0381168114620002ad5760008081fd5b825294820194908201906200028b565b91880151919650909350505080821115620002d757600080fd5b50620002e6858286016200019f565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff81036200032b57634e487b7160e01b600052601160045260246000fd5b60010192915050565b608051610944620003646000396000818160c40152818161015d0152818161027b01526102bc01526109446000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063816a04501461006757806389266f601461007c5780638da5cb5b146100bf578063a7537986146100fe578063ae9a680814610111578063fabed4121461013f575b600080fd5b61007a6100753660046106a2565b610152565b005b6100aa61008a366004610764565b600160209081526000928352604080842090915290825290205460ff1681565b60405190151581526020015b60405180910390f35b6100e67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b6565b61007a61010c36600461079d565b610270565b61013161011f3660046107c9565b60006020819052908152604090205481565b6040519081526020016100b6565b61007a61014d3660046107e6565b610338565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461018757600080fd5b80518251146101e85760405162461bcd60e51b815260206004820152602360248201527f4e656564206173206d616e79206d65726b6c6520526f6f747320617320746f6b604482015262656e7360e81b606482015260840160405180910390fd5b60005b82518160ff16101561026b57818160ff168151811061020c5761020c610888565b6020026020010151600080858460ff168151811061022c5761022c610888565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610263906108b4565b9150506101eb565b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102a557600080fd5b60405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820183905283169063a9059cbb906044016020604051808303816000875af1158015610314573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026b91906108d3565b6001600160a01b0380861660009081526001602090815260408083209388168352929052205460ff161561037f57604051630c8d9eab60e31b815260040160405180910390fd5b6040516bffffffffffffffffffffffff19606086901b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050600061041684848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052506001600160a01b038d16815260208190526040902054925086915061051f9050565b9050806104365760405163452c2df160e11b815260040160405180910390fd5b6001600160a01b038781166000818152600160208181526040808420958c168085529590915291829020805460ff191690911790555163a9059cbb60e01b81526004810192909252602482018790529063a9059cbb906044016020604051808303816000875af11580156104ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d291906108d3565b50856001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d48660405161050e91815260200190565b60405180910390a250505050505050565b60008261052c8584610535565b14949350505050565b600081815b845181101561057a576105668286838151811061055957610559610888565b6020026020010151610582565b915080610572816108f5565b91505061053a565b509392505050565b600081831061059e5760008281526020849052604090206105ad565b60008381526020839052604090205b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156105f3576105f36105b4565b604052919050565b600067ffffffffffffffff821115610615576106156105b4565b5060051b60200190565b6001600160a01b038116811461063457600080fd5b50565b600082601f83011261064857600080fd5b8135602061065d610658836105fb565b6105ca565b82815260059290921b8401810191818101908684111561067c57600080fd5b8286015b848110156106975780358352918301918301610680565b509695505050505050565b600080604083850312156106b557600080fd5b823567ffffffffffffffff808211156106cd57600080fd5b818501915085601f8301126106e157600080fd5b813560206106f1610658836105fb565b82815260059290921b8401810191818101908984111561071057600080fd5b948201945b838610156107375785356107288161061f565b82529482019490820190610715565b9650508601359250508082111561074d57600080fd5b5061075a85828601610637565b9150509250929050565b6000806040838503121561077757600080fd5b82356107828161061f565b915060208301356107928161061f565b809150509250929050565b600080604083850312156107b057600080fd5b82356107bb8161061f565b946020939093013593505050565b6000602082840312156107db57600080fd5b81356105ad8161061f565b6000806000806000608086880312156107fe57600080fd5b85356108098161061f565b945060208601356108198161061f565b935060408601359250606086013567ffffffffffffffff8082111561083d57600080fd5b818801915088601f83011261085157600080fd5b81358181111561086057600080fd5b8960208260051b850101111561087557600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff81036108ca576108ca61089e565b60010192915050565b6000602082840312156108e557600080fd5b815180151581146105ad57600080fd5b6000600182016109075761090761089e565b506001019056fea2646970667358221220240f445f1b52d6bfe2c21610e1cabe05f402524dc77078b13e282ec62a57c16664736f6c634300081400330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000002f09cba262e39bd18dcfdaa1d59c284079ac40930000000000000000000000000000000000000000000000000000000000000001cbb96036782eea112d8a3811cbc185ab6d22cecafa85543eadcd3b087a9f7a01

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063816a04501461006757806389266f601461007c5780638da5cb5b146100bf578063a7537986146100fe578063ae9a680814610111578063fabed4121461013f575b600080fd5b61007a6100753660046106a2565b610152565b005b6100aa61008a366004610764565b600160209081526000928352604080842090915290825290205460ff1681565b60405190151581526020015b60405180910390f35b6100e67f000000000000000000000000d57d84f4427e0d328a4eff63f1dfdfe86b53a13981565b6040516001600160a01b0390911681526020016100b6565b61007a61010c36600461079d565b610270565b61013161011f3660046107c9565b60006020819052908152604090205481565b6040519081526020016100b6565b61007a61014d3660046107e6565b610338565b336001600160a01b037f000000000000000000000000d57d84f4427e0d328a4eff63f1dfdfe86b53a139161461018757600080fd5b80518251146101e85760405162461bcd60e51b815260206004820152602360248201527f4e656564206173206d616e79206d65726b6c6520526f6f747320617320746f6b604482015262656e7360e81b606482015260840160405180910390fd5b60005b82518160ff16101561026b57818160ff168151811061020c5761020c610888565b6020026020010151600080858460ff168151811061022c5761022c610888565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610263906108b4565b9150506101eb565b505050565b336001600160a01b037f000000000000000000000000d57d84f4427e0d328a4eff63f1dfdfe86b53a13916146102a557600080fd5b60405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000d57d84f4427e0d328a4eff63f1dfdfe86b53a139811660048301526024820183905283169063a9059cbb906044016020604051808303816000875af1158015610314573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026b91906108d3565b6001600160a01b0380861660009081526001602090815260408083209388168352929052205460ff161561037f57604051630c8d9eab60e31b815260040160405180910390fd5b6040516bffffffffffffffffffffffff19606086901b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050600061041684848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052506001600160a01b038d16815260208190526040902054925086915061051f9050565b9050806104365760405163452c2df160e11b815260040160405180910390fd5b6001600160a01b038781166000818152600160208181526040808420958c168085529590915291829020805460ff191690911790555163a9059cbb60e01b81526004810192909252602482018790529063a9059cbb906044016020604051808303816000875af11580156104ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d291906108d3565b50856001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d48660405161050e91815260200190565b60405180910390a250505050505050565b60008261052c8584610535565b14949350505050565b600081815b845181101561057a576105668286838151811061055957610559610888565b6020026020010151610582565b915080610572816108f5565b91505061053a565b509392505050565b600081831061059e5760008281526020849052604090206105ad565b60008381526020839052604090205b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156105f3576105f36105b4565b604052919050565b600067ffffffffffffffff821115610615576106156105b4565b5060051b60200190565b6001600160a01b038116811461063457600080fd5b50565b600082601f83011261064857600080fd5b8135602061065d610658836105fb565b6105ca565b82815260059290921b8401810191818101908684111561067c57600080fd5b8286015b848110156106975780358352918301918301610680565b509695505050505050565b600080604083850312156106b557600080fd5b823567ffffffffffffffff808211156106cd57600080fd5b818501915085601f8301126106e157600080fd5b813560206106f1610658836105fb565b82815260059290921b8401810191818101908984111561071057600080fd5b948201945b838610156107375785356107288161061f565b82529482019490820190610715565b9650508601359250508082111561074d57600080fd5b5061075a85828601610637565b9150509250929050565b6000806040838503121561077757600080fd5b82356107828161061f565b915060208301356107928161061f565b809150509250929050565b600080604083850312156107b057600080fd5b82356107bb8161061f565b946020939093013593505050565b6000602082840312156107db57600080fd5b81356105ad8161061f565b6000806000806000608086880312156107fe57600080fd5b85356108098161061f565b945060208601356108198161061f565b935060408601359250606086013567ffffffffffffffff8082111561083d57600080fd5b818801915088601f83011261085157600080fd5b81358181111561086057600080fd5b8960208260051b850101111561087557600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff81036108ca576108ca61089e565b60010192915050565b6000602082840312156108e557600080fd5b815180151581146105ad57600080fd5b6000600182016109075761090761089e565b506001019056fea2646970667358221220240f445f1b52d6bfe2c21610e1cabe05f402524dc77078b13e282ec62a57c16664736f6c63430008140033