OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Multicall.py

Multicall.py is a Python library that prepares and aggregates Ethereum smart-contract calls, encodes function inputs, and decodes returned values with optional named handlers.

Independent OpenViST project profile, based on linked sources.

Multicall.py — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Python application needs to aggregate related Ethereum contract reads, such as several token balances and a supply value, and process the outputs together.

Who it is for

  • Python developers building Ethereum applications that read data from smart contracts.
  • Developers creating utilities to collect, label, and process results from multiple contract methods.

Documented uses

  • Group calls to several contract methods into one multicall operation.
  • Encode function inputs and decode returned contract data.
  • Label or transform returned values with configurable handlers.
  • Reuse a prepared call definition with different arguments.
Before you choose

Requirements & limits

  • The library requires contract addresses, function signatures, and any relevant arguments to define calls.
  • The README documents installation through pip and describes test configuration using a Web3 Infura project ID and a pytest network setting.
  • The repository identifies the project as MIT-licensed.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Group token balance and supply reads

Prepare balance and total-supply calls and collect labeled, processed results in one multicall.

Before you start

  • Python with the multicall package installed using the documented pip command.
  • A token contract address and addresses to query.
  • A configured Ethereum call environment; the example uses Kovan.

Steps

  1. Install the package with the command below.

    Documented command
    pip install multicall
  2. Import Call and Multicall from multicall.

  3. Create Call definitions for balanceOf(address)(uint256) and totalSupply()(uint256), supplying the relevant address arguments and named return handlers.

  4. Pass the prepared calls to Multicall and invoke it to collect the result dictionary.

Expected outcome

A combined result with named entries for the queried balances and supply, processed by the specified handlers.

Guide limitations

  • The README example assumes a Kovan context; it does not establish current network availability.
  • A working node connection and suitable contract addresses are needed to make calls.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
9 October 2026
Original website title
banteg/multicall.py · Official homepage title · retained in its source language

Related options

MakerDAO multicall — The project describes itself as a Python interface to MakerDAO’s multicall.

multicall.js — The project describes itself as a port of multicall.js.