Skip to main content

getPermitSignature

Description:

Get permit signature for ERC20 token

Arguments:

NameTypeRequiredDescription
contractErc20AbiYesThe ERC20 token contract
ownerAddressstringYesThe user address
spenderAddressstringYesThe address of the spender

Returns:

type Output = {
amount: bigint
deadline: number
v: number
r: string
s: string
}

Example:

const permitParams = await sdk.utils.getPermitSignature({
contract: sdk.contracts.tokens.mintToken,
ownerAddress: '0x...',
spenderAddress: '0x...',
})