approve_exchange_token
Grants ERC-20 allowance to the Boson Protocol contract. Must be called before commit_to_offer or deposit_funds when using non-native exchange tokens. Returns unsigned transaction data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Allowance in wei. Use max uint256 string for unlimited: '115792089237316195423570985008687907853269984665640564039457584007913129639935'. | |
| configId | Yes | Boson/Fermion Protocol deployment identifier. Format: '<env>-<chainId>-<index>' e.g. 'production-137-0' (Polygon mainnet), 'testing-80002-0' (Amoy testnet). Call get_config_ids to list all valid values for this server. | |
| executionMode | No | 'direct' = standard on-chain tx (sign locally with your wallet → send_signed_transaction). 'metaTx' = gasless relay via Biconomy (send_meta_transaction). Defaults to 'direct'. | |
| signerAddress | Yes | Ethereum address that will sign and send this transaction. Must match the wallet that will sign the returned transaction locally. | |
| exchangeTokenAddress | Yes | ERC-20 token contract address to approve for the Boson Protocol diamond. |