Todas as lições · Rust scripts and ckb-std · Começa aqui · Glossário
Check that a derived successor type args match the spent cell's type argsPráticoDe uma correção
De uma correção · Verificação: em parte certa · Verificada em 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.
Porque importa: A shard paired with a config from another round builds a transaction the contract rejects as BadState with no explanation of the cause.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- toastmanAu/daowow:
apps/web/test/codec.test.js,apps/web/test/discovery.test.js,apps/web/test/entry-tx.test.js
- Conceitos
- Transaction building and fees, Cell deps and script lookup
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-09-23
- Última mudança
- 2026-09-23
- Última verificação
- 2026-11-19
- Verificação contra o commit
- em parte certa: um núcleo verdadeiro, com uma parte solta ou demasiado larga
Fontes (1)
- 2026-09-23 · toastmanAu/daowow · mais deste projeto
Mais sobre Rust scripts and ckb-std
- Delegating script validation via exec to a hash bound cell dep
- Iterating group inputs and outputs with ckb-std until IndexOutOfBound
- Partial load of a cell's type Script header to match code_hash and hash_type
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.