Expand description
Multicall3 batching support for EvmCache.
This module provides utilities to batch multiple view calls into a single EVM execution using the Multicall3 contract. This significantly reduces the number of RPC round-trips needed when loading related contract state.
Multicall3 is deployed at the same address on all EVM chains:
0xcA11bde05977b3631167028862bE2a173976CA11
Modules§
- IMulticall3
- Multicall3 contract interface. See: https://github.com/mds1/multicall
Structs§
- Multicall
Batch - A batch of calls to execute in a single
aggregate3invocation via Multicall3.
Constants§
- MAX_
BATCH_ SIZE - Maximum number of calls to batch in a single
aggregate3invocation. - MULTICAL
L3_ ADDRESS - Multicall3 contract address (same on all EVM chains).
Functions§
- decode_
result - Decode a single multicall
IMulticall3::Resultinto the call’s typed return. - execute_
batched - Execute multiple calls in batches using Multicall3.
- try_
decode_ result - Like
decode_result, but returnsNoneinstead of anErrwhen the call did not succeed or its return data fails to decode.