Skip to content

[good first issue] Add Base mainnet + Base Sepolia first-class support (chains::base module) #5

@abhicris

Description

@abhicris

Context

arka ships with a Chain enum and a per-chain chains::arbitrum module holding the Arbitrum-specific AgentDepositClient + ArbitrumContracts constants (see src/chains/arbitrum.rs, landed in PR #4). Base mainnet is already a Chain::Base enum variant and has a default RPC wired in src/chain/mod.rs, but there is no src/chains/base.rs mirroring what Arbitrum has — so agents can't yet point at Base-native deployments of Create Protocol / AgentDeposit, Uniswap V3, etc.

This ticket adds Base mainnet + Base Sepolia first-class support by mirroring the Arbitrum pattern.

Scope

  • Add Chain::BaseSepolia (chain id 84532) to the enum in src/chain/mod.rs with:
    • chain_id(), default_rpc() (https://sepolia.base.org), explorer() (https://sepolia.basescan.org), native_token() ("ETH"), Display impl.
  • Create src/chains/base.rs mirroring src/chains/arbitrum.rs:
    • BaseContracts struct with at minimum USDC mainnet (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) and Uniswap V3 QuoterV2 (0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a).
    • A BaseAgentDepositClient stub that takes an AgentDeposit contract address as a parameter and implements AgentAccount. Re-use the Arbitrum implementation's structure — the bytecode-level calls are identical on Base.
  • Register pub mod base; in src/chains/mod.rs.
  • Re-export the new types from crate::prelude alongside the Arbitrum ones.

Acceptance criteria

  • cargo test green.
  • cargo build --all-features green.
  • Chain::BaseSepolia.chain_id() == 84532.
  • examples/multi_chain.rs (or a new examples/base_chain.rs) can ChainConnector::new(Chain::Base).await and print block number.
  • No network calls required in tests — keep them offline like the Arbitrum module does.

Reference: see PR #4 (fix+feat: unbreak CI + Arbitrum AgentAccount primitives) for the module layout to copy.

Estimated effort

S (2–4 hours)

kcolbchain / Abhishek Krishna

Metadata

Metadata

Assignees

No one assigned

    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