0.2.14 • Published 8 months ago

@goat-sdk/plugin-erc20 v0.2.14

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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

  1. Get token info by symbol
  2. Get balance
  3. Transfer
  4. Approve
  5. Get allowance
  6. Total supply
  7. Revoke approval
  8. Convert to base unit
  9. Convert from base unit
0.2.14

8 months ago

0.2.13

8 months ago

0.2.12

8 months ago

0.2.11

8 months ago

0.2.10

9 months ago

0.2.9

9 months ago

0.2.8

9 months ago

0.2.7

10 months ago

0.2.6

10 months ago

0.2.5

10 months ago

0.2.4

10 months ago

0.2.3

10 months ago

0.2.2

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.12

10 months ago

0.1.11

11 months ago

0.1.10

11 months ago

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago