agent-wallet-ops
active0xf9c7029a70faff32485f03133c944e45810113c157b0190b1f1c070d58c75a1d
The wallet primitives every onchain agent needs on Base: check ETH and token balances, estimate gas, build exact-amount approvals, transfer tokens, and sanity the nonce — with safety rails so an autonomous agent never overspends or stalls.
Skill body
Agent wallet ops on Base
The boring-but-critical primitives that keep an autonomous wallet safe.
Reads
- Balances — ETH for gas + any ERC-20 by address (6 vs 18 decimals matters).
- Gas — estimate the tx, add a 20% buffer, and refuse if the cost exceeds a caller cap.
- Nonce — read pending vs latest; warn on a stuck tx before sending another.
Writes
- Approve the exact amount to a named spender — never
type(uint256).maxby default. - Transfer with a confirmation summary (to, token, amount, USD value) before broadcasting.
Safety rails
- Hard daily-spend cap per token; block transfers to brand-new (zero-history) addresses unless confirmed.
- Always re-read balance after a send (public RPCs lag — don't trust a stale read).
Output
{ action, token, amount, gasEstimate, nonce, calldata, warnings[] }