Module Multicall

Module Multicall 

Source
Expand description

Generated by the following Solidity interface…

interface Multicall {
    struct Call {
        address target;
        bytes callData;
    }

    function aggregate(Call[] memory calls) external returns (uint256 blockNumber, bytes[] memory returnData);
    function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);
    function getCurrentBlockCoinbase() external view returns (address coinbase);
    function getCurrentBlockDifficulty() external view returns (uint256 difficulty);
    function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);
    function getCurrentBlockTimestamp() external view returns (uint256 timestamp);
    function getEthBalance(address addr) external view returns (uint256 balance);
    function getLastBlockHash() external view returns (bytes32 blockHash);
}

…which was generated by the following JSON ABI:

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

Structs§

Call
MulticallInstance
A Multicall instance.
aggregateCall
Function with signature aggregate((address,bytes)[]) and selector 0x252dba42.
aggregateReturn
Container type for the return parameters of the aggregate((address,bytes)[]) function.
getBlockHashCall
Function with signature getBlockHash(uint256) and selector 0xee82ac5e.
getBlockHashReturn
Container type for the return parameters of the getBlockHash(uint256) function.
getCurrentBlockCoinbaseCall
Function with signature getCurrentBlockCoinbase() and selector 0xa8b0574e.
getCurrentBlockCoinbaseReturn
Container type for the return parameters of the getCurrentBlockCoinbase() function.
getCurrentBlockDifficultyCall
Function with signature getCurrentBlockDifficulty() and selector 0x72425d9d.
getCurrentBlockDifficultyReturn
Container type for the return parameters of the getCurrentBlockDifficulty() function.
getCurrentBlockGasLimitCall
Function with signature getCurrentBlockGasLimit() and selector 0x86d516e8.
getCurrentBlockGasLimitReturn
Container type for the return parameters of the getCurrentBlockGasLimit() function.
getCurrentBlockTimestampCall
Function with signature getCurrentBlockTimestamp() and selector 0x0f28c97d.
getCurrentBlockTimestampReturn
Container type for the return parameters of the getCurrentBlockTimestamp() function.
getEthBalanceCall
Function with signature getEthBalance(address) and selector 0x4d2301cc.
getEthBalanceReturn
Container type for the return parameters of the getEthBalance(address) function.
getLastBlockHashCall
Function with signature getLastBlockHash() and selector 0x27e86d6e.
getLastBlockHashReturn
Container type for the return parameters of the getLastBlockHash() function.

Enums§

MulticallCalls
Container for all the Multicall function calls.

Statics§

BYTECODE
The creation / init bytecode of the contract.
DEPLOYED_BYTECODE
The runtime bytecode of the contract, as deployed on the network.

Functions§

deploy
Deploys this contract using the given provider and constructor arguments, if any.
deploy_builder
Creates a RawCallBuilder for deploying this contract using the given provider and constructor arguments, if any.
new
Creates a new wrapper around an on-chain Multicall contract instance.