Build staking v2: stake / withdraw / claim / exit (gas-padded)
blazar_build_staking_v2One call for staking v2: ordered txs[] for stake (exact approve + stake), withdraw, claimAll, claimMany (defaults to only tokens with rewards), exit or emergencyWithdraw, each with a summary, a simulation, warnings, and a gas limit. withdraw / exit / emergencyWithdraw / claimAll carry gas = max(estimateGas x 1.25, 1.1M) because a cold exit can use ~885k. Returns UNSIGNED txs.
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": {
"action": "<action>",
"from": "<from>"
},
"name": "blazar_build_staking_v2"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Address that will sign and send the txs. Required: used for allowance checks, simulation and nonce. | |
| action | Yes | stake: deposit. withdraw: take back some (the rest must stay >= minStake or be 0). claimAll: every reward token (all-or-nothing). claimMany: chosen tokens (default: tokens with rewards). exit: withdraw all + claim all. emergencyWithdraw: last resort, principal only, rewards stay claimable. | |
| amount | No | Staking-token amount in HUMAN units, e.g. "250" = 250 BZB. Required for stake and withdraw. | |
| tokens | No | claimMany only: reward token addresses. Default: every token where earned > 0. | |
| amountIsBaseUnits | No | If true, amount is in base units (wei for 18-decimal tokens; 6 decimals for USDC). Default false. |