Overview
APE Balance
0 APE
APE Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Multicall
Compiler Version
v0.8.24+commit.e11b9ed9
Contract Source Code (Solidity)
/** *Submitted for verification at apescan.io on 2024-10-30 */ // SPDX-License-Identifier:MIT pragma solidity ^0.8.24; pragma experimental ABIEncoderV2; /// @title Multicall - Aggregate results from multiple read-only function calls /// @author Michael Elliot <[email protected]> /// @author Joshua Levine <[email protected]> /// @author Nick Johnson <[email protected]> contract Multicall { struct Call { address target; bytes callData; } function aggregate(Call[] memory calls) public returns (uint256 blockNumber, bytes[] memory returnData) { blockNumber = block.number; returnData = new bytes[](calls.length); for(uint256 i = 0; i < calls.length; i++) { (bool success, bytes memory ret) = calls[i].target.call(calls[i].callData); require(success); returnData[i] = ret; } } // Helper functions function getEthBalance(address addr) public view returns (uint256 balance) { balance = addr.balance; } function getBlockHash(uint256 blockNumber) public view returns (bytes32 blockHash) { blockHash = blockhash(blockNumber); } function getLastBlockHash() public view returns (bytes32 blockHash) { blockHash = blockhash(block.number - 1); } function getCurrentBlockTimestamp() public view returns (uint256 timestamp) { timestamp = block.timestamp; } function getCurrentBlockDifficulty() public view returns (uint256 difficulty) { difficulty = block.prevrandao; } function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) { gaslimit = block.gaslimit; } function getCurrentBlockCoinbase() public view returns (address coinbase) { coinbase = block.coinbase; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall.Call[]","name":"calls","type":"tuple[]"}],"name":"aggregate","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes[]","name":"returnData","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getBlockHash","outputs":[{"internalType":"bytes32","name":"blockHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentBlockCoinbase","outputs":[{"internalType":"address","name":"coinbase","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentBlockDifficulty","outputs":[{"internalType":"uint256","name":"difficulty","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentBlockGasLimit","outputs":[{"internalType":"uint256","name":"gaslimit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentBlockTimestamp","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getEthBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastBlockHash","outputs":[{"internalType":"bytes32","name":"blockHash","type":"bytes32"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561000f575f80fd5b506105878061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610085575f3560e01c806372425d9d1161005857806372425d9d146100e257806386d516e8146100e8578063a8b0574e146100ee578063ee82ac5e146100fc575f80fd5b80630f28c97d14610089578063252dba421461009e57806327e86d6e146100bf5780634d2301cc146100c7575b5f80fd5b425b6040519081526020015b60405180910390f35b6100b16100ac3660046102d6565b61010e565b604051610095929190610446565b61008b61023b565b61008b6100d53660046104c6565b6001600160a01b03163190565b4461008b565b4561008b565b604051418152602001610095565b61008b61010a3660046104e6565b4090565b8051439060609067ffffffffffffffff81111561012d5761012d61024d565b60405190808252806020026020018201604052801561016057816020015b606081526020019060019003908161014b5790505b5090505f5b8351811015610235575f80858381518110610182576101826104fd565b60200260200101515f01516001600160a01b03168684815181106101a8576101a86104fd565b6020026020010151602001516040516101c19190610511565b5f604051808303815f865af19150503d805f81146101fa576040519150601f19603f3d011682016040523d82523d5f602084013e6101ff565b606091505b50915091508161020d575f80fd5b80848481518110610220576102206104fd565b60209081029190910101525050600101610165565b50915091565b5f61024760014361052c565b40905090565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156102845761028461024d565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156102b3576102b361024d565b604052919050565b80356001600160a01b03811681146102d1575f80fd5b919050565b5f60208083850312156102e7575f80fd5b823567ffffffffffffffff808211156102fe575f80fd5b818501915085601f830112610311575f80fd5b8135818111156103235761032361024d565b8060051b61033285820161028a565b918252838101850191858101908984111561034b575f80fd5b86860192505b8383101561041757823585811115610367575f80fd5b86016040601f19828d03810182131561037e575f80fd5b610386610261565b6103918b85016102bb565b815282840135898111156103a3575f80fd5b8085019450508d603f8501126103b7575f80fd5b8a840135898111156103cb576103cb61024d565b6103db8c84601f8401160161028a565b92508083528e848287010111156103f0575f80fd5b808486018d8501375f9083018c0152808b0191909152845250509186019190860190610351565b9998505050505050505050565b5f5b8381101561043e578181015183820152602001610426565b50505f910152565b5f60408201848352602060408185015281855180845260608601915060608160051b87010193508287015f5b828110156104b857878603605f190184528151805180885261049981888a01898501610424565b601f01601f191696909601850195509284019290840190600101610472565b509398975050505050505050565b5f602082840312156104d6575f80fd5b6104df826102bb565b9392505050565b5f602082840312156104f6575f80fd5b5035919050565b634e487b7160e01b5f52603260045260245ffd5b5f8251610522818460208701610424565b9190910192915050565b8181038181111561054b57634e487b7160e01b5f52601160045260245ffd5b9291505056fea26469706673582212204a32d990c78d135a6e81a4a5c5834f398390858acabc968909da29345d1c6b7864736f6c63430008180033
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610085575f3560e01c806372425d9d1161005857806372425d9d146100e257806386d516e8146100e8578063a8b0574e146100ee578063ee82ac5e146100fc575f80fd5b80630f28c97d14610089578063252dba421461009e57806327e86d6e146100bf5780634d2301cc146100c7575b5f80fd5b425b6040519081526020015b60405180910390f35b6100b16100ac3660046102d6565b61010e565b604051610095929190610446565b61008b61023b565b61008b6100d53660046104c6565b6001600160a01b03163190565b4461008b565b4561008b565b604051418152602001610095565b61008b61010a3660046104e6565b4090565b8051439060609067ffffffffffffffff81111561012d5761012d61024d565b60405190808252806020026020018201604052801561016057816020015b606081526020019060019003908161014b5790505b5090505f5b8351811015610235575f80858381518110610182576101826104fd565b60200260200101515f01516001600160a01b03168684815181106101a8576101a86104fd565b6020026020010151602001516040516101c19190610511565b5f604051808303815f865af19150503d805f81146101fa576040519150601f19603f3d011682016040523d82523d5f602084013e6101ff565b606091505b50915091508161020d575f80fd5b80848481518110610220576102206104fd565b60209081029190910101525050600101610165565b50915091565b5f61024760014361052c565b40905090565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156102845761028461024d565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156102b3576102b361024d565b604052919050565b80356001600160a01b03811681146102d1575f80fd5b919050565b5f60208083850312156102e7575f80fd5b823567ffffffffffffffff808211156102fe575f80fd5b818501915085601f830112610311575f80fd5b8135818111156103235761032361024d565b8060051b61033285820161028a565b918252838101850191858101908984111561034b575f80fd5b86860192505b8383101561041757823585811115610367575f80fd5b86016040601f19828d03810182131561037e575f80fd5b610386610261565b6103918b85016102bb565b815282840135898111156103a3575f80fd5b8085019450508d603f8501126103b7575f80fd5b8a840135898111156103cb576103cb61024d565b6103db8c84601f8401160161028a565b92508083528e848287010111156103f0575f80fd5b808486018d8501375f9083018c0152808b0191909152845250509186019190860190610351565b9998505050505050505050565b5f5b8381101561043e578181015183820152602001610426565b50505f910152565b5f60408201848352602060408185015281855180845260608601915060608160051b87010193508287015f5b828110156104b857878603605f190184528151805180885261049981888a01898501610424565b601f01601f191696909601850195509284019290840190600101610472565b509398975050505050505050565b5f602082840312156104d6575f80fd5b6104df826102bb565b9392505050565b5f602082840312156104f6575f80fd5b5035919050565b634e487b7160e01b5f52603260045260245ffd5b5f8251610522818460208701610424565b9190910192915050565b8181038181111561054b57634e487b7160e01b5f52601160045260245ffd5b9291505056fea26469706673582212204a32d990c78d135a6e81a4a5c5834f398390858acabc968909da29345d1c6b7864736f6c63430008180033
Deployed Bytecode Sourcemap
325:1450:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1270:122;1369:15;1270:122;;;160:25:1;;;148:2;133:18;1270:122:0;;;;;;;;427:416;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;1138:126::-;;;:::i;874:116::-;;;;;;:::i;:::-;-1:-1:-1;;;;;970:12:0;;;874:116;1398:126;1500:16;1398:126;;1530:118;1626:14;1530:118;;1654;;;1750:14;4873:51:1;;4861:2;4846:18;1654:118:0;4727:203:1;996:136:0;;;;;;:::i;:::-;1102:22;;996:136;427:416;604:12;;556;;504:25;;592;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;579:38;;632:9;628:208;651:5;:12;647:1;:16;628:208;;;686:12;700:16;720:5;726:1;720:8;;;;;;;;:::i;:::-;;;;;;;:15;;;-1:-1:-1;;;;;720:20:0;741:5;747:1;741:8;;;;;;;;:::i;:::-;;;;;;;:17;;;720:39;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;685:74;;;;782:7;774:16;;;;;;821:3;805:10;816:1;805:13;;;;;;;;:::i;:::-;;;;;;;;;;:19;-1:-1:-1;;665:3:0;;628:208;;;;427:416;;;:::o;1138:126::-;1187:17;1239:16;1254:1;1239:12;:16;:::i;:::-;1229:27;1217:39;;1138:126;:::o;196:127:1:-;257:10;252:3;248:20;245:1;238:31;288:4;285:1;278:15;312:4;309:1;302:15;328:257;400:4;394:11;;;432:17;;479:18;464:34;;500:22;;;461:62;458:88;;;526:18;;:::i;:::-;562:4;555:24;328:257;:::o;590:275::-;661:2;655:9;726:2;707:13;;-1:-1:-1;;703:27:1;691:40;;761:18;746:34;;782:22;;;743:62;740:88;;;808:18;;:::i;:::-;844:2;837:22;590:275;;-1:-1:-1;590:275:1:o;870:173::-;938:20;;-1:-1:-1;;;;;987:31:1;;977:42;;967:70;;1033:1;1030;1023:12;967:70;870:173;;;:::o;1048:1958::-;1151:6;1182:2;1225;1213:9;1204:7;1200:23;1196:32;1193:52;;;1241:1;1238;1231:12;1193:52;1281:9;1268:23;1310:18;1351:2;1343:6;1340:14;1337:34;;;1367:1;1364;1357:12;1337:34;1405:6;1394:9;1390:22;1380:32;;1450:7;1443:4;1439:2;1435:13;1431:27;1421:55;;1472:1;1469;1462:12;1421:55;1508:2;1495:16;1530:2;1526;1523:10;1520:36;;;1536:18;;:::i;:::-;1582:2;1579:1;1575:10;1605:28;1629:2;1625;1621:11;1605:28;:::i;:::-;1667:15;;;1737:11;;;1733:20;;;1698:12;;;;1765:19;;;1762:39;;;1797:1;1794;1787:12;1762:39;1829:2;1825;1821:11;1810:22;;1841:1135;1857:6;1852:3;1849:15;1841:1135;;;1943:3;1930:17;1979:2;1966:11;1963:19;1960:39;;;1995:1;1992;1985:12;1960:39;2022:20;;2065:4;-1:-1:-1;;2123:16:1;;;2119:25;;2115:34;-1:-1:-1;2112:54:1;;;2162:1;2159;2152:12;2112:54;2192:22;;:::i;:::-;2241:31;2268:2;2264;2260:11;2241:31;:::i;:::-;2234:5;2227:46;2323:2;2319;2315:11;2302:25;2356:2;2346:8;2343:16;2340:36;;;2372:1;2369;2362:12;2340:36;2407:8;2403:2;2399:17;2389:27;;;2456:7;2451:2;2447;2443:11;2439:25;2429:53;;2478:1;2475;2468:12;2429:53;2527:2;2523;2519:11;2506:25;2555:2;2550:3;2547:11;2544:37;;;2561:18;;:::i;:::-;2607:49;2652:2;2647;2640:4;2635:3;2631:14;2627:23;2623:32;2607:49;:::i;:::-;2594:62;;2683:3;2676:5;2669:18;2729:7;2724:2;2718:3;2714:2;2710:12;2706:21;2703:34;2700:54;;;2750:1;2747;2740:12;2700:54;2809:3;2804:2;2800;2796:11;2791:2;2784:5;2780:14;2767:46;2859:1;2837:15;;;2833:24;;2826:35;2881:14;;;2874:29;;;;2916:18;;-1:-1:-1;;1874:12:1;;;;2954;;;;1841:1135;;;2995:5;1048:1958;-1:-1:-1;;;;;;;;;1048:1958:1:o;3011:250::-;3096:1;3106:113;3120:6;3117:1;3114:13;3106:113;;;3196:11;;;3190:18;3177:11;;;3170:39;3142:2;3135:10;3106:113;;;-1:-1:-1;;3253:1:1;3235:16;;3228:27;3011:250::o;3266:1083::-;3454:4;3502:2;3491:9;3487:18;3532:6;3521:9;3514:25;3558:2;3596;3591;3580:9;3576:18;3569:30;3619:6;3654;3648:13;3685:6;3677;3670:22;3723:2;3712:9;3708:18;3701:25;;3785:2;3775:6;3772:1;3768:14;3757:9;3753:30;3749:39;3735:53;;3823:2;3815:6;3811:15;3844:1;3854:466;3868:6;3865:1;3862:13;3854:466;;;3933:22;;;-1:-1:-1;;3929:36:1;3917:49;;3989:13;;4031:9;;4053:24;;;4090:74;4031:9;4138:15;;;4125:11;;;4090:74;:::i;:::-;4230:2;4207:17;-1:-1:-1;;4203:31:1;4191:44;;;;4187:53;;;-1:-1:-1;4298:12:1;;;;4263:15;;;;3890:1;3883:9;3854:466;;;-1:-1:-1;4337:6:1;;3266:1083;-1:-1:-1;;;;;;;;3266:1083:1:o;4536:186::-;4595:6;4648:2;4636:9;4627:7;4623:23;4619:32;4616:52;;;4664:1;4661;4654:12;4616:52;4687:29;4706:9;4687:29;:::i;:::-;4677:39;4536:186;-1:-1:-1;;;4536:186:1:o;4935:180::-;4994:6;5047:2;5035:9;5026:7;5022:23;5018:32;5015:52;;;5063:1;5060;5053:12;5015:52;-1:-1:-1;5086:23:1;;4935:180;-1:-1:-1;4935:180:1:o;5120:127::-;5181:10;5176:3;5172:20;5169:1;5162:31;5212:4;5209:1;5202:15;5236:4;5233:1;5226:15;5252:287;5381:3;5419:6;5413:13;5435:66;5494:6;5489:3;5482:4;5474:6;5470:17;5435:66;:::i;:::-;5517:16;;;;;5252:287;-1:-1:-1;;5252:287:1:o;5544:225::-;5611:9;;;5632:11;;;5629:134;;;5685:10;5680:3;5676:20;5673:1;5666:31;5720:4;5717:1;5710:15;5748:4;5745:1;5738:15;5629:134;5544:225;;;;:::o
Swarm Source
ipfs://4a32d990c78d135a6e81a4a5c5834f398390858acabc968909da29345d1c6b78
Loading...
Loading
Loading...
Loading
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.