Python library for managing Ethswarm smart contract deployment data across all versions and networks
Project description
ethswarm-deployments
Python library for managing Ethswarm smart contract deployment data across all versions and networks.
Overview
This library ingests Swarm smart contract deployment data from the ethersphere/storage-incentives GitHub repository and provides a clean Python interface for accessing deployment information across:
- Multiple contract versions (v0.4.0 through v0.9.4+)
- Multiple networks (mainnet, testnet)
- Both legacy and hardhat-deploy format contracts
Features
- Multi-network support: Query deployments on Gnosis Chain mainnet and Sepolia testnet
- Version tracking: Access any version of deployed contracts
- Backward compatible: Supports both legacy (
staking) and canonical (StakeRegistry) contract names - Persistent caching: Local cache with block timestamp optimization
- Rich metadata: Includes ABIs, bytecode, constructor args, and transaction hashes
Installation
pip install ethswarm-deployments
Quick Start
from ethswarm_deployments import DeploymentManager
# Initialize (uses cached data at ~/.ethswarm-deployments/deployments.json)
mgr = DeploymentManager()
# Get latest deployment on mainnet (default)
deployment = mgr.deployment("StakeRegistry")
print(f"StakeRegistry at {deployment.address}")
# Get specific version on testnet
deployment = mgr.deployment("Redistribution", version="v0.9.2", network="testnet")
# List all versions
versions = mgr.versions()
# Get all deployments of a contract across versions
all_staking = mgr.all_deployments("StakeRegistry")
Regenerating Cache
The cache can be regenerated from GitHub:
from ethswarm_deployments import regenerate_from_github
# Regenerate cache (requires RPC endpoints)
regenerate_from_github(
mainnet_rpc_url="https://rpc.gnosischain.com",
testnet_rpc_url="https://ethereum-sepolia-rpc.publicnode.com"
)
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ethswarm_deployments-0.1.2.tar.gz.
File metadata
- Download URL: ethswarm_deployments-0.1.2.tar.gz
- Upload date:
- Size: 85.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41f556258e032e1075a408603e3492c84a75440c3844b54e7ade7a5e628e171c
|
|
| MD5 |
3202b221054ea0bc8197f70c8d4a5a46
|
|
| BLAKE2b-256 |
608834eab8f96bf577c5c7dc8dc32fd8663ee2880e7736e11ba99285f48bf9e8
|
File details
Details for the file ethswarm_deployments-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ethswarm_deployments-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c5e57d8a417f218a2eda0a433c12057c343e8397adf42148e697ce073b260a4
|
|
| MD5 |
b2bc8194b13785967b238720f8783c6d
|
|
| BLAKE2b-256 |
6f82314888fa21f568e95f2d09ffefa0a4c168ed44e3c288a583768cae6ebd5c
|