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:
- Loads a private key from env var
ARKA_SEPOLIA_KEY (bail with a clear message if missing).
- Connects via
ChainConnector::new(Chain::Arbitrum) (or a new ArbitrumSepolia variant if you add one — bonus).
- 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.
- All output uses
tracing — RUST_LOG=info should show what happened.
- 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
Context
arkanow 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. Theexamples/agent_account.rsfile exists but usesInMemoryAgentAccount. 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.rsthat:ARKA_SEPOLIA_KEY(bail with a clear message if missing).ChainConnector::new(Chain::Arbitrum)(or a newArbitrumSepoliavariant if you add one — bonus).AgentDepositClient(on-chain, fromsrc/chains/arbitrum.rs) to:execute_taskwith a dummy task id and assert the receipt comes back.tracing—RUST_LOG=infoshould show what happened.README.mdunder "Examples" documenting how to run it (and where to get Sepolia USDC).Acceptance criteria
cargo run --example agent_lifecycle_sepoliaexecutes end-to-end against Arbitrum Sepolia.cargo clippy --examples -- -D warnings.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
AgentDepositClientshape;examples/agent_account.rsfor the in-memory variant to use as a starting skeleton.— kcolbchain / Abhishek Krishna