All lessons · Rust scripts and ckb-std · Start here · Glossary
Cheque lock receiver path must return the cell's capacity to the senderWorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
When a Cheque lock cell (RFC 0039) is spent on the receiver path, rule 1.b.ii requires the Cheque cell's CKB capacity to go back to the sender's lock. An output paying that CKB to the receiver fails with Cheque error 8 (SenderCapacityNotSame). So the Cheque lock cannot be used to deliver plain CKB to the receiver, and in this project's tests it also blocked an owner placed in the receiver role from reclaiming their own CKB.
Why it matters: A claim transaction that pays the Cheque cell's CKB to the receiver is rejected with Cheque error 8, so a design that counts on the Cheque lock to hand plain CKB to the receiver cannot work.
Pattern
assert!(err.to_string().contains("error code 8"), "expected Cheque error 8, got: {err}");A test changed in the same commit
It sits next to the fix. We did not run it.
- salmansarwarr/Tranfr:
tests/src/composition.rs,tests/src/lib.rs
- Concepts
- Testing and devnet, Capacity and cell size
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-11-09
- Last changed
- 2026-11-09
- 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-09 · salmansarwarr/Tranfr · more from this project
More about Rust scripts and ckb-std
- ckb-testtool runs scripts only, so node transaction verifiers must be added in tests
- ckb-std C shim needs a RISC-V C toolchain (clang) in CI
- Median time vs tip timestamp for deadlines
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Cheque lock receiver path must return the cell's capacity to the sender", CKB lessons, https://pulse.lusocryptolabs.com/learned/scripts/cheque-lock-receiver-path-must-return-the-cell-s-capacity-to, CC BY 4.0, last changed 2026-11-09.