You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add 'revoke' and 'approve' subcommands to manage ERC-20 allowances from the CLI #31
The awal CLI lets agents trade tokens but provides no way to manage the standing ERC-20 allowances those trades create. Every swap from an ERC-20 requires approve(router, amount), and the SDK appears to default to max-uint256 approvals. A one-time swap leaves a permanent unlimited allowance.
If the spender contract is later compromised — or the user wants to scope down the agent wallet's exposure after a session — there is currently no way to revoke the allowance from inside the agent runtime. Workarounds (revoke.cash, etc.) require the user to control the same address through a separate wallet client, which breaks the agentic model.
revoke is sugar for approve <token> <spender> 0. Same validation rules as trade/send. Output should match the trade JSON shape (transactionHash + basescan link).
Why this belongs in the CLI
Agentic wallets that can trade but cannot revoke are strictly worse than human-operated wallets from a security standpoint. Closing this gap is a prerequisite for trusting agents with non-trivial balances or longer sessions.
Adjacent
A companion skill (approvals-management, PR #30) covers the list side by querying Approval events. Pairing that with revoke would give agents a complete approval lifecycle: list → audit → revoke.
Tested scenario that motivated this
Agent wallet performed trade 2.5 USDC → AERO then trade 4.9 AERO → USDC on Base. Two standing approvals remain (USDC→router and AERO→router). With current tooling, the agent cannot revoke either.
Activity
stefangovedarov86-hash commentedon Jul 1, 2026