All lessons · Developer tooling · Start here · Glossary
Output type scripts need cell deps too, including the native DAO typeBasicFrom one fix
From one fix · Check: right · Checked 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.
Why it matters: 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.
Pattern
...tx.outputs.map((o, i) => ({ where: `Outputs[${i}].Type`, script: o.type })),Taken from the commit, shortened.
A test changed in the same commit
It sits next to the fix. We did not run it.
- toastmanAu/daowow:
apps/web/test/aggregate-tx.test.js
- Concepts
- Cell deps and script lookup, Transaction building and fees
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-10-05
- Last changed
- 2026-10-05
- Last checked
- 2026-11-19
- Check against the commit
- right: the lesson follows from its commit and still holds in the code today
Sources (1)
- 2026-10-05 · toastmanAu/daowow · more from this project
More about 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
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
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.