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