CKB Contract Flow

.bit ReverseRecordCell Type 约束.bit ReverseRecordCell Type Constraints

来源:dotbitHQ/did-contracts @0cc9fbf contracts/reverse-record-cell-type(“sync the source code from latest deployed contracts”)Source: dotbitHQ/did-contracts @0cc9fbf contracts/reverse-record-cell-type ("sync the source code from latest deployed contracts")
Type 脚本Type script身份 / 钱包Identity / wallet主网Mainnet测试网Testnet开源Open source社区Community
贡献者:Contributed by @linkdesu @linkdesu

给 AI agent:For AI agents: dotbit_reverse_record.md · llms.txt

n → 0retract_reverse_record:收回反向解析记录retract_reverse_record: retract reverse records

Inputs 输入Inputs
输入 #0..#n-1:ReverseRecordCell(全部输入)inputs #0..#n-1: ReverseRecordCells (all inputs)Cell{ lock: L (same for all), type: REVERSE_RECORD }
Outputs 输出Outputs
BalanceCell(退款)BalanceCell (refund)Cell{ lock: L, type: BALANCE_CELL | none, capacity: ≥ Σ inputs − common_fee }
Witness:"das" ‖ 00000000 ‖ ActionData{ action: "retract_reverse_record", params }Witness: "das" ‖ 00000000 ‖ ActionData{ action: "retract_reverse_record", params }

限制Constraints

  • witnessdas ActionData witness 可解析das ActionData witness decodes46
  • 系统开关system switchConfigCellMain.status ≠ off(配置,未检查)ConfigCellMain.status ≠ off (config, not checked)-1
  • action只支持 retract_reverse_recordonly retract_reverse_record is supported27
  • 数量count输入 > 0,输出 = 0inputs > 0, outputs = 06
  • 位置position从输入 #0 起连续,之后没有其他输入contiguous from input #0, nothing after6
  • lock所有输入的 lock 相同all inputs share one lock6
  • 退款refundlock = L 的 BalanceCell 输出容量 ≥ Σ 输入 − common_fee(配置,未检查)BalanceCell outputs with lock L hold ≥ Σ inputs − common_fee (config, not checked)34
部署与来源Deployments & source 未核验unverified
源码source
dotbitHQ/did-contracts@0cc9fbf5 · contracts/reverse-record-cell-type/src/entry.rs · libs/das-core/src/verifiers/misc.rs · libs/das-core/src/verifiers/common.rs · libs/das-core/src/error.rs ("sync the source code from latest deployed contracts" (2025-03-20); type-id args from dotbitHQ/das-lib core/env.go @57eb578)
二进制核验binary check
未核验unverified no binary or checksum at the recorded commit matched the deployed data hash (reproducible build not attempted)
网络networkcode_hashcell_deptype_id args数据哈希data hash部署交易deploy tx
mainnet0xebc9e13658f6df13593cf59b7e9cd159602b6c3c7d54b14dea43bae600ebae11 type0x302a1db660…d14d4a32:0 code0x000f3e1a89…67b84a2e0x84bdd29c78…0784fd720x302a1db660…d14d4a32 #15198800
testnet0x61711416468fa5211ead5f24c6f3efadfbbc332274c5d40e50c6feadcb5f9606 type0x7e327a507d…05f610e9:0 code0x334d7841eb…a6ce9d750xd42e6e5400…4cd32fe10x7e327a507d…05f610e9 #14415502
链上数据核对于 on-chain data checked 2026-11-06
部署:code hash 是 Type ID 脚本哈希;type-id args 来自 dotbitHQ/das-lib core/env.go(主网 0x000f3e1a…,测试网 Testnet2 0x334d7841…),主网与测试网都已在链上看到活的 code cell 和交易。Deployment: the code hash is the Type ID script hash; type-id args come from dotbitHQ/das-lib core/env.go (mainnet 0x000f3e1a…, testnet Testnet2 0x334d7841…); live code cells and txs seen on both networks.
Type ID 合约可升级:主网 code cell 已多次替换。所读源码是 0cc9fbf(官方注明从最新部署合约同步),未做可复现构建。Type ID contracts are upgradable: the mainnet code cell has been replaced several times. The source read is 0cc9fbf (officially described as synced from the latest deployed contracts); no reproducible build.
早期部署的二进制还支持 declare_reverse_record / redeclare_reverse_record(链上有这类交易);当前源码对它们返回 27,解码器对这类交易显示为未检查。Earlier deployed binaries also supported declare_reverse_record / redeclare_reverse_record (such txs exist on chain); the current source returns 27 for them, and the decoder shows those txs as not checked.
系统开关、BalanceCell type id 和 common_fee 都来自 cell_deps 里的 ConfigCell,解码器不加载 cell_deps 数据,所以这些项未检查。The system switch, BalanceCell type id and common_fee come from ConfigCells in cell_deps; the decoder does not load cell_dep data, so these are not checked.
错误码(das-core error.rs):-1 SystemOff · 6 InvalidTransactionStructure · 27 ActionNotSupported · 34 ChangeError · 46 WitnessDataDecodingErrorError codes (das-core error.rs): -1 SystemOff · 6 InvalidTransactionStructure · 27 ActionNotSupported · 34 ChangeError · 46 WitnessDataDecodingError