Start here · Glossary · Test yourself · Feed
“Transaction building and fees” ✕
52 lessons found. All lessons
PreviousPage 5 of 5
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.
#Transaction building and fees #Cell deps and script lookup · Sources (1) · 2026-09-23
`ckb-cli tx init --tx-file` creates a new empty transaction file and exits 0, so running it on a prepared transaction silently destroys that transaction. For a prebuilt transaction, write ckb-cli's tx-file wrapper ({transaction, multisig_configs, signatures}) yourself and go straight to `tx info` and `tx sign-inputs`.
#Transaction building and fees #Witnesses and signatures · Sources (1) · 2026-09-23
ckb-cli `tx sign-inputs --add-signatures` leaves witness 0's lock zero-filled and records the signature in the tx file's `signatures` map keyed by lock arg; `tx send` assembles the final witnesses from that map. A checker that inspects witness 0 for a signature before `tx send` will wrongly report the transaction as unsigned, so read `doc.signatures[lockArg]` instead.
#Witnesses and signatures #Transaction building and fees · Sources (1) · 2026-09-23
`ckb-cli deploy gen-txs` checks capacity and reports success even when the deployment transaction exceeds the 597,000 byte block size limit; the node only rejects it at broadcast with ExceededMaximumBlockBytes. When deploying several large contract binaries, sum their sizes before signing and split them across separate deployment configs (sending each transaction only after the previous one confirms) if they approach the limit.
#Transaction building and fees #Capacity and cell size · Sources (1) · 2026-09-18
PreviousPage 5 of 5
Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. JSON · Want a lesson changed or removed? Open an issue.