Skip to content

[help wanted] Extend agent-deposit: register, cancel, read-task, batch unsigned calldata #7

@abhicris

Description

@abhicris

Context

agent_deposit (landed in PR #2) is the only Create Protocol subcommand. The CLI never holds keys — it produces unsigned calldata and prints it as JSON for external signers (Frame, Foundry's cast send, Ledger-backed tools) to broadcast. This is the right agent-economy pattern. We should extend it with the other AgentDeposit functions so agents and operators have full lifecycle coverage, not just deposit/withdraw/balance/registered.

Scope

Medium-effort ticket. Extend src/agent_deposit.rs to also support:

  • register action — produce unsigned register() calldata (per the Create Protocol AgentDeposit ABI).
  • cancel action — produce unsigned cancel() calldata for pulling a pending registration.
  • read-task <task_id> action — eth_call for task metadata (purely a read, no calldata returned).
  • A new subcommand agent-deposit-batch <json_file> that takes a batch JSON spec and emits unsigned multicall calldata — one deposit followed by N task executions, for example.
  • Golden unit tests for each action's calldata byte-for-byte — pin the ABI encoding so changes are visible.

Acceptance criteria

  • All actions return well-formed JSON ({"action": "...", "to": "0x...", "data": "0x...", "value": "0x0"}).
  • Unit tests cover each action: input → expected hex calldata.
  • cargo test green.
  • README updated with the new actions.
  • Preserve the invariant: CLI never asks for or touches a private key.

Reference: src/agent_deposit.rs (PR #2) for the encoding helpers (encode_uint256_call, encode_address_call, selectors::*).

Estimated effort

M (1–2 days)

kcolbchain / Abhishek Krishna

Metadata

Metadata

Assignees

No one assigned

    Labels

    arbitrumArbitrum-specificcreate-protocolCreate Protocol / AgentDeposit / agent-economyhelp wantedExtra attention is neededrustRust code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions