What is ethereum-multicall?
masterethereum-multicall is a lightweight TypeScript library designed for interacting with the Multicall3 smart contract.
It allows you to group multiple smart contract constant function calls into a single JSON RPC request. This provides two main benefits:
- Efficiency: Reduces the number of network requests (useful when using providers like Infura).
- Atomicity: Guarantees that all returned values are from the same block. The library also returns the latest block number used for the call.
The library is unopinionated; it works with web3, ethers, or a custom nodeUrl. It handles data decoding by default, but this can be disabled if preferred.