Skip to content

[help wanted] End-to-end agent lifecycle example on Arbitrum Sepolia #9

@abhicris

Description

@abhicris

Context

arka now ships agent-first primitives (see PR #4) but has no end-to-end example showing an agent connecting to a real (or forked) Arbitrum node and executing a full lifecycle: deposit → read balance → execute task → withdraw. The examples/agent_account.rs file exists but uses InMemoryAgentAccount. Contributors exploring the SDK learn a lot faster from a realistic example — this is scoped to be doable using Arbitrum Sepolia.

Scope

Medium-effort ticket. Create a new examples/agent_lifecycle_sepolia.rs that:

  1. Loads a private key from env var ARKA_SEPOLIA_KEY (bail with a clear message if missing).
  2. Connects via ChainConnector::new(Chain::Arbitrum) (or a new ArbitrumSepolia variant if you add one — bonus).
  3. Uses AgentDepositClient (on-chain, from src/chains/arbitrum.rs) to:
    • Print current USDC balance on-chain.
    • Print AgentDeposit-registered balance.
    • If registered balance < $1, call deposit for $1 (6 decimals = 1_000_000).
    • Print new balance.
    • Call execute_task with a dummy task id and assert the receipt comes back.
  4. All output uses tracingRUST_LOG=info should show what happened.
  5. Add a section to README.md under "Examples" documenting how to run it (and where to get Sepolia USDC).

Acceptance criteria

  • cargo run --example agent_lifecycle_sepolia executes end-to-end against Arbitrum Sepolia.
  • Code compiles cleanly with cargo clippy --examples -- -D warnings.
  • README gains a short "Run the Sepolia example" subsection.
  • Private keys never logged, even at debug! level.

Estimated effort

M (1 day) — the code is small, but you'll spend time on the sepolia faucet + contract-address config.

Reference: PR #4 for the AgentDepositClient shape; examples/agent_account.rs for the in-memory variant to use as a starting skeleton.

kcolbchain / Abhishek Krishna

Metadata

Metadata

Assignees

No one assigned

    Labels

    create-protocolCreate Protocol / AgentDeposit / agent-economydocumentationImprovements or additions to documentationhelp wantedExtra attention is neededpipeline: stalerustRust code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions