CKB Pulse

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.

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)

More about CCC (TypeScript SDK)

All 33 in this topic

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.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.