Skip to content

dckb-rescuer/v1-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dCKB contracts

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.

  1. The NervosDAO deposit type script is the always in the first cell and Type lock is its lock script.
  2. Its args is always constant: 0x010044adfd493be5af2f53688e814c52595f8675097251d3843ef41ecfcab0000c
  3. 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 and NervosDAO.
  • 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 its tx hash is the same of the deposit.
  • The lock of this cell is the lock that ultimately locks the deposit:
  1. In the first revision of dCKB this lock was always a pwlock-k1-acpl, same as dCKB UDT cell.
  2. 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's SUDT 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages