ETH Price: $2,770.10 (+5.59%)

Contract

0xEE262aDCd9Ecc0476452e302Cf3C822F634DaFAF
 
Transaction Hash
Method
Block
From
To
Claim205886672024-08-23 3:36:5919 hrs ago1724384219IN
0xEE262aDC...F634DaFAF
0 ETH0.000098641.03423141
Claim205761722024-08-21 9:42:472 days ago1724233367IN
0xEE262aDC...F634DaFAF
0 ETH0.000081231.03700098
Claim205716002024-08-20 18:24:233 days ago1724178263IN
0xEE262aDC...F634DaFAF
0 ETH0.000170541.8
Claim205678192024-08-20 5:42:113 days ago1724132531IN
0xEE262aDC...F634DaFAF
0 ETH0.000080111.03143813
Claim205676002024-08-20 4:58:233 days ago1724129903IN
0xEE262aDC...F634DaFAF
0 ETH0.000106851.12795271
Claim205672332024-08-20 3:44:353 days ago1724125475IN
0xEE262aDC...F634DaFAF
0 ETH0.000094470.99
Claim205611952024-08-19 7:30:594 days ago1724052659IN
0xEE262aDC...F634DaFAF
0 ETH0.000069551.13560987
Claim205609892024-08-19 6:49:474 days ago1724050187IN
0xEE262aDC...F634DaFAF
0 ETH0.000081811.05376719
Claim205563712024-08-18 15:20:355 days ago1723994435IN
0xEE262aDC...F634DaFAF
0 ETH0.00009711.24017454
Claim205468702024-08-17 7:31:596 days ago1723879919IN
0xEE262aDC...F634DaFAF
0 ETH0.000079790.83608433
Claim205423492024-08-16 16:20:357 days ago1723825235IN
0xEE262aDC...F634DaFAF
0 ETH0.000201983.3
Claim205408312024-08-16 11:15:477 days ago1723806947IN
0xEE262aDC...F634DaFAF
0 ETH0.00011461.89289124
Claim205347562024-08-15 14:54:238 days ago1723733663IN
0xEE262aDC...F634DaFAF
0 ETH0.000558255.85195225
Claim205327052024-08-15 8:01:598 days ago1723708919IN
0xEE262aDC...F634DaFAF
0 ETH0.000155551.98800711
Claim205253342024-08-14 7:19:479 days ago1723619987IN
0xEE262aDC...F634DaFAF
0 ETH0.000106041.1195401
Claim205228622024-08-13 23:02:5910 days ago1723590179IN
0xEE262aDC...F634DaFAF
0 ETH0.000092220.97312689
Claim205228102024-08-13 22:52:3510 days ago1723589555IN
0xEE262aDC...F634DaFAF
0 ETH0.000076390.98439514
Claim205196002024-08-13 12:07:5910 days ago1723550879IN
0xEE262aDC...F634DaFAF
0 ETH0.000117081.49511872
Claim205188612024-08-13 9:38:5910 days ago1723541939IN
0xEE262aDC...F634DaFAF
0 ETH0.00013091.67104771
Claim205167832024-08-13 2:41:3510 days ago1723516895IN
0xEE262aDC...F634DaFAF
0 ETH0.000098031.26236687
Claim205154452024-08-12 22:12:5911 days ago1723500779IN
0xEE262aDC...F634DaFAF
0 ETH0.000158331.65980937
Claim205064672024-08-11 16:09:1112 days ago1723392551IN
0xEE262aDC...F634DaFAF
0 ETH0.000146831.55012269
Claim205028982024-08-11 4:10:4712 days ago1723349447IN
0xEE262aDC...F634DaFAF
0 ETH0.00019082
Claim205025122024-08-11 2:52:5912 days ago1723344779IN
0xEE262aDC...F634DaFAF
0 ETH0.000190812
Claim205024612024-08-11 2:42:4712 days ago1723344167IN
0xEE262aDC...F634DaFAF
0 ETH0.000156622
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
205886672024-08-23 3:36:5919 hrs ago1724384219
0xEE262aDC...F634DaFAF
0 ETH
205761722024-08-21 9:42:472 days ago1724233367
0xEE262aDC...F634DaFAF
0 ETH
205716002024-08-20 18:24:233 days ago1724178263
0xEE262aDC...F634DaFAF
0 ETH
205678192024-08-20 5:42:113 days ago1724132531
0xEE262aDC...F634DaFAF
0 ETH
205676002024-08-20 4:58:233 days ago1724129903
0xEE262aDC...F634DaFAF
0 ETH
205672332024-08-20 3:44:353 days ago1724125475
0xEE262aDC...F634DaFAF
0 ETH
205611952024-08-19 7:30:594 days ago1724052659
0xEE262aDC...F634DaFAF
0 ETH
205609892024-08-19 6:49:474 days ago1724050187
0xEE262aDC...F634DaFAF
0 ETH
205563712024-08-18 15:20:355 days ago1723994435
0xEE262aDC...F634DaFAF
0 ETH
205468702024-08-17 7:31:596 days ago1723879919
0xEE262aDC...F634DaFAF
0 ETH
205423492024-08-16 16:20:357 days ago1723825235
0xEE262aDC...F634DaFAF
0 ETH
205408312024-08-16 11:15:477 days ago1723806947
0xEE262aDC...F634DaFAF
0 ETH
205347562024-08-15 14:54:238 days ago1723733663
0xEE262aDC...F634DaFAF
0 ETH
205327052024-08-15 8:01:598 days ago1723708919
0xEE262aDC...F634DaFAF
0 ETH
205253342024-08-14 7:19:479 days ago1723619987
0xEE262aDC...F634DaFAF
0 ETH
205228622024-08-13 23:02:5910 days ago1723590179
0xEE262aDC...F634DaFAF
0 ETH
205228102024-08-13 22:52:3510 days ago1723589555
0xEE262aDC...F634DaFAF
0 ETH
205196002024-08-13 12:07:5910 days ago1723550879
0xEE262aDC...F634DaFAF
0 ETH
205188612024-08-13 9:38:5910 days ago1723541939
0xEE262aDC...F634DaFAF
0 ETH
205167832024-08-13 2:41:3510 days ago1723516895
0xEE262aDC...F634DaFAF
0 ETH
205154452024-08-12 22:12:5911 days ago1723500779
0xEE262aDC...F634DaFAF
0 ETH
205064672024-08-11 16:09:1112 days ago1723392551
0xEE262aDC...F634DaFAF
0 ETH
205028982024-08-11 4:10:4712 days ago1723349447
0xEE262aDC...F634DaFAF
0 ETH
205025122024-08-11 2:52:5912 days ago1723344779
0xEE262aDC...F634DaFAF
0 ETH
205024612024-08-11 2:42:4712 days ago1723344167
0xEE262aDC...F634DaFAF
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CumulativeMerkleDrop

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion
File 1 of 7 : CumulativeMerkleDrop.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./interfaces/ICumulativeMerkleDrop.sol";


contract CumulativeMerkleDrop is Ownable, ICumulativeMerkleDrop {
    using SafeERC20 for IERC20;

    address public immutable override token;

    bytes32 public override merkleRoot;
    mapping(address => uint256) public cumulativeClaimed;

    constructor(address token_) {
        token = token_;
    }

    function setMerkleRoot(bytes32 merkleRoot_) external override onlyOwner {
        emit MerkelRootUpdated(merkleRoot, merkleRoot_);
        merkleRoot = merkleRoot_;
    }

    function claim(
        address account,
        uint256 cumulativeAmount,
        bytes32 expectedMerkleRoot,
        bytes32[] calldata merkleProof
    ) external override {
        require(merkleRoot == expectedMerkleRoot, "CMD: Merkle root was updated");

        // Verify the merkle proof
        bytes32 leaf = keccak256(abi.encodePacked(account, cumulativeAmount));
        require(_verifyAsm(merkleProof, expectedMerkleRoot, leaf), "CMD: Invalid proof");

        // Mark it claimed
        uint256 preclaimed = cumulativeClaimed[account];
        require(preclaimed < cumulativeAmount, "CMD: Nothing to claim");
        cumulativeClaimed[account] = cumulativeAmount;

        // Send the token
        unchecked {
            uint256 amount = cumulativeAmount - preclaimed;
            IERC20(token).safeTransfer(account, amount);
            emit Claimed(account, amount);
        }
    }

    // function verify(bytes32[] calldata merkleProof, bytes32 root, bytes32 leaf) public pure returns (bool) {
    //     return merkleProof.verify(root, leaf);
    // }

    // Experimental assembly optimization
    function _verifyAsm(bytes32[] calldata proof, bytes32 root, bytes32 leaf) private pure returns (bool valid) {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            let mem1 := mload(0x40)
            let mem2 := add(mem1, 0x20)
            let ptr := proof.offset

            for { let end := add(ptr, mul(0x20, proof.length)) } lt(ptr, end) { ptr := add(ptr, 0x20) } {
                let node := calldataload(ptr)

                switch lt(leaf, node)
                case 1 {
                    mstore(mem1, leaf)
                    mstore(mem2, node)
                }
                default {
                    mstore(mem1, node)
                    mstore(mem2, leaf)
                }

                leaf := keccak256(mem1, 0x40)
            }

            valid := eq(root, leaf)
        }
    }
}

File 2 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the 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 virtual onlyOwner {
        _setOwner(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 virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 7 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.6;

// Allows anyone to claim a token if they exist in a merkle root.
interface ICumulativeMerkleDrop {
    // This event is triggered whenever a call to #setMerkleRoot succeeds.
    event MerkelRootUpdated(bytes32 oldMerkleRoot, bytes32 newMerkleRoot);
    // This event is triggered whenever a call to #claim succeeds.
    event Claimed(address indexed account, uint256 amount);

    // 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 cumulative account balances available to claim.
    function merkleRoot() external view returns (bytes32);
    // Sets the merkle root of the merkle tree containing cumulative account balances available to claim.
    function setMerkleRoot(bytes32 merkleRoot_) external;
    // Claim the given amount of the token to the given address. Reverts if the inputs are invalid.
    function claim(
        address account,
        uint256 cumulativeAmount,
        bytes32 expectedMerkleRoot,
        bytes32[] calldata merkleProof
    ) external;
}

File 6 of 7 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 7 of 7 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // 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;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"token_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"oldMerkleRoot","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"MerkelRootUpdated","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":"address","name":"account","type":"address"},{"internalType":"uint256","name":"cumulativeAmount","type":"uint256"},{"internalType":"bytes32","name":"expectedMerkleRoot","type":"bytes32"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"cumulativeClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setMerkleRoot","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"}]

60a060405234801561001057600080fd5b50604051610d9e380380610d9e83398101604081905261002f9161009d565b6100383361004d565b60601b6001600160601b0319166080526100cd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100af57600080fd5b81516001600160a01b03811681146100c657600080fd5b9392505050565b60805160601c610cac6100f260003960008181610150015261036a0152610cac6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b146100d9578063a991957614610118578063f2fde38b14610138578063fc0c546a1461014b57600080fd5b80631d7d4ebc1461008d5780632eb4a7ab146100a2578063715018a6146100be5780637cb64759146100c6575b600080fd5b6100a061009b366004610b07565b610172565b005b6100ab60015481565b6040519081526020015b60405180910390f35b6100a06103eb565b6100a06100d4366004610bc0565b610478565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b6100ab610126366004610aec565b60026020526000908152604090205481565b6100a0610146366004610aec565b61053a565b6100f37f000000000000000000000000000000000000000000000000000000000000000081565b82600154146101e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f434d443a204d65726b6c6520726f6f742077617320757064617465640000000060448201526064015b60405180910390fd5b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b166020820152603481018590526000906054016040516020818303038152906040528051906020012090506102428383868461066a565b6102a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f434d443a20496e76616c69642070726f6f66000000000000000000000000000060448201526064016101d9565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260026020526040902054858110610337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f434d443a204e6f7468696e6720746f20636c61696d000000000000000000000060448201526064016101d9565b73ffffffffffffffffffffffffffffffffffffffff808816600090815260026020526040902087905581870390610391907f00000000000000000000000000000000000000000000000000000000000000001689836106c4565b8773ffffffffffffffffffffffffffffffffffffffff167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a826040516103d991815260200190565b60405180910390a25050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461046c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d9565b6104766000610756565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d9565b60015460408051918252602082018390527f936fd71fceff3b4f98f4935ac269e4f94b4b25e3e38c519d3ff3db222a27117a910160405180910390a1600155565b60005473ffffffffffffffffffffffffffffffffffffffff1633146105bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d9565b73ffffffffffffffffffffffffffffffffffffffff811661065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101d9565b61066781610756565b50565b600060405160208101868660200281015b808210156106b55781358087106001811461069b578186528785526106a2565b8786528185525b505060408420955060208201915061067b565b50505092909114949350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526107519084906107cb565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061082d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166108d79092919063ffffffff16565b805190915015610751578080602001905181019061084b9190610b9e565b610751576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101d9565b60606108e684846000856108f0565b90505b9392505050565b606082471015610982576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016101d9565b843b6109ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101d9565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610a139190610bd9565b60006040518083038185875af1925050503d8060008114610a50576040519150601f19603f3d011682016040523d82523d6000602084013e610a55565b606091505b5091509150610a65828286610a70565b979650505050505050565b60608315610a7f5750816108e9565b825115610a8f5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d99190610bf5565b803573ffffffffffffffffffffffffffffffffffffffff81168114610ae757600080fd5b919050565b600060208284031215610afe57600080fd5b6108e982610ac3565b600080600080600060808688031215610b1f57600080fd5b610b2886610ac3565b94506020860135935060408601359250606086013567ffffffffffffffff80821115610b5357600080fd5b818801915088601f830112610b6757600080fd5b813581811115610b7657600080fd5b8960208260051b8501011115610b8b57600080fd5b9699959850939650602001949392505050565b600060208284031215610bb057600080fd5b815180151581146108e957600080fd5b600060208284031215610bd257600080fd5b5035919050565b60008251610beb818460208701610c46565b9190910192915050565b6020815260008251806020840152610c14816040850160208701610c46565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60005b83811015610c61578181015183820152602001610c49565b83811115610c70576000848401525b5050505056fea26469706673582212209e22d2d95a24c338efa0af551ea9c3ec8e152d14b22d62be56b5631cb5c57de164736f6c63430008060033000000000000000000000000111111111117dc0aa78b770fa6a738034120c302

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b146100d9578063a991957614610118578063f2fde38b14610138578063fc0c546a1461014b57600080fd5b80631d7d4ebc1461008d5780632eb4a7ab146100a2578063715018a6146100be5780637cb64759146100c6575b600080fd5b6100a061009b366004610b07565b610172565b005b6100ab60015481565b6040519081526020015b60405180910390f35b6100a06103eb565b6100a06100d4366004610bc0565b610478565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b5565b6100ab610126366004610aec565b60026020526000908152604090205481565b6100a0610146366004610aec565b61053a565b6100f37f000000000000000000000000111111111117dc0aa78b770fa6a738034120c30281565b82600154146101e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f434d443a204d65726b6c6520726f6f742077617320757064617465640000000060448201526064015b60405180910390fd5b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b166020820152603481018590526000906054016040516020818303038152906040528051906020012090506102428383868461066a565b6102a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f434d443a20496e76616c69642070726f6f66000000000000000000000000000060448201526064016101d9565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260026020526040902054858110610337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f434d443a204e6f7468696e6720746f20636c61696d000000000000000000000060448201526064016101d9565b73ffffffffffffffffffffffffffffffffffffffff808816600090815260026020526040902087905581870390610391907f000000000000000000000000111111111117dc0aa78b770fa6a738034120c3021689836106c4565b8773ffffffffffffffffffffffffffffffffffffffff167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a826040516103d991815260200190565b60405180910390a25050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461046c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d9565b6104766000610756565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d9565b60015460408051918252602082018390527f936fd71fceff3b4f98f4935ac269e4f94b4b25e3e38c519d3ff3db222a27117a910160405180910390a1600155565b60005473ffffffffffffffffffffffffffffffffffffffff1633146105bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d9565b73ffffffffffffffffffffffffffffffffffffffff811661065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101d9565b61066781610756565b50565b600060405160208101868660200281015b808210156106b55781358087106001811461069b578186528785526106a2565b8786528185525b505060408420955060208201915061067b565b50505092909114949350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526107519084906107cb565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061082d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166108d79092919063ffffffff16565b805190915015610751578080602001905181019061084b9190610b9e565b610751576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101d9565b60606108e684846000856108f0565b90505b9392505050565b606082471015610982576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016101d9565b843b6109ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101d9565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610a139190610bd9565b60006040518083038185875af1925050503d8060008114610a50576040519150601f19603f3d011682016040523d82523d6000602084013e610a55565b606091505b5091509150610a65828286610a70565b979650505050505050565b60608315610a7f5750816108e9565b825115610a8f5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d99190610bf5565b803573ffffffffffffffffffffffffffffffffffffffff81168114610ae757600080fd5b919050565b600060208284031215610afe57600080fd5b6108e982610ac3565b600080600080600060808688031215610b1f57600080fd5b610b2886610ac3565b94506020860135935060408601359250606086013567ffffffffffffffff80821115610b5357600080fd5b818801915088601f830112610b6757600080fd5b813581811115610b7657600080fd5b8960208260051b8501011115610b8b57600080fd5b9699959850939650602001949392505050565b600060208284031215610bb057600080fd5b815180151581146108e957600080fd5b600060208284031215610bd257600080fd5b5035919050565b60008251610beb818460208701610c46565b9190910192915050565b6020815260008251806020840152610c14816040850160208701610c46565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60005b83811015610c61578181015183820152602001610c49565b83811115610c70576000848401525b5050505056fea26469706673582212209e22d2d95a24c338efa0af551ea9c3ec8e152d14b22d62be56b5631cb5c57de164736f6c63430008060033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000111111111117dc0aa78b770fa6a738034120c302

-----Decoded View---------------
Arg [0] : token_ (address): 0x111111111117dC0aa78b770fA6A738034120C302

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000111111111117dc0aa78b770fa6a738034120c302


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.