Registry / web-framework / multicall

multicall

JSON →
library0.15.2pypypi✓ verified 83d ago

Aggregate results from multiple Ethereum contract calls into a single RPC call, using the MakerDAO Multicall contract. Current version 0.15.2, compatible with Python >=3.10 and <4. Release cadence is irregular.

pip install multicall
INSTALL
IMPORT
SIG · MULTICALL
M
multicall
web-frameworkpythonv0.15.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Multicall
from multicall import Multicall
from multicall import Multicall
No common wrong import; always use this.
Call
from multicall import Call
from multicall import Multicall
Call is a separate class; do not import from Multicall.

Create a Multicall instance with a list of Call objects, then call it to aggregate results.

from multicall import Multicall, Call from web3 import Web3 w3 = Web3(Web3.HTTPProvider('https://mainnet.infura.io/v3/YOUR-PROJECT-ID')) multi = Multicall([ Call(('0x...', 'balanceOf(address)(uint256)'), [['0x...', None]]), ], _w3=w3) result = multi() print(result)
Debug
Known issues
breakingIn version 0.10.0, the API changed from using `Multicall.aggregate()` to calling the instance directly `multi()`. Old code using `.aggregate()` will break.
fix
Replace `.aggregate()` with a direct call: `multi()` instead of `multi.aggregate()`.
affects: <0.10.0
deprecatedThe `_w3` argument is deprecated in favor of passing a `web3` instance directly to the `Multicall` constructor.
fix
Use `Multicall(..., web3=w3)` instead of `Multicall(..., _w3=w3)`.
affects: >=0.12.0
gotchaCall targets must be checksummed addresses; passing an address without correct checksum will raise an error.
fix
Use `Web3.to_checksum_address()` on all addresses before passing to `Call`.
affects: >0.8.0
Errors
Common errors & fixes
EthCallError: No data returned from call at block
The target contract or block does not exist, or the RPC endpoint is faulty.
fix
Verify the contract address and RPC URL. Ensure the block is within the chain's range.
AttributeError: 'Multicall' object has no attribute 'aggregate'
Using the old API on multicall >=0.10.0 which removed `.aggregate()`.
fix
Call the instance directly: `multi()` instead of `multi.aggregate()`.
ValueError: Address must be checksummed
Passing an address without proper EIP-55 checksumming.
fix
Use `Web3.to_checksum_address('0x...')` on the address.
Upgrade
Version history
0.15.2latest on PyPI · released Jan 16, 2026
Audit
Dependencies
web3requiredRequired for Ethereum interaction
httpxrequiredUsed for async HTTP requests
Agent activity
6 hits · last 30 days
node
6
Resources
multicall — pip install multicall · libregistry