Skip to main content

Many Abis

Version Pypi

GitHub Org's stars GitHub forks


Verified ABI files, EVM chain metadata, contract addresses, token records, and pinned on-chain evidence for blockchain developers.


Uniswap v4 singleton contracts and the BSC PancakeSwap Infinity CLAMM/LBAMM contracts are available through get_contract() and list_contracts(), including pool managers, quoters, position managers, routers, and shared dependencies. See singleton DEX usage for read-only state, quote, and event decoding examples. The generated deployment catalog lists chain coverage.

Legacy factory/router DEX deployments:



Chain, token, RPC, and DEX contract entries follow the documented source and verification policy. DEX volume is used to prioritize candidates, while official deployment documentation and on-chain bytecode are required before an address is added. These checks do not replace a smart-contract security audit.


Installation

Python 3.13 or newer is required.

uv add many-abis

# pip remains supported when integrating with a non-uv project.
python -m pip install --upgrade many-abis

Quick start

import many_abis as ma

# Chain, contract, and token lookups return defensive copies.
base = ma.get_chain(name="base")
router = ma.get_contract("base:dex:uniswap-v3:router")
usdc = ma.get_token("base", "USDC")
snapshot = ma.get_verification("base", usdc["address"])

print(base["chain_id"], base["rpc"])
print(router["address"], router["provenance_status"])
print(usdc["origin"], usdc["decimals"])
print(snapshot["block_number"], snapshot["runtime_code_keccak256"])

# ABI files are loaded lazily and cached as recursively read-only values.
router_abi = ma.get_abi(router["abi"])
abi_info = ma.get_abi_info(router["abi"])
print(len(router_abi), abi_info["canonical_sha256"])
print(ma.loaded_abis())

# Filter the generated catalogs without accessing the network.
print(ma.list_contracts(chain="base", role="router"))
print(ma.list_tokens(chain="base", role="stablecoin"))
print(ma.find_abis(contract_role="router"))

Use copy.deepcopy() before changing an ABI. The public ABIS and CHAINS registries are intentionally read-only so one caller cannot corrupt cached state for the rest of a process.

To retrieve an ABI that is not bundled, use an API key from the environment and pass an EVM chain ID. The request always uses the fixed Etherscan V2 endpoint:

import os

import many_abis as ma

abi_json = ma.get_abi_from_address(
    "0x2626664c2603336E57B271c5C0b26F421741e481",
    os.environ["ETHERSCAN_API_KEY"],
    chain_id=8453,
)

Complete runnable examples cover offline catalog inspection, safe Etherscan lookup, and optional web3.py integration in the examples directory.

Registry maintenance

Runtime data is generated offline. Edit one reviewed source file under registry/chains/, registry/deployments/, or registry/abi-metadata.json, then regenerate and verify:

uv sync --locked --dev
uv run python scripts/generate_registry.py --write
uv run python scripts/generate_registry.py --check
uv run python -m unittest discover -s tests -v
uv run mypy

On-chain evidence refreshes are explicit network operations and are separate from the offline generator. Refresh only through the reviewed RPC list, inspect the diff, and then regenerate:

uv run python scripts/refresh_verifications.py --chain base --write
uv run python scripts/generate_registry.py --write

Do not edit many_abis/assets/utils/chains.json, abi-index.json, generated documentation, or many_abis/abis.pyi directly. Generation is deterministic and never accesses the network. See the generated chain registry, ABI provenance, and the detailed verification policy. Usage-specific caveats for standards, oracles, multicall, Permit2, and proxy events are documented in common contract ABIs. API-driven bridge and aggregator boundaries are documented in cross-chain aggregators. The generated contract/token catalogs, snapshot semantics, proxy limitations, and query API are documented in registry verification. Pre-0.3 ABI files without complete provenance are quarantined under registry/legacy-abis/ and are not included in the runtime package or PyPI artifacts. Public ABIs require verified provenance, an immutable source reference, license evidence, and required function/event signatures.

Build and release

Project metadata, runtime dependencies, and development dependencies live in pyproject.toml; uv.lock pins the complete development environment. Build both distribution formats from a clean commit with:

uv sync --locked --dev
uv run python scripts/build_release_artifacts.py --output-dir dist
uv run python scripts/check_distribution.py dist
uv run twine check dist/*

The release builder invokes uv build --no-sources twice from independent Git archives and rejects non-identical outputs. GitHub Actions publishes the checked artifacts with uv publish --trusted-publishing always, PyPI Trusted Publishing, and PEP 740 attestations. Publishing requires GitHub's OIDC identity; no PyPI API token or GitHub repository secret is needed.

One-time Trusted Publisher setup

  1. In the GitHub repository's Settings > Environments, create an environment named pypi. If deployment rules restrict refs, allow release tags such as v*. Required reviewers introduce a manual approval before publishing; omit them if releases should publish automatically.

  2. Open the PyPI project's Publishing settings and add a GitHub Trusted Publisher with these exact values:

    Field Value
    Owner ackness
    Repository name many_abis
    Workflow name python-publish.yml
    Environment name pypi

    The workflow name is the filename, without .github/workflows/, rather than its display name. If the PyPI project does not exist yet, register a pending publisher in Your publishing settings with project name many-abis and the same values.

See the official PyPI Trusted Publisher setup guide and uv GitHub Actions guide.

Publish a release

Commit and push the release files, including the workflow and uv.lock. Set project.version in pyproject.toml to the new version, and refresh uv.lock with uv lock. The runtime version comes from installed package metadata. Create a matching tag, such as v0.5.0 for version 0.5.0, on that commit, then publish a GitHub Release for the tag. Pushing a tag alone or saving a draft release does not trigger publishing. Published prereleases also trigger this workflow; use a matching prerelease package version such as 0.5.1rc1 and tag v0.5.1rc1.

The workflow tests Python 3.13 and 3.14, checks the tag against the package version, builds and validates the wheel and source distribution, then publishes those artifacts from a separate job with id-token: write. A failed check blocks publication. PyPI does not allow overwriting a published distribution; use a new version for a changed release.

License and provenance

Original Python code is MIT-licensed. Bundled verified ABI data remains subject to its recorded upstream terms. See THIRD_PARTY_NOTICES.md and the license texts shipped under LICENSES/. Quarantined legacy ABI files have unresolved provenance or licensing and are not part of the distribution.

Metadata

Release files for many-abis 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for many-abis 0.5.1
File Size Uploaded
many_abis-0.5.1.tar.gz 142.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for many-abis 0.5.1
File Interpreter ABI Platform
many_abis-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 315.5 kB

Release files / many_abis-0.5.1.tar.gz

Download URL many_abis-0.5.1.tar.gz
Size 142.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c107fc811162198b2be9cd191b6a39c7bd7f3dc09eec598a3078931b765af66e
BLAKE2b-256 checksum
How to use checksums
6d5f5ff2a909879940ee042709d8b7e66e4f9278dce6844416285f5c338294d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / many_abis-0.5.1-py3-none-any.whl

Download URL many_abis-0.5.1-py3-none-any.whl
Size 173.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2af5fa153a819306050fc746d3e92e8b11d263b5223e6aaf86bce3e48b20efd6
BLAKE2b-256 checksum
How to use checksums
3e27de66d3250d904909e6a2cca8d26e65a37cae59fb69d743cc6945ff44cd5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page