All lessons · Apps and UI · Start here · Glossary
Resolving cell deps per cell after redeploying a data-hashed scriptWorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
After a data/data1 type script is redeployed with a new code hash, old cells still run against the old code. Keep a list of retired deployments and query the indexer for every one. Pick each cell's cell dep by matching the codeHash and hashType of that cell's own type script, not a single 'current' manifest entry.
Why it matters: Indexer scans and holdings filters keyed only to the newest code hash miss every cell made under the replaced contract. A transaction built with the newest contract's cell dep for such a cell is built against the wrong code, and the app's checker refuses it.
Pattern
manifest.scripts[name] used for every cell → resolve per cell: deployments.find(d => d.codeHash===cell.type.codeHash && d.hashType===cell.type.hashType)A test changed in the same commit
It sits next to the fix. We did not run it.
- toastmanAu/daowow:
apps/web/test/app-shell.test.js,apps/web/test/helpers/fake-chain.js,apps/web/test/manifest.test.js,apps/web/test/model-claim-guard.test.js,apps/web/test/round-cells.test.js
- Concepts
- Cell deps and script lookup, Type ID and upgrades, Indexer queries and cell collection
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-11-17
- Last changed
- 2026-11-17
- 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-11-17 · toastmanAu/daowow · more from this project
More about Apps and UI
- Lock-based fallback when a stored out point goes stale
- Exact CKB-to-shannon conversion with BigInt
- Nervos DAO hold time with term-locked withdrawals
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Resolving cell deps per cell after redeploying a data-hashed script", CKB lessons, https://pulse.lusocryptolabs.com/learned/apps/resolving-cell-deps-per-cell-after-redeploying-a-data-hashed, CC BY 4.0, last changed 2026-11-17.