Skip to main content

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

ethswarm_deployments-0.1.1.tar.gz (85.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ethswarm_deployments-0.1.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file ethswarm_deployments-0.1.1.tar.gz.

File metadata

  • Download URL: ethswarm_deployments-0.1.1.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

Hashes for ethswarm_deployments-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6df688429df2105c62df19b434620ab0ba81b1fe0730673f9411ef36398d12a4
MD5 2fb08a756543e48c73e7b8a4abf20b42
BLAKE2b-256 82cdb6682acb1785f1d94d5a9731079feeccd15245262e47d67b24e06d08db3c

See more details on using hashes here.

File details

Details for the file ethswarm_deployments-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ethswarm_deployments-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f390b911c3ced24ada4d1bb06d33ac4ed22ebbaf1c29840f5893012e6c917a7
MD5 92f0a43d37f8b33f918de8a220488f49
BLAKE2b-256 ca9ffb109f17325fecd5f2fa31d4fec17a51cb61c7cddf5af37ab6c1e708202a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page