Build ERC20.approve(spender, amount) calldata
dexe_vote_build_erc20_approveBuild ERC20 approve calldata for DeXe staking: allow a spender, typically the DAO's GovUserKeeper, to use your tokens before depositing. Returns calldata only, no broadcast.
Instructions
Builds calldata; does not broadcast. ERC20.approve(spender, amount). Run it before dexe_vote_build_deposit when staking an ERC20: approve the DAO's GovUserKeeper (dexe_dao_info), never the GovPool. Native-coin staking needs no approve — pass value on deposit instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"token": "<token>",
"spender": "<spender>",
"amount": "<amount>"
},
"name": "dexe_vote_build_erc20_approve"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | ERC20 token contract address to approve. | |
| amount | Yes | Allowance in the ERC20 at `token`, that token's own decimals. RAW base units, digits only ('1500000000000000000' = 1.5 at 18 dec); '1.5' is REJECTED — scale it, or use dexe_proposal_create. Unlimited = max uint256, i.e. '115792089237316195423570985008687907853269984665640564039457584007913129639935' | |
| chainId | No | Chain this payload targets: 56 mainnet, 97 testnet. Default: the configured chain. | |
| govPool | No | DAO GovPool. When set, an approve to it (instead of its GovUserKeeper) is refused. | |
| spender | Yes | For deposits: the DAO's GovUserKeeper address (NOT the GovPool) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | ||
| warnings | No | ||
| advisories | No | Deprecated — use warnings. |