Todas as lições · CCC (TypeScript SDK) · Começa aqui · Glossário
Registering NervosDao on devnetPráticoVista outra vez
Vista outra vez · Verificação: certa · Verificada em 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'}}]}.
Porque importa: 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.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- 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
- Conceitos
- Cell deps and script lookup, Testing and devnet
- Evidência
- Vista outra vez: vista em dois ou mais projetos
- Vista pela primeira vez
- 2026-11-15
- Última mudança
- 2026-11-15
- Última verificação
- 2026-11-19
- Verificação contra o commit
- certa: a lição sai do commit e continua a valer no código de hoje
Fontes (2)
- 2026-11-15 · psawyerberlin/ckb-revocable-timelock · mais deste projeto
- 2026-11-02 · Akane-CN/spark-verify · mais deste projeto
Mais sobre 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
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.