ETH Price: $3,389.01 (+1.24%)

Contract

0xC8AcA0b50F3Ca9A0cBe413d8a110a7aab7d4C1aE
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim168988932023-03-24 17:38:11640 days ago1679679491IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0022806836.27620659
Claim167910522023-03-09 13:49:59655 days ago1678369799IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.003657946.49443324
Claim167169362023-02-27 3:44:11665 days ago1677469451IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0012065319.19037743
Claim166797382023-02-21 22:06:35671 days ago1677017195IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0021650234.46067681
Claim166504192023-02-17 19:12:11675 days ago1676661131IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0028566645.41306383
Claim166439162023-02-16 21:16:11676 days ago1676582171IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0030781248.94145684
Claim166433042023-02-16 19:12:59676 days ago1676574779IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0027669444.02045936
Claim166432092023-02-16 18:53:59676 days ago1676573639IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0024321338.69379932
Claim166387022023-02-16 3:46:47676 days ago1676519207IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0022705636.10948244
Claim166282432023-02-14 16:40:35678 days ago1676392835IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0019393630.85219398
Claim166279882023-02-14 15:49:23678 days ago1676389763IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0025128639.98961939
Claim165992562023-02-10 15:28:47682 days ago1676042927IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0024886331.11882438
Claim165948092023-02-10 0:35:47683 days ago1675989347IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0020669932.88150268
Claim165867772023-02-08 21:39:47684 days ago1675892387IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.002168834.49011718
Claim165865772023-02-08 20:59:35684 days ago1675889975IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0022253235.41367078
Claim165777732023-02-07 15:23:47685 days ago1675783427IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0025751640.9615037
Claim165493002023-02-03 15:58:11689 days ago1675439891IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0022959436.5212576
Claim165343512023-02-01 13:46:11691 days ago1675259171IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0013494721.46460633
Claim165304292023-02-01 0:36:23692 days ago1675211783IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0011945319
Claim164311202023-01-18 3:52:23705 days ago1674013943IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0014319317.90857297
Claim164293772023-01-17 22:01:47706 days ago1673992907IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0024789339.44453729
Claim164258632023-01-17 10:16:35706 days ago1673950595IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0010853617.26586198
Claim163995132023-01-13 17:58:11710 days ago1673632691IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0019744831.43279225
Claim163856382023-01-11 19:25:59712 days ago1673465159IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0016064625.55622286
Claim163787692023-01-10 20:22:35713 days ago1673382155IN
0xC8AcA0b5...ab7d4C1aE
0 ETH0.0018199328.94300039
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xF63FD073...1623D5520
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
MerklePayout

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : MerklePayout.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";


/**
 * @notice The `MerklePayout` contract enables claimes to claim their token
 * after funds have been loaded into this contract. They claim their
 * funds in the given `ERC20` token by providing a merkleProof.
 *
 * This contract is intended to work as follows:
 *  - Generate a Merkle tree on how the match payout results
 *  - Deploy an instance of this contract with the associated Merkle root
 *  - Transfer match funds from the funder to the contract
 *  - Users eligible for match payouts can use the `claim`
 *  - Anyone can invoke `batchClaim` method to process all the claims
 *
 * @dev code sourced from https://github.com/Uniswap/merkle-distributor/blob/0d478d722da2e5d95b7292fd8cbdb363d98e9a93/contracts/MerkleDistributor.sol
 * Changes made:
 *
 * General
 *  - does not implement interface `IMerkleDistributor`
 *
 *
 * Variable
 *  - add `funder` param who funds and reclaim funds from contract
 *  - `account` renamed to `claimee`
 *
 * Events
 * - add `ReclaimFunds` which is emitted on invoking `reclaimFunds`
 * -
 *
 * Functions
 *  - `isClaimed` renamed to `hasClaimed`
 *  - add `reclaimFunds` to claw back remaining funds
 *  - claim function accepts argument `Claim`
 *  - claim function is public to enable `batchClaims`
 *  - add `batchClaim` function to allow multiple claims in a single transaction
 */
contract MerklePayout {
  using SafeERC20 for IERC20;

  // --- Data ---

  /// @notice Address where funding comes from address which funds the contract
  address public immutable funder;

  /// @notice Token in which payouts woulc be made
  IERC20 public immutable token;

  /// @notice merkle root generated from distribution
  bytes32 public immutable merkleRoot;

  /// @dev packed array of booleans to keep track of claims
  mapping(uint256 => uint256) private claimedBitMap;


  // --- Events ---

  /// @notice Emitted when funder reclaims funds
  event ReclaimFunds(address indexed funder, IERC20 indexed token, uint256 indexed amount);

  /// @notice Emitted when user succesfully claims funds
  event FundsClaimed(uint256 index, address indexed claimee, uint256 indexed amount);

  /// @notice Emitted when funder succesfully invokes batchClaim
  event BatchClaimTriggered(address indexed funder);

  // --- Types ---

  struct Claim {
    uint256 index;
    address claimee;
    uint256 amount;
    bytes32[] merkleProof;
  }

  // --- Constructor ---

  /// @notice sets the funder address, payout token, merkleRoot
  constructor(
    IERC20 _token,
    bytes32 _merkleRoot,
    address _funder
  ) {
    token =  _token;
    merkleRoot = _merkleRoot;
    funder = _funder;
  }


  // --- Core methods ---

  /**
   * @notice Marks claim on the claimedBitMap for given index
   * @param _index index in claimedBitMap which has claimed funds
   */
  function _setClaimed(uint256 _index) private {
    uint256 claimedWordIndex = _index / 256;
    uint256 claimedBitIndex = _index % 256;
    claimedBitMap[claimedWordIndex] |= (1 << claimedBitIndex);
  }


  /**
   * @notice Check if claimee has already claimed funds.
   * @dev Checks if index has been marked as claimed.
   *
   * @param _index Index in claimedBitMap
   */
  function hasClaimed(uint256 _index) public view returns (bool) {
    uint256 claimedWordIndex = _index / 256;
    uint256 claimedBitIndex = _index % 256;
    uint256 claimedWord = claimedBitMap[claimedWordIndex];

    uint256 mask = (1 << claimedBitIndex);
    return claimedWord & mask == mask;
  }


  /**
   * @notice Claims token to given address and updates claimedBitMap
   * @dev Reverts a claim if inputs are invalid
   * @param _claim Claim
   */
  function claim(Claim calldata _claim) public {
    uint256 _index = _claim.index;
    address _claimee = _claim.claimee;
    uint256 _amount = _claim.amount;
    bytes32[] calldata _merkleProof = _claim.merkleProof;

    // check if claimee has not claimed funds
    require(!hasClaimed(_index), "MerklePayout: Funds already claimed.");

    // verify the merkle proof
    bytes32 node = keccak256(abi.encodePacked(_index, _claimee, _amount));
    require(MerkleProof.verify(_merkleProof, merkleRoot, node), "MerklePayout: Invalid proof.");

    // mark as claimed and transfer
    _setClaimed(_index);
    token.safeTransfer(_claimee, _amount);

    // emit event
    emit FundsClaimed(_index, _claimee, _amount);
  }


  /**
   * @notice Enables the funder to withrdraw remaining balance
   * @dev Escape hatch, intended to be used if the merkle root uploaded is incorrect
   * @dev We trust the funder, which is why they are allowed to withdraw funds at any time
   *
   * @param _token Address of token to withdraw from this contract
   */
  function reclaimFunds(IERC20 _token) external {
    require(msg.sender == funder, "MerklePayout: caller is not the funder");

    uint256 _balance = _token.balanceOf(address(this));

    token.safeTransfer(funder, _balance);

    emit ReclaimFunds(funder, _token, _balance);
  }

  /**
   * @notice Batch Claim
   * @dev Useful for batch claims (complete pending claims)
   *
   * @param _claims Array of Claim
   */
  function batchClaim(Claim[] calldata _claims) external {
    require(msg.sender == funder, "MerklePayout: caller is not the funder");

    for (uint256 i = 0; i < _claims.length; i++) {
      claim(_claims[i]);
    }

    emit BatchClaimTriggered(funder);
  }
}

File 2 of 5 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol)

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 3 of 5 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee 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.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }
        return computedHash;
    }
}

File 4 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)

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 5 of 5 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

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": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"address","name":"_funder","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"funder","type":"address"}],"name":"BatchClaimTriggered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":true,"internalType":"address","name":"claimee","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FundsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"funder","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReclaimFunds","type":"event"},{"inputs":[{"components":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"claimee","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"internalType":"struct MerklePayout.Claim[]","name":"_claims","type":"tuple[]"}],"name":"batchClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"claimee","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"internalType":"struct MerklePayout.Claim","name":"_claim","type":"tuple"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"funder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"hasClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"reclaimFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063c31d72381161005b578063c31d7238146100da578063ce516507146100f6578063dcf0e82d14610126578063fc0c546a146101425761007d565b8063041ae880146100825780632eb4a7ab146100a05780633d995ada146100be575b600080fd5b61008a610160565b604051610097919061103c565b60405180910390f35b6100a8610184565b6040516100b5919061109b565b60405180910390f35b6100d860048036038101906100d39190610d5d565b6101a8565b005b6100f460048036038101906100ef9190610cc6565b6103b7565b005b610110600480360381019061010b9190610d9e565b610521565b60405161011d9190611080565b60405180910390f35b610140600480360381019061013b9190610d34565b610576565b005b61014a61077b565b60405161015791906110b6565b60405180910390f35b7f000000000000000000000000de21f729137c5af1b01d73af1dc21effa2b8a0d681565b7f04b1b1c0acdac3b611558c25f4e6d18087105c11a211e2a0fb8f65ee224fe34c81565b60008160000135905060008260200160208101906101c69190610c9d565b90506000836040013590503660008580606001906101e491906111ce565b915091506101f185610521565b15610231576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022890611153565b60405180910390fd5b600085858560405160200161024893929190610fff565b6040516020818303038152906040528051906020012090506102cc838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050507f04b1b1c0acdac3b611558c25f4e6d18087105c11a211e2a0fb8f65ee224fe34c8361079f565b61030b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030290611113565b60405180910390fd5b610314866107b6565b61035f85857f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f73ffffffffffffffffffffffffffffffffffffffff166108039092919063ffffffff16565b838573ffffffffffffffffffffffffffffffffffffffff167fa4eb50103b0591feb0bc913f479d92af5eb7ea33e8c397b49bab52ce6af26cb5886040516103a691906111b3565b60405180910390a350505050505050565b7f000000000000000000000000de21f729137c5af1b01d73af1dc21effa2b8a0d673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610445576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043c90611133565b60405180910390fd5b60005b828290508110156104b9576104a683838381811061048f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020028101906104a19190611225565b6101a8565b80806104b190611367565b915050610448565b507f000000000000000000000000de21f729137c5af1b01d73af1dc21effa2b8a0d673ffffffffffffffffffffffffffffffffffffffff167f82c9a7253cfe7a976ac9897d931fd95645ed287c70782e041f1e08f8a9443a6260405160405180910390a25050565b60008061010083610532919061127b565b905060006101008461054491906113e8565b905060008060008481526020019081526020016000205490506000826001901b90508081831614945050505050919050565b7f000000000000000000000000de21f729137c5af1b01d73af1dc21effa2b8a0d673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610604576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fb90611133565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161063f919061103c565b60206040518083038186803b15801561065757600080fd5b505afa15801561066b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068f9190610dc7565b90506106fc7f000000000000000000000000de21f729137c5af1b01d73af1dc21effa2b8a0d6827f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f73ffffffffffffffffffffffffffffffffffffffff166108039092919063ffffffff16565b808273ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000de21f729137c5af1b01d73af1dc21effa2b8a0d673ffffffffffffffffffffffffffffffffffffffff167f0f4621ecf2b7e205ba20a7643ed6bfb840c86f0f185a89fe812e112f035d583e60405160405180910390a45050565b7f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81565b6000826107ac8584610889565b1490509392505050565b6000610100826107c6919061127b565b90506000610100836107d891906113e8565b9050806001901b60008084815260200190815260200160002060008282541792505081905550505050565b6108848363a9059cbb60e01b8484604051602401610822929190611057565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610962565b505050565b60008082905060005b84518110156109575760008582815181106108d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190508083116109175782816040516020016108fa929190610fbc565b604051602081830303815290604052805190602001209250610943565b808360405160200161092a929190610fbc565b6040516020818303038152906040528051906020012092505b50808061094f90611367565b915050610892565b508091505092915050565b60006109c4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610a299092919063ffffffff16565b9050600081511115610a2457808060200190518101906109e49190610d0b565b610a23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1a90611193565b60405180910390fd5b5b505050565b6060610a388484600085610a41565b90509392505050565b606082471015610a86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7d906110f3565b60405180910390fd5b610a8f85610b55565b610ace576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac590611173565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610af79190610fe8565b60006040518083038185875af1925050503d8060008114610b34576040519150601f19603f3d011682016040523d82523d6000602084013e610b39565b606091505b5091509150610b49828286610b68565b92505050949350505050565b600080823b905060008111915050919050565b60608315610b7857829050610bc8565b600083511115610b8b5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf91906110d1565b60405180910390fd5b9392505050565b600081359050610bde81611623565b92915050565b60008083601f840112610bf657600080fd5b8235905067ffffffffffffffff811115610c0f57600080fd5b602083019150836020820283011115610c2757600080fd5b9250929050565b600081519050610c3d8161163a565b92915050565b600081359050610c5281611651565b92915050565b600060808284031215610c6a57600080fd5b81905092915050565b600081359050610c8281611668565b92915050565b600081519050610c9781611668565b92915050565b600060208284031215610caf57600080fd5b6000610cbd84828501610bcf565b91505092915050565b60008060208385031215610cd957600080fd5b600083013567ffffffffffffffff811115610cf357600080fd5b610cff85828601610be4565b92509250509250929050565b600060208284031215610d1d57600080fd5b6000610d2b84828501610c2e565b91505092915050565b600060208284031215610d4657600080fd5b6000610d5484828501610c43565b91505092915050565b600060208284031215610d6f57600080fd5b600082013567ffffffffffffffff811115610d8957600080fd5b610d9584828501610c58565b91505092915050565b600060208284031215610db057600080fd5b6000610dbe84828501610c73565b91505092915050565b600060208284031215610dd957600080fd5b6000610de784828501610c88565b91505092915050565b610df9816112ac565b82525050565b610e10610e0b826112ac565b6113b0565b82525050565b610e1f816112be565b82525050565b610e2e816112ca565b82525050565b610e45610e40826112ca565b6113c2565b82525050565b6000610e5682611249565b610e60818561125f565b9350610e70818560208601611334565b80840191505092915050565b610e8581611310565b82525050565b6000610e9682611254565b610ea0818561126a565b9350610eb0818560208601611334565b610eb981611477565b840191505092915050565b6000610ed160268361126a565b9150610edc82611495565b604082019050919050565b6000610ef4601c8361126a565b9150610eff826114e4565b602082019050919050565b6000610f1760268361126a565b9150610f228261150d565b604082019050919050565b6000610f3a60248361126a565b9150610f458261155c565b604082019050919050565b6000610f5d601d8361126a565b9150610f68826115ab565b602082019050919050565b6000610f80602a8361126a565b9150610f8b826115d4565b604082019050919050565b610f9f81611306565b82525050565b610fb6610fb182611306565b6113de565b82525050565b6000610fc88285610e34565b602082019150610fd88284610e34565b6020820191508190509392505050565b6000610ff48284610e4b565b915081905092915050565b600061100b8286610fa5565b60208201915061101b8285610dff565b60148201915061102b8284610fa5565b602082019150819050949350505050565b60006020820190506110516000830184610df0565b92915050565b600060408201905061106c6000830185610df0565b6110796020830184610f96565b9392505050565b60006020820190506110956000830184610e16565b92915050565b60006020820190506110b06000830184610e25565b92915050565b60006020820190506110cb6000830184610e7c565b92915050565b600060208201905081810360008301526110eb8184610e8b565b905092915050565b6000602082019050818103600083015261110c81610ec4565b9050919050565b6000602082019050818103600083015261112c81610ee7565b9050919050565b6000602082019050818103600083015261114c81610f0a565b9050919050565b6000602082019050818103600083015261116c81610f2d565b9050919050565b6000602082019050818103600083015261118c81610f50565b9050919050565b600060208201905081810360008301526111ac81610f73565b9050919050565b60006020820190506111c86000830184610f96565b92915050565b600080833560016020038436030381126111e757600080fd5b80840192508235915067ffffffffffffffff82111561120557600080fd5b60208301925060208202360383131561121d57600080fd5b509250929050565b60008235600160800383360303811261123d57600080fd5b80830191505092915050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600061128682611306565b915061129183611306565b9250826112a1576112a0611448565b5b828204905092915050565b60006112b7826112e6565b9050919050565b60008115159050919050565b6000819050919050565b60006112df826112ac565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061131b82611322565b9050919050565b600061132d826112e6565b9050919050565b60005b83811015611352578082015181840152602081019050611337565b83811115611361576000848401525b50505050565b600061137282611306565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156113a5576113a4611419565b5b600182019050919050565b60006113bb826113cc565b9050919050565b6000819050919050565b60006113d782611488565b9050919050565b6000819050919050565b60006113f382611306565b91506113fe83611306565b92508261140e5761140d611448565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f4d65726b6c655061796f75743a20496e76616c69642070726f6f662e00000000600082015250565b7f4d65726b6c655061796f75743a2063616c6c6572206973206e6f74207468652060008201527f66756e6465720000000000000000000000000000000000000000000000000000602082015250565b7f4d65726b6c655061796f75743a2046756e647320616c726561647920636c616960008201527f6d65642e00000000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b61162c816112ac565b811461163757600080fd5b50565b611643816112be565b811461164e57600080fd5b50565b61165a816112d4565b811461166557600080fd5b50565b61167181611306565b811461167c57600080fd5b5056fea26469706673582212201f0ecaa99548aa9edadb55a3309ade2bdb1f882a056e3645de29e35dd0a96fb164736f6c63430008040033

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.