一次性锁 约束Single Use Lock Constraints
来源:ckb-devrel/ckb-proxy-locks / contracts/single-use-lock/src/entry.rs · 0x8290…bbaf (data1,主网与测试网相同)Source: ckb-devrel/ckb-proxy-locks / contracts/single-use-lock/src/entry.rs · 0x8290…bbaf (data1, same on mainnet and testnet)
ckb-proxy-locks
- GitHubGitHubgithub.com/ckb-devrel/ckb-proxy-locks
来源:Source: repo (no website/docs listed)
A与指定 OutPoint 同时花费Spend together with a given OutPoint
Inputs 输入Inputs
inputCell{ lock: { codeHash: SINGLE_USE, args: OutPoint 36B } }
另一输入another inputprevious_output = args 中的 OutPointprevious_output = the OutPoint in args
➜
Outputs 输出Outputs
outputs:任意outputs: any任意any
args 字节布局args byte layout
tx_hash32B
index4B
- tx_hash 32B OutPoint.tx_hashOutPoint.tx_hash 被某个输入消耗consumed by an input (7)
- index 4B OutPoint.index u32 LEOutPoint.index u32 LE 同上same (7)
限制Constraints
- args ≥ 36 字节≥ 36 bytes (4)
- inputs:: 某个输入的 previous_output = args 中的 OutPoint(该 OutPoint 只能花一次,故锁只能用一次)some input's previous_output = the OutPoint in args (it can be spent only once, so the lock is single-use) (7)
部署与来源Deployments & source 未核验unverified
源码source ckb-devrel/ckb-proxy-locks@38b7e1df · contracts/single-use-lock/src/entry.rs (default-branch HEAD recorded at backfill 2026-10-21; spec/plugin were written from the default branch shortly before (exact read commit not recorded))
二进制核验binary check 未核验unverified no binary or checksum at the recorded commit matched the deployed data hash (reproducible build not attempted)
| 网络network | code_hash | cell_dep | type_id args | 数据哈希data hash | 部署交易deploy tx |
|---|---|---|---|---|---|
| mainnet | 0x8290467a512e5b9a6b816469b0edabba1f4ac474e28ffdd604c2a7c76446bbaf data1 | 0x10d63a9961…160eb66b:4 code | — | 0x8290467a51…6446bbaf | 0x10d63a9961…160eb66b #13589704 |
| testnet | 0x8290467a512e5b9a6b816469b0edabba1f4ac474e28ffdd604c2a7c76446bbaf data1 | 0xb4f171c9c9…a3137b93:4 code | — | 0x8290467a51…6446bbaf | 0xb4f171c9c9…a3137b93 #14025090 |
链上数据核对于 on-chain data checked 2026-10-20
错误码(error.rs):1 IndexOutOfBound · 2 ItemMissing · 3 LengthNotEnough · 4 Encoding · 5 Overflow · 6 MoleculeVerification · 7 OutpointNotFoundError codes (error.rs): 1 IndexOutOfBound · 2 ItemMissing · 3 LengthNotEnough · 4 Encoding · 5 Overflow · 6 MoleculeVerification · 7 OutpointNotFound
不检查任何签名:安全性完全来自 args 指向的其他脚本No signature is checked: security comes entirely from the script that args points to
不检查任何签名:安全性完全来自 args 指向的其他脚本No signature is checked: security comes entirely from the script that args points to