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.


Supported 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/ 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.4.0 for version 0.4.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.4.1rc1 and tag v0.4.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.4.0

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.4.0
File Size Uploaded
many_abis-0.4.0.tar.gz 106.6 kB Details

Built distribution (wheel)

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

Total release size: 239.9 kB

Release files / many_abis-0.4.0.tar.gz

Download URL many_abis-0.4.0.tar.gz
Size 106.6 kB
Tags Source
SHA-256 checksum
How to use checksums
76c9d767691d73d3acbdbd34328b617d8f7bb8b002b1543ed0569115ce2d4318
BLAKE2b-256 checksum
How to use checksums
0c16c0ef101fb1d1e26bc92e4bf78bf8ac040f7018df665a869916ac94be8efd
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 Sep 29, 2026.

Transparency log

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

Download URL many_abis-0.4.0-py3-none-any.whl
Size 133.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f150fb75319c9d67226464dee5a7063e2cf853db567ac631b6c47b898c1e37b1
BLAKE2b-256 checksum
How to use checksums
c9802491c5d9cc39fc555fad9abe4c976484a8427684c91a3cd216032d727592
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 Sep 29, 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