Address Details
contract

0xa27A0C40A0a17485c11d1f342a95c946E9523551

Contract Name
Multicall
Creator
0x087927–0e4c89 at 0x1cb734–4d6158
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
14218929
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
Multicall




Optimization enabled
false
Compiler version
v0.6.6+commit.6c089d02




EVM Version
istanbul




Verified at
2022-08-24T16:47:19.075751Z

Multicall.sol

/**
 *Submitted for verification at snowtrace.io on 2022-02-28
*/

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.5.0;
pragma experimental ABIEncoderV2;

/// @title Multicall - Aggregate results from multiple read-only function calls
/// @author Michael Elliot <mike@makerdao.com>
/// @author Joshua Levine <joshua@makerdao.com>
/// @author Nick Johnson <arachnid@notdot.net>

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.difficulty;
    }

    function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) {
        gaslimit = block.gaslimit;
    }

    function getCurrentBlockCoinbase() public view returns (address coinbase) {
        coinbase = block.coinbase;
    }
}
        

Contract ABI

[{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"},{"type":"bytes[]","name":"returnData","internalType":"bytes[]"}],"name":"aggregate","inputs":[{"type":"tuple[]","name":"calls","internalType":"struct Multicall.Call[]","components":[{"type":"address","name":"target","internalType":"address"},{"type":"bytes","name":"callData","internalType":"bytes"}]}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"blockHash","internalType":"bytes32"}],"name":"getBlockHash","inputs":[{"type":"uint256","name":"blockNumber","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"coinbase","internalType":"address"}],"name":"getCurrentBlockCoinbase","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"difficulty","internalType":"uint256"}],"name":"getCurrentBlockDifficulty","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"gaslimit","internalType":"uint256"}],"name":"getCurrentBlockGasLimit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"timestamp","internalType":"uint256"}],"name":"getCurrentBlockTimestamp","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"balance","internalType":"uint256"}],"name":"getEthBalance","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"blockHash","internalType":"bytes32"}],"name":"getLastBlockHash","inputs":[]}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b506108c5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806372425d9d1161005b57806372425d9d1461012a57806386d516e814610148578063a8b0574e14610166578063ee82ac5e1461018457610088565b80630f28c97d1461008d578063252dba42146100ab57806327e86d6e146100dc5780634d2301cc146100fa575b600080fd5b6100956101b4565b6040516100a2919061069c565b60405180910390f35b6100c560048036038101906100c091906104c5565b6101bc565b6040516100d39291906106b7565b60405180910390f35b6100e46102f6565b6040516100f19190610681565b60405180910390f35b610114600480360381019061010f919061049c565b610302565b604051610121919061069c565b60405180910390f35b610132610323565b60405161013f919061069c565b60405180910390f35b61015061032b565b60405161015d919061069c565b60405180910390f35b61016e610333565b60405161017b9190610666565b60405180910390f35b61019e60048036038101906101999190610506565b61033b565b6040516101ab9190610681565b60405180910390f35b600042905090565b60006060439150825167ffffffffffffffff811180156101db57600080fd5b5060405190808252806020026020018201604052801561020f57816020015b60608152602001906001900390816101fa5790505b50905060008090505b83518110156102f0576000606085838151811061023157fe5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1686848151811061025f57fe5b602002602001015160200151604051610278919061064f565b6000604051808303816000865af19150503d80600081146102b5576040519150601f19603f3d011682016040523d82523d6000602084013e6102ba565b606091505b5091509150816102c957600080fd5b808484815181106102d657fe5b602002602001018190525050508080600101915050610218565b50915091565b60006001430340905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b600045905090565b600041905090565b600081409050919050565b60008135905061035581610861565b92915050565b600082601f83011261036c57600080fd5b813561037f61037a82610714565b6106e7565b9150818183526020840193506020810190508360005b838110156103c557813586016103ab8882610423565b845260208401935060208301925050600181019050610395565b5050505092915050565b600082601f8301126103e057600080fd5b81356103f36103ee8261073c565b6106e7565b9150808252602083016020830185838301111561040f57600080fd5b61041a83828461080e565b50505092915050565b60006040828403121561043557600080fd5b61043f60406106e7565b9050600061044f84828501610346565b600083015250602082013567ffffffffffffffff81111561046f57600080fd5b61047b848285016103cf565b60208301525092915050565b60008135905061049681610878565b92915050565b6000602082840312156104ae57600080fd5b60006104bc84828501610346565b91505092915050565b6000602082840312156104d757600080fd5b600082013567ffffffffffffffff8111156104f157600080fd5b6104fd8482850161035b565b91505092915050565b60006020828403121561051857600080fd5b600061052684828501610487565b91505092915050565b600061053b83836105d6565b905092915050565b61054c816107c8565b82525050565b600061055d82610778565b610567818561079b565b93508360208202850161057985610768565b8060005b858110156105b55784840389528151610596858261052f565b94506105a18361078e565b925060208a0199505060018101905061057d565b50829750879550505050505092915050565b6105d0816107da565b82525050565b60006105e182610783565b6105eb81856107ac565b93506105fb81856020860161081d565b61060481610850565b840191505092915050565b600061061a82610783565b61062481856107bd565b935061063481856020860161081d565b80840191505092915050565b61064981610804565b82525050565b600061065b828461060f565b915081905092915050565b600060208201905061067b6000830184610543565b92915050565b600060208201905061069660008301846105c7565b92915050565b60006020820190506106b16000830184610640565b92915050565b60006040820190506106cc6000830185610640565b81810360208301526106de8184610552565b90509392505050565b6000604051905081810181811067ffffffffffffffff8211171561070a57600080fd5b8060405250919050565b600067ffffffffffffffff82111561072b57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561075357600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006107d3826107e4565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561083b578082015181840152602081019050610820565b8381111561084a576000848401525b50505050565b6000601f19601f8301169050919050565b61086a816107c8565b811461087557600080fd5b50565b61088181610804565b811461088c57600080fd5b5056fea26469706673582212202bd844499db537ebebd9f1beb165e51f5a93427dc82d0934c71f6b2cf88402f764736f6c63430006060033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c806372425d9d1161005b57806372425d9d1461012a57806386d516e814610148578063a8b0574e14610166578063ee82ac5e1461018457610088565b80630f28c97d1461008d578063252dba42146100ab57806327e86d6e146100dc5780634d2301cc146100fa575b600080fd5b6100956101b4565b6040516100a2919061069c565b60405180910390f35b6100c560048036038101906100c091906104c5565b6101bc565b6040516100d39291906106b7565b60405180910390f35b6100e46102f6565b6040516100f19190610681565b60405180910390f35b610114600480360381019061010f919061049c565b610302565b604051610121919061069c565b60405180910390f35b610132610323565b60405161013f919061069c565b60405180910390f35b61015061032b565b60405161015d919061069c565b60405180910390f35b61016e610333565b60405161017b9190610666565b60405180910390f35b61019e60048036038101906101999190610506565b61033b565b6040516101ab9190610681565b60405180910390f35b600042905090565b60006060439150825167ffffffffffffffff811180156101db57600080fd5b5060405190808252806020026020018201604052801561020f57816020015b60608152602001906001900390816101fa5790505b50905060008090505b83518110156102f0576000606085838151811061023157fe5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1686848151811061025f57fe5b602002602001015160200151604051610278919061064f565b6000604051808303816000865af19150503d80600081146102b5576040519150601f19603f3d011682016040523d82523d6000602084013e6102ba565b606091505b5091509150816102c957600080fd5b808484815181106102d657fe5b602002602001018190525050508080600101915050610218565b50915091565b60006001430340905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b600045905090565b600041905090565b600081409050919050565b60008135905061035581610861565b92915050565b600082601f83011261036c57600080fd5b813561037f61037a82610714565b6106e7565b9150818183526020840193506020810190508360005b838110156103c557813586016103ab8882610423565b845260208401935060208301925050600181019050610395565b5050505092915050565b600082601f8301126103e057600080fd5b81356103f36103ee8261073c565b6106e7565b9150808252602083016020830185838301111561040f57600080fd5b61041a83828461080e565b50505092915050565b60006040828403121561043557600080fd5b61043f60406106e7565b9050600061044f84828501610346565b600083015250602082013567ffffffffffffffff81111561046f57600080fd5b61047b848285016103cf565b60208301525092915050565b60008135905061049681610878565b92915050565b6000602082840312156104ae57600080fd5b60006104bc84828501610346565b91505092915050565b6000602082840312156104d757600080fd5b600082013567ffffffffffffffff8111156104f157600080fd5b6104fd8482850161035b565b91505092915050565b60006020828403121561051857600080fd5b600061052684828501610487565b91505092915050565b600061053b83836105d6565b905092915050565b61054c816107c8565b82525050565b600061055d82610778565b610567818561079b565b93508360208202850161057985610768565b8060005b858110156105b55784840389528151610596858261052f565b94506105a18361078e565b925060208a0199505060018101905061057d565b50829750879550505050505092915050565b6105d0816107da565b82525050565b60006105e182610783565b6105eb81856107ac565b93506105fb81856020860161081d565b61060481610850565b840191505092915050565b600061061a82610783565b61062481856107bd565b935061063481856020860161081d565b80840191505092915050565b61064981610804565b82525050565b600061065b828461060f565b915081905092915050565b600060208201905061067b6000830184610543565b92915050565b600060208201905061069660008301846105c7565b92915050565b60006020820190506106b16000830184610640565b92915050565b60006040820190506106cc6000830185610640565b81810360208301526106de8184610552565b90509392505050565b6000604051905081810181811067ffffffffffffffff8211171561070a57600080fd5b8060405250919050565b600067ffffffffffffffff82111561072b57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561075357600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006107d3826107e4565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561083b578082015181840152602081019050610820565b8381111561084a576000848401525b50505050565b6000601f19601f8301169050919050565b61086a816107c8565b811461087557600080fd5b50565b61088181610804565b811461088c57600080fd5b5056fea26469706673582212202bd844499db537ebebd9f1beb165e51f5a93427dc82d0934c71f6b2cf88402f764736f6c63430006060033