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.5.tar.gz (4.0 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.5-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: goat_sdk_wallet_web3-0.1.5.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.16 Linux/6.8.0-1021-azure

File hashes

Hashes for goat_sdk_wallet_web3-0.1.5.tar.gz
Algorithm Hash digest
SHA256 df8eea0c5d2a195b8b49e531fb1e5b78bbdddfa8ceb5ae8d0fb8e138d60400e2
MD5 0fc4f291491c68e8e3b7102455c69c08
BLAKE2b-256 de8c27b0660dc2a5059d87194b77c46c6a7a7e6e237bc8a13cf62b175ce92108

See more details on using hashes here.

File details

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

File metadata

  • Download URL: goat_sdk_wallet_web3-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.16 Linux/6.8.0-1021-azure

File hashes

Hashes for goat_sdk_wallet_web3-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c9816f0b58ee8391991e3be337ee364217038895c33bb0b0b639df52a09984cd
MD5 c9441ff70b311d877734694bc9bfb30a
BLAKE2b-256 bdc779c514c61fd0a46faae86b341600aaab48cc27c990417899c792d2fe998e

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