feat: agent-deposit command + GitHub Actions CI#2
Merged
Conversation
Adds a first-class `agent-deposit` verb for Create Protocol AgentDeposit on Arbitrum so an AI agent can introspect and fund itself from a single binary: arbitrum-cli agent-deposit <address> --action balance|deposit|withdraw|registered Reads (balance, registered) go through eth_call. Writes return unsigned calldata — the CLI is strictly key-less; agents sign via switchboard or any wallet and broadcast with `exec eth_sendRawTransaction`. Contract address is resolved per-chain (Arbitrum One / Sepolia) with a one-line swap when Phase 1 lands on mainnet. Also wires up CI (fmt + check + clippy + test) since none existed. 11 unit tests cover calldata encoding, action parsing, chain resolution, and response shape. See README "Create Protocol agent-deposit" section for usage.
This was referenced Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a first-class
agent-depositsubcommand wrapping the Create Protocol AgentDeposit contract on Arbitrum, plus a GitHub Actions CI pipeline (fmt / check / clippy / test) since none existed.Why
Create Protocol Phase 1 is an AI agent economy on Arbitrum: agents register, deposit USDC, execute tasks, earn fees.
arbitrum-cliis positioned as the tool an LLM uses to drive the chain — an AgentDeposit verb closes the loop on the agent's own balance sheet without the agent having to hand-roll selectors or ABI calls.Design choices worth flagging:
agent_deposit_address) — placeholder addresses today, one-line swap when the Arbitrum One redeployment of AgentDeposit lands. No scattered constants.eth_sendRawTransaction.balance_rawandbalance_usdc.CI
None existed before. Added
.github/workflows/ci.ymlcovering:cargo fmt --checkcargo check --all-targetscargo clippy --all-targets -- -D warningscargo test --all-targetsWith registry + build caching.
Tests
11 new unit tests in
src/agent_deposit.rscovering:balanceOf/isRegistered/deposit/withdrawcalldata encodingbalance | deposit | withdraw | registered, plus case + alias handling)uint256result decodingAll green locally (
cargo test: 11 passed / 0 failed), clippy clean, fmt clean.Manual verification
— kcolbchain / Abhishek Krishna