Todas as lições · Developer tooling · Começa aqui · Glossário
Output type scripts need cell deps too, including the native DAO typeBásicoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
CKB runs the type script of every output (not only input locks and input types), so a transaction that creates a native DAO deposit must include the DAO type's code cell (genesis tx0 index 2) as a cell dep, or the node rejects it with ScriptNotFound on Outputs[i].Type. Pre-send checks that only verify deps for input locks will miss this; check every input lock, input type and output type, deduplicated by code_hash and hash_type.
Porque importa: A DAO deposit built without the DAO type's code cell as a dep is rejected by the node with ScriptNotFound on Outputs[i].Type, and pre-send checks that look only at input locks pass it anyway.
Padrão
...tx.outputs.map((o, i) => ({ where: `Outputs[${i}].Type`, script: o.type })),Tirado do commit, encurtado.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- toastmanAu/daowow:
apps/web/test/aggregate-tx.test.js
- Conceitos
- Cell deps and script lookup, Transaction building and fees
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-10-05
- Última mudança
- 2026-10-05
- Ú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 (1)
- 2026-10-05 · toastmanAu/daowow · mais deste projeto
Mais sobre Developer tooling
- Derive devnet Spore and system script cell deps from a fresh OffCKB export
- Matching a Script code_hash to its code Cell by hash_type
- Saved transaction test vectors go stale when their cell deps are spent
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Output type scripts need cell deps too, including the native DAO type", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/output-type-scripts-need-cell-deps-too-including-the-native, CC BY 4.0, last changed 2026-10-05.