# Chain 391 Quickstart

## 前置

* `curl` (任何系统自带)
* `cast` (foundry-zksync, [安装指南](https://github.com/matter-labs/foundry-zksync))
* `node` ≥ 20 (TypeScript SDK 路径)

## 验证

```bash
# 1. chain id (期望 391 / 0x187)
curl -X POST -H "Content-Type: application/json" \
    --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' \
    https://rpc-testnet.axblade.io

# 2. 当前 block 高度
curl -X POST -H "Content-Type: application/json" \
    --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
    https://rpc-testnet.axblade.io
```

期望返回：

```json
{"jsonrpc":"2.0","id":1,"result":"0x187"}
{"jsonrpc":"2.0","id":1,"result":"0x521f"} // (实际值随时间增长)
```

## 命令

```bash
export RPC=https://rpc-testnet.axblade.io
export POB=0xdD7870A759Cbe9B755e33ce10Fbc16962c6b44B7
export STAKE=0x1f6A315850489B949735Dc3F37ca90B2d1d4A2B8
export POLICY=0x07De5CBeaB32e6b86ae6b993A62B4a1759c66217
export DEPLOYER=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

# PoBRegistry batch count
cast call $POB "getBatchCount()(uint256)" --rpc-url $RPC

# StakeManager: deployer 抵押金 (期望 0.5 ETH)
cast call $STAKE "activeStake(address)(uint256)" $DEPLOYER --rpc-url $RPC

# PolicyRegistry: EU AI Act 策略 active (期望 true)
cast call $POLICY "isRegistered(bytes32)(bool)" \
    0xfc53fc5e88de7760db17d4f0e39289edebfb8bfe10d277dbef22e9e85bdd6732 \
    --rpc-url $RPC
```

## SDK Quick install

```bash
npm install @babydriver/sdk viem
# 或
pnpm add @babydriver/sdk viem
```

详见 [TypeScript SDK 接入](/integration-jie-ru-fang-shi/sdk-typescript.md)。

## G3 稳定性 soak (验证链一直 LIVE)

```bash
# clone repo
git clone https://github.com/leeleeEcho/babyDriver_Layer2.git
cd babyDriver_Layer2

# 跑 5 分钟 smoke
INTERVAL_SEC=10 DURATION_SEC=300 ./scripts/g3-stability-poll.sh

# 跑 30 分钟 soak
INTERVAL_SEC=15 DURATION_SEC=1800 ./scripts/g3-stability-poll.sh
```

预期结果：100% uptime, p50 < 1s, 0 drift。

24h soak runbook 见 [`docs/guides/g3-stability-24h-runbook.md`](https://github.com/leeleeEcho/babyDriver_Layer2/blob/main/docs/guides/g3-stability-24h-runbook.md)。

## 相关：按角色：

* **Agent 开发者** → [Agent 接入](/getting-started/for-agents.md)
* **合约开发者** → [开发者接入](/getting-started/for-developers.md)
* **审计师** → [审计师上手](/getting-started/for-auditors.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yellowpaper.axblade.io/getting-started/chain-391-quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
