codeExamples

Complete runnable examples

Complete, runnable code examples demonstrating common Seismic Python SDK patterns.

Available Examples

Getting Started

Example
Description

Complete wallet client setup with both sync and async variants, environment configuration, and connection verification

Core Workflows

Example
Description

Full shielded write workflow from setup to confirmation, including custom security parameters and error handling

Complete signed read pattern with result decoding, demonstrating identity-proving reads and type conversion

Full SRC20 token workflow including metadata, balances, transfers, approvals, minting, and event watching

Advanced Patterns

Example
Description

Best practices for async usage including concurrent operations, error handling, connection pooling, rate limiting, and WebSocket events

Example Template

Each example follows this structure:

# 1. Imports and setup
from seismic_web3 import create_wallet_client, PrivateKey

# 2. Configuration
private_key = PrivateKey(...)
w3 = create_wallet_client("https://gcp-1.seismictest.net/rpc", private_key=private_key)

# 3. Main operation
result = await contract.write.method(args)

# 4. Confirmation and verification
receipt = w3.eth.wait_for_transaction_receipt(result)
print(f"Status: {receipt['status']}")

Running Examples

All examples assume you have:

Quick Example: Basic Wallet Setup

See Also

Last updated