More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 130 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 129531594 | 25 days ago | IN | 0 ETH | 0.000005524562 | ||||
Claim | 129467550 | 26 days ago | IN | 0 ETH | 0.000000584992 | ||||
Claim | 129466865 | 26 days ago | IN | 0 ETH | 0.000000642053 | ||||
Claim | 126574685 | 93 days ago | IN | 0 ETH | 0.000001054476 | ||||
Claim | 124889281 | 132 days ago | IN | 0 ETH | 0.000000447914 | ||||
Claim | 124612398 | 139 days ago | IN | 0 ETH | 0.000000040526 | ||||
Claim | 124509569 | 141 days ago | IN | 0 ETH | 0.000000712649 | ||||
Claim | 124246350 | 147 days ago | IN | 0 ETH | 0.000000495725 | ||||
Claim | 124205904 | 148 days ago | IN | 0 ETH | 0.000000089483 | ||||
Claim | 124126808 | 150 days ago | IN | 0 ETH | 0.000000026033 | ||||
Claim | 123945835 | 154 days ago | IN | 0 ETH | 0.000000182106 | ||||
Claim | 123929288 | 154 days ago | IN | 0 ETH | 0.00000016522 | ||||
Claim | 123729093 | 159 days ago | IN | 0 ETH | 0.000000322657 | ||||
Claim | 123657475 | 161 days ago | IN | 0 ETH | 0.000000139713 | ||||
Claim | 123628224 | 161 days ago | IN | 0 ETH | 0.00000573641 | ||||
Claim | 123601090 | 162 days ago | IN | 0 ETH | 0.000000576165 | ||||
Claim | 123599617 | 162 days ago | IN | 0 ETH | 0.000001253164 | ||||
Claim | 123598817 | 162 days ago | IN | 0 ETH | 0.000002992347 | ||||
Claim | 123563584 | 163 days ago | IN | 0 ETH | 0.000000136646 | ||||
Claim | 123516570 | 164 days ago | IN | 0 ETH | 0.000000124527 | ||||
Claim | 123476838 | 165 days ago | IN | 0 ETH | 0.000000353457 | ||||
Claim | 123473428 | 165 days ago | IN | 0 ETH | 0.000000317953 | ||||
Claim | 123136729 | 173 days ago | IN | 0 ETH | 0.000005737826 | ||||
Claim | 122965928 | 177 days ago | IN | 0 ETH | 0.0000067047 | ||||
Claim | 122965541 | 177 days ago | IN | 0 ETH | 0.000005552543 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
121884213 | 202 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xcd6A3e53...8DF07CE0B The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
MerkleDistributor
Compiler Version
v0.6.7+commit.b8d736ae
Optimization Enabled:
Yes with 200 runs
Other Settings:
istanbul EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED // Forked from: https://github.com/Uniswap/merkle-distributor pragma solidity 0.6.7; import "./openzeppelin/IERC20.sol"; import "./openzeppelin/MerkleProof.sol"; import "./interfaces/IMerkleDistributor.sol"; contract MerkleDistributor is IMerkleDistributor { // --- Auth --- mapping (address => uint) public authorizedAccounts; /** * @notice Add auth to an account * @param account Account to add auth to */ function addAuthorization(address account) virtual external isAuthorized { authorizedAccounts[account] = 1; emit AddAuthorization(account); } /** * @notice Remove auth from an account * @param account Account to remove auth from */ function removeAuthorization(address account) virtual external isAuthorized { authorizedAccounts[account] = 0; emit RemoveAuthorization(account); } /** * @notice Checks whether msg.sender can call an authed function **/ modifier isAuthorized { require(authorizedAccounts[msg.sender] == 1, "MerkleDistributorFactory/account-not-authorized"); _; } /* * @notify Checks whether an address can send tokens out of this contract */ modifier canSendTokens { require( either(authorizedAccounts[msg.sender] == 1, both(owner == msg.sender, now >= addition(deploymentTime, timelapseUntilWithdrawWindow))), "MerkleDistributorFactory/cannot-send-tokens" ); _; } // The token being distributed address public immutable override token; // The owner of this contract address public immutable override owner; // The merkle root of all addresses that get a distribution bytes32 public immutable override merkleRoot; // Timestamp when this contract was deployed uint256 public immutable override deploymentTime; // This is a packed array of booleans mapping(uint256 => uint256) private claimedBitMap; constructor(address token_, bytes32 merkleRoot_) public { authorizedAccounts[msg.sender] = 1; owner = msg.sender; token = token_; merkleRoot = merkleRoot_; deploymentTime = now; emit AddAuthorization(msg.sender); } // --- Math --- function addition(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x, "MerkleDistributorFactory/add-uint-uint-overflow"); } // --- Boolean Logic --- function either(bool x, bool y) internal pure returns (bool z) { assembly{ z := or(x, y)} } function both(bool x, bool y) internal pure returns (bool z) { assembly{ z := and(x, y)} } // --- Administration --- /* * @notice Send tokens to an authorized address * @param dst The address to send tokens to * @param tokenAmount The amount of tokens to send */ function sendTokens(address dst, uint256 tokenAmount) external override canSendTokens { require(dst != address(0), "MerkleDistributorFactory/null-dst"); IERC20(token).transfer(dst, tokenAmount); emit SendTokens(dst, tokenAmount); } /* * @notice View function returning whether an address has already claimed their tokens * @param index The position of the address inside the merkle tree */ function isClaimed(uint256 index) public view override returns (bool) { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; uint256 claimedWord = claimedBitMap[claimedWordIndex]; uint256 mask = (1 << claimedBitIndex); return claimedWord & mask == mask; } /* * @notice Mark an address as having claimed their distribution * @param index The position of the address inside the merkle tree */ function _setClaimed(uint256 index) private { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; claimedBitMap[claimedWordIndex] = claimedBitMap[claimedWordIndex] | (1 << claimedBitIndex); } /* * @notice Claim your distribution * @param index The position of the address inside the merkle tree * @param account The actual address from the tree * @param amount The amount being distributed * @param merkleProof The merkle path used to prove that the address is in the tree and can claim amount tokens */ function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external override { require(!isClaimed(index), 'MerkleDistributor/drop-already-claimed'); // Verify the merkle proof bytes32 node = keccak256(abi.encodePacked(index, account, amount)); require(MerkleProof.verify(merkleProof, merkleRoot, node), 'MerkleDistributor/invalid-proof'); // Mark it claimed and send the token _setClaimed(index); require(IERC20(token).transfer(account, amount), 'MerkleDistributor/transfer-failed'); emit Claimed(index, account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @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; } }
// SPDX-License-Identifier: UNLICENSED // Forked from: https://github.com/Uniswap/merkle-distributor pragma solidity >=0.5.0; // Allows anyone to claim a token if they exist in a merkle root abstract contract IMerkleDistributor { // Time from the moment this contract is deployed and until the owner can withdraw leftover tokens uint256 public constant timelapseUntilWithdrawWindow = 90 days; // Returns the address of the token distributed by this contract function token() virtual external view returns (address); // Returns the merkle root of the merkle tree containing account balances available to claim function merkleRoot() virtual external view returns (bytes32); // Returns the timestamp when this contract was deployed function deploymentTime() virtual external view returns (uint256); // Returns the address for the owner of this contract function owner() virtual external view returns (address); // Returns true if the index has been marked claimed function isClaimed(uint256 index) virtual external view returns (bool); // Send tokens to an address without that address claiming them function sendTokens(address dst, uint256 tokenAmount) virtual external; // Claim the given amount of the token to the given address. Reverts if the inputs are invalid function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) virtual external; // This event is triggered whenever an address is added to the set of authed addresses event AddAuthorization(address account); // This event is triggered whenever an address is removed from the set of authed addresses event RemoveAuthorization(address account); // This event is triggered whenever a call to #claim succeeds event Claimed(uint256 index, address account, uint256 amount); // This event is triggered whenever some tokens are sent to an address without that address claiming them event SendTokens(address dst, uint256 tokenAmount); }
{ "remappings": [ "ds-auth/=lib/ds-token/lib/ds-stop/lib/ds-auth/src/", "ds-math/=lib/ds-token/lib/ds-math/src/", "ds-note/=lib/ds-token/lib/ds-stop/lib/ds-note/src/", "ds-stop/=lib/ds-token/lib/ds-stop/src/", "ds-test/=lib/ds-test/src/", "ds-token/=lib/ds-token/src/", "erc20/=lib/ds-token/lib/erc20/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "istanbul", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"AddAuthorization","type":"event"},{"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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"RemoveAuthorization","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"dst","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"SendTokens","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorizedAccounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deploymentTime","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":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"sendTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timelapseUntilWithdrawWindow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80638da5cb5b116100715780638da5cb5b146101ce57806393a10984146101f257806394f3f81d146101fa5780639e34070f14610220578063ecda10f514610251578063fc0c546a14610259576100a9565b806305ab421d146100ae57806324ba5884146100dc5780632e7ba6ef146101145780632eb4a7ab146101a057806335b28153146101a8575b600080fd5b6100da600480360360408110156100c457600080fd5b506001600160a01b038135169060200135610261565b005b610102600480360360208110156100f257600080fd5b50356001600160a01b0316610458565b60408051918252519081900360200190f35b6100da6004803603608081101561012a57600080fd5b8135916001600160a01b03602082013516916040820135919081019060808101606082013564010000000081111561016157600080fd5b82018360208201111561017357600080fd5b8035906020019184602083028401116401000000008311171561019557600080fd5b50909250905061046a565b6101026106e3565b6100da600480360360208110156101be57600080fd5b50356001600160a01b0316610707565b6101d66107a7565b604080516001600160a01b039092168252519081900360200190f35b6101026107cb565b6100da6004803603602081101561021057600080fd5b50356001600160a01b03166107d2565b61023d6004803603602081101561023657600080fd5b5035610871565b604080519115158252519081900360200190f35b610102610895565b6101d66108b9565b336000818152602081905260409020546102e4916001909114906102df907f000000000000000000000000524fe171e80173c15381bb50034033da282abcc66001600160a01b0316146102d77f00000000000000000000000000000000000000000000000000000000667b76236276a7006108dd565b421015610925565b610929565b61031f5760405162461bcd60e51b815260040180806020018281038252602b815260200180610a7e602b913960400191505060405180910390fd5b6001600160a01b0382166103645760405162461bcd60e51b8152600401808060200182810382526021815260200180610aa96021913960400191505060405180910390fd5b7f00000000000000000000000042000000000000000000000000000000000000426001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156103e457600080fd5b505af11580156103f8573d6000803e3d6000fd5b505050506040513d602081101561040e57600080fd5b5050604080516001600160a01b03841681526020810183905281517f09bd3894cb7ab22415416dac0fecc519855a4b0842f1c9115e562ef557ab577b929181900390910190a15050565b60006020819052908152604090205481565b61047385610871565b156104af5760405162461bcd60e51b8152600401808060200182810382526026815260200180610aca6026913960400191505060405180910390fd5b6040805160208082018890526bffffffffffffffffffffffff19606088901b1682840152605480830187905283518084039091018152607483018085528151918301919091206094928602808501840190955285825293610552939192879287928392909101908490808284376000920191909152507f73acf6c6b45a0fa0ed60d9e3cc1c81aa25164aae249646cbca6602cd412c2849925085915061092d9050565b6105a3576040805162461bcd60e51b815260206004820152601f60248201527f4d65726b6c654469737472696275746f722f696e76616c69642d70726f6f6600604482015290519081900360640190fd5b6105ac866109d6565b7f00000000000000000000000042000000000000000000000000000000000000426001600160a01b031663a9059cbb86866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561062c57600080fd5b505af1158015610640573d6000803e3d6000fd5b505050506040513d602081101561065657600080fd5b50516106935760405162461bcd60e51b81526004018080602001828103825260218152602001806109ff6021913960400191505060405180910390fd5b604080518781526001600160a01b038716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f73acf6c6b45a0fa0ed60d9e3cc1c81aa25164aae249646cbca6602cd412c284981565b336000908152602081905260409020546001146107555760405162461bcd60e51b815260040180806020018281038252602f815260200180610a4f602f913960400191505060405180910390fd5b6001600160a01b0381166000818152602081815260409182902060019055815192835290517f599a298163e1678bb1c676052a8930bf0b8a1261ed6e01b8a2391e55f70001029281900390910190a150565b7f000000000000000000000000524fe171e80173c15381bb50034033da282abcc681565b6276a70081565b336000908152602081905260409020546001146108205760405162461bcd60e51b815260040180806020018281038252602f815260200180610a4f602f913960400191505060405180910390fd5b6001600160a01b03811660008181526020818152604080832092909255815192835290517f8834a87e641e9716be4f34527af5d23e11624f1ddeefede6ad75a9acfc31b9039281900390910190a150565b610100810460009081526001602081905260409091205460ff9092161b9081161490565b7f00000000000000000000000000000000000000000000000000000000667b762381565b7f000000000000000000000000420000000000000000000000000000000000004281565b8082018281101561091f5760405162461bcd60e51b815260040180806020018281038252602f815260200180610a20602f913960400191505060405180910390fd5b92915050565b1690565b1790565b600081815b85518110156109cb57600086828151811061094957fe5b6020026020010151905080831161099057828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506109c2565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101610932565b509092149392505050565b61010081046000908152600160208190526040909120805460ff9093169190911b909117905556fe4d65726b6c654469737472696275746f722f7472616e736665722d6661696c65644d65726b6c654469737472696275746f72466163746f72792f6164642d75696e742d75696e742d6f766572666c6f774d65726b6c654469737472696275746f72466163746f72792f6163636f756e742d6e6f742d617574686f72697a65644d65726b6c654469737472696275746f72466163746f72792f63616e6e6f742d73656e642d746f6b656e734d65726b6c654469737472696275746f72466163746f72792f6e756c6c2d6473744d65726b6c654469737472696275746f722f64726f702d616c72656164792d636c61696d6564a264697066735822122001e90c582a018987b84b4406c14acda7c4af2ccb91ead4d7722968675db781e964736f6c63430006070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
OP | 100.00% | $1.77 | 461.6437 | $819.1 |
[ Download: CSV Export ]
[ 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.