Requested by @nsatoshi (Devin session 10c48192bc54424e82d856b10a83c9ff).
What
New docs/CHAIN138_ALIGNMENT_AUDIT_2026-04-18.md — full drift report over 67 unique Chain-138 addresses collected from 7 canonical sources, cross-checked against live on-chain state at https://rpc-core.d-bis.org (chainId 0x8a / 138).
New docs/data/chain138-alignment.json — machine-readable findings for downstream tooling/codegen.
Existing docs/CHAIN138_TOKEN_ADDRESSES.md banner-deprecated (only 5 of 15+ tokens, 0 of 43 infrastructure contracts, last updated 2026-01-31 vs. 2026-03-27 canonical inventory).
64 of 67 referenced addresses are live on-chain; 3 ghosts (in allowlist only, no bytecode).
61 deployed contracts are missing from the LedgerLive master doc.
17 deployed ERC20-shaped tokens vs. the 5 documented. 10 net-new undocumented: cAUDC, cCADC, cCHFC, cEURC, cEURT, cGBPC, cGBPT, cJPYC, cXAUC, cXAUT + raw USDT/USDC/wXRP.
WETH9 genesis slot0xC02aaA39…Cc2 returns decimals=0 on-chain — the genesis pre-deploy is a non-ERC20 shim; the real WETH9 bytecode lives at 0x3304b747…E6 per ADDRESS_MAPPING.md.
WETH10 at canonical 0xf4BB2e28…A9f works correctly (18 decimals, Wrapped Ether v10).
LedgerLive/docs/CONTRACT_ADDRESSES_REFERENCE.md and CONTRACT_INVENTORY_AND_VERIFICATION.md are linked from the master doc but return 404 (files never existed in this repo).
Recommended follow-ups (listed in audit doc §9)
Treat smom-dbis-138/config/address-inventory.chain138.json as the single on-box source of truth; generate DUAL_CHAIN_TOKEN_LIST.tokenlist.json, allowlist.config.ts Chain-138 block, and canonical-tokens.ts Chain-138 entries from it via codegen.
Either re-point CHAIN138_TOKEN_ADDRESSES.md WETH entry at the real deployed 0x3304b747…E6, or redeploy canonical WETH9 at the genesis slot.
Reconcile 3 ghost addresses in dbis_core/allowlist.config.ts.
Restore or remove the 404ing cross-referenced files.
## Chain 138 alignment audit
Requested by @nsatoshi (Devin session `10c48192bc54424e82d856b10a83c9ff`).
### What
- New `docs/CHAIN138_ALIGNMENT_AUDIT_2026-04-18.md` — full drift report over **67 unique Chain-138 addresses** collected from 7 canonical sources, cross-checked against live on-chain state at `https://rpc-core.d-bis.org` (chainId `0x8a` / 138).
- New `docs/data/chain138-alignment.json` — machine-readable findings for downstream tooling/codegen.
- Existing `docs/CHAIN138_TOKEN_ADDRESSES.md` banner-deprecated (only 5 of 15+ tokens, 0 of 43 infrastructure contracts, last updated 2026-01-31 vs. 2026-03-27 canonical inventory).
### Sources consulted
1. `LedgerLive/docs/CHAIN138_TOKEN_ADDRESSES.md` — purported master (v1.0, 2026-01-31)
2. `smom-dbis-138/config/address-inventory.chain138.json` — infrastructure inventory (2026-03-27)
3. `smom-dbis-138/config/runtime-env.chain138.json` — runtime env surface (2026-03-27)
4. `smom-dbis-138/services/token-aggregation/src/config/canonical-tokens.ts`
5. `dbis_core/src/core/defi/tezos-usdtz/allowlist.config.ts`
6. `explorer-monorepo/backend/config/metamask/DUAL_CHAIN_TOKEN_LIST.tokenlist.json` (v1.3.4, 2026-04-04)
7. `smom-dbis-138/docs/ADDRESS_MAPPING.md` — genesis ↔ deployed mapping
8. On-chain state via JSON-RPC
### Headline findings
- **64 of 67** referenced addresses are live on-chain; **3 ghosts** (in allowlist only, no bytecode).
- **61** deployed contracts are missing from the LedgerLive master doc.
- **17** deployed ERC20-shaped tokens vs. the 5 documented. 10 net-new undocumented: `cAUDC`, `cCADC`, `cCHFC`, `cEURC`, `cEURT`, `cGBPC`, `cGBPT`, `cJPYC`, `cXAUC`, `cXAUT` + raw `USDT`/`USDC`/`wXRP`.
- **WETH9 genesis slot** `0xC02aaA39…Cc2` returns `decimals=0` on-chain — the genesis pre-deploy is a non-ERC20 shim; the real WETH9 bytecode lives at `0x3304b747…E6` per `ADDRESS_MAPPING.md`.
- **WETH10** at canonical `0xf4BB2e28…A9f` works correctly (18 decimals, `Wrapped Ether v10`).
- `LedgerLive/docs/CONTRACT_ADDRESSES_REFERENCE.md` and `CONTRACT_INVENTORY_AND_VERIFICATION.md` are linked from the master doc but return 404 (files never existed in this repo).
### Recommended follow-ups (listed in audit doc §9)
1. Treat `smom-dbis-138/config/address-inventory.chain138.json` as the single on-box source of truth; generate `DUAL_CHAIN_TOKEN_LIST.tokenlist.json`, `allowlist.config.ts` Chain-138 block, and `canonical-tokens.ts` Chain-138 entries from it via codegen.
2. Either re-point `CHAIN138_TOKEN_ADDRESSES.md` WETH entry at the real deployed `0x3304b747…E6`, or redeploy canonical WETH9 at the genesis slot.
3. Reconcile 3 ghost addresses in `dbis_core/allowlist.config.ts`.
4. Restore or remove the 404ing cross-referenced files.
### Verification
```
curl -sX POST https://rpc-core.d-bis.org -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
# → {"jsonrpc":"2.0","id":1,"result":"0x8a"}
```
This pull request is broken due to missing fork information.
This pull request can be merged automatically.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Chain 138 alignment audit
Requested by @nsatoshi (Devin session
10c48192bc54424e82d856b10a83c9ff).What
docs/CHAIN138_ALIGNMENT_AUDIT_2026-04-18.md— full drift report over 67 unique Chain-138 addresses collected from 7 canonical sources, cross-checked against live on-chain state athttps://rpc-core.d-bis.org(chainId0x8a/ 138).docs/data/chain138-alignment.json— machine-readable findings for downstream tooling/codegen.docs/CHAIN138_TOKEN_ADDRESSES.mdbanner-deprecated (only 5 of 15+ tokens, 0 of 43 infrastructure contracts, last updated 2026-01-31 vs. 2026-03-27 canonical inventory).Sources consulted
LedgerLive/docs/CHAIN138_TOKEN_ADDRESSES.md— purported master (v1.0, 2026-01-31)smom-dbis-138/config/address-inventory.chain138.json— infrastructure inventory (2026-03-27)smom-dbis-138/config/runtime-env.chain138.json— runtime env surface (2026-03-27)smom-dbis-138/services/token-aggregation/src/config/canonical-tokens.tsdbis_core/src/core/defi/tezos-usdtz/allowlist.config.tsexplorer-monorepo/backend/config/metamask/DUAL_CHAIN_TOKEN_LIST.tokenlist.json(v1.3.4, 2026-04-04)smom-dbis-138/docs/ADDRESS_MAPPING.md— genesis ↔ deployed mappingHeadline findings
cAUDC,cCADC,cCHFC,cEURC,cEURT,cGBPC,cGBPT,cJPYC,cXAUC,cXAUT+ rawUSDT/USDC/wXRP.0xC02aaA39…Cc2returnsdecimals=0on-chain — the genesis pre-deploy is a non-ERC20 shim; the real WETH9 bytecode lives at0x3304b747…E6perADDRESS_MAPPING.md.0xf4BB2e28…A9fworks correctly (18 decimals,Wrapped Ether v10).LedgerLive/docs/CONTRACT_ADDRESSES_REFERENCE.mdandCONTRACT_INVENTORY_AND_VERIFICATION.mdare linked from the master doc but return 404 (files never existed in this repo).Recommended follow-ups (listed in audit doc §9)
smom-dbis-138/config/address-inventory.chain138.jsonas the single on-box source of truth; generateDUAL_CHAIN_TOKEN_LIST.tokenlist.json,allowlist.config.tsChain-138 block, andcanonical-tokens.tsChain-138 entries from it via codegen.CHAIN138_TOKEN_ADDRESSES.mdWETH entry at the real deployed0x3304b747…E6, or redeploy canonical WETH9 at the genesis slot.dbis_core/allowlist.config.ts.Verification
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.