approveAllowance
function approveAllowance(client, options): Promise<`0x${string}`>;Defined in: packages/synapse-core/src/erc20.ts:119
Approve the allowance of the ERC20 token to the payments contract.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain, Account> | The client to use. |
options | ERC20ApproveAllowanceOptions | The props to use. |
Returns
Section titled “Returns”Promise<`0x${string}`>
The hash of the approve transaction.
Throws
Section titled “Throws”- SimulateContractErrorType if the simulate contract fails.
Throws
Section titled “Throws”- WriteContractErrorType if the write contract fails.