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.token.setAllowance(spenderAddress, amount);
Signature:
setAllowance(spender: string, amount: Amount): Promise<TransactionResult>;
Parameters
Parameter | Type | Description |
---|---|---|
spender | string | |
amount | Amount |
Returns:
Promise<TransactionResult>