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.0.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.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ethswarm_deployments-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 2d075a8031244b7963d02481855c46adef29df75d8cd697b8bf0ed4b308511b1
MD5 a6005acf972ddb5aec4bf71f5d3f44ab
BLAKE2b-256 0d8179fc796ca5c41ec6637eaeb8895f6194d2a89fe9a44b909a48e09892273a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ethswarm_deployments-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 635bb4525468128a4ef6ebae227d031a479afc1e5abbb797e0d255583ae7d8ba
MD5 d73e61417bc08a056d1eaf41ba497c7a
BLAKE2b-256 a60bbf6e7ca0400c94af698a17e8794d0b07ef2bf32224d19d9e45ca9d42a0f4

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