false
false

Contract Address Details

0x89CaC08fF462C991bc2f05608Bc692C946Cc1041

Contract Name
AirdropFactory
Creator
0xd57d84–53a139 at 0xcb79c2–2888f1
Balance
0 SYS ( )
Tokens
Fetching tokens...
Transactions
13 Transactions
Transfers
0 Transfers
Gas Used
6,064,419
Last Balance Update
793293
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:
AirdropFactory




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




Optimization runs
200
EVM Version
shanghai




Verified at
2024-02-16T01:43:47.382526Z

tests/contracts/airdropFactory.sol

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

import { IERC20 } from './interface/IERC20.sol';
import { Airdrop } from './airdrop.sol';

contract AirdropFactory {
    address public owner;

    Airdrop[] public airdrop;

    modifier onlyOwner() {
        require(msg.sender == owner, "Only owner can call this function");
        _;
    }

    constructor() {
        owner = msg.sender;
    }

    function createAirdrop(address _token, bytes32 _merkleRoot, uint256 _amount) public onlyOwner() {
        Airdrop airdropContract = new Airdrop(_token, owner, _merkleRoot);
        if (_amount > 0) {
            IERC20(_token).transferFrom(msg.sender, address(airdropContract), _amount);
        }
        airdrop.push(airdropContract);
    }

    function multipleAirdrop(address[] memory _token, bytes32[] memory _merkleRoot, uint256[] memory _amounts) public onlyOwner() {
        require(_token.length == _merkleRoot.length && _merkleRoot.length == _amounts.length, "Invalid input");
        for (uint256 i = 0; i < _token.length; i++) {
            createAirdrop(_token[i], _merkleRoot[i], _amounts[i]);
        }
    }
    
}
        

/tests/contracts/library/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)
        }
    }
}
          

/tests/contracts/interface/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 ERC-20 standard as defined in the ERC.
 */
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);
}
          

/tests/contracts/airdrop.sol

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

import { IERC20 } from './interface/IERC20.sol';
import { MerkleProof } from './library/MerkleProof.sol';


contract Airdrop {

  IERC20 public token;
  bytes32 public merkleRoot;
  address public owner;


  mapping(address => bool) public claimers;


  event Claim(address indexed to, uint256 amount);


  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  constructor(address _token, address _owner, bytes32 _merkleRoot) {
    token = IERC20(_token);
    merkleRoot= _merkleRoot;
    owner = _owner;
  }

  function isValidLeaf(address to, uint256 amount, bytes32[] calldata proof) public view returns (bool) {
    bytes32 leaf = keccak256(abi.encodePacked(to, amount));
    return MerkleProof.verify(proof, merkleRoot, leaf);
  }

  function claim(address to, uint256 amount, bytes32[] calldata proof) external {
    require(!claimers[to], 'already claimed');
    require(isValidLeaf(to, amount, proof), 'not whitelisted');

    claimers[to] = true;

    token.transfer(to, amount);

    emit Claim(to, amount);
  }

  function protocolFallback(uint256 amount) public onlyOwner() {
    token.transfer(owner, amount);
  }

  function updateRoot(bytes32 _merkleRoot) public onlyOwner() {
    merkleRoot = _merkleRoot;
  }

}
          

Compiler Settings

{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"shanghai","compilationTarget":{"tests/contracts/airdropFactory.sol":"AirdropFactory"}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract Airdrop"}],"name":"airdrop","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"createAirdrop","inputs":[{"type":"address","name":"_token","internalType":"address"},{"type":"bytes32","name":"_merkleRoot","internalType":"bytes32"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"multipleAirdrop","inputs":[{"type":"address[]","name":"_token","internalType":"address[]"},{"type":"bytes32[]","name":"_merkleRoot","internalType":"bytes32[]"},{"type":"uint256[]","name":"_amounts","internalType":"uint256[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]}]
              

Contract Creation Code

0x608060405234801561000f575f80fd5b505f80546001600160a01b03191633179055610ce28061002e5f395ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c80631f4edd471461004e5780638da5cb5b1461006357806397dc4a1314610091578063e8f01f26146100a4575b5f80fd5b61006161005c366004610421565b6100b7565b005b5f54610075906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b61007561009f3660046104fd565b6101b0565b6100616100b2366004610514565b6101d8565b5f546001600160a01b031633146100e95760405162461bcd60e51b81526004016100e090610544565b60405180910390fd5b815183511480156100fb575080518251145b6101375760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016100e0565b5f5b83518110156101aa5761019884828151811061015757610157610585565b602002602001015184838151811061017157610171610585565b602002602001015184848151811061018b5761018b610585565b60200260200101516101d8565b806101a281610599565b915050610139565b50505050565b600181815481106101bf575f80fd5b5f918252602090912001546001600160a01b0316905081565b5f546001600160a01b031633146102015760405162461bcd60e51b81526004016100e090610544565b5f805460405185916001600160a01b031690859061021e90610329565b6001600160a01b0393841681529290911660208301526040820152606001604051809103905ff080158015610255573d5f803e3d5ffd5b50905081156102d6576040516323b872dd60e01b81523360048201526001600160a01b038281166024830152604482018490528516906323b872dd906064016020604051808303815f875af11580156102b0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102d491906105bd565b505b6001805480820182555f919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0392909216919091179055505050565b6106c9806105e483390190565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561037357610373610336565b604052919050565b5f67ffffffffffffffff82111561039457610394610336565b5060051b60200190565b80356001600160a01b03811681146103b4575f80fd5b919050565b5f82601f8301126103c8575f80fd5b813560206103dd6103d88361037b565b61034a565b82815260059290921b840181019181810190868411156103fb575f80fd5b8286015b8481101561041657803583529183019183016103ff565b509695505050505050565b5f805f60608486031215610433575f80fd5b833567ffffffffffffffff8082111561044a575f80fd5b818601915086601f83011261045d575f80fd5b8135602061046d6103d88361037b565b82815260059290921b8401810191818101908a84111561048b575f80fd5b948201945b838610156104b0576104a18661039e565b82529482019490820190610490565b975050870135925050808211156104c5575f80fd5b6104d1878388016103b9565b935060408601359150808211156104e6575f80fd5b506104f3868287016103b9565b9150509250925092565b5f6020828403121561050d575f80fd5b5035919050565b5f805f60608486031215610526575f80fd5b61052f8461039e565b95602085013595506040909401359392505050565b60208082526021908201527f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f6040820152603760f91b606082015260800190565b634e487b7160e01b5f52603260045260245ffd5b5f600182016105b657634e487b7160e01b5f52601160045260245ffd5b5060010190565b5f602082840312156105cd575f80fd5b815180151581146105dc575f80fd5b939250505056fe608060405234801561000f575f80fd5b506040516106c93803806106c983398101604081905261002e9161007f565b5f80546001600160a01b039485166001600160a01b031991821617909155600191909155600280549290931691161790556100b8565b80516001600160a01b038116811461007a575f80fd5b919050565b5f805f60608486031215610091575f80fd5b61009a84610064565b92506100a860208501610064565b9150604084015190509250925092565b610604806100c55f395ff3fe608060405234801561000f575f80fd5b5060043610610085575f3560e01c806363c375d01161005857806363c375d0146100f05780638da5cb5b14610103578063da62fba91461012e578063fc0c546a14610150575f80fd5b806321ff9970146100895780632eb4a7ab1461009e5780633d13f874146100ba578063564bec64146100cd575b5f80fd5b61009c6100973660046104a9565b610162565b005b6100a760015481565b6040519081526020015b60405180910390f35b61009c6100c83660046104db565b61017d565b6100e06100db3660046104db565b6102fe565b60405190151581526020016100b1565b61009c6100fe3660046104a9565b61038a565b600254610116906001600160a01b031681565b6040516001600160a01b0390911681526020016100b1565b6100e061013c36600461055e565b60036020525f908152604090205460ff1681565b5f54610116906001600160a01b031681565b6002546001600160a01b03163314610178575f80fd5b600155565b6001600160a01b0384165f9081526003602052604090205460ff16156101dc5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b60448201526064015b60405180910390fd5b6101e8848484846102fe565b6102265760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081dda1a5d195b1a5cdd1959608a1b60448201526064016101d3565b6001600160a01b038481165f81815260036020526040808220805460ff191660011790559054905163a9059cbb60e01b81526004810192909252602482018690529091169063a9059cbb906044016020604051808303815f875af1158015610290573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102b49190610577565b50836001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4846040516102f091815260200190565b60405180910390a250505050565b6040516bffffffffffffffffffffffff19606086901b166020820152603481018490525f9081906054016040516020818303038152906040528051906020012090506103808484808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506001549150849050610419565b9695505050505050565b6002546001600160a01b031633146103a0575f80fd5b5f5460025460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303815f875af11580156103f1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104159190610577565b5050565b5f82610425858461042e565b14949350505050565b5f81815b84518110156104725761045e8286838151811061045157610451610596565b602002602001015161047a565b91508061046a816105aa565b915050610432565b509392505050565b5f818310610494575f8281526020849052604090206104a2565b5f8381526020839052604090205b9392505050565b5f602082840312156104b9575f80fd5b5035919050565b80356001600160a01b03811681146104d6575f80fd5b919050565b5f805f80606085870312156104ee575f80fd5b6104f7856104c0565b935060208501359250604085013567ffffffffffffffff8082111561051a575f80fd5b818701915087601f83011261052d575f80fd5b81358181111561053b575f80fd5b8860208260051b850101111561054f575f80fd5b95989497505060200194505050565b5f6020828403121561056e575f80fd5b6104a2826104c0565b5f60208284031215610587575f80fd5b815180151581146104a2575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f600182016105c757634e487b7160e01b5f52601160045260245ffd5b506001019056fea2646970667358221220bf4fb6f62286e827f3b3cedc0cd61581112f08f74187ad02c1fb5bb1df310c2764736f6c63430008140033a2646970667358221220433e465666c3540b4d36c8f6ae8c473620f255a7cbb815fd8f322fad625e221264736f6c63430008140033

Deployed ByteCode

0x608060405234801561000f575f80fd5b506004361061004a575f3560e01c80631f4edd471461004e5780638da5cb5b1461006357806397dc4a1314610091578063e8f01f26146100a4575b5f80fd5b61006161005c366004610421565b6100b7565b005b5f54610075906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b61007561009f3660046104fd565b6101b0565b6100616100b2366004610514565b6101d8565b5f546001600160a01b031633146100e95760405162461bcd60e51b81526004016100e090610544565b60405180910390fd5b815183511480156100fb575080518251145b6101375760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016100e0565b5f5b83518110156101aa5761019884828151811061015757610157610585565b602002602001015184838151811061017157610171610585565b602002602001015184848151811061018b5761018b610585565b60200260200101516101d8565b806101a281610599565b915050610139565b50505050565b600181815481106101bf575f80fd5b5f918252602090912001546001600160a01b0316905081565b5f546001600160a01b031633146102015760405162461bcd60e51b81526004016100e090610544565b5f805460405185916001600160a01b031690859061021e90610329565b6001600160a01b0393841681529290911660208301526040820152606001604051809103905ff080158015610255573d5f803e3d5ffd5b50905081156102d6576040516323b872dd60e01b81523360048201526001600160a01b038281166024830152604482018490528516906323b872dd906064016020604051808303815f875af11580156102b0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102d491906105bd565b505b6001805480820182555f919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0392909216919091179055505050565b6106c9806105e483390190565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561037357610373610336565b604052919050565b5f67ffffffffffffffff82111561039457610394610336565b5060051b60200190565b80356001600160a01b03811681146103b4575f80fd5b919050565b5f82601f8301126103c8575f80fd5b813560206103dd6103d88361037b565b61034a565b82815260059290921b840181019181810190868411156103fb575f80fd5b8286015b8481101561041657803583529183019183016103ff565b509695505050505050565b5f805f60608486031215610433575f80fd5b833567ffffffffffffffff8082111561044a575f80fd5b818601915086601f83011261045d575f80fd5b8135602061046d6103d88361037b565b82815260059290921b8401810191818101908a84111561048b575f80fd5b948201945b838610156104b0576104a18661039e565b82529482019490820190610490565b975050870135925050808211156104c5575f80fd5b6104d1878388016103b9565b935060408601359150808211156104e6575f80fd5b506104f3868287016103b9565b9150509250925092565b5f6020828403121561050d575f80fd5b5035919050565b5f805f60608486031215610526575f80fd5b61052f8461039e565b95602085013595506040909401359392505050565b60208082526021908201527f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f6040820152603760f91b606082015260800190565b634e487b7160e01b5f52603260045260245ffd5b5f600182016105b657634e487b7160e01b5f52601160045260245ffd5b5060010190565b5f602082840312156105cd575f80fd5b815180151581146105dc575f80fd5b939250505056fe608060405234801561000f575f80fd5b506040516106c93803806106c983398101604081905261002e9161007f565b5f80546001600160a01b039485166001600160a01b031991821617909155600191909155600280549290931691161790556100b8565b80516001600160a01b038116811461007a575f80fd5b919050565b5f805f60608486031215610091575f80fd5b61009a84610064565b92506100a860208501610064565b9150604084015190509250925092565b610604806100c55f395ff3fe608060405234801561000f575f80fd5b5060043610610085575f3560e01c806363c375d01161005857806363c375d0146100f05780638da5cb5b14610103578063da62fba91461012e578063fc0c546a14610150575f80fd5b806321ff9970146100895780632eb4a7ab1461009e5780633d13f874146100ba578063564bec64146100cd575b5f80fd5b61009c6100973660046104a9565b610162565b005b6100a760015481565b6040519081526020015b60405180910390f35b61009c6100c83660046104db565b61017d565b6100e06100db3660046104db565b6102fe565b60405190151581526020016100b1565b61009c6100fe3660046104a9565b61038a565b600254610116906001600160a01b031681565b6040516001600160a01b0390911681526020016100b1565b6100e061013c36600461055e565b60036020525f908152604090205460ff1681565b5f54610116906001600160a01b031681565b6002546001600160a01b03163314610178575f80fd5b600155565b6001600160a01b0384165f9081526003602052604090205460ff16156101dc5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b60448201526064015b60405180910390fd5b6101e8848484846102fe565b6102265760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081dda1a5d195b1a5cdd1959608a1b60448201526064016101d3565b6001600160a01b038481165f81815260036020526040808220805460ff191660011790559054905163a9059cbb60e01b81526004810192909252602482018690529091169063a9059cbb906044016020604051808303815f875af1158015610290573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102b49190610577565b50836001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4846040516102f091815260200190565b60405180910390a250505050565b6040516bffffffffffffffffffffffff19606086901b166020820152603481018490525f9081906054016040516020818303038152906040528051906020012090506103808484808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506001549150849050610419565b9695505050505050565b6002546001600160a01b031633146103a0575f80fd5b5f5460025460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303815f875af11580156103f1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104159190610577565b5050565b5f82610425858461042e565b14949350505050565b5f81815b84518110156104725761045e8286838151811061045157610451610596565b602002602001015161047a565b91508061046a816105aa565b915050610432565b509392505050565b5f818310610494575f8281526020849052604090206104a2565b5f8381526020839052604090205b9392505050565b5f602082840312156104b9575f80fd5b5035919050565b80356001600160a01b03811681146104d6575f80fd5b919050565b5f805f80606085870312156104ee575f80fd5b6104f7856104c0565b935060208501359250604085013567ffffffffffffffff8082111561051a575f80fd5b818701915087601f83011261052d575f80fd5b81358181111561053b575f80fd5b8860208260051b850101111561054f575f80fd5b95989497505060200194505050565b5f6020828403121561056e575f80fd5b6104a2826104c0565b5f60208284031215610587575f80fd5b815180151581146104a2575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f600182016105c757634e487b7160e01b5f52601160045260245ffd5b506001019056fea2646970667358221220bf4fb6f62286e827f3b3cedc0cd61581112f08f74187ad02c1fb5bb1df310c2764736f6c63430008140033a2646970667358221220433e465666c3540b4d36c8f6ae8c473620f255a7cbb815fd8f322fad625e221264736f6c63430008140033