Skip to main content

Crate wp_evm_multicall

Crate wp_evm_multicall 

Source
Expand description

wp-evm-multicall — thin async wrapper over the canonical Multicall3 contract for dynamic, heterogeneous batch reads.

alloy::providers::MulticallBuilder does not fit the CLI use case:

  • The static (tuple-generic) builder requires call count + types known at compile time — can’t loop with .add(...) over a runtime-sized Vec<Address>.
  • The dynamic builder restricts all calls to a single decoder type (homogeneous), so it can’t mix e.g. slot0 + liquidity + symbol across pool and ERC20 contracts.

This crate exposes a content-agnostic aggregate3(provider, multicall, calls) that ships a Vec<Call3> and returns Vec<Result> raw. Callers encode each calldata via the relevant interfaces crate (e.g. wp-evm-v3-interfaces) and decode each result with the matching *Call::abi_decode_returns(returnData).

Source: https://github.com/mds1/multicall

Modules§

IMulticall3
Module containing a contract’s types and functions.

Constants§

MULTICALL3_ADDRESS
Canonical Multicall3 deployment — same address on all major EVM chains via deterministic CREATE2.

Functions§

aggregate3
Send a heterogeneous batch of pre-encoded calls in a single Multicall3 RPC. output[i] corresponds to calls[i].