CKB Pulse

All lessons · CKB node, RPC and indexer · Start here · Glossary

Nervos DAO phase 1 withdrawing cells keep the DAO type; count deposits by 8 zero bytes of dataWorkingChecked by the owner

Checked by the owner · Check: right · Checked 2026-11-19

A Nervos DAO cell in phase 1 of withdrawal still has the DAO type script (code hash 0x82d76d...3f2e, hash_type type, args 0x), so filtering by type alone counts it as a deposit. Only cells whose output data is exactly 0x0000000000000000 are deposits; a withdrawing cell's data holds its deposit block number. The commit's testnet test shows a type-only count giving 500 CKB where the true deposit total is 300 CKB.

Why it matters: Counting Nervos DAO cells by type script alone also counts phase 1 withdrawing cells as deposits, so a deposit already being withdrawn still adds weight; in the testnet history this gave 500 CKB instead of 300 CKB.

Pattern

Prefer
(data === DAO_DEPOSIT_DATA ? deposits : withdrawing).push(cell);

Taken from the commit, shortened.

A test changed in the same commit

It sits next to the fix. We did not run it.

Concepts
Indexer queries and cell collection, Data encoding (molecule, hex, bigints)
Evidence
Checked by the owner: checked by the owner of the project it came from, who is also the publisher of these lessons
First seen
2026-11-06
Last changed
2026-11-06
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 CKB node, RPC and indexer

All 45 in this topic

Checked by @LusoCryptoLabs (owner of the project), 2026-11-19.

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
LusoCryptoLabs, "Nervos DAO phase 1 withdrawing cells keep the DAO type; count deposits by 8 zero bytes of data", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/nervos-dao-phase-1-withdrawing-cells-keep-the-dao-type-count, CC BY 4.0, last changed 2026-11-06.

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.