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

Uploaded Python 3

File details

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

File metadata

  • Download URL: goat_sdk_plugin_erc20-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 13ae947795d9ba12d12e496760ef12e79429e33c1a6676f2f61b8ad7677f4160
MD5 445553a0ec41f34d8dcc0645e8bcb07c
BLAKE2b-256 432528e10be6db6c5292767419441c760a1b3439c745f352c6f10358a2573a0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for goat_sdk_plugin_erc20-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d027b4cec5d527ff3973d8bbd6b5639fc5967d5255d306de3694340dc71dd0cc
MD5 c9dbf0fa5b3175ecb88e75440144ade2
BLAKE2b-256 fa4329a48335b2d308ded3b588e33f37c98382a85e6d3b88117c68afafa8746d

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