Skip to main content

Erc20.setAllowance() method

Allows the specified spender wallet to transfer the given amount of tokens to another wallet

Example

// Address of the wallet to allow transfers from
const spenderAddress = "0x...";
// The number of tokens to give as allowance
const amount = 100;
await contract.erc20.setAllowance(spenderAddress, amount);

Signature:

setAllowance(spender: string, amount: Amount): Promise<TransactionResult>;

Parameters

ParameterTypeDescription
spenderstring
amountAmount

Returns:

Promise<TransactionResult>