CKB Pulse

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

Prefer
...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.

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)

More about Developer tooling

All 35 in this topic

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.

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.