ETH Price: $2,005.29 (-0.45%)

Contract

0x108e823a26C5FB096D1f7c493809ccE9015507a6
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Multicall

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 1 : Multicall.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;
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]>
/// @author Bogdan Dumitru <[email protected]>

contract Multicall {
    struct Call {
        address target;
        bytes callData;
    }
    struct Return {
      bool success;
      bytes data;

    }
    function aggregate(Call[] memory calls, bool strict) public returns (uint256 blockNumber, Return[] memory returnData) {
        blockNumber = block.number;
        returnData = new Return[](calls.length);
        for(uint256 i = 0; i < calls.length; i++) {
            (bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);
            if (strict) {
              require(success);
            }
            returnData[i] = Return(success, 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;
    }
}

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin-4/contracts/=lib/openzeppelin-contracts-4/contracts/",
    "@layerzero/=lib/solidity-examples/contracts/",
    "@xerc20/=lib/xERC20/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-4/lib/erc4626-tests/",
    "openzeppelin-contracts-4/=lib/openzeppelin-contracts-4/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-4/contracts/",
    "solidity-examples/=lib/solidity-examples/contracts/",
    "solmate/=lib/solmate/src/",
    "xERC20/=lib/xERC20/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall.Call[]","name":"calls","type":"tuple[]"},{"internalType":"bool","name":"strict","type":"bool"}],"name":"aggregate","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Multicall.Return[]","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":"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"}]

608060405234801561001057600080fd5b50610643806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806372425d9d1161005b57806372425d9d146100e657806386d516e8146100ec578063a8b0574e146100f2578063ee82ac5e1461010057600080fd5b80630f28c97d1461008d57806317352e13146100a257806327e86d6e146100c35780634d2301cc146100cb575b600080fd5b425b6040519081526020015b60405180910390f35b6100b56100b0366004610332565b610112565b6040516100999291906104c2565b61008f610283565b61008f6100d9366004610558565b6001600160a01b03163190565b4461008f565b4561008f565b604051418152602001610099565b61008f61010e36600461057a565b4090565b8151439060609067ffffffffffffffff81111561013157610131610296565b60405190808252806020026020018201604052801561017757816020015b60408051808201909152600081526060602082015281526020019060019003908161014f5790505b50905060005b845181101561027b5760008086838151811061019b5761019b610593565b6020026020010151600001516001600160a01b03168784815181106101c2576101c2610593565b6020026020010151602001516040516101db91906105a9565b6000604051808303816000865af19150503d8060008114610218576040519150601f19603f3d011682016040523d82523d6000602084013e61021d565b606091505b50915091508515610232578161023257600080fd5b604051806040016040528083151581526020018281525084848151811061025b5761025b610593565b602002602001018190525050508080610273906105db565b91505061017d565b509250929050565b60006102906001436105f4565b40905090565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156102cf576102cf610296565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156102fe576102fe610296565b604052919050565b80356001600160a01b038116811461031d57600080fd5b919050565b8035801515811461031d57600080fd5b6000806040838503121561034557600080fd5b823567ffffffffffffffff8082111561035d57600080fd5b818501915085601f83011261037157600080fd5b813560208282111561038557610385610296565b8160051b6103948282016102d5565b928352848101820192828101908a8511156103ae57600080fd5b83870192505b84831015610481578235868111156103cb57600080fd5b8701601f196040828e03820112156103e257600080fd5b6103ea6102ac565b6103f5878401610306565b815260408301358981111561040957600080fd5b8084019350508d603f84011261041e57600080fd5b868301358981111561043257610432610296565b6104428884601f840116016102d5565b92508083528e604082860101111561045957600080fd5b80604085018985013760009083018801528087019190915283525091830191908301906103b4565b9750610491915050878201610322565b9450505050509250929050565b60005b838110156104b95781810151838201526020016104a1565b50506000910152565b6000604080830185845260208281860152818651808452606093508387019150838160051b88010183890160005b8381101561054857898303605f1901855281518051151584528601518684018990528051898501819052610529818a8701848b0161049e565b95870195601f01601f19169390930187019250908501906001016104f0565b50909a9950505050505050505050565b60006020828403121561056a57600080fd5b61057382610306565b9392505050565b60006020828403121561058c57600080fd5b5035919050565b634e487b7160e01b600052603260045260246000fd5b600082516105bb81846020870161049e565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000600182016105ed576105ed6105c5565b5060010190565b81810381811115610607576106076105c5565b9291505056fea2646970667358221220505a4301a5ae6a2583ddfa27656f3bfc8894f9060b3321a061bebb21f1a99a2b64736f6c63430008140033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c806372425d9d1161005b57806372425d9d146100e657806386d516e8146100ec578063a8b0574e146100f2578063ee82ac5e1461010057600080fd5b80630f28c97d1461008d57806317352e13146100a257806327e86d6e146100c35780634d2301cc146100cb575b600080fd5b425b6040519081526020015b60405180910390f35b6100b56100b0366004610332565b610112565b6040516100999291906104c2565b61008f610283565b61008f6100d9366004610558565b6001600160a01b03163190565b4461008f565b4561008f565b604051418152602001610099565b61008f61010e36600461057a565b4090565b8151439060609067ffffffffffffffff81111561013157610131610296565b60405190808252806020026020018201604052801561017757816020015b60408051808201909152600081526060602082015281526020019060019003908161014f5790505b50905060005b845181101561027b5760008086838151811061019b5761019b610593565b6020026020010151600001516001600160a01b03168784815181106101c2576101c2610593565b6020026020010151602001516040516101db91906105a9565b6000604051808303816000865af19150503d8060008114610218576040519150601f19603f3d011682016040523d82523d6000602084013e61021d565b606091505b50915091508515610232578161023257600080fd5b604051806040016040528083151581526020018281525084848151811061025b5761025b610593565b602002602001018190525050508080610273906105db565b91505061017d565b509250929050565b60006102906001436105f4565b40905090565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156102cf576102cf610296565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156102fe576102fe610296565b604052919050565b80356001600160a01b038116811461031d57600080fd5b919050565b8035801515811461031d57600080fd5b6000806040838503121561034557600080fd5b823567ffffffffffffffff8082111561035d57600080fd5b818501915085601f83011261037157600080fd5b813560208282111561038557610385610296565b8160051b6103948282016102d5565b928352848101820192828101908a8511156103ae57600080fd5b83870192505b84831015610481578235868111156103cb57600080fd5b8701601f196040828e03820112156103e257600080fd5b6103ea6102ac565b6103f5878401610306565b815260408301358981111561040957600080fd5b8084019350508d603f84011261041e57600080fd5b868301358981111561043257610432610296565b6104428884601f840116016102d5565b92508083528e604082860101111561045957600080fd5b80604085018985013760009083018801528087019190915283525091830191908301906103b4565b9750610491915050878201610322565b9450505050509250929050565b60005b838110156104b95781810151838201526020016104a1565b50506000910152565b6000604080830185845260208281860152818651808452606093508387019150838160051b88010183890160005b8381101561054857898303605f1901855281518051151584528601518684018990528051898501819052610529818a8701848b0161049e565b95870195601f01601f19169390930187019250908501906001016104f0565b50909a9950505050505050505050565b60006020828403121561056a57600080fd5b61057382610306565b9392505050565b60006020828403121561058c57600080fd5b5035919050565b634e487b7160e01b600052603260045260246000fd5b600082516105bb81846020870161049e565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b6000600182016105ed576105ed6105c5565b5060010190565b81810381811115610607576106076105c5565b9291505056fea2646970667358221220505a4301a5ae6a2583ddfa27656f3bfc8894f9060b3321a061bebb21f1a99a2b64736f6c63430008140033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
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.