NexisDAO dCKB Type Lock 约束NexisDAO dCKB Type Lock Constraints
来源:NexisDao/NexisDao-core @1447fed contracts/type_lock/src/entry.rs · mainnet 0x8baa…74de (data)Source: NexisDao/NexisDao-core @1447fed contracts/type_lock/src/entry.rs · mainnet 0x8baa…74de (data)
给 AI agent:For AI agents: nexisdao_type_lock.md · llms.txt
1 → *解锁:交易中必须出现指定 typeUnlock: the named type must appear in the tx
Inputs 输入Inputs
被锁的 cell(如 dCKB 的 NervosDAO 存款)locked cell (e.g. a dCKB NervosDAO deposit)Cell{
lock: { codeHash: TYPE_LOCK, hashType: data,
args: [mode 1B] ‖ type_hash 32B }
}
另一个输入(mode 1 / 0)another input (mode 1 / 0)Cell{ type: hash = type_hash }
Outputs 输出Outputs
或某个输出(mode 2 / 0)or some output (mode 2 / 0)Cell{ type: hash = type_hash }
args 字节布局args byte layout
mode1B(args 为 32 字节时省略 = 0)1B (omitted = 0 when args is 32 bytes)
type_hash32B
- mode1B(args 为 32 字节时省略 = 0)1B (omitted = 0 when args is 32 bytes)1 只查输入 · 2 只查输出 · 其他 先输入后输出1 inputs only · 2 outputs only · other inputs then outputs—5
- type_hash32B必须出现的 type script hashtype script hash that must appear在对应位置找到found where mode says6
限制Constraints
- args非空not empty5
- type按 mode 在输入 / 输出中找到 type hash = args 中的值an input / output (per mode) has type hash = the value in args6
部署与来源Deployments & source 未核验unverified
源码source
NexisDao/NexisDao-core@1447fed9 · contracts/type_lock/src/entry.rs · contracts/type_lock/src/error.rs (default-branch HEAD read 2026-11-06 (the repo has a single commit); code hash from dckb-rescuer/v1-core README)
二进制核验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 | 0x8baa01f58baab0cb58fc319136ea4f6866ed59c323fa94bf7d6b72bea21c74de data | 0x584ddf4379…81f6770f:4 code | — | 0x8baa01f58b…a21c74de | 0x584ddf4379…81f6770f #5664076 |
链上数据核对于 on-chain data checked 2026-11-06
没有签名检查:只要交易里带上指定 type 的 cell 就能解锁。dCKB 存款的 args 固定为 0x01 ‖ DAO info type hash,所以 dCKB 的 DAO Info type 负责真正的规则(社区 dckb-rescuer/v1-core 说明)。There is no signature check: including a cell with the named type unlocks it. dCKB deposits use args 0x01 ‖ DAO-info type hash, so the dCKB DAO Info type carries the real rules (per the community dckb-rescuer/v1-core notes).
部署来源:code hash 来自社区仓库 dckb-rescuer/v1-core 的 README,并在主网 dCKB 存款交易中看到(hash_type data)。NexisDAO 原仓库没有记录部署哈希,未做可复现构建。Deployment source: the code hash comes from the community repo dckb-rescuer/v1-core README and appears on mainnet dCKB deposit txs (hash_type data). The original NexisDAO repo records no deployment hash; no reproducible build was attempted.
args 长度不是 32 时取 args[1..] 作为 type hash;若它不是 32 字节则永远匹配不到(6)。When args is not 32 bytes, args[1..] is the type hash; if that is not 32 bytes it can never match (6).
错误码(error.rs):1–4 syscall · 5 ErrArgs · 6 ErrNotExistError codes (error.rs): 1–4 syscall · 5 ErrArgs · 6 ErrNotExist
部署来源:code hash 来自社区仓库 dckb-rescuer/v1-core 的 README,并在主网 dCKB 存款交易中看到(hash_type data)。NexisDAO 原仓库没有记录部署哈希,未做可复现构建。Deployment source: the code hash comes from the community repo dckb-rescuer/v1-core README and appears on mainnet dCKB deposit txs (hash_type data). The original NexisDAO repo records no deployment hash; no reproducible build was attempted.
args 长度不是 32 时取 args[1..] 作为 type hash;若它不是 32 字节则永远匹配不到(6)。When args is not 32 bytes, args[1..] is the type hash; if that is not 32 bytes it can never match (6).
错误码(error.rs):1–4 syscall · 5 ErrArgs · 6 ErrNotExistError codes (error.rs): 1–4 syscall · 5 ErrArgs · 6 ErrNotExist