This repository is a fork of NexisDao original repository without all the information non relevant to dCKB. Follows a bit of documentation on the scripts uses.
Type lock
is a lock script and it's deployed with this code hash: 0x8baa01f58baab0cb58fc319136ea4f6866ed59c323fa94bf7d6b72bea21c74de.- This is the locks that locks the
dCKB
NervosDAO
deposits. - In a
dCKB
NervosDAO
deposit transaction:
- The
NervosDAO
deposit type script is the always in the first cell andType lock
is its lock script. - Its
args
is always constant:0x010044adfd493be5af2f53688e814c52595f8675097251d3843ef41ecfcab0000c
- With this argument it just requires
Dao info
to be included in the transaction.
Dao info
is a type script and it's deployed with this code hash: 0x6fb198a4ef2cc0fa63c2ef7596c169452323d8ce678bdb3f75c77dc1eac2f47f.- It contains the logic regulating interactions between
dCKB
andNervosDAO
. - Usually it's the second cell, right after the
NervosDAO
deposit cell, which always comes first. - It's a receipt of the deposit, its data is the deposit amount.
- Its arguments contains the type of
DepCells
containing the data about other cells, this avoids circular dependencies. Dao info
unlocks by checking that itstx hash
is the same of the deposit.- The lock of this cell is the lock that ultimately locks the deposit:
- In the first revision of dCKB this lock was always a
pwlock-k1-acpl
, same asdCKB
UDT
cell. - In the second revision of dCKB this lock changed to a closed source script, this lock can be unlocked if the user
pwlock-k1-acpl
is used as input and output lock.
Udt owner
is a lock script and it's deployed with this code hash: 0x29a81473e24924e394a9148ab357c2492fedf65241848b7a87539a7db9c3d43f.- As the name suggest it is
dCKB
'sSUDT owner cell
. - Usually comes as last cell.
- The design is a public owner cell: one owner cell in input one in output.
- Its
args
is always constant:0xe3e93d10fd0bf4bcf8da9dec59a51f083521b3e11a10077614b3b53b933792d60f000000
- With this argument it just requires
Dao info
to be included in the transaction.