ETH Price: $3,064.06 (-7.11%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Fetch Unclaimed125463802021-06-01 4:13:381336 days ago1622520818IN
0xD56a7581...493f41400
0 ETH0.0006144419
Claim125319192021-05-29 22:20:301338 days ago1622326830IN
0xD56a7581...493f41400
0 ETH0.0014096318.26000023
Claim125292712021-05-29 12:30:091338 days ago1622291409IN
0xD56a7581...493f41400
0 ETH0.0013124317
Claim125209222021-05-28 5:22:031340 days ago1622179323IN
0xD56a7581...493f41400
0 ETH0.0017139222.2
Claim125165512021-05-27 13:09:501340 days ago1622120990IN
0xD56a7581...493f41400
0 ETH0.0027021435
Claim125107832021-05-26 15:36:421341 days ago1622043402IN
0xD56a7581...493f41400
0 ETH0.0036647561
Claim125044192021-05-25 15:50:551342 days ago1621957855IN
0xD56a7581...493f41400
0 ETH0.0046327260
Claim125012612021-05-25 4:08:561343 days ago1621915736IN
0xD56a7581...493f41400
0 ETH0.0023233530.1
Claim125011892021-05-25 3:51:301343 days ago1621914690IN
0xD56a7581...493f41400
0 ETH0.0023243830.1
Claim125002492021-05-25 0:11:561343 days ago1621901516IN
0xD56a7581...493f41400
0 ETH0.0028236647
Claim124887212021-05-23 5:34:191345 days ago1621748059IN
0xD56a7581...493f41400
0 ETH0.0009182231.00000001
Claim124886572021-05-23 5:20:541345 days ago1621747254IN
0xD56a7581...493f41400
0 ETH0.0027017235
Claim124848402021-05-22 15:13:391345 days ago1621696419IN
0xD56a7581...493f41400
0 ETH0.00463260
Claim124843062021-05-22 13:15:021345 days ago1621689302IN
0xD56a7581...493f41400
0 ETH0.0037056948
Claim124831512021-05-22 8:57:531346 days ago1621673873IN
0xD56a7581...493f41400
0 ETH0.0036290547
Claim124820582021-05-22 4:47:091346 days ago1621658829IN
0xD56a7581...493f41400
0 ETH0.004630260.00000145
Claim124759422021-05-21 5:53:571347 days ago1621576437IN
0xD56a7581...493f41400
0 ETH0.0034723845
Claim124759342021-05-21 5:51:431347 days ago1621576303IN
0xD56a7581...493f41400
0 ETH0.0035512946
Claim124749712021-05-21 2:10:241347 days ago1621563024IN
0xD56a7581...493f41400
0 ETH0.0045869859.4
Claim124739972021-05-20 22:33:221347 days ago1621550002IN
0xD56a7581...493f41400
0 ETH0.0043238756
Claim124735212021-05-20 20:50:241347 days ago1621543824IN
0xD56a7581...493f41400
0 ETH0.0067174487
Claim124732742021-05-20 19:51:351347 days ago1621540295IN
0xD56a7581...493f41400
0 ETH0.005712274
Claim124732012021-05-20 19:35:581347 days ago1621539358IN
0xD56a7581...493f41400
0 ETH0.0060991179
Claim124731622021-05-20 19:25:311347 days ago1621538731IN
0xD56a7581...493f41400
0 ETH0.0044767858
Claim124730802021-05-20 19:09:271347 days ago1621537767IN
0xD56a7581...493f41400
0 ETH0.0048620863
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MooncatDistributor

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2021-04-29
*/

// SPDX-License-Identifier: NONE

pragma solidity 0.6.12;



// Part: OpenZeppelin/[email protected]/IERC20

/**
 * @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);
}

// Part: OpenZeppelin/[email protected]/MerkleProof

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

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

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

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

// File: MooncatDistributor.sol

contract MooncatDistributor {
	using MerkleProof for bytes32[];

	IERC20 public token;

	bytes32 public merkleRoot;
	mapping(uint256 => uint256) public claimedBitMap;
	uint256 expiryDate;
	address owner;

	event Claimed(uint256 index, address account, uint256 amount);

	constructor(address _token, bytes32 _root, uint256 _expiry, address _owner) public {
		token = IERC20(_token);
		merkleRoot = _root;
		expiryDate = _expiry;
		owner = _owner;
	}

	function fetchUnclaimed() external {
		require(block.timestamp > expiryDate, "!date");
		require(token.transfer(owner, token.balanceOf(address(this))), "Token transfer failed");
	}

	function isClaimed(uint256 _index) public view returns(bool) {
		uint256 wordIndex = _index / 256;
		uint256 bitIndex = _index % 256;
		uint256 word = claimedBitMap[wordIndex];
		uint256 bitMask = 1 << bitIndex;
		return word & bitMask == bitMask;
	}

	function _setClaimed(uint256 _index) internal {
		uint256 wordIndex = _index / 256;
		uint256 bitIndex = _index % 256;
		claimedBitMap[wordIndex] |= 1 << bitIndex;
	}

	function claim(uint256 _index, address _account, uint256 _amount, bytes32[] memory _proof) external {
		require(!isClaimed(_index), "Claimed already");
		bytes32 node = keccak256(abi.encodePacked(_index, _account, _amount));
		require(_proof.verify(merkleRoot, node), "Wrong proof");
		
		_setClaimed(_index);
		require(token.transfer(_account, _amount), "Token transfer failed");
		emit Claimed(_index, _account, _amount);
	}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"uint256","name":"_expiry","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedBitMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fetchUnclaimed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161072b38038061072b8339818101604052608081101561003357600080fd5b50805160208201516040830151606090930151600080546001600160a01b039485166001600160a01b0319918216179091556001929092556003939093556004805492909316911617905561069e8061008d6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80632e7ba6ef146100675780632eb4a7ab146101285780639e34070f14610142578063ee25560b14610173578063ee5d69c614610190578063fc0c546a14610198575b600080fd5b6101266004803603608081101561007d57600080fd5b8135916001600160a01b0360208201351691604082013591908101906080810160608201356401000000008111156100b457600080fd5b8201836020820111156100c657600080fd5b803590602001918460208302840111640100000000831117156100e857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506101bc945050505050565b005b6101306103c0565b60408051918252519081900360200190f35b61015f6004803603602081101561015857600080fd5b50356103c6565b604080519115158252519081900360200190f35b6101306004803603602081101561018957600080fd5b50356103ec565b6101266103fe565b6101a0610589565b604080516001600160a01b039092168252519081900360200190f35b6101c5846103c6565b15610209576040805162461bcd60e51b815260206004820152600f60248201526e436c61696d656420616c726561647960881b604482015290519081900360640190fd5b6040805160208082018790526bffffffffffffffffffffffff19606087901b16828401526054808301869052835180840390910181526074909201909252805191012060015461025b90839083610598565b61029a576040805162461bcd60e51b815260206004820152600b60248201526a2bb937b73390383937b7b360a91b604482015290519081900360640190fd5b6102a385610641565b600080546040805163a9059cbb60e01b81526001600160a01b038881166004830152602482018890529151919092169263a9059cbb92604480820193602093909283900390910190829087803b1580156102fc57600080fd5b505af1158015610310573d6000803e3d6000fd5b505050506040513d602081101561032657600080fd5b5051610371576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b604482015290519081900360640190fd5b604080518681526001600160a01b038616602082015280820185905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a15050505050565b60015481565b6101008104600090815260026020526040902054600160ff9092169190911b9081161490565b60026020526000908152604090205481565b600354421161043c576040805162461bcd60e51b8152602060048201526005602482015264216461746560d81b604482015290519081900360640190fd5b60005460048054604080516370a0823160e01b81523093810193909352516001600160a01b039384169363a9059cbb9392169184916370a0823191602480820192602092909190829003018186803b15801561049757600080fd5b505afa1580156104ab573d6000803e3d6000fd5b505050506040513d60208110156104c157600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561051257600080fd5b505af1158015610526573d6000803e3d6000fd5b505050506040513d602081101561053c57600080fd5b5051610587576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b604482015290519081900360640190fd5b565b6000546001600160a01b031681565b600081815b85518110156106365760008682815181106105b457fe5b602002602001015190508083116105fb578281604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120925061062d565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b5060010161059d565b509092149392505050565b610100810460009081526002602052604090208054600160ff9093169290921b909117905556fea2646970667358221220026400403927c3a8ec2c980beb14478c5af7264db25c1e077778c5a02f756cab64736f6c634300060c003300000000000000000000000006141f60ee56c8ecc869f46568e2cb1e66baaf41c8c53d696028c218fcb2c5b799d345c87e82bb1efb3dc3d40a2a95da702a2e2400000000000000000000000000000000000000000000000000000000609ef2df000000000000000000000000795aff8df356872fa867fa77241bbf27efbd5eba

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c80632e7ba6ef146100675780632eb4a7ab146101285780639e34070f14610142578063ee25560b14610173578063ee5d69c614610190578063fc0c546a14610198575b600080fd5b6101266004803603608081101561007d57600080fd5b8135916001600160a01b0360208201351691604082013591908101906080810160608201356401000000008111156100b457600080fd5b8201836020820111156100c657600080fd5b803590602001918460208302840111640100000000831117156100e857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506101bc945050505050565b005b6101306103c0565b60408051918252519081900360200190f35b61015f6004803603602081101561015857600080fd5b50356103c6565b604080519115158252519081900360200190f35b6101306004803603602081101561018957600080fd5b50356103ec565b6101266103fe565b6101a0610589565b604080516001600160a01b039092168252519081900360200190f35b6101c5846103c6565b15610209576040805162461bcd60e51b815260206004820152600f60248201526e436c61696d656420616c726561647960881b604482015290519081900360640190fd5b6040805160208082018790526bffffffffffffffffffffffff19606087901b16828401526054808301869052835180840390910181526074909201909252805191012060015461025b90839083610598565b61029a576040805162461bcd60e51b815260206004820152600b60248201526a2bb937b73390383937b7b360a91b604482015290519081900360640190fd5b6102a385610641565b600080546040805163a9059cbb60e01b81526001600160a01b038881166004830152602482018890529151919092169263a9059cbb92604480820193602093909283900390910190829087803b1580156102fc57600080fd5b505af1158015610310573d6000803e3d6000fd5b505050506040513d602081101561032657600080fd5b5051610371576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b604482015290519081900360640190fd5b604080518681526001600160a01b038616602082015280820185905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a15050505050565b60015481565b6101008104600090815260026020526040902054600160ff9092169190911b9081161490565b60026020526000908152604090205481565b600354421161043c576040805162461bcd60e51b8152602060048201526005602482015264216461746560d81b604482015290519081900360640190fd5b60005460048054604080516370a0823160e01b81523093810193909352516001600160a01b039384169363a9059cbb9392169184916370a0823191602480820192602092909190829003018186803b15801561049757600080fd5b505afa1580156104ab573d6000803e3d6000fd5b505050506040513d60208110156104c157600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561051257600080fd5b505af1158015610526573d6000803e3d6000fd5b505050506040513d602081101561053c57600080fd5b5051610587576040805162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b604482015290519081900360640190fd5b565b6000546001600160a01b031681565b600081815b85518110156106365760008682815181106105b457fe5b602002602001015190508083116105fb578281604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120925061062d565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b5060010161059d565b509092149392505050565b610100810460009081526002602052604090208054600160ff9093169290921b909117905556fea2646970667358221220026400403927c3a8ec2c980beb14478c5af7264db25c1e077778c5a02f756cab64736f6c634300060c0033

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

00000000000000000000000006141f60ee56c8ecc869f46568e2cb1e66baaf41c8c53d696028c218fcb2c5b799d345c87e82bb1efb3dc3d40a2a95da702a2e2400000000000000000000000000000000000000000000000000000000609ef2df000000000000000000000000795aff8df356872fa867fa77241bbf27efbd5eba

-----Decoded View---------------
Arg [0] : _token (address): 0x06141F60eE56c8ECc869f46568E2cb1e66BAaf41
Arg [1] : _root (bytes32): 0xc8c53d696028c218fcb2c5b799d345c87e82bb1efb3dc3d40a2a95da702a2e24
Arg [2] : _expiry (uint256): 1621029599
Arg [3] : _owner (address): 0x795afF8df356872FA867fA77241bBF27EFBD5EbA

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000006141f60ee56c8ecc869f46568e2cb1e66baaf41
Arg [1] : c8c53d696028c218fcb2c5b799d345c87e82bb1efb3dc3d40a2a95da702a2e24
Arg [2] : 00000000000000000000000000000000000000000000000000000000609ef2df
Arg [3] : 000000000000000000000000795aff8df356872fa867fa77241bbf27efbd5eba


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.