Skip to main content

Goat plugin for ERC20

Project description

ERC20 Plugin for GOAT SDK

A plugin for the GOAT SDK that provides ERC20 token interaction functionality.

Installation

# Install the plugin
poetry add goat-sdk-plugin-erc20

# Install required wallet dependency
poetry add goat-sdk-wallet-evm

Usage

from goat_plugins.erc20 import erc20, ERC20PluginOptions

# Initialize the plugin
options = ERC20PluginOptions(
    rpc_url="${RPC_PROVIDER_URL}"  # Your EVM RPC provider URL
)
plugin = erc20(options)

# Get token balance
balance = await plugin.balance_of(
    token_address="0x6B175474E89094C44Da98b954EedeAC495271d0F",  # DAI token
    wallet_address="0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
)

# Check allowance
allowance = await plugin.allowance(
    token_address="0x6B175474E89094C44Da98b954EedeAC495271d0F",  # DAI token
    owner="0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    spender="0x1111111254EEB25477B68fb85Ed929f73A960582"  # 1inch router
)

Features

  • Token balance checking
  • Allowance management
  • Token transfers
  • Token approvals
  • Supported chains:
    • Ethereum
    • Polygon
    • BSC
    • Arbitrum
    • Optimism
    • Avalanche
    • Base
    • Any EVM-compatible chain

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_plugin_erc20-0.1.2.tar.gz (4.5 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_plugin_erc20-0.1.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file goat_sdk_plugin_erc20-0.1.2.tar.gz.

File metadata

  • Download URL: goat_sdk_plugin_erc20-0.1.2.tar.gz
  • Upload date:
  • Size: 4.5 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_plugin_erc20-0.1.2.tar.gz
Algorithm Hash digest
SHA256 40f40f8dc0212817cdccb2cf8802ad2f40ff5c76994adf87a0f987c4239dcc90
MD5 75ac164e685bf6b49d7b2aa30050d2a5
BLAKE2b-256 02daa75fd64495e027d32100cbe157f1ff9eef79a93614a5671e12716d6adf4e

See more details on using hashes here.

File details

Details for the file goat_sdk_plugin_erc20-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for goat_sdk_plugin_erc20-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 96f58f668e90fcc99d907e277ff5ce2bfd8c5448eb828dd579a4a55b0d8978c9
MD5 108df64e2edc349266c5a25a8a6c5915
BLAKE2b-256 575b193f287f4d4d29a9b45b54fd582712fb0996c05346d5f27c5a7cce7584a1

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