@contractjs/erc20
Version:
A TypeScript utility library for ERC20 contracts.
14 lines • 1.7 kB
TypeScript
import { Address, PublicClient, WalletClient } from "viem";
import { ChainIdentifier } from "./utils";
import { TransactionResult } from "./types";
export declare const allowance: (owner: Address, spender: Address, tokenAddress: Address, publicClient: PublicClient) => Promise<bigint>;
export declare const balanceOf: (owner: Address, tokenAddress: Address, publicClient: PublicClient) => Promise<bigint>;
export declare const balanceOfMultichain: (owner: Address, tokenAddresses: Address[], chains: ChainIdentifier[], rpcUrls?: string[]) => Promise<bigint>;
export declare const getBalanceValueInUSD: (tokenAddress: Address, tokenDecimals: number, balance: bigint, publicClient: PublicClient) => Promise<number>;
export declare const approve: (spender: Address, amount: bigint, tokenAddress: Address, walletClient: WalletClient) => Promise<TransactionResult>;
export declare const transfer: (to: Address, amount: bigint, tokenAddress: Address, walletClient: WalletClient) => Promise<TransactionResult>;
export declare const transferFrom: (from: Address, to: Address, amount: bigint, tokenAddress: Address, walletClient: WalletClient) => Promise<TransactionResult>;
export declare const burn: (value: bigint, tokenAddress: Address, walletClient: WalletClient) => Promise<TransactionResult>;
export declare const burnFrom: (account: Address, value: bigint, tokenAddress: Address, walletClient: WalletClient) => Promise<TransactionResult>;
export declare const permit: (owner: Address, spender: Address, value: bigint, deadline: bigint, v: number, r: `0x${string}`, s: `0x${string}`, tokenAddress: Address, walletClient: WalletClient) => Promise<TransactionResult>;
//# sourceMappingURL=erc20.d.ts.map