More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 142 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 21412896 | 6 days ago | IN | 0 ETH | 0.00122924 | ||||
Claim | 21412890 | 6 days ago | IN | 0 ETH | 0.00144063 | ||||
Claim | 21316928 | 20 days ago | IN | 0 ETH | 0.00519402 | ||||
Claim | 21307593 | 21 days ago | IN | 0 ETH | 0.0013263 | ||||
Claim | 21286152 | 24 days ago | IN | 0 ETH | 0.00149152 | ||||
Claim | 21260113 | 28 days ago | IN | 0 ETH | 0.00113406 | ||||
Claim | 21260104 | 28 days ago | IN | 0 ETH | 0.00127503 | ||||
Claim | 21256064 | 28 days ago | IN | 0 ETH | 0.00124099 | ||||
Claim | 21220151 | 33 days ago | IN | 0 ETH | 0.00164281 | ||||
Claim | 21200366 | 36 days ago | IN | 0 ETH | 0.00196401 | ||||
Claim | 21196832 | 36 days ago | IN | 0 ETH | 0.00270761 | ||||
Claim | 21177473 | 39 days ago | IN | 0 ETH | 0.00295764 | ||||
Claim | 21164120 | 41 days ago | IN | 0 ETH | 0.00247676 | ||||
Claim | 21137623 | 45 days ago | IN | 0 ETH | 0.00357057 | ||||
Claim | 21109003 | 49 days ago | IN | 0 ETH | 0.00133746 | ||||
Claim | 21099486 | 50 days ago | IN | 0 ETH | 0.00052207 | ||||
Claim | 21095113 | 51 days ago | IN | 0 ETH | 0.00109708 | ||||
Claim | 21083461 | 52 days ago | IN | 0 ETH | 0.00143217 | ||||
Claim | 21072705 | 54 days ago | IN | 0 ETH | 0.0052705 | ||||
Claim | 21045625 | 57 days ago | IN | 0 ETH | 0.0349022 | ||||
Claim | 21033578 | 59 days ago | IN | 0 ETH | 0.00163165 | ||||
Claim | 21033554 | 59 days ago | IN | 0 ETH | 0.00108401 | ||||
Claim | 21031921 | 59 days ago | IN | 0 ETH | 0.00146885 | ||||
Claim | 21031916 | 59 days ago | IN | 0 ETH | 0.00146866 | ||||
Claim | 21031904 | 59 days ago | IN | 0 ETH | 0.00146875 |
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 0x61E553F8...563BD2e67 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
MerkleClaimer
Compiler Version
v0.8.26+commit.8a97fa7a
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-09-12 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.22; contract MerkleClaimer { IERC20 public token; IStaking public staking; bytes32 public merkleRoot; uint256 public distributed; mapping(address => uint256) public claimed; mapping(address => bool) public exec; event File(bytes32 indexed what, address data); event SetMerkleRoot(bytes32 root); event Claim(address indexed user, uint256 amount, uint256 total); error InvalidFile(); error Unauthorized(); error TransferFailed(); constructor(address _token, address _staking) { token = IERC20(_token); staking = IStaking(_staking); exec[msg.sender] = true; } modifier auth() { if (!exec[msg.sender]) revert Unauthorized(); _; } function file(bytes32 what, address data) external auth { if (what == "exec") { exec[data] = !exec[data]; } else { revert InvalidFile(); } emit File(what, data); } function setMerkleRoot(bytes32 root) external auth { merkleRoot = root; emit SetMerkleRoot(root); } function collect(address _token, uint256 amount) external auth { IERC20(_token).transfer(msg.sender, amount); } function claim(address user, uint256 total, bytes32[] calldata proof) external { bytes32 leaf = keccak256(abi.encodePacked(user, total)); require(verify(proof, merkleRoot, leaf), "invalid proof"); uint256 amount = total - min(total, claimed[user]); claimed[user] = total; distributed += amount; token.approve(address(staking), amount); staking.deposit(amount, user); emit Claim(user, amount, amount); } function verify(bytes32[] calldata 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) { computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash == root; } function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } } interface IERC20 { function approve(address, uint256) external; function transfer(address, uint256) external returns (bool); } interface IStaking { function deposit(uint256 amount, address to) external; }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_staking","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidFile","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"what","type":"bytes32"},{"indexed":false,"internalType":"address","name":"data","type":"address"}],"name":"File","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"SetMerkleRoot","type":"event"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"collect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"exec","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"what","type":"bytes32"},{"internalType":"address","name":"data","type":"address"}],"name":"file","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"contract IStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060405234801561000f575f80fd5b506004361061009b575f3560e01c80637cb64759116100635780637cb6475914610140578063c884ef8314610153578063d4e8be8314610172578063f84b903e14610185578063fc0c546a1461018e575f80fd5b80632eb4a7ab1461009f5780633d13f874146100bb5780634cf088d9146100d05780636b8357ac146100fb5780636bb6126e1461010e575b5f80fd5b6100a860025481565b6040519081526020015b60405180910390f35b6100ce6100c9366004610644565b6101a0565b005b6001546100e3906001600160a01b031681565b6040516001600160a01b0390911681526020016100b2565b6100ce6101093660046106ca565b6103a0565b61013061011c3660046106f2565b60056020525f908152604090205460ff1681565b60405190151581526020016100b2565b6100ce61014e36600461070b565b610441565b6100a86101613660046106f2565b60046020525f908152604090205481565b6100ce610180366004610722565b6104aa565b6100a860035481565b5f546100e3906001600160a01b031681565b6040516bffffffffffffffffffffffff19606086901b166020820152603481018490525f906054016040516020818303038152906040528051906020012090506101ee83836002548461056d565b61022e5760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b604482015260640160405180910390fd5b6001600160a01b0385165f90815260046020526040812054610251908690610610565b61025b9086610760565b6001600160a01b0387165f90815260046020526040812087905560038054929350839290919061028c908490610773565b90915550505f5460015460405163095ea7b360e01b81526001600160a01b0391821660048201526024810184905291169063095ea7b3906044015f604051808303815f87803b1580156102dd575f80fd5b505af11580156102ef573d5f803e3d5ffd5b5050600154604051636e553f6560e01b8152600481018590526001600160a01b038a811660248301529091169250636e553f6591506044015f604051808303815f87803b15801561033e575f80fd5b505af1158015610350573d5f803e3d5ffd5b505060408051848152602081018590526001600160a01b038a1693507f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf792500160405180910390a2505050505050565b335f9081526005602052604090205460ff166103ce576040516282b42960e81b815260040160405180910390fd5b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303815f875af1158015610418573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043c9190610786565b505050565b335f9081526005602052604090205460ff1661046f576040516282b42960e81b815260040160405180910390fd5b60028190556040518181527f914960aef5e033ce5cae8a7992d4b7a6f0f9741227b66acb67c605b7019f8a469060200160405180910390a150565b335f9081526005602052604090205460ff166104d8576040516282b42960e81b815260040160405180910390fd5b81636578656360e01b03610512576001600160a01b0381165f908152600560205260409020805460ff19811660ff9091161517905561052b565b6040516302bfa98160e41b815260040160405180910390fd5b6040516001600160a01b038216815282907f8fef588b5fc1afbf5b2f06c1a435d513f208da2e6704c3d8f0e0ec91167066ba9060200160405180910390a25050565b5f81815b85811015610604575f87878381811061058c5761058c6107ac565b905060200201359050808310156105ce5760408051602081018590529081018290526060016040516020818303038152906040528051906020012092506105fb565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50600101610571565b50909214949350505050565b5f81831061061e5781610620565b825b90505b92915050565b80356001600160a01b038116811461063f575f80fd5b919050565b5f805f8060608587031215610657575f80fd5b61066085610629565b935060208501359250604085013567ffffffffffffffff811115610682575f80fd5b8501601f81018713610692575f80fd5b803567ffffffffffffffff8111156106a8575f80fd5b8760208260051b84010111156106bc575f80fd5b949793965060200194505050565b5f80604083850312156106db575f80fd5b6106e483610629565b946020939093013593505050565b5f60208284031215610702575f80fd5b61062082610629565b5f6020828403121561071b575f80fd5b5035919050565b5f8060408385031215610733575f80fd5b8235915061074360208401610629565b90509250929050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156106235761062361074c565b808201808211156106235761062361074c565b5f60208284031215610796575f80fd5b815180151581146107a5575f80fd5b9392505050565b634e487b7160e01b5f52603260045260245ffdfea2646970667358221220ffe361e27edf9c7a364d8300b54b3bed937da68cf195946ced278cc1da59d3e764736f6c634300081a0033
Deployed Bytecode Sourcemap
61:2424:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;147:25;;;;;;;;;160::1;;;148:2;133:18;147:25:0;;;;;;;;1324:479;;;;;;:::i;:::-;;:::i;:::-;;117:23;;;;;-1:-1:-1;;;;;117:23:0;;;;;;-1:-1:-1;;;;;1357:32:1;;;1339:51;;1327:2;1312:18;117:23:0;1177:219:1;1191:125:0;;;;;;:::i;:::-;;:::i;261:36::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2062:14:1;;2055:22;2037:41;;2025:2;2010:18;261:36:0;1897:187:1;1061:122:0;;;;;;:::i;:::-;;:::i;212:42::-;;;;;;:::i;:::-;;;;;;;;;;;;;;823:230;;;;;;:::i;:::-;;:::i;179:26::-;;;;;;91:19;;;;;-1:-1:-1;;;;;91:19:0;;;1324:479;1439:29;;-1:-1:-1;;3206:2:1;3202:15;;;3198:53;1439:29:0;;;3186:66:1;3268:12;;;3261:28;;;1414:12:0;;3305::1;;1439:29:0;;;;;;;;;;;;1429:40;;;;;;1414:55;;1488:31;1495:5;;1502:10;;1514:4;1488:6;:31::i;:::-;1480:57;;;;-1:-1:-1;;;1480:57:0;;3530:2:1;1480:57:0;;;3512:21:1;3569:2;3549:18;;;3542:30;-1:-1:-1;;;3588:18:1;;;3581:43;3641:18;;1480:57:0;;;;;;;;-1:-1:-1;;;;;1584:13:0;;1548:14;1584:13;;;:7;:13;;;;;;1573:25;;1577:5;;1573:3;:25::i;:::-;1565:33;;:5;:33;:::i;:::-;-1:-1:-1;;;;;1609:13:0;;;;;;:7;:13;;;;;:21;;;1641:11;:21;;1548:50;;-1:-1:-1;1548:50:0;;1641:11;;1609:13;1641:21;;1548:50;;1641:21;:::i;:::-;;;;-1:-1:-1;;1673:5:0;;;1695:7;1673:39;;-1:-1:-1;;;1673:39:0;;-1:-1:-1;;;;;1695:7:0;;;1673:39;;;4239:51:1;4306:18;;;4299:34;;;1673:5:0;;;:13;;4212:18:1;;1673:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1723:7:0;;:29;;-1:-1:-1;;;1723:29:0;;;;;4518:25:1;;;-1:-1:-1;;;;;4579:32:1;;;4559:18;;;4552:60;1723:7:0;;;;-1:-1:-1;1723:15:0;;-1:-1:-1;4491:18:1;;1723:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1768:27:0;;;4797:25:1;;;4853:2;4838:18;;4831:34;;;-1:-1:-1;;;;;1768:27:0;;;-1:-1:-1;1768:27:0;;-1:-1:-1;4770:18:1;1768:27:0;;;;;;;1403:400;;1324:479;;;;:::o;1191:125::-;761:10;756:16;;;;:4;:16;;;;;;;;751:44;;781:14;;-1:-1:-1;;;781:14:0;;;;;;;;;;;751:44;1265:43:::1;::::0;-1:-1:-1;;;1265:43:0;;1289:10:::1;1265:43;::::0;::::1;4239:51:1::0;4306:18;;;4299:34;;;-1:-1:-1;;;;;1265:23:0;::::1;::::0;::::1;::::0;4212:18:1;;1265:43:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1191:125:::0;;:::o;1061:122::-;761:10;756:16;;;;:4;:16;;;;;;;;751:44;;781:14;;-1:-1:-1;;;781:14:0;;;;;;;;;;;751:44;1123:10:::1;:17:::0;;;1156:19:::1;::::0;160:25:1;;;1156:19:0::1;::::0;148:2:1;133:18;1156:19:0::1;;;;;;;1061:122:::0;:::o;823:230::-;761:10;756:16;;;;:4;:16;;;;;;;;751:44;;781:14;;-1:-1:-1;;;781:14:0;;;;;;;;;;;751:44;894:4:::1;-1:-1:-1::0;;;894:14:0;890:124:::1;;-1:-1:-1::0;;;;;939:10:0;::::1;;::::0;;;:4:::1;:10;::::0;;;;;;-1:-1:-1;;925:24:0;::::1;939:10;::::0;;::::1;938:11;925:24;::::0;;890:124:::1;;;989:13;;-1:-1:-1::0;;;989:13:0::1;;;;;;;;;;;890:124;1029:16;::::0;-1:-1:-1;;;;;1357:32:1;;1339:51;;1034:4:0;;1029:16:::1;::::0;1327:2:1;1312:18;1029:16:0::1;;;;;;;823:230:::0;;:::o;1811:557::-;1904:4;1944;1904;1959:364;1979:16;;;1959:364;;;2017:20;2040:5;;2046:1;2040:8;;;;;;;:::i;:::-;;;;;;;2017:31;;2082:12;2067;:27;2063:249;;;2140:44;;;;;;5655:19:1;;;5690:12;;;5683:28;;;5727:12;;2140:44:0;;;;;;;;;;;;2130:55;;;;;;2115:70;;2063:249;;;2251:44;;;;;;5655:19:1;;;5690:12;;;5683:28;;;5727:12;;2251:44:0;;;;;;;;;;;;2241:55;;;;;;2226:70;;2063:249;-1:-1:-1;1997:3:0;;1959:364;;;-1:-1:-1;2340:20:0;;;;1811:557;-1:-1:-1;;;;1811:557:0:o;2376:106::-;2434:7;2465:1;2461;:5;:13;;2473:1;2461:13;;;2469:1;2461:13;2454:20;;2376:106;;;;;:::o;196:173:1:-;264:20;;-1:-1:-1;;;;;313:31:1;;303:42;;293:70;;359:1;356;349:12;293:70;196:173;;;:::o;374:798::-;478:6;486;494;502;555:2;543:9;534:7;530:23;526:32;523:52;;;571:1;568;561:12;523:52;594:29;613:9;594:29;:::i;:::-;584:39;-1:-1:-1;692:2:1;677:18;;664:32;;-1:-1:-1;771:2:1;756:18;;743:32;798:18;787:30;;784:50;;;830:1;827;820:12;784:50;853:22;;906:4;898:13;;894:27;-1:-1:-1;884:55:1;;935:1;932;925:12;884:55;975:2;962:16;1001:18;993:6;990:30;987:50;;;1033:1;1030;1023:12;987:50;1086:7;1081:2;1071:6;1068:1;1064:14;1060:2;1056:23;1052:32;1049:45;1046:65;;;1107:1;1104;1097:12;1046:65;374:798;;;;-1:-1:-1;1138:2:1;1130:11;;-1:-1:-1;;;374:798:1:o;1401:300::-;1469:6;1477;1530:2;1518:9;1509:7;1505:23;1501:32;1498:52;;;1546:1;1543;1536:12;1498:52;1569:29;1588:9;1569:29;:::i;:::-;1559:39;1667:2;1652:18;;;;1639:32;;-1:-1:-1;;;1401:300:1:o;1706:186::-;1765:6;1818:2;1806:9;1797:7;1793:23;1789:32;1786:52;;;1834:1;1831;1824:12;1786:52;1857:29;1876:9;1857:29;:::i;2089:226::-;2148:6;2201:2;2189:9;2180:7;2176:23;2172:32;2169:52;;;2217:1;2214;2207:12;2169:52;-1:-1:-1;2262:23:1;;2089:226;-1:-1:-1;2089:226:1:o;2502:300::-;2570:6;2578;2631:2;2619:9;2610:7;2606:23;2602:32;2599:52;;;2647:1;2644;2637:12;2599:52;2692:23;;;-1:-1:-1;2758:38:1;2792:2;2777:18;;2758:38;:::i;:::-;2748:48;;2502:300;;;;;:::o;3670:127::-;3731:10;3726:3;3722:20;3719:1;3712:31;3762:4;3759:1;3752:15;3786:4;3783:1;3776:15;3802:128;3869:9;;;3890:11;;;3887:37;;;3904:18;;:::i;3935:125::-;4000:9;;;4021:10;;;4018:36;;;4034:18;;:::i;4876:277::-;4943:6;4996:2;4984:9;4975:7;4971:23;4967:32;4964:52;;;5012:1;5009;5002:12;4964:52;5044:9;5038:16;5097:5;5090:13;5083:21;5076:5;5073:32;5063:60;;5119:1;5116;5109:12;5063:60;5142:5;4876:277;-1:-1:-1;;;4876:277:1:o;5366:127::-;5427:10;5422:3;5418:20;5415:1;5408:31;5458:4;5455:1;5448:15;5482:4;5479:1;5472:15
Swarm Source
ipfs://ffe361e27edf9c7a364d8300b54b3bed937da68cf195946ced278cc1da59d3e7
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.007967 | 48,312.9314 | $384.93 |
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.