🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@goat-sdk/plugin-erc20

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@goat-sdk/plugin-erc20

latest
Source
npmnpm
Version
0.2.14
Version published
Weekly downloads
744
17.91%
Maintainers
2
Weekly downloads
 
Created
Source
GOAT

ERC20 GOAT Plugin

ERC20 plugin for Goat. Allows you to create tools for transferring and getting the balance of ERC20 tokens.

Installation

npm install @goat-sdk/plugin-erc20
yarn add @goat-sdk/plugin-erc20
pnpm add @goat-sdk/plugin-erc20

Usage

import { erc20 } from "@goat-sdk/plugin-erc20";


const plugin = erc20({
    tokens: [USDC, PEPE],
});

Adding custom tokens

import { erc20 } from "@goat-sdk/plugin-erc20";


const plugin = erc20({
    tokens: [
        USDC,
        {
            decimals: 18,
            symbol: "SHIB",
            name: "Shiba Inu",
            chains: {
                "1": {
                    contractAddress: "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",
                },
            },
        },
    ],
});

Tools

  • Get token info by symbol
  • Get balance
  • Transfer
  • Approve
  • Get allowance
  • Total supply
  • Revoke approval
  • Convert to base unit
  • Convert from base unit


Keywords

ai

FAQs

Package last updated on 11 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts