CKB Pulse

Todas as lições · Other · Começa aqui · Glossário

Recognizing a Nervos DAO deposit cell (not a withdrawing one)PráticoVista outra vez

Vista outra vez · Verificação: certa · Verificada em 2026-11-19

Treat a cell as a Nervos DAO deposit only if its type script exactly matches the DAO type script and its data is exactly 8 zero bytes. The DAO type script has code hash 0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e, hash_type type and empty args. A phase one withdrawing cell has the same type script but a nonzero block number in its 8 data bytes, so it fails this check, as do data of any other length and look alike type scripts.

Porque importa: Without the exact type and data check, look alike scripts and phase one withdrawing cells are counted as live deposits, so stake or voting weight survives a withdrawal or can be faked.

joined with the ckb-service-runner card teaching the same check

Padrão

Preferir
return self.exact_dao_type and self.data == DEPOSIT_DATA

Tirado do commit, encurtado.

Um teste mudou no mesmo commit

Está ao lado da correcção. Nós não o corremos.

Conceitos
Indexer queries and cell collection, Data encoding (molecule, hex, bigints)
Evidência
Vista outra vez: vista em dois ou mais projetos
Vista pela primeira vez
2026-10-08
Última mudança
2026-10-20
Ú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)

Mais sobre Other

Ver as 9 deste tema

Manténs um projeto de onde esta lição veio? Confirma ou corrige

Citar esta lição
LusoCryptoLabs, "Recognizing a Nervos DAO deposit cell (not a withdrawing one)", CKB lessons, https://pulse.lusocryptolabs.com/learned/other/recognizing-a-nervos-dao-deposit-cell-not-a-withdrawing-one, CC BY 4.0, last changed 2026-10-20.

Tiradas de commits públicos e verificadas contra o commit de onde cada uma veio e o código de hoje do projeto. Lê a fonte antes de confiar numa. Texto sob CC BY 4.0: dá crédito à LusoCryptoLabs, CKB lessons, com uma ligação para a lição. Queres que uma lição seja mudada ou retirada? Abre um issue.