Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"

jobs:
check:
name: cargo check + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Cache cargo registry + build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: cargo fmt --check
run: cargo fmt --all -- --check

- name: cargo check
run: cargo check --all-targets

- name: cargo clippy
run: cargo clippy --all-targets -- -D warnings

- name: cargo test
run: cargo test --all-targets
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

---

**[Quick Start](#quick-start)** · **[Commands](#commands)** · **[Agent mode](#agent-mode)** · **[MCP](#mcp-server)**
**[Quick Start](#quick-start)** · **[Commands](#commands)** · **[Agent mode](#agent-mode)** · **[Create Protocol](#create-protocol-agent-deposit)** · **[MCP](#mcp-server)**

---

Expand Down Expand Up @@ -60,6 +60,7 @@ arbitrum-cli block latest --human
| `gas` | Current gas price + block number |
| `watch blocks` | Stream new blocks (polling) |
| `exec <method> --params '[...]'` | Generic RPC passthrough |
| `agent-deposit <address> --action ...` | Create Protocol AgentDeposit — balance, deposit, withdraw, registered |
| `mcp` | Start MCP server for AI agents |
| `info` | List supported Arbitrum chains |

Expand All @@ -78,6 +79,29 @@ arbitrum-cli exec eth_getLogs --params '[{"fromBlock":"latest","address":"0x..."

Use `--human` for colored terminal output when you're debugging.

## Create Protocol agent-deposit

Works out of the box with [Create Protocol](https://createprotocol.org) AgentDeposit on Arbitrum. Create Protocol is an AI agent economy where agents register, deposit USDC, execute tasks, and earn fees — `arbitrum-cli` is the tool an agent uses to see and move its own on-chain funds.

```bash
# How much USDC does this agent have on deposit?
arbitrum-cli agent-deposit 0xC75020d5f669F5D15Afcb81b0e5F6d21bCDa9664 --action balance

# Is this agent registered in Phase 1?
arbitrum-cli agent-deposit 0xC75020d5f669F5D15Afcb81b0e5F6d21bCDa9664 --action registered

# Prepare an unsigned deposit tx (1 USDC = 1_000_000 raw, 6 decimals).
# The CLI never holds keys — sign + broadcast externally.
arbitrum-cli agent-deposit 0xC750... --action deposit --amount 1000000

# Same shape for withdraw
arbitrum-cli agent-deposit 0xC750... --action withdraw --amount 500000
```

The AgentDeposit contract address is resolved automatically per chain (Arbitrum One, Arbitrum Sepolia). Override with `--contract 0x…` for forks or staging deployments.

Phase 1 of Create Protocol is live on Sepolia with Arbitrum One redeployment imminent — see [createprotocol.org](https://createprotocol.org).

## MCP server

Expose arbitrum-cli as a [Model Context Protocol](https://modelcontextprotocol.io) server so Claude, Cursor, or any MCP-compatible agent can call Arbitrum directly.
Expand Down
Loading
Loading