increaseAllowance()

increaseAllowance is a method that helps developers to increase allowance from fee token for the airdrop contract and the transfer token in the call of registerTree method. It is commonly used before any methods in the RegisterTree section pages. See more details about its usage in the section for RegisterTree method

Parameter

ArgumentTypeDescription
tokenAddressstringone of the payment method token of the presale contract
allowanceAmountstringamount of increased allowance
signerSignerthe instance to represent wallet address.

Example

const feeToken = await airdrop.feeToken();
await airdrop.increaseAllowance(feeToken, "20", signer)
const allowance = await presaleSdk.getAllowance(paymentToken, await signer.getAddress())