Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IERC20

Interface that represents a smart contract, which implements EIP20

interface

Hierarchy

Implemented by

Index

Methods

  • allowance(owner: string, spender: string): Promise<bigint>
  • Returns the remaining number of tokens that spender will be allowed to spend on behalf of owner through transferFrom. This is zero by default. This value changes when approve or transferFrom are called.

    Parameters

    • owner: string
    • spender: string

    Returns Promise<bigint>

  • approve(spender: string, amount: bigint): Promise<Transaction>
  • Sets amount as the allowance of spender over the caller's tokens.

    Emits an {Approval} event.

    Parameters

    • spender: string
    • amount: bigint

    Returns Promise<Transaction>

  • balanceOf(account: string): Promise<bigint>
  • Returns the amount of tokens owned by account.

    Parameters

    • account: string

    Returns Promise<bigint>

  • totalSupply(): Promise<bigint>
  • transfer(recipient: string, amount: bigint): Promise<Transaction>
  • Moves amount tokens from the caller's account to recipient.

    Emits a {Transfer} event.

    Parameters

    • recipient: string
    • amount: bigint

    Returns Promise<Transaction>

  • transferFrom(sender: string, recipient: string, amount: bigint): Promise<Transaction>
  • Moves amount tokens from sender to recipient using the allowance mechanism. amount is then deducted from the caller's allowance.

    Emits a {Transfer} event.

    Parameters

    • sender: string
    • recipient: string
    • amount: bigint

    Returns Promise<Transaction>

Generated using TypeDoc