View Source Ethers.Contracts.Multicall3 (Ethers v0.4.5)

Multicall3 token interface

More info: https://www.multicall3.com

Summary

Functions

Default address of the contract. Returns nil if not specified.

Prepares aggregate3((address,bool,bytes)[] calls) call parameters on the contract.

Prepares aggregate3Value((address,bool,uint256,bytes)[] calls) call parameters on the contract.

Prepares aggregate((address,bytes)[] calls) call parameters on the contract.

Prepares blockAndAggregate((address,bytes)[] calls) call parameters on the contract.

Prepares contract constructor values for deployment.

Prepares getBasefee() call parameters on the contract.

Prepares getBlockHash(uint256 blockNumber) call parameters on the contract.

Prepares getBlockNumber() call parameters on the contract.

Prepares getChainId() call parameters on the contract.

Prepares getCurrentBlockCoinbase() call parameters on the contract.

Prepares getCurrentBlockDifficulty() call parameters on the contract.

Prepares getCurrentBlockGasLimit() call parameters on the contract.

Prepares getCurrentBlockTimestamp() call parameters on the contract.

Prepares getEthBalance(address addr) call parameters on the contract.

Prepares getLastBlockHash() call parameters on the contract.

Prepares tryAggregate(bool requireSuccess, (address,bytes)[] calls) call parameters on the contract.

Prepares tryBlockAndAggregate(bool requireSuccess, (address,bytes)[] calls) call parameters on the contract.

Functions

@spec __default_address__() :: Ethers.Types.t_address()

Default address of the contract. Returns nil if not specified.

To specify a default address see Ethers.Contract

@spec aggregate3([{Ethers.Types.t_address(), boolean(), binary()}]) ::
  Ethers.TxData.t()

Prepares aggregate3((address,bool,bytes)[] calls) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • calls: {:array, {:tuple, [:address, :bool, :bytes]}}

Return Types (when called with Ethers.call/2)

  • returnData: {:array, {:tuple, [:bool, :bytes]}}
@spec aggregate3_value([
  {Ethers.Types.t_address(), boolean(), non_neg_integer(), binary()}
]) ::
  Ethers.TxData.t()

Prepares aggregate3Value((address,bool,uint256,bytes)[] calls) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • calls: {:array, {:tuple, [:address, :bool, {:uint, 256}, :bytes]}}

Return Types (when called with Ethers.call/2)

  • returnData: {:array, {:tuple, [:bool, :bytes]}}
@spec aggregate([{Ethers.Types.t_address(), binary()}]) :: Ethers.TxData.t()

Prepares aggregate((address,bytes)[] calls) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • calls: {:array, {:tuple, [:address, :bytes]}}

Return Types (when called with Ethers.call/2)

  • blockNumber: {:uint, 256}
  • returnData: {:array, :bytes}
Link to this function

block_and_aggregate(calls)

View Source
@spec block_and_aggregate([{Ethers.Types.t_address(), binary()}]) :: Ethers.TxData.t()

Prepares blockAndAggregate((address,bytes)[] calls) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • calls: {:array, {:tuple, [:address, :bytes]}}

Return Types (when called with Ethers.call/2)

  • blockNumber: {:uint, 256}
  • blockHash: {:bytes, 32}
  • returnData: {:array, {:tuple, [:bool, :bytes]}}
@spec constructor() :: binary()

Prepares contract constructor values for deployment.

To deploy a contracts use Ethers.deploy/2 and pass the result of this function as :encoded_constructor option.

Parameters

@spec get_basefee() :: Ethers.TxData.t()

Prepares getBasefee() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • basefee: {:uint, 256}
Link to this function

get_block_hash(block_number)

View Source
@spec get_block_hash(non_neg_integer()) :: Ethers.TxData.t()

Prepares getBlockHash(uint256 blockNumber) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • blockNumber: {:uint, 256}

Return Types (when called with Ethers.call/2)

  • blockHash: {:bytes, 32}
@spec get_block_number() :: Ethers.TxData.t()

Prepares getBlockNumber() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • blockNumber: {:uint, 256}
@spec get_chain_id() :: Ethers.TxData.t()

Prepares getChainId() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • chainid: {:uint, 256}
Link to this function

get_current_block_coinbase()

View Source
@spec get_current_block_coinbase() :: Ethers.TxData.t()

Prepares getCurrentBlockCoinbase() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • coinbase: :address
Link to this function

get_current_block_difficulty()

View Source
@spec get_current_block_difficulty() :: Ethers.TxData.t()

Prepares getCurrentBlockDifficulty() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • difficulty: {:uint, 256}
Link to this function

get_current_block_gas_limit()

View Source
@spec get_current_block_gas_limit() :: Ethers.TxData.t()

Prepares getCurrentBlockGasLimit() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • gaslimit: {:uint, 256}
Link to this function

get_current_block_timestamp()

View Source
@spec get_current_block_timestamp() :: Ethers.TxData.t()

Prepares getCurrentBlockTimestamp() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • timestamp: {:uint, 256}
@spec get_eth_balance(Ethers.Types.t_address()) :: Ethers.TxData.t()

Prepares getEthBalance(address addr) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • addr: :address

Return Types (when called with Ethers.call/2)

  • balance: {:uint, 256}
@spec get_last_block_hash() :: Ethers.TxData.t()

Prepares getLastBlockHash() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • blockHash: {:bytes, 32}
Link to this function

try_aggregate(require_success, calls)

View Source
@spec try_aggregate(boolean(), [{Ethers.Types.t_address(), binary()}]) ::
  Ethers.TxData.t()

Prepares tryAggregate(bool requireSuccess, (address,bytes)[] calls) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • requireSuccess: :bool
  • calls: {:array, {:tuple, [:address, :bytes]}}

Return Types (when called with Ethers.call/2)

  • returnData: {:array, {:tuple, [:bool, :bytes]}}
Link to this function

try_block_and_aggregate(require_success, calls)

View Source
@spec try_block_and_aggregate(boolean(), [{Ethers.Types.t_address(), binary()}]) ::
  Ethers.TxData.t()

Prepares tryBlockAndAggregate(bool requireSuccess, (address,bytes)[] calls) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). It also supports receiving ether from the transaction origin.

State mutability: payable

Function Parameter Types

  • requireSuccess: :bool
  • calls: {:array, {:tuple, [:address, :bytes]}}

Return Types (when called with Ethers.call/2)

  • blockNumber: {:uint, 256}
  • blockHash: {:bytes, 32}
  • returnData: {:array, {:tuple, [:bool, :bytes]}}