CKB Pulse

All lessons · Rust scripts and ckb-std · Start here · Glossary

Check that a derived successor type args match the spent cell's type argsWorkingFrom one fix

From one fix · Check: partly right · Checked 2026-11-19

When a successor cell's type args are derived from other data (such as a config commitment) instead of copied from the spent input, compare them with the input cell's own type args before building. A mismatch (for example a config cell paired with a shard from another round) puts the input's type script group in the transaction with no output, so the type script runs as a burn and typically fails with an opaque error code. Read output.type.args during cell discovery and throw a clear client error on mismatch.

Why it matters: A shard paired with a config from another round builds a transaction the contract rejects as BadState with no explanation of the cause.

A test changed in the same commit

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

Concepts
Transaction building and fees, Cell deps and script lookup
Evidence
From one fix: from one project, checked against its commit
First seen
2026-09-23
Last changed
2026-09-23
Last checked
2026-11-19
Check against the commit
partly right: a true core, with a part that is loose or too wide

Sources (1)

More about Rust scripts and ckb-std

All 35 in this topic

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

Cite this lesson
LusoCryptoLabs, "Check that a derived successor type args match the spent cell's type args", CKB lessons, https://pulse.lusocryptolabs.com/learned/scripts/check-that-a-derived-successor-type-args-match-the-spent-cel, CC BY 4.0, last changed 2026-09-23.

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.