v1

latestOpenAPI 3.0.02026-07-26278284.4 KB
DeFi Shortcuts

Approve Enso contract

Returns a transaction that approves your Enso contracts to spend the given amount of specified tokens. Approve before sending the route transaction on-chain.

get/api/v1/wallet/approve

Query parameters

chainIdnumber

Chain ID of the network to execute the transaction on

fromAddressstring required
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Ethereum address of the wallet to send the transaction from

routingStrategy'ensowallet' | 'router' | 'delegate' | 'router-legacy' | 'delegate-legacy' nullable

Routing strategy to use. Use the same routing strategy you used to create the transaction.

tokenAddressstring required

ERC20 token address of the token to approve

amountstring required

Amount of tokens to approve in wei

Response

txobject required

The tx object to use in ethers

gasstring required

The gas estimate for the transaction

tokenstring required

The token address to approve

amountstring required

The amount of tokens to approve

spenderstring required

The spender address to approve