Godwoken 委托 cell lock(delegate-cell-lock)约束Godwoken delegate-cell lock Constraints

来源:godwokenrises/godwoken @c2b1f85 / gwos/contracts/delegate-cell-lock/src/entry.rs · 未找到官方部署Source: godwokenrises/godwoken @c2b1f85 / gwos/contracts/delegate-cell-lock/src/entry.rs · no official deployment found
Lock 脚本Lock script二层 / RollupLayer 2 / Rollup开源Open sourceNervos 官方Nervos

A解锁Unlock

Inputs 输入Inputs
input[0] 被保护 cell(如 rollup cell)input[0] protected cell (e.g. rollup cell)Cell{ capacity: any, lock: { DELEGATE_CELL_LOCK, args: delegate cell type hash 32B }, type: any, data: any }
input[k] 当前授权者 cellinput[k] current authorized cellCell{ capacity: any, lock: lock hash[0..20] == delegate cell data, type: any, data: any }
➜
Outputs 输出Outputs
outputsoutputsany

cell_depscell_deps

cell_dep:delegate cellcell_dep: delegate cellCell{ capacity: any, lock: e.g. multisig (to rotate the key), type: type hash == args (usually type_id), data: 20B: lock hash[0..20] of the authorized lock }

witnesses(WitnessArgs)witnesses (WitnessArgs)

witnesses[组首输入]witnesses[first group input]{ lock: none } // must be empty, else 9

限制Constraints

  • witness.lock:: 必须为空must be empty (9)
  • args:: 恰 32 字节exactly 32 bytes (5)
  • cell_deps:: 有 type hash = args 的 cella cell with type hash = args (6)
  • 其 dataits data:: 恰 20 字节exactly 20 bytes (7)
  • 输入inputs:: 有 lock hash[0..20] = 该 data 的输入an input whose lock hash[0..20] = that data (8)
部署与来源Deployments & source 未核验unverified
源码source godwokenrises/godwoken@c2b1f850 · gwos/contracts/delegate-cell-lock/src (exact commit read (default-branch HEAD, 2024-01-12). Deployment constants from godwokenrises/godwoken-info @8ce6390133ddfffe9d40d51b7be191418b54958c (mainnet_v1, testnet_v1_1 scripts-deploy-result.json).)
二进制核验binary check 未核验unverified no deployment resolved on chain
未在链上找到部署no on-chain deployment resolved
链上数据核对于 on-chain data checked 2026-10-21
⚠ 状态:官方已宣布 Godwoken 退役(2025-06-01 起,Nervos Talk “Sunset of Force Bridge and Godwoken”);冻结期限延至 2026-01-01 23:59:59 UTC,之后网络冻结、桥前端下线,v0/v1 RPC 节点已关闭。本页仅作历史 / 审计参考。⚠ Status: Godwoken was officially sunset (from 2025-06-01, Nervos Talk “Sunset of Force Bridge and Godwoken”); the freeze deadline was extended to 2026-01-01 23:59:59 UTC, after which the network froze, the bridge UI went offline and v0/v1 RPC nodes were shut down. This page is for historical / audit reference.
错误码(delegate-cell-lock/src/error.rs):1 IndexOutOfBound,2 ItemMissing,3 LengthNotEnough,4 Encoding,5 InvalidArgs,6 CellDepNotFound,7 CellDepDataInvalid,8 InputNotFound,9 InvalidWitnessArgsError codes (delegate-cell-lock/src/error.rs): 1 IndexOutOfBound, 2 ItemMissing, 3 LengthNotEnough, 4 Encoding, 5 InvalidArgs, 6 CellDepNotFound, 7 CellDepDataInvalid, 8 InputNotFound, 9 InvalidWitnessArgs
godwoken-info 的部署结果中没有该脚本;主网 v1 rollup cell 使用的是 omni_lock 部署。仅静态页面,无部署,无测试交易。Not in godwoken-info deploy results; the mainnet v1 rollup cell uses the omni_lock deployment. Static page only: no deployment, no test tx.
GitHub · gpBlockchain/ckb-contract-flow-html