Skip to main content

Goat SDK Web3 wallet implementation

Project description

Web3 Wallet for GOAT SDK

A Python implementation of a Web3 wallet for the GOAT SDK, providing enhanced Ethereum and EVM-compatible chain support through web3.py integration.

Installation

poetry add goat-sdk-wallet-web3

# Required dependency
poetry add goat-sdk-wallet-evm

Usage

from goat_wallets.web3 import web3_wallet

# Initialize wallet with private key
wallet = web3_wallet(
    private_key="${WALLET_PRIVATE_KEY}",  # Your EVM wallet private key
    rpc_url="${RPC_PROVIDER_URL}"  # Your EVM RPC endpoint
)

# Get wallet address
address = wallet.get_address()

# Get native token balance
balance = await wallet.get_balance()

# Send transaction
tx_hash = await wallet.send_transaction({
    "to": "recipient_address",
    "value": "1000000000000000000",  # 1 ETH in wei
    "data": "0x",  # Optional contract data
    "gas": 21000,  # Optional gas limit
    "maxFeePerGas": "50000000000"  # Optional max fee per gas (50 gwei)
})

# Call contract method
result = await wallet.call_contract(
    contract_address="contract_address",
    function_name="balanceOf",
    args=["token_holder_address"]
)

Features

  • Web3.py Integration:

    • Full web3.py functionality
    • Enhanced contract interactions
    • ABI handling
    • Gas estimation
  • Transaction Management:

    • EIP-1559 support
    • Legacy transaction support
    • Contract deployment
    • Method encoding/decoding
  • Smart Contract Features:

    • Contract interaction
    • Event listening
    • Function calling
    • State queries
  • Network Support:

    • Ethereum
    • Polygon
    • Arbitrum
    • Optimism
    • Base
    • BNB Chain
    • All EVM-compatible chains

License

This project is licensed under the terms of the MIT license.

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

goat_sdk_wallet_web3-0.1.4.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

goat_sdk_wallet_web3-0.1.4-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file goat_sdk_wallet_web3-0.1.4.tar.gz.

File metadata

  • Download URL: goat_sdk_wallet_web3-0.1.4.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Linux/6.13.0-1-MANJARO

File hashes

Hashes for goat_sdk_wallet_web3-0.1.4.tar.gz
Algorithm Hash digest
SHA256 07241a4000162a56da014803e557ba26d68070b3bf17365e6c345c5912adc129
MD5 5de334f36f369513c0bf6817b66d1a3f
BLAKE2b-256 20bcd1e183b105bd409b6162fc84de5ac6f4191e5860d96912ebac11e8846ed0

See more details on using hashes here.

File details

Details for the file goat_sdk_wallet_web3-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: goat_sdk_wallet_web3-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Linux/6.13.0-1-MANJARO

File hashes

Hashes for goat_sdk_wallet_web3-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 986f16e96407fb4a2b32f451212a52dba953880efcab6920492fb3d594943aeb
MD5 6e498861160ffe0255eb40513ca0cd90
BLAKE2b-256 b1c2bfcc73523044a307dbe83669091f643ced5f10340cb490a17107a4b35e83

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