CKB Pulse
经验

CKB 学到了什么

从这里开始 · 术语表 · 自测 · 订阅

经验用英文撰写,请用英文搜索。

toastmanAu/openswap

来自 toastmanAu/openswap 的经验

github.com/toastmanAu/openswap

你维护这个项目吗? 在一个 issue 中确认它的经验

找到 14 条经验。 全部经验

第 2 页,共 2 页

Deriving minimum cell capacity with ccc.CellOutput.from and output data实践已复现

In CCC, calling ccc.CellOutput.from({lock, type}, outputData) without a capacity fills capacity with the cell's occupied size, so it serves as the minimum capacity check for change or receipt cells. This commit uses it to reject dust change before and after subtracting the fee (via transaction.estimateFee), and to top up a receipt cell whose received CKB is below its occupied capacity.

#Capacity and cell size #Transaction building and fees · 来源(1) · 2026-10-01

Persist the transaction hash before broadcasting it实践来自一次修复

A CKB transaction hash covers the raw transaction but not the witnesses, so after fee completion ccc tx.hash() already gives the final hash before signing. Save that hash to a durable journal before broadcasting, and assert that the hash returned by send equals it. Also assert that signing and preparation did not change the hash, so a rerun after a lost RPC reply waits for the recorded transaction instead of building and sending a duplicate.

#Transaction building and fees #Network and RPC reliability · 来源(1) · 2026-09-18

第 2 页,共 2 页

文本采用 CC BY 4.0:请署名 LusoCryptoLabs, CKB lessons,并附上经验的链接。 JSON · 想修改或撤下某条经验?请提交 issue。