Allowance

ERC20 Getter Plugin - Allowance

Description

Returns the amount which spender is still allowed to withdraw from owner

Method

allowance(address, address)

Input Parameters

NamePlugin TypeDescription

to

FctAddress

ERC20 Contract Address

Method Parameters

NamePlugin TypeDescription

owner

FctAddress

Address of owner

spender

FctAddress

Address of spender, who can spend allowed ERC20 tokens on behalf of owner

Returned Values

NamePlugin TypeSolidity Type

allowance

FctValue

uint256

Example

Example with initParams

const allowance = new ERC20.getter.Allowance({
 chainId: 1,
 initParams: {
   to: "0xB1191F691A355b43542Bea9B8847bc73e7Abb137" // KIRO Address
   methodParams: {
     owner: "0x...",
     spender: "0x...",
   }
 }
})

Example without initParams

const allowance = new ERC20.getter.Allowance({ chainId: 1 })

allowance.input.set({
    to: "0xB1191F691A355b43542Bea9B8847bc73e7Abb137" // KIRO Address
    methodParams: {
      owner: "0x...",
      spender: "0x...",
    }
})

Learn more

Learn more about EIP20 token standard here

Last updated