How to Calculate Script Hash
Script hash is calculated as follows:
ckbhash(molecule_encode(script))
Where:
- 
ckbhashis the BLAKE2b hash algorithm specifically used in CKB. For details, refer to ckbhash.
- 
molecule_encodeserializes a structure into a binary format with the Molecule serialization method
The definition of Script is as follows:
table Script {
    code_hash:      Byte32,
    hash_type:      byte,
    args:           Bytes,
}