Contract 0x842eC2c7D803033Edf55E478F461FC547Bc54EB2

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xb806e1921911e3c2141a06fd163cdcbf267a8e03b0069cbc0b2b25f1e864c6ed0x252dba4260285762022-02-14 8:42:33183 days 16 hrs ago0x23c56da8855b2a8778a6219840860d7514605a7a IN  Arbitrum: L2 Multicall0 ETH0.‍000241978308 ETH
0x005d388f6419fc0f08a28ec8837f2989e24ff924d90f54992d1ffa63f264f6970x608060408219232021-09-14 12:57:16336 days 12 hrs agoArbitrum: Deployer 1 IN  Create: Multicall20 ETH0.‍016901671235 ETH
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xb806e1921911e3c2141a06fd163cdcbf267a8e03b0069cbc0b2b25f1e864c6ed60285762022-02-14 8:42:33183 days 16 hrs ago Arbitrum: L2 Multicall Arbitrum: ArbSys0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Multicall2

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 1 : Multicall2.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;
pragma experimental ABIEncoderV2;

interface ArbSys {
    /**
    * @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0)
    * @return block number as int
     */ 
    function arbBlockNumber() external view returns (uint);
}

/// @title Multicall2 - Aggregate results from multiple read-only function calls
/// @author Michael Elliot <[email protected]>
/// @author Joshua Levine <[email protected]>
/// @author Nick Johnson <[email protected]>

contract Multicall2 {
    struct Call {
        address target;
        bytes callData;
    }
    struct Result {
        bool success;
        bytes returnData;
    }

    function aggregate(Call[] memory calls) public returns (uint256 blockNumber, bytes[] memory returnData) {
        blockNumber = ArbSys(address(100)).arbBlockNumber();
        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, "Multicall aggregate: call failed");
            returnData[i] = ret;
        }
    }
    function blockAndAggregate(Call[] memory calls) public returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData) {
        (blockNumber, blockHash, returnData) = tryBlockAndAggregate(true, calls);
    }
    function getBlockHash(uint256 blockNumber) public view returns (bytes32 blockHash) {
        blockHash = blockhash(blockNumber);
    }
    function getBlockNumber() public view returns (uint256 blockNumber) {
        blockNumber = ArbSys(address(100)).arbBlockNumber();
    }
    function getL1BlockNumber() public view returns (uint256 l1BlockNumber) {
        l1BlockNumber = block.number;
    }
    function getCurrentBlockCoinbase() public view returns (address coinbase) {
        coinbase = block.coinbase;
    }
    function getCurrentBlockDifficulty() public view returns (uint256 difficulty) {
        difficulty = block.difficulty;
    }
    function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) {
        gaslimit = block.gaslimit;
    }
    function getCurrentBlockTimestamp() public view returns (uint256 timestamp) {
        timestamp = block.timestamp;
    }
    function getEthBalance(address addr) public view returns (uint256 balance) {
        balance = addr.balance;
    }
    function getLastBlockHash() public view returns (bytes32 blockHash) {
        blockHash = blockhash(ArbSys(address(100)).arbBlockNumber() - 1);
    }
    function tryAggregate(bool requireSuccess, Call[] memory calls) public returns (Result[] memory returnData) {
        returnData = new Result[](calls.length);
        for(uint256 i = 0; i < calls.length; i++) {
            (bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);

            if (requireSuccess) {
                require(success, "Multicall2 aggregate: call failed");
            }

            returnData[i] = Result(success, ret);
        }
    }
    function tryBlockAndAggregate(bool requireSuccess, Call[] memory calls) public returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData) {
        blockNumber = ArbSys(address(100)).arbBlockNumber();
        blockHash = blockhash(ArbSys(address(100)).arbBlockNumber());
        returnData = tryAggregate(requireSuccess, calls);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall2.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":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall2.Call[]","name":"calls","type":"tuple[]"}],"name":"blockAndAggregate","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct Multicall2.Result[]","name":"returnData","type":"tuple[]"}],"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":"getBlockNumber","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"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":"getL1BlockNumber","outputs":[{"internalType":"uint256","name":"l1BlockNumber","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastBlockHash","outputs":[{"internalType":"bytes32","name":"blockHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"requireSuccess","type":"bool"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall2.Call[]","name":"calls","type":"tuple[]"}],"name":"tryAggregate","outputs":[{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct Multicall2.Result[]","name":"returnData","type":"tuple[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"requireSuccess","type":"bool"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall2.Call[]","name":"calls","type":"tuple[]"}],"name":"tryBlockAndAggregate","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct Multicall2.Result[]","name":"returnData","type":"tuple[]"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610c43806100206000396000f3fe608060405234801561001057600080fd5b50600436106100bf5760003560e01c806372425d9d1161007c57806372425d9d1461014757806386d516e81461014d578063a8b0574e14610153578063b9b3efe914610161578063bce38bd714610167578063c3077fa914610187578063ee82ac5e1461019a57600080fd5b80630f28c97d146100c4578063252dba42146100d957806327e86d6e146100fa578063399542e91461010257806342cbb15c146101245780634d2301cc1461012c575b600080fd5b425b6040519081526020015b60405180910390f35b6100ec6100e73660046108f4565b6101ac565b6040516100d0929190610a7f565b6100c66103a6565b610115610110366004610930565b61042c565b6040516100d093929190610ae9565b6100c661052d565b6100c661013a3660046108d2565b6001600160a01b03163190565b446100c6565b456100c6565b6040514181526020016100d0565b436100c6565b61017a610175366004610930565b6105a6565b6040516100d09190610a6c565b6101156101953660046108f4565b61075f565b6100c66101a8366004610984565b4090565b6000606060646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ea57600080fd5b505afa1580156101fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610222919061099d565b915082516001600160401b0381111561023d5761023d610bf7565b60405190808252806020026020018201604052801561027057816020015b606081526020019060019003908161025b5790505b50905060005b83518110156103a05760008085838151811061029457610294610be1565b6020026020010151600001516001600160a01b03168684815181106102bb576102bb610be1565b6020026020010151602001516040516102d49190610a50565b6000604051808303816000865af19150503d8060008114610311576040519150601f19603f3d011682016040523d82523d6000602084013e610316565b606091505b50915091508161036d5760405162461bcd60e51b815260206004820181905260248201527f4d756c746963616c6c206167677265676174653a2063616c6c206661696c656460448201526064015b60405180910390fd5b8084848151811061038057610380610be1565b60200260200101819052505050808061039890610bb0565b915050610276565b50915091565b6000600160646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103e457600080fd5b505afa1580156103f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041c919061099d565b6104269190610b69565b40905090565b600080606060646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561046b57600080fd5b505afa15801561047f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a3919061099d565b925060646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104df57600080fd5b505afa1580156104f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610517919061099d565b40915061052485856105a6565b90509250925092565b600060646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561056957600080fd5b505afa15801561057d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a1919061099d565b905090565b606081516001600160401b038111156105c1576105c1610bf7565b60405190808252806020026020018201604052801561060757816020015b6040805180820190915260008152606060208201528152602001906001900390816105df5790505b50905060005b82518110156107585760008084838151811061062b5761062b610be1565b6020026020010151600001516001600160a01b031685848151811061065257610652610be1565b60200260200101516020015160405161066b9190610a50565b6000604051808303816000865af19150503d80600081146106a8576040519150601f19603f3d011682016040523d82523d6000602084013e6106ad565b606091505b5091509150851561070f578161070f5760405162461bcd60e51b815260206004820152602160248201527f4d756c746963616c6c32206167677265676174653a2063616c6c206661696c656044820152601960fa1b6064820152608401610364565b604051806040016040528083151581526020018281525084848151811061073857610738610be1565b60200260200101819052505050808061075090610bb0565b91505061060d565b5092915050565b600080606061076f60018561042c565b9196909550909350915050565b80356001600160a01b038116811461079357600080fd5b919050565b600082601f8301126107a957600080fd5b813560206001600160401b03808311156107c5576107c5610bf7565b8260051b6107d4838201610b39565b8481528381019087850183890186018a10156107ef57600080fd5b600093505b868410156108c55780358581111561080b57600080fd5b89016040601f19828d03810182131561082357600080fd5b61082b610b11565b6108368a850161077c565b8152828401358981111561084957600080fd5b8085019450508d603f85011261085e57600080fd5b898401358981111561087257610872610bf7565b6108828b84601f84011601610b39565b92508083528e8482870101111561089857600080fd5b808486018c85013760009083018b0152808a019190915285525050600193909301929185019185016107f4565b5098975050505050505050565b6000602082840312156108e457600080fd5b6108ed8261077c565b9392505050565b60006020828403121561090657600080fd5b81356001600160401b0381111561091c57600080fd5b61092884828501610798565b949350505050565b6000806040838503121561094357600080fd5b8235801515811461095357600080fd5b915060208301356001600160401b0381111561096e57600080fd5b61097a85828601610798565b9150509250929050565b60006020828403121561099657600080fd5b5035919050565b6000602082840312156109af57600080fd5b5051919050565b600082825180855260208086019550808260051b84010181860160005b84811015610a1757858303601f1901895281518051151584528401516040858501819052610a0381860183610a24565b9a86019a94505050908301906001016109d3565b5090979650505050505050565b60008151808452610a3c816020860160208601610b80565b601f01601f19169290920160200192915050565b60008251610a62818460208701610b80565b9190910192915050565b6020815260006108ed60208301846109b6565b600060408201848352602060408185015281855180845260608601915060608160051b870101935082870160005b82811015610adb57605f19888703018452610ac9868351610a24565b95509284019290840190600101610aad565b509398975050505050505050565b838152826020820152606060408201526000610b0860608301846109b6565b95945050505050565b604080519081016001600160401b0381118282101715610b3357610b33610bf7565b60405290565b604051601f8201601f191681016001600160401b0381118282101715610b6157610b61610bf7565b604052919050565b600082821015610b7b57610b7b610bcb565b500390565b60005b83811015610b9b578181015183820152602001610b83565b83811115610baa576000848401525b50505050565b6000600019821415610bc457610bc4610bcb565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212206163776c17cd7c4dba2afd5ddcf3e9337540f2260aa0e397399030821497bc8564736f6c63430008070033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.