All lessons · CCC (TypeScript SDK) · Start here · Glossary
Registering NervosDao on devnetWorkingSeen again
Seen again · Check: right · Checked 2026-11-19
A CCC client for a devnet only knows the scripts you give it, and fee completion looks up KnownScript.NervosDao, so register it by hand. Take the cell dep from genesis block tx 0: find the output whose type script, hashed with Script.from({codeHash: o.type.code_hash, hashType: o.type.hash_type, args: o.type.args}).hash(), equals the DAO code hash 0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e, and fail loudly if none is found. Register it as {codeHash, hashType: 'type', cellDeps: [{cellDep: {outPoint: {txHash: genesisTx0Hash, index: '0x' + daoIndex.toString(16)}, depType: 'code'}}]}.
Why it matters: Without a NervosDao entry, a devnet CCC client built with a custom scripts table has no DAO script info, even though CCC fee completion checks DAO identity on every input. The fee step then fails or relies on testnet cells that do not exist on the devnet.
A test changed in the same commit
It sits next to the fix. We did not run it.
- Akane-CN/spark-verify:
tests/claims-v3.test.ts,tests/cli.test.ts,tests/fixtures/claims-v3/synthetic.ts,tests/fixtures/conformance/manifests/invalid/draft5-account-out-of-range.toml,tests/fixtures/conformance/manifests/invalid/draft5-bare-amount.toml
- Concepts
- Cell deps and script lookup, Testing and devnet
- Evidence
- Seen again: seen in two or more projects
- First seen
- 2026-11-15
- Last changed
- 2026-11-15
- Last checked
- 2026-11-19
- Check against the commit
- right: the lesson follows from its commit and still holds in the code today
Sources (2)
- 2026-11-15 · psawyerberlin/ckb-revocable-timelock · more from this project
- 2026-11-02 · Akane-CN/spark-verify · more from this project
More about CCC (TypeScript SDK)
- CCC custom client scripts must include AnyoneCanPay for SignerCkbPrivateKey
- Hand-rolled Script hash: hash_type byte mapping and molecule offsets, checked against CCC
- Re-zero the witness lock before recomputing the sign message with getSignHashInfo
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Registering NervosDao on devnet", CKB lessons, https://pulse.lusocryptolabs.com/learned/ccc/registering-nervosdao-on-devnet, CC BY 4.0, last changed 2026-11-15.