# Chain 391 合约地址表

## 基本信息

| 字段                 | 值                                                  |
| ------------------ | -------------------------------------------------- |
| Chain ID           | `391` (`0x187`)                                    |
| Chain Name         | AxBlade testnet                                    |
| RPC URL            | `https://rpc-testnet.axblade.io`                   |
| Block explorer     | `https://explorer-testnet.axblade.io` (Blockscout) |
| 出块速率               | \~1 block/min (anvil-zksync default)               |
| 部署版本               | post PoB v2 升级 (commit `1f1e29d`)                  |
| 最近 block (G3 soak) | 21055 (2026-05-05)                                 |

## L0 — 行为记录 PoB v2

| 合约                               | 地址                                                  |
| -------------------------------- | --------------------------------------------------- |
| **PoBRegistry**                  | `0xdD7870A759Cbe9B755e33ce10Fbc16962c6b44B7`        |
| **BehaviorSpecRegistry**         | (查 `deployments/l2-opa-pob-upgrade-chain-391.json`) |
| **StakeManager**                 | `0x1f6A315850489B949735Dc3F37ca90B2d1d4A2B8`        |
| **ChallengeManager**             | `0x87211Ff26Ae70300917119ded51FBc88714dB544`        |
| **Groth16PoBVerifier**           | (查 deployments JSON)                                |
| **PoBComplianceGroth16Verifier** | (查 deployments JSON)                                |

## L1 — 决策回执 PoD

| 合约                         | 地址                                        |
| -------------------------- | ----------------------------------------- |
| **PoDRegistry**            | (查 `deployments/d2-tee-chain-391.json`)   |
| **ModelRegistry**          | (查 deployments JSON)                      |
| **EcdsaInferenceVerifier** | (查 deployments JSON)                      |
| **TeeInferenceVerifier**   | (查 `deployments/d2-tee-chain-391.json`)   |
| **MockDcapVerifier**       | (查 deployments JSON) — PoC, 主网前 swap      |
| **TeeProfileRegistry**     | (查 deployments JSON)                      |
| **ZkmlInferenceVerifier**  | (查 `deployments/l1-zkml-chain-391.json`)  |
| **MockHalo2Verifier**      | (查 deployments JSON) — PoC, 主网前 EZKL swap |
| **ZkmlCircuitRegistry**    | (查 deployments JSON)                      |
| **CausalChainLinker**      | (查 deployments JSON)                      |

## L2 — 策略引擎

| 合约                   | 地址                                                                   |
| -------------------- | -------------------------------------------------------------------- |
| **PolicyRegistry**   | `0x07De5CBeaB32e6b86ae6b993A62B4a1759c66217`                         |
| EU AI Act policyHash | `0xfc53fc5e88de7760db17d4f0e39289edebfb8bfe10d277dbef22e9e85bdd6732` |

## L3 — 解释层

| 合约                      | 地址                                              |
| ----------------------- | ----------------------------------------------- |
| **ExplanationRegistry** | (查 `deployments/l3-explanation-chain-391.json`) |

## Bridge / Oracle / DID Infra

| 合约                      | 地址 / 备注                       |
| ----------------------- | ----------------------------- |
| OracleHub               | system contract slot `0x8016` |
| OracleHubLocal          | (deploy artifact)             |
| L1OracleReader          | (deploy artifact)             |
| L1BridgeContract        | (deploy on L1 Sepolia)        |
| L2BridgeContract        | (deploy artifact)             |
| FastWithdrawalPoolV2    | (deploy artifact)             |
| DIDRegistryLocal        | system contract slot `0x8017` |
| CredentialRegistryLocal | system contract slot `0x8018` |
| IdentityVerifierLocal   | system contract slot `0x8019` |
| EnterpriseIAMLocal      | (deploy artifact)             |
| ERC8004Adapter          | (deploy artifact)             |

> **完整地址表**：见 `deployments/*.json`（gitignored，因含 private deployer 信息；可从项目方索取）。

## 关键 Actor 地址

| 角色               | 地址                                                          |
| ---------------- | ----------------------------------------------------------- |
| Deployer / Admin | `0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266` (anvil rich#0) |
| Aggregator (PoC) | `0x70997970C51812dc3A010C7d01b50e0d17dc79C8` (anvil rich#1) |
| Challenger (PoC) | `0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC` (anvil rich#2) |
| Treasury (PoC)   | `0x90F79bf6EB2c4f870365E785982E1f101E93b906` (anvil rich#3) |

> 注意：**以上 anvil rich 账户私钥是公开测试 key**，不能用于主网。详见 [非主网就绪](/legal-and-disclaimers/not-mainnet-ready.md)。

## 关键链上事件 tx

| 事件                                 | tx hash 类型                        | 文件位置                                                |
| ---------------------------------- | --------------------------------- | --------------------------------------------------- |
| B4-Phase2 真 fraud-proof e2e (5 tx) | challenge\_id=1, 真 slash 0.5 ETH  | `deployments/b4p2-fraud-proof-e2e-chain-391.json`   |
| L2 OPA PoB v2 升级 (9 wiring tx)     | 4 新合约 + 9 setX hooks              | `deployments/l2-opa-pob-upgrade-chain-391.json`     |
| L2 OPA SDK e2e (3 case)            | Compliant / Denied / NonCompliant | `deployments/l2-opa-sdk-e2e-chain-391.json`         |
| Challenger daemon soak (3 ticks)   | 0 false-positive                  | `deployments/b4p2-challenger-daemon-chain-391.json` |
| G3 30-min soak                     | 100% uptime                       | `deployments/g3-stability-chain-391.json`           |

## Cast 自验证脚本（不需 SDK）

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

# 1. 验证 chain id
cast chain-id --rpc-url $RPC
# expect: 391

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

# 3. 验证 PolicyRegistry EU AI Act 策略仍 active
cast call $POLICY "isRegistered(bytes32)(bool)" \
    0xfc53fc5e88de7760db17d4f0e39289edebfb8bfe10d277dbef22e9e85bdd6732 \
    --rpc-url $RPC
# expect: true

# 4. 验证 deployer 余额
cast balance $DEPLOYER --rpc-url $RPC --ether
# expect: > 0

# 5. 验证 deployer 抵押金
cast call $STAKE "activeStake(address)(uint256)" $DEPLOYER \
    --rpc-url $RPC | awk '{print $1}'
# expect: 500000000000000000 (0.5 ETH)

# 6. 验证 PoBRegistry 引用了 PolicyRegistry
cast call $POB "policyRegistry()(address)" --rpc-url $RPC
# expect: 0x07De5CBeaB32e6b86ae6b993A62B4a1759c66217
```

## ABI 获取

每个合约的 ABI 都在 `contracts/out/<ContractName>.sol/<ContractName>.json` (`abi` 字段)。

```bash
cd contracts && forge build # 生成 out/
jq '.abi' out/PoBRegistry.sol/PoBRegistry.json > /tmp/pob-abi.json
```

或用 `cast interface`：

```bash
cast interface $POB --rpc-url $RPC > IPoBRegistry.sol
```

## 历史版本

| 版本                | 日期         | 变化                                                                 |
| ----------------- | ---------- | ------------------------------------------------------------------ |
| v1 (2026-04-30 早) | 2026-04-30 | 初版 PoB / PoD / ChallengeManager                                    |
| v2 (2026-04-30 晚) | 2026-04-30 | PoB v2 升级 — 4 新合约 + 9 wiring tx (commit `1f1e29d`)                 |
| v2.1 (audit prep) | 2026-05-07 | ChallengeManager CEI 修 + 7 immutable (commit `7a1c8b5`, `70fcce0`) |

## 相关

* [部署 artifacts](/consolidated-resources/deployment-artifacts.md) — JSON 文件结构
* [测试覆盖率](/consolidated-resources/test-coverage.md) — 905 tests 状态
* [审计送审包](/consolidated-resources/audit-prep-package.md) — 9 docs 集合


---

# 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/consolidated-resources/contract-addresses-chain-391.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.
