Overview
S Balance
0 S
S Value
-More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
Multicall
Compiler Version
v0.7.6+commit.7338295f
Contract Source Code (Solidity)
/** *Submitted for verification at SonicScan.org on 2024-12-19 */ // SPDX-License-Identifier: MIT pragma solidity =0.7.6; pragma abicoder v2; /// @notice A fork of Multicall2 specifically tailored for the Uniswap Interface contract Multicall { struct Call { address target; uint256 gasLimit; bytes callData; } struct Result { bool success; uint256 gasUsed; bytes returnData; } function getCurrentBlockTimestamp() public view returns (uint256 timestamp) { timestamp = block.timestamp; } function getEthBalance(address addr) public view returns (uint256 balance) { balance = addr.balance; } function multicall(Call[] memory calls) public returns (uint256 blockNumber, Result[] memory returnData) { blockNumber = block.number; returnData = new Result[](calls.length); for (uint256 i = 0; i < calls.length; i++) { (address target, uint256 gasLimit, bytes memory callData) = (calls[i].target, calls[i].gasLimit, calls[i].callData); uint256 gasLeftBefore = gasleft(); (bool success, bytes memory ret) = target.call{gas: gasLimit}(callData); uint256 gasUsed = gasLeftBefore - gasleft(); returnData[i] = Result(success, gasUsed, ret); } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall.Call[]","name":"calls","type":"tuple[]"}],"name":"multicall","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"gasUsed","type":"uint256"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct Multicall.Result[]","name":"returnData","type":"tuple[]"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061050f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630f28c97d146100465780631749e1e3146100645780634d2301cc14610085575b600080fd5b61004e610098565b60405161005b91906103da565b60405180910390f35b610077610072366004610280565b61009c565b60405161005b9291906103e3565b61004e61009336600461025f565b610213565b4290565b8051439060609067ffffffffffffffff811180156100b957600080fd5b506040519080825280602002602001820160405280156100f357816020015b6100e0610220565b8152602001906001900390816100d85790505b50905060005b835181101561020d57600080600086848151811061011357fe5b60200260200101516000015187858151811061012b57fe5b60200260200101516020015188868151811061014357fe5b60200260200101516040015192509250925060005a9050600080856001600160a01b0316858560405161017691906103be565b60006040518083038160008787f1925050503d80600081146101b4576040519150601f19603f3d011682016040523d82523d6000602084013e6101b9565b606091505b509150915060005a8403905060405180606001604052808415158152602001828152602001838152508989815181106101ee57fe5b60200260200101819052505050505050505080806001019150506100f9565b50915091565b6001600160a01b03163190565b604051806060016040528060001515815260200160008152602001606081525090565b80356001600160a01b038116811461025a57600080fd5b919050565b600060208284031215610270578081fd5b61027982610243565b9392505050565b60006020808385031215610292578182fd5b823567ffffffffffffffff808211156102a9578384fd5b818501915085601f8301126102bc578384fd5b8135818111156102c857fe5b6102d58485830201610485565b81815284810190848601875b848110156103af5781358701601f196060828e0382011215610301578a8bfd5b60408051606081018181108b8211171561031757fe5b8252610324848d01610243565b8152818401358c82015260608401358a81111561033f578d8efd5b8085019450508e603f850112610353578c8dfd5b8b8401358a81111561036157fe5b6103718d85601f84011601610485565b93508084528f83828701011115610386578d8efd5b808386018e86013783018c018d90529081019190915285525092870192908701906001016102e1565b50909998505050505050505050565b600082516103d08184602087016104a9565b9190910192915050565b90815260200190565b600060408083018584526020828186015281865180845260609350838701915083838202880101838901875b8381101561047557898303605f19018552815180511515845286810151878501528801518884018890528051888501819052608061045282828801858c016104a9565b96880196601f91909101601f19169490940190930192509085019060010161040f565b50909a9950505050505050505050565b60405181810167ffffffffffffffff811182821017156104a157fe5b604052919050565b60005b838110156104c45781810151838201526020016104ac565b838111156104d3576000848401525b5050505056fea2646970667358221220833f3d851ebbb6f1c39c50d1006d8782c46450ee75b827fe9bb47a8b90a7b4fa64736f6c63430007060033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c80630f28c97d146100465780631749e1e3146100645780634d2301cc14610085575b600080fd5b61004e610098565b60405161005b91906103da565b60405180910390f35b610077610072366004610280565b61009c565b60405161005b9291906103e3565b61004e61009336600461025f565b610213565b4290565b8051439060609067ffffffffffffffff811180156100b957600080fd5b506040519080825280602002602001820160405280156100f357816020015b6100e0610220565b8152602001906001900390816100d85790505b50905060005b835181101561020d57600080600086848151811061011357fe5b60200260200101516000015187858151811061012b57fe5b60200260200101516020015188868151811061014357fe5b60200260200101516040015192509250925060005a9050600080856001600160a01b0316858560405161017691906103be565b60006040518083038160008787f1925050503d80600081146101b4576040519150601f19603f3d011682016040523d82523d6000602084013e6101b9565b606091505b509150915060005a8403905060405180606001604052808415158152602001828152602001838152508989815181106101ee57fe5b60200260200101819052505050505050505080806001019150506100f9565b50915091565b6001600160a01b03163190565b604051806060016040528060001515815260200160008152602001606081525090565b80356001600160a01b038116811461025a57600080fd5b919050565b600060208284031215610270578081fd5b61027982610243565b9392505050565b60006020808385031215610292578182fd5b823567ffffffffffffffff808211156102a9578384fd5b818501915085601f8301126102bc578384fd5b8135818111156102c857fe5b6102d58485830201610485565b81815284810190848601875b848110156103af5781358701601f196060828e0382011215610301578a8bfd5b60408051606081018181108b8211171561031757fe5b8252610324848d01610243565b8152818401358c82015260608401358a81111561033f578d8efd5b8085019450508e603f850112610353578c8dfd5b8b8401358a81111561036157fe5b6103718d85601f84011601610485565b93508084528f83828701011115610386578d8efd5b808386018e86013783018c018d90529081019190915285525092870192908701906001016102e1565b50909998505050505050505050565b600082516103d08184602087016104a9565b9190910192915050565b90815260200190565b600060408083018584526020828186015281865180845260609350838701915083838202880101838901875b8381101561047557898303605f19018552815180511515845286810151878501528801518884018890528051888501819052608061045282828801858c016104a9565b96880196601f91909101601f19169490940190930192509085019060010161040f565b50909a9950505050505050505050565b60405181810167ffffffffffffffff811182821017156104a157fe5b604052919050565b60005b838110156104c45781810151838201526020016104ac565b838111156104d3576000848401525b5050505056fea2646970667358221220833f3d851ebbb6f1c39c50d1006d8782c46450ee75b827fe9bb47a8b90a7b4fa64736f6c63430007060033
Deployed Bytecode Sourcemap
163:1158:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;400:122;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;654:664;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;530:116::-;;;;;;:::i;:::-;;:::i;400:122::-;499:15;;400:122::o;654:664::-;833:12;;784;;731:26;;820;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;807:39;;862:9;857:454;881:5;:12;877:1;:16;857:454;;;916:14;932:16;950:21;993:5;999:1;993:8;;;;;;;;;;;;;;:15;;;1010:5;1016:1;1010:8;;;;;;;;;;;;;;:17;;;1029:5;1035:1;1029:8;;;;;;;;;;;;;;:17;;;915:132;;;;;;1062:21;1086:9;1062:33;;1111:12;1125:16;1145:6;-1:-1:-1;;;;;1145:11:0;1162:8;1172;1145:36;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1110:71;;;;1196:15;1230:9;1214:13;:25;1196:43;;1270:29;;;;;;;;1277:7;1270:29;;;;;;1286:7;1270:29;;;;1295:3;1270:29;;;1254:10;1265:1;1254:13;;;;;;;;;;;;;:45;;;;857:454;;;;;;;895:3;;;;;;;857:454;;;;654:664;;;:::o;530:116::-;-1:-1:-1;;;;;626:12:0;;;530:116::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:175:1:-;84:20;;-1:-1:-1;;;;;133:31:1;;123:42;;113:2;;179:1;176;169:12;113:2;65:124;;;:::o;194:198::-;;306:2;294:9;285:7;281:23;277:32;274:2;;;327:6;319;312:22;274:2;355:31;376:9;355:31;:::i;:::-;345:41;264:128;-1:-1:-1;;;264:128:1:o;397:2063::-;;532:2;575;563:9;554:7;550:23;546:32;543:2;;;596:6;588;581:22;543:2;641:9;628:23;670:18;711:2;703:6;700:14;697:2;;;732:6;724;717:22;697:2;775:6;764:9;760:22;750:32;;820:7;813:4;809:2;805:13;801:27;791:2;;847:6;839;832:22;791:2;888;875:16;910:2;906;903:10;900:2;;;916:9;900:2;947:36;979:2;974;970;966:11;962:20;947:36;:::i;:::-;1017:15;;;1048:12;;;;1080:11;;;1109:6;1124:1306;1138:2;1135:1;1132:9;1124:1306;;;1201:17;;1193:26;;-1:-1:-1;;1296:4:1;1273:16;;;1269:25;;1265:36;1262:2;;;1319:6;1311;1304:22;1262:2;1351;1386;1380:9;1432:4;1424:6;1420:17;1491:6;1479:10;1476:22;1471:2;1459:10;1456:18;1453:46;1450:2;;;1502:9;1450:2;1526:22;;1576:33;1597:11;;;1576:33;:::i;:::-;1568:6;1561:49;1668:2;1664;1660:11;1647:25;1642:2;1634:6;1630:15;1623:50;1723:4;1719:2;1715:13;1702:27;1758:2;1748:8;1745:16;1742:2;;;1779:6;1771;1764:22;1742:2;1819:8;1815:2;1811:17;1801:27;;;1868:7;1863:2;1859;1855:11;1851:25;1841:2;;1895:6;1887;1880:22;1841:2;1948;1944;1940:11;1927:25;1975:2;1971;1968:10;1965:2;;;1981:9;1965:2;2018:47;2061:2;2056;2049:4;2045:2;2041:13;2037:22;2033:31;2018:47;:::i;:::-;2005:60;;2092:2;2085:5;2078:17;2136:7;2131:2;2126;2122;2118:11;2114:20;2111:33;2108:2;;;2162:6;2154;2147:22;2108:2;2226;2221;2217;2213:11;2208:2;2201:5;2197:14;2184:45;2253:14;;2249:23;;2242:39;;;2301:15;;;2294:30;;;;2337:19;;-1:-1:-1;2376:12:1;;;;2408;;;;1156:1;1149:9;1124:1306;;;-1:-1:-1;2449:5:1;;512:1948;-1:-1:-1;;;;;;;;;512:1948:1:o;2465:274::-;;2632:6;2626:13;2648:53;2694:6;2689:3;2682:4;2674:6;2670:17;2648:53;:::i;:::-;2717:16;;;;;2602:137;-1:-1:-1;;2602:137:1:o;2744:177::-;2890:25;;;2878:2;2863:18;;2845:76::o;2926:1398::-;;3169:2;3209;3198:9;3194:18;3239:6;3228:9;3221:25;3265:2;3303;3298;3287:9;3283:18;3276:30;3326:6;3361;3355:13;3392:6;3384;3377:22;3418:2;3408:12;;3451:2;3440:9;3436:18;3429:25;;3514:2;3508;3500:6;3496:15;3485:9;3481:31;3477:40;3552:2;3544:6;3540:15;3573:4;3586:709;3600:6;3597:1;3594:13;3586:709;;;3665:22;;;-1:-1:-1;;3661:36:1;3649:49;;3721:13;;3776:9;;3769:17;3762:25;3747:41;;3831:11;;;3825:18;3808:15;;;3801:43;3883:11;;3877:18;3915:15;;;3908:27;;;3964:19;;4003:15;;;3996:33;;;4052:3;4068:71;3964:19;4113:15;;;4090:21;;;4068:71;:::i;:::-;4273:12;;;;4205:2;4182:17;;;;-1:-1:-1;;4178:31:1;4166:44;;;;4162:53;;;;-1:-1:-1;4238:15:1;;;;3622:1;3615:9;3586:709;;;-1:-1:-1;4312:6:1;;3149:1175;-1:-1:-1;;;;;;;;;;3149:1175:1:o;4329:242::-;4399:2;4393:9;4429:17;;;4476:18;4461:34;;4497:22;;;4458:62;4455:2;;;4523:9;4455:2;4550;4543:22;4373:198;;-1:-1:-1;4373:198:1:o;4576:258::-;4648:1;4658:113;4672:6;4669:1;4666:13;4658:113;;;4748:11;;;4742:18;4729:11;;;4722:39;4694:2;4687:10;4658:113;;;4789:6;4786:1;4783:13;4780:2;;;4824:1;4815:6;4810:3;4806:16;4799:27;4780:2;;4629:205;;;:::o
Swarm Source
ipfs://833f3d851ebbb6f1c39c50d1006d8782c46450ee75b827fe9bb47a8b90a7b4fa
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.