ETH Price: $3,249.93 (-0.31%)
Gas: 1 Gwei

Contract

0xC5492bf3A3A7faDa4d1bbD0001Af37271a8B5A46
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim182664672023-10-03 0:35:11299 days ago1696293311IN
0xC5492bf3...71a8B5A46
0 ETH0.004762999.63207723
Claim169180282023-03-27 10:09:23488 days ago1679911763IN
0xC5492bf3...71a8B5A46
0 ETH0.0095405318.64853298
Claim161384962022-12-08 7:27:47597 days ago1670484467IN
0xC5492bf3...71a8B5A46
0 ETH0.0080568215.74849742
Claim157307322022-10-12 8:06:59654 days ago1665562019IN
0xC5492bf3...71a8B5A46
0 ETH0.0061394712
Claim155258682022-09-13 8:16:34683 days ago1663056994IN
0xC5492bf3...71a8B5A46
0 ETH0.003402166.64997782
Claim155249722022-09-13 4:37:59683 days ago1663043879IN
0xC5492bf3...71a8B5A46
0 ETH0.003515496.87174642
Claim154200252022-08-27 6:29:51700 days ago1661581791IN
0xC5492bf3...71a8B5A46
0 ETH0.003885447.59482321
Claim154199962022-08-27 6:21:16700 days ago1661581276IN
0xC5492bf3...71a8B5A46
0 ETH0.002923255.71442764
Claim153554482022-08-17 0:03:17711 days ago1660694597IN
0xC5492bf3...71a8B5A46
0 ETH0.0037857.39832895
Claim153517362022-08-16 10:03:10711 days ago1660644190IN
0xC5492bf3...71a8B5A46
0 ETH0.003100786.0610111
Claim153452712022-08-15 9:29:09712 days ago1660555749IN
0xC5492bf3...71a8B5A46
0 ETH0.0054634910.67991934
Claim153396392022-08-14 12:00:03713 days ago1660478403IN
0xC5492bf3...71a8B5A46
0 ETH0.003359036.5658592
Claim153396032022-08-14 11:52:39713 days ago1660477959IN
0xC5492bf3...71a8B5A46
0 ETH0.003621487.07873371
Claim153395642022-08-14 11:44:31713 days ago1660477471IN
0xC5492bf3...71a8B5A46
0 ETH0.003887997.59970199
Claim153395342022-08-14 11:38:00713 days ago1660477080IN
0xC5492bf3...71a8B5A46
0 ETH0.00317016.19644023
Claim153394982022-08-14 11:29:49713 days ago1660476589IN
0xC5492bf3...71a8B5A46
0 ETH0.003358086.56361377
Claim153394402022-08-14 11:16:32713 days ago1660475792IN
0xC5492bf3...71a8B5A46
0 ETH0.002850495.57185241
Claim153392352022-08-14 10:33:44713 days ago1660473224IN
0xC5492bf3...71a8B5A46
0 ETH0.00352496.8900626
Claim153391922022-08-14 10:25:03713 days ago1660472703IN
0xC5492bf3...71a8B5A46
0 ETH0.003855467.53624491
Claim153322472022-08-13 8:00:11714 days ago1660377611IN
0xC5492bf3...71a8B5A46
0 ETH0.003904437.63229671
Claim153320102022-08-13 7:07:28714 days ago1660374448IN
0xC5492bf3...71a8B5A46
0 ETH0.003813977.45497716
Claim153319222022-08-13 6:51:17714 days ago1660373477IN
0xC5492bf3...71a8B5A46
0 ETH0.004260938.32879959
Claim153262552022-08-12 9:34:14715 days ago1660296854IN
0xC5492bf3...71a8B5A46
0 ETH0.0059920811.71186888
Claim153129362022-08-10 7:03:38717 days ago1660115018IN
0xC5492bf3...71a8B5A46
0 ETH0.004129028.07031688
Claim153127032022-08-10 6:13:35717 days ago1660112015IN
0xC5492bf3...71a8B5A46
0 ETH0.000285659
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:
MerkleMinter

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-10-20
*/

// SPDX-License-Identifier: NONE

pragma solidity 0.6.12;



// Part: IMintableAirdrop

interface IMintableAirdrop {

  function mintAirdrops(
    address _owner,
    uint256 _amount,
    uint256 _upfront,
    uint256 _start,
    uint256 _end) external returns(uint256);
}

// 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: MerkleMinter.sol

contract MerkleMinter {
  using MerkleProof for bytes32[];

  IMintableAirdrop public toAirdrop;

  bytes32 public merkleRoot;
  mapping(uint256 => uint256) public claimedBitMap;
  uint256 public start;
  uint256 public end;
  uint256 upfrontDivisor;


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

  constructor(address _toAirdrop, bytes32 _root, uint256 _start, uint256 _end, uint _upfrontDivisor) public {
    toAirdrop = IMintableAirdrop(_toAirdrop);
    merkleRoot = _root;
    start = _start;
    end = _end;
    upfrontDivisor = _upfrontDivisor;
  }


  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(address account, uint256 _index, 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);
    uint256 upfront = _amount / upfrontDivisor;
    uint256 adjustedAmount = _amount - upfront;

    toAirdrop.mintAirdrops(account, adjustedAmount, upfront, start, end);
    emit Claimed(_index, account, _amount);
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_toAirdrop","type":"address"},{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"},{"internalType":"uint256","name":"_upfrontDivisor","type":"uint256"}],"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":"address","name":"account","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"},{"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":"end","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toAirdrop","outputs":[{"internalType":"contract IMintableAirdrop","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506040516105cd3803806105cd833981810160405260a081101561003357600080fd5b508051602082015160408301516060840151608090940151600080546001600160a01b039095166001600160a01b03199095169490941790935560019190915560035560049190915560055561053f8061008e6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639e34070f1161005b5780639e34070f14610181578063be9a6555146101b2578063ee25560b146101ba578063efbe1c1c146101d75761007d565b8063172bd6de146100825780632aa0b45a146101435780632eb4a7ab14610167575b600080fd5b6101416004803603608081101561009857600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100cf57600080fd5b8201836020820111156100e157600080fd5b8035906020019184602083028401116401000000008311171561010357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506101df945050505050565b005b61014b6103e0565b604080516001600160a01b039092168252519081900360200190f35b61016f6103ef565b60408051918252519081900360200190f35b61019e6004803603602081101561019757600080fd5b50356103f5565b604080519115158252519081900360200190f35b61016f61041b565b61016f600480360360208110156101d057600080fd5b5035610421565b61016f610433565b6101e8836103f5565b1561022c576040805162461bcd60e51b815260206004820152600f60248201526e436c61696d656420616c726561647960881b604482015290519081900360640190fd5b6040805160208082018690526bffffffffffffffffffffffff19606088901b16828401526054808301869052835180840390910181526074909201909252805191012060015461027e90839083610439565b6102bd576040805162461bcd60e51b815260206004820152600b60248201526a2bb937b73390383937b7b360a91b604482015290519081900360640190fd5b6102c6846104e2565b600060055484816102d357fe5b0490506000818503905060008054906101000a90046001600160a01b03166001600160a01b0316632bd63cee8883856003546004546040518663ffffffff1660e01b815260040180866001600160a01b0316815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561036357600080fd5b505af1158015610377573d6000803e3d6000fd5b505050506040513d602081101561038d57600080fd5b5050604080518781526001600160a01b038916602082015280820187905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a150505050505050565b6000546001600160a01b031681565b60015481565b6101008104600090815260026020526040902054600160ff9092169190911b9081161490565b60035481565b60026020526000908152604090205481565b60045481565b600081815b85518110156104d757600086828151811061045557fe5b6020026020010151905080831161049c57828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506104ce565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b5060010161043e565b509092149392505050565b610100810460009081526002602052604090208054600160ff9093169290921b909117905556fea2646970667358221220ee90bb2d93785a1792896ca7167730aa4abb250b5b85927555b2e8f476ec138064736f6c634300060c00330000000000000000000000009bb26200691a21e8f737424e6d800609e3c5b2feee66fda93e6f009147bdb1dba568da0c381b85485e1affb9f054e2755cd8029900000000000000000000000000000000000000000000000000000000617091600000000000000000000000000000000000000000000000000000000061e73860000000000000000000000000000000000000000000000000000000000000000a

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80639e34070f1161005b5780639e34070f14610181578063be9a6555146101b2578063ee25560b146101ba578063efbe1c1c146101d75761007d565b8063172bd6de146100825780632aa0b45a146101435780632eb4a7ab14610167575b600080fd5b6101416004803603608081101561009857600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100cf57600080fd5b8201836020820111156100e157600080fd5b8035906020019184602083028401116401000000008311171561010357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506101df945050505050565b005b61014b6103e0565b604080516001600160a01b039092168252519081900360200190f35b61016f6103ef565b60408051918252519081900360200190f35b61019e6004803603602081101561019757600080fd5b50356103f5565b604080519115158252519081900360200190f35b61016f61041b565b61016f600480360360208110156101d057600080fd5b5035610421565b61016f610433565b6101e8836103f5565b1561022c576040805162461bcd60e51b815260206004820152600f60248201526e436c61696d656420616c726561647960881b604482015290519081900360640190fd5b6040805160208082018690526bffffffffffffffffffffffff19606088901b16828401526054808301869052835180840390910181526074909201909252805191012060015461027e90839083610439565b6102bd576040805162461bcd60e51b815260206004820152600b60248201526a2bb937b73390383937b7b360a91b604482015290519081900360640190fd5b6102c6846104e2565b600060055484816102d357fe5b0490506000818503905060008054906101000a90046001600160a01b03166001600160a01b0316632bd63cee8883856003546004546040518663ffffffff1660e01b815260040180866001600160a01b0316815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561036357600080fd5b505af1158015610377573d6000803e3d6000fd5b505050506040513d602081101561038d57600080fd5b5050604080518781526001600160a01b038916602082015280820187905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a150505050505050565b6000546001600160a01b031681565b60015481565b6101008104600090815260026020526040902054600160ff9092169190911b9081161490565b60035481565b60026020526000908152604090205481565b60045481565b600081815b85518110156104d757600086828151811061045557fe5b6020026020010151905080831161049c57828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506104ce565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b5060010161043e565b509092149392505050565b610100810460009081526002602052604090208054600160ff9093169290921b909117905556fea2646970667358221220ee90bb2d93785a1792896ca7167730aa4abb250b5b85927555b2e8f476ec138064736f6c634300060c0033

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

0000000000000000000000009bb26200691a21e8f737424e6d800609e3c5b2feee66fda93e6f009147bdb1dba568da0c381b85485e1affb9f054e2755cd8029900000000000000000000000000000000000000000000000000000000617091600000000000000000000000000000000000000000000000000000000061e73860000000000000000000000000000000000000000000000000000000000000000a

-----Decoded View---------------
Arg [0] : _toAirdrop (address): 0x9bb26200691a21E8f737424e6d800609e3C5b2fe
Arg [1] : _root (bytes32): 0xee66fda93e6f009147bdb1dba568da0c381b85485e1affb9f054e2755cd80299
Arg [2] : _start (uint256): 1634767200
Arg [3] : _end (uint256): 1642543200
Arg [4] : _upfrontDivisor (uint256): 10

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000009bb26200691a21e8f737424e6d800609e3c5b2fe
Arg [1] : ee66fda93e6f009147bdb1dba568da0c381b85485e1affb9f054e2755cd80299
Arg [2] : 0000000000000000000000000000000000000000000000000000000061709160
Arg [3] : 0000000000000000000000000000000000000000000000000000000061e73860
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000a


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.