@opcat-labs/cat-sdk 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/artifacts/.templates/cat20/cat20.scrypt.tpl +2 -2
  2. package/artifacts/.templates/cat20/cat20Admin.scrypt.tpl +4 -4
  3. package/artifacts/.templates/cat20/cat20Guard_12_12_2.scrypt.tpl +2 -2
  4. package/artifacts/.templates/cat20/cat20Guard_12_12_4.scrypt.tpl +2 -2
  5. package/artifacts/.templates/cat20/cat20Guard_6_6_2.scrypt.tpl +2 -2
  6. package/artifacts/.templates/cat20/cat20Guard_6_6_4.scrypt.tpl +2 -2
  7. package/artifacts/.templates/cat20/minters/cat20ClosedMinter.scrypt.tpl +2 -2
  8. package/artifacts/.templates/cat20/minters/cat20OpenMinter.scrypt.tpl +2 -2
  9. package/artifacts/.templates/cat721/cat721.scrypt.tpl +2 -2
  10. package/artifacts/.templates/cat721/cat721Guard_12_12_2.scrypt.tpl +2 -2
  11. package/artifacts/.templates/cat721/cat721Guard_12_12_4.scrypt.tpl +2 -2
  12. package/artifacts/.templates/cat721/cat721Guard_6_6_2.scrypt.tpl +2 -2
  13. package/artifacts/.templates/cat721/cat721Guard_6_6_4.scrypt.tpl +2 -2
  14. package/artifacts/.templates/cat721/minters/cat721ClosedMinter.scrypt.tpl +2 -2
  15. package/artifacts/.templates/cat721/minters/cat721OpenMinter.scrypt.tpl +2 -2
  16. package/artifacts/cat20/cat20.json +41 -37
  17. package/artifacts/cat20/cat20.scrypt +18 -18
  18. package/artifacts/cat20/cat20Admin.json +45 -37
  19. package/artifacts/cat20/cat20Admin.scrypt +30 -30
  20. package/artifacts/cat20/cat20GuardStateLib.json +22 -22
  21. package/artifacts/cat20/cat20GuardStateLib.scrypt +5 -5
  22. package/artifacts/cat20/cat20Guard_12_12_2.json +37 -33
  23. package/artifacts/cat20/cat20Guard_12_12_2.scrypt +21 -21
  24. package/artifacts/cat20/cat20Guard_12_12_4.json +37 -33
  25. package/artifacts/cat20/cat20Guard_12_12_4.scrypt +21 -21
  26. package/artifacts/cat20/cat20Guard_6_6_2.json +37 -33
  27. package/artifacts/cat20/cat20Guard_6_6_2.scrypt +21 -21
  28. package/artifacts/cat20/cat20Guard_6_6_4.json +37 -33
  29. package/artifacts/cat20/cat20Guard_6_6_4.scrypt +21 -21
  30. package/artifacts/cat20/cat20StateLib.json +23 -23
  31. package/artifacts/cat20/cat20StateLib.scrypt +5 -5
  32. package/artifacts/cat20/minters/cat20ClosedMinter.json +39 -35
  33. package/artifacts/cat20/minters/cat20ClosedMinter.scrypt +22 -22
  34. package/artifacts/cat20/minters/cat20OpenMinter.json +39 -35
  35. package/artifacts/cat20/minters/cat20OpenMinter.scrypt +18 -18
  36. package/artifacts/cat20/types.json +6 -6
  37. package/artifacts/cat20/types.scrypt +5 -5
  38. package/artifacts/cat721/cat721.json +41 -37
  39. package/artifacts/cat721/cat721.scrypt +18 -18
  40. package/artifacts/cat721/cat721GuardStateLib.json +22 -22
  41. package/artifacts/cat721/cat721GuardStateLib.scrypt +5 -5
  42. package/artifacts/cat721/cat721Guard_12_12_2.json +36 -32
  43. package/artifacts/cat721/cat721Guard_12_12_2.scrypt +18 -18
  44. package/artifacts/cat721/cat721Guard_12_12_4.json +36 -32
  45. package/artifacts/cat721/cat721Guard_12_12_4.scrypt +18 -18
  46. package/artifacts/cat721/cat721Guard_6_6_2.json +36 -32
  47. package/artifacts/cat721/cat721Guard_6_6_2.scrypt +18 -18
  48. package/artifacts/cat721/cat721Guard_6_6_4.json +36 -32
  49. package/artifacts/cat721/cat721Guard_6_6_4.scrypt +18 -18
  50. package/artifacts/cat721/cat721StateLib.json +23 -23
  51. package/artifacts/cat721/cat721StateLib.scrypt +5 -5
  52. package/artifacts/cat721/minters/cat721ClosedMinter.json +39 -35
  53. package/artifacts/cat721/minters/cat721ClosedMinter.scrypt +18 -18
  54. package/artifacts/cat721/minters/cat721OpenMintInfo.json +6 -6
  55. package/artifacts/cat721/minters/cat721OpenMintInfo.scrypt +4 -4
  56. package/artifacts/cat721/minters/cat721OpenMinter.json +44 -40
  57. package/artifacts/cat721/minters/cat721OpenMinter.scrypt +22 -22
  58. package/artifacts/cat721/minters/cat721OpenMinterMerkleTree.json +20 -20
  59. package/artifacts/cat721/minters/cat721OpenMinterMerkleTree.scrypt +6 -6
  60. package/artifacts/cat721/types.json +6 -6
  61. package/artifacts/cat721/types.scrypt +5 -5
  62. package/artifacts/constants.json +3 -3
  63. package/artifacts/constants.scrypt +1 -1
  64. package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/backtrace.scrypt +14 -14
  65. package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/contextUtils.scrypt +16 -16
  66. package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/stateUtils.scrypt +1 -1
  67. package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/stdUtils.scrypt +12 -12
  68. package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/txHashPreimageUtils.scrypt +7 -7
  69. package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/txUtils.scrypt +12 -12
  70. package/artifacts/scrypt-ts-opcat/assets/smart-contract/types/structs.scrypt +8 -8
  71. package/artifacts/types.json +3 -3
  72. package/artifacts/types.scrypt +2 -2
  73. package/artifacts/utils/ownerUtils.json +15 -15
  74. package/artifacts/utils/ownerUtils.scrypt +3 -3
  75. package/artifacts/utils/safeMath.json +15 -15
  76. package/artifacts/utils/safeMath.scrypt +1 -1
  77. package/dist/artifacts/.templates/cat20/cat20.scrypt.tpl +2 -2
  78. package/dist/artifacts/.templates/cat20/cat20Admin.scrypt.tpl +4 -4
  79. package/dist/artifacts/.templates/cat20/cat20Guard_12_12_2.scrypt.tpl +2 -2
  80. package/dist/artifacts/.templates/cat20/cat20Guard_12_12_4.scrypt.tpl +2 -2
  81. package/dist/artifacts/.templates/cat20/cat20Guard_6_6_2.scrypt.tpl +2 -2
  82. package/dist/artifacts/.templates/cat20/cat20Guard_6_6_4.scrypt.tpl +2 -2
  83. package/dist/artifacts/.templates/cat20/minters/cat20ClosedMinter.scrypt.tpl +2 -2
  84. package/dist/artifacts/.templates/cat20/minters/cat20OpenMinter.scrypt.tpl +2 -2
  85. package/dist/artifacts/.templates/cat721/cat721.scrypt.tpl +2 -2
  86. package/dist/artifacts/.templates/cat721/cat721Guard_12_12_2.scrypt.tpl +2 -2
  87. package/dist/artifacts/.templates/cat721/cat721Guard_12_12_4.scrypt.tpl +2 -2
  88. package/dist/artifacts/.templates/cat721/cat721Guard_6_6_2.scrypt.tpl +2 -2
  89. package/dist/artifacts/.templates/cat721/cat721Guard_6_6_4.scrypt.tpl +2 -2
  90. package/dist/artifacts/.templates/cat721/minters/cat721ClosedMinter.scrypt.tpl +2 -2
  91. package/dist/artifacts/.templates/cat721/minters/cat721OpenMinter.scrypt.tpl +2 -2
  92. package/dist/artifacts/cat20/cat20.json +41 -37
  93. package/dist/artifacts/cat20/cat20.scrypt +18 -18
  94. package/dist/artifacts/cat20/cat20Admin.json +45 -37
  95. package/dist/artifacts/cat20/cat20Admin.scrypt +30 -30
  96. package/dist/artifacts/cat20/cat20GuardStateLib.json +22 -22
  97. package/dist/artifacts/cat20/cat20GuardStateLib.scrypt +5 -5
  98. package/dist/artifacts/cat20/cat20Guard_12_12_2.json +37 -33
  99. package/dist/artifacts/cat20/cat20Guard_12_12_2.scrypt +21 -21
  100. package/dist/artifacts/cat20/cat20Guard_12_12_4.json +37 -33
  101. package/dist/artifacts/cat20/cat20Guard_12_12_4.scrypt +21 -21
  102. package/dist/artifacts/cat20/cat20Guard_6_6_2.json +37 -33
  103. package/dist/artifacts/cat20/cat20Guard_6_6_2.scrypt +21 -21
  104. package/dist/artifacts/cat20/cat20Guard_6_6_4.json +37 -33
  105. package/dist/artifacts/cat20/cat20Guard_6_6_4.scrypt +21 -21
  106. package/dist/artifacts/cat20/cat20StateLib.json +23 -23
  107. package/dist/artifacts/cat20/cat20StateLib.scrypt +5 -5
  108. package/dist/artifacts/cat20/minters/cat20ClosedMinter.json +39 -35
  109. package/dist/artifacts/cat20/minters/cat20ClosedMinter.scrypt +22 -22
  110. package/dist/artifacts/cat20/minters/cat20OpenMinter.json +39 -35
  111. package/dist/artifacts/cat20/minters/cat20OpenMinter.scrypt +18 -18
  112. package/dist/artifacts/cat20/types.json +6 -6
  113. package/dist/artifacts/cat20/types.scrypt +5 -5
  114. package/dist/artifacts/cat721/cat721.json +41 -37
  115. package/dist/artifacts/cat721/cat721.scrypt +18 -18
  116. package/dist/artifacts/cat721/cat721GuardStateLib.json +22 -22
  117. package/dist/artifacts/cat721/cat721GuardStateLib.scrypt +5 -5
  118. package/dist/artifacts/cat721/cat721Guard_12_12_2.json +36 -32
  119. package/dist/artifacts/cat721/cat721Guard_12_12_2.scrypt +18 -18
  120. package/dist/artifacts/cat721/cat721Guard_12_12_4.json +36 -32
  121. package/dist/artifacts/cat721/cat721Guard_12_12_4.scrypt +18 -18
  122. package/dist/artifacts/cat721/cat721Guard_6_6_2.json +36 -32
  123. package/dist/artifacts/cat721/cat721Guard_6_6_2.scrypt +18 -18
  124. package/dist/artifacts/cat721/cat721Guard_6_6_4.json +36 -32
  125. package/dist/artifacts/cat721/cat721Guard_6_6_4.scrypt +18 -18
  126. package/dist/artifacts/cat721/cat721StateLib.json +23 -23
  127. package/dist/artifacts/cat721/cat721StateLib.scrypt +5 -5
  128. package/dist/artifacts/cat721/minters/cat721ClosedMinter.json +39 -35
  129. package/dist/artifacts/cat721/minters/cat721ClosedMinter.scrypt +18 -18
  130. package/dist/artifacts/cat721/minters/cat721OpenMintInfo.json +6 -6
  131. package/dist/artifacts/cat721/minters/cat721OpenMintInfo.scrypt +4 -4
  132. package/dist/artifacts/cat721/minters/cat721OpenMinter.json +44 -40
  133. package/dist/artifacts/cat721/minters/cat721OpenMinter.scrypt +22 -22
  134. package/dist/artifacts/cat721/minters/cat721OpenMinterMerkleTree.json +20 -20
  135. package/dist/artifacts/cat721/minters/cat721OpenMinterMerkleTree.scrypt +6 -6
  136. package/dist/artifacts/cat721/types.json +6 -6
  137. package/dist/artifacts/cat721/types.scrypt +5 -5
  138. package/dist/artifacts/constants.json +3 -3
  139. package/dist/artifacts/constants.scrypt +1 -1
  140. package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/backtrace.scrypt +14 -14
  141. package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/contextUtils.scrypt +16 -16
  142. package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/stateUtils.scrypt +1 -1
  143. package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/stdUtils.scrypt +12 -12
  144. package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/txHashPreimageUtils.scrypt +7 -7
  145. package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/txUtils.scrypt +12 -12
  146. package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/types/structs.scrypt +8 -8
  147. package/dist/artifacts/types.json +3 -3
  148. package/dist/artifacts/types.scrypt +2 -2
  149. package/dist/artifacts/utils/ownerUtils.json +15 -15
  150. package/dist/artifacts/utils/ownerUtils.scrypt +3 -3
  151. package/dist/artifacts/utils/safeMath.json +15 -15
  152. package/dist/artifacts/utils/safeMath.scrypt +1 -1
  153. package/package.json +4 -4
  154. package/scrypt.index.json +15 -15
@@ -21,8 +21,8 @@ contract CAT20 {
21
21
  this.hasAdmin = hasAdmin;
22
22
  this.adminScriptHash = adminScriptHash;
23
23
  }
24
- public function unlock(CAT20ContractUnlockArgs unlockArgs, CAT20GuardConstState guardState, int guardInputIndex, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, CAT20State __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
25
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
24
+ public function unlock(CAT20ContractUnlockArgs unlockArgs, CAT20GuardConstState guardState, int guardInputIndex, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, CAT20State __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
25
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
26
26
 
27
27
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
28
28
 
@@ -13,8 +13,8 @@ contract CAT20Admin {
13
13
  constructor(bytes genesisOutpoint) {
14
14
  this.genesisOutpoint = genesisOutpoint;
15
15
  }
16
- public function authorizeToSpendToken(PubKey adminPubKey, Sig adminSig, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, TxOut __scrypt_ts_changeInfo, CAT20AdminState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
17
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
16
+ public function authorizeToSpendToken(PubKey adminPubKey, Sig adminSig, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, TxOut __scrypt_ts_changeInfo, CAT20AdminState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
17
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
18
18
 
19
19
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
20
20
 
@@ -38,8 +38,8 @@ contract CAT20Admin {
38
38
  require(hash256(adminOutput +
39
39
  (__scrypt_ts_changeInfo.satoshis > 0 ? TxUtils.buildOutput(__scrypt_ts_changeInfo.scriptHash, __scrypt_ts_changeInfo.satoshis) : b'')) == __scrypt_ts_shPreimage.hashOutputs);
40
40
  }
41
- public function transferOwnership(PubKey adminPubKey, Sig adminSig, Ripemd160 newPubKeyHash, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, TxOut __scrypt_ts_changeInfo, CAT20AdminState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
42
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
41
+ public function transferOwnership(PubKey adminPubKey, Sig adminSig, Ripemd160 newPubKeyHash, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, TxOut __scrypt_ts_changeInfo, CAT20AdminState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
42
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
43
43
 
44
44
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
45
45
 
@@ -12,8 +12,8 @@ import "@opcat-labs/scrypt-ts-opcat/assets/.templates/smart-contract/builtin-lib
12
12
 
13
13
  contract CAT20Guard_12_12_2 {
14
14
  constructor(){}
15
- public function unlock(bytes[12] nextStateHashes, bytes[12] ownerAddrOrScriptHashes, int[12] outputTokens, int[12] tokenScriptHashIndexes, int[12] outputSatoshis, CAT20State[12] cat20States, int outputCount, SHPreimage __scrypt_ts_shPreimage, CAT20GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
16
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
15
+ public function unlock(bytes[12] nextStateHashes, bytes[12] ownerAddrOrScriptHashes, int[12] outputTokens, int[12] tokenScriptHashIndexes, int[12] outputSatoshis, CAT20State[12] cat20States, int outputCount, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, CAT20GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
16
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
17
17
 
18
18
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
19
19
 
@@ -12,8 +12,8 @@ import "@opcat-labs/scrypt-ts-opcat/assets/.templates/smart-contract/builtin-lib
12
12
 
13
13
  contract CAT20Guard_12_12_4 {
14
14
  constructor(){}
15
- public function unlock(bytes[12] nextStateHashes, bytes[12] ownerAddrOrScriptHashes, int[12] outputTokens, int[12] tokenScriptHashIndexes, int[12] outputSatoshis, CAT20State[12] cat20States, int outputCount, SHPreimage __scrypt_ts_shPreimage, CAT20GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
16
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
15
+ public function unlock(bytes[12] nextStateHashes, bytes[12] ownerAddrOrScriptHashes, int[12] outputTokens, int[12] tokenScriptHashIndexes, int[12] outputSatoshis, CAT20State[12] cat20States, int outputCount, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, CAT20GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
16
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
17
17
 
18
18
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
19
19
 
@@ -12,8 +12,8 @@ import "@opcat-labs/scrypt-ts-opcat/assets/.templates/smart-contract/builtin-lib
12
12
 
13
13
  contract CAT20Guard_6_6_2 {
14
14
  constructor(){}
15
- public function unlock(bytes[6] nextStateHashes, bytes[6] ownerAddrOrScriptHashes, int[6] outputTokens, int[6] tokenScriptHashIndexes, int[6] outputSatoshis, CAT20State[6] cat20States, int outputCount, SHPreimage __scrypt_ts_shPreimage, CAT20GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
16
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
15
+ public function unlock(bytes[6] nextStateHashes, bytes[6] ownerAddrOrScriptHashes, int[6] outputTokens, int[6] tokenScriptHashIndexes, int[6] outputSatoshis, CAT20State[6] cat20States, int outputCount, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, CAT20GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
16
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
17
17
 
18
18
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
19
19
 
@@ -12,8 +12,8 @@ import "@opcat-labs/scrypt-ts-opcat/assets/.templates/smart-contract/builtin-lib
12
12
 
13
13
  contract CAT20Guard_6_6_4 {
14
14
  constructor(){}
15
- public function unlock(bytes[6] nextStateHashes, bytes[6] ownerAddrOrScriptHashes, int[6] outputTokens, int[6] tokenScriptHashIndexes, int[6] outputSatoshis, CAT20State[6] cat20States, int outputCount, SHPreimage __scrypt_ts_shPreimage, CAT20GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
16
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
15
+ public function unlock(bytes[6] nextStateHashes, bytes[6] ownerAddrOrScriptHashes, int[6] outputTokens, int[6] tokenScriptHashIndexes, int[6] outputSatoshis, CAT20State[6] cat20States, int outputCount, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, CAT20GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
16
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
17
17
 
18
18
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
19
19
 
@@ -16,8 +16,8 @@ contract CAT20ClosedMinter {
16
16
  this.issuerAddress = ownerAddress;
17
17
  this.genesisOutpoint = genesisOutpoint;
18
18
  }
19
- public function mint(CAT20State tokenMint, PubKey issuerPubKey, Sig issuerSig, int minterSatoshis, int tokenSatoshis, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, TxOut __scrypt_ts_changeInfo, CAT20ClosedMinterState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
20
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
19
+ public function mint(CAT20State tokenMint, PubKey issuerPubKey, Sig issuerSig, int minterSatoshis, int tokenSatoshis, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, TxOut __scrypt_ts_changeInfo, CAT20ClosedMinterState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
20
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
21
21
 
22
22
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
23
23
 
@@ -24,8 +24,8 @@ contract CAT20OpenMinter {
24
24
  this.limit = limit;
25
25
  this.preminerAddr = premineAddr;
26
26
  }
27
- public function mint(CAT20State tokenMint, int[2] nextRemainingCounts, PubKey preminerPubKey, Sig preminerSig, int minterSatoshis, int tokenSatoshis, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, TxOut __scrypt_ts_changeInfo, CAT20OpenMinterState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
28
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
27
+ public function mint(CAT20State tokenMint, int[2] nextRemainingCounts, PubKey preminerPubKey, Sig preminerSig, int minterSatoshis, int tokenSatoshis, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, TxOut __scrypt_ts_changeInfo, CAT20OpenMinterState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
28
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
29
29
 
30
30
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
31
31
 
@@ -17,8 +17,8 @@ contract CAT721 {
17
17
  this.minterScriptHash = minterScriptHash;
18
18
  this.guardVariantScriptHashes = guardVariantScriptHashes;
19
19
  }
20
- public function unlock(CAT721ContractUnlockArgs unlockArgs, CAT721GuardConstState guardState, int guardInputIndex, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, CAT721State __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
21
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
20
+ public function unlock(CAT721ContractUnlockArgs unlockArgs, CAT721GuardConstState guardState, int guardInputIndex, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, CAT721State __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
21
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
22
22
 
23
23
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
24
24
 
@@ -11,8 +11,8 @@ import "@opcat-labs/scrypt-ts-opcat/assets/.templates/smart-contract/builtin-lib
11
11
 
12
12
  contract CAT721Guard_12_12_2 {
13
13
  constructor(){}
14
- public function unlock(bytes[12] nextStateHashes, bytes[12] ownerAddrOrScriptHashes, int[12] outputLocalIds, int[12] nftScriptHashIndexes, int[12] outputSatoshis, CAT721State[12] cat721States, int outputCount, SHPreimage __scrypt_ts_shPreimage, CAT721GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
15
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
14
+ public function unlock(bytes[12] nextStateHashes, bytes[12] ownerAddrOrScriptHashes, int[12] outputLocalIds, int[12] nftScriptHashIndexes, int[12] outputSatoshis, CAT721State[12] cat721States, int outputCount, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, CAT721GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
15
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
16
16
 
17
17
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
18
18
 
@@ -11,8 +11,8 @@ import "@opcat-labs/scrypt-ts-opcat/assets/.templates/smart-contract/builtin-lib
11
11
 
12
12
  contract CAT721Guard_12_12_4 {
13
13
  constructor(){}
14
- public function unlock(bytes[12] nextStateHashes, bytes[12] ownerAddrOrScriptHashes, int[12] outputLocalIds, int[12] nftScriptHashIndexes, int[12] outputSatoshis, CAT721State[12] cat721States, int outputCount, SHPreimage __scrypt_ts_shPreimage, CAT721GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
15
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
14
+ public function unlock(bytes[12] nextStateHashes, bytes[12] ownerAddrOrScriptHashes, int[12] outputLocalIds, int[12] nftScriptHashIndexes, int[12] outputSatoshis, CAT721State[12] cat721States, int outputCount, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, CAT721GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
15
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
16
16
 
17
17
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
18
18
 
@@ -11,8 +11,8 @@ import "@opcat-labs/scrypt-ts-opcat/assets/.templates/smart-contract/builtin-lib
11
11
 
12
12
  contract CAT721Guard_6_6_2 {
13
13
  constructor(){}
14
- public function unlock(bytes[6] nextStateHashes, bytes[6] ownerAddrOrScriptHashes, int[6] outputLocalIds, int[6] nftScriptHashIndexes, int[6] outputSatoshis, CAT721State[6] cat721States, int outputCount, SHPreimage __scrypt_ts_shPreimage, CAT721GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
15
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
14
+ public function unlock(bytes[6] nextStateHashes, bytes[6] ownerAddrOrScriptHashes, int[6] outputLocalIds, int[6] nftScriptHashIndexes, int[6] outputSatoshis, CAT721State[6] cat721States, int outputCount, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, CAT721GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
15
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
16
16
 
17
17
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
18
18
 
@@ -11,8 +11,8 @@ import "@opcat-labs/scrypt-ts-opcat/assets/.templates/smart-contract/builtin-lib
11
11
 
12
12
  contract CAT721Guard_6_6_4 {
13
13
  constructor(){}
14
- public function unlock(bytes[6] nextStateHashes, bytes[6] ownerAddrOrScriptHashes, int[6] outputLocalIds, int[6] nftScriptHashIndexes, int[6] outputSatoshis, CAT721State[6] cat721States, int outputCount, SHPreimage __scrypt_ts_shPreimage, CAT721GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
15
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
14
+ public function unlock(bytes[6] nextStateHashes, bytes[6] ownerAddrOrScriptHashes, int[6] outputLocalIds, int[6] nftScriptHashIndexes, int[6] outputSatoshis, CAT721State[6] cat721States, int outputCount, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, CAT721GuardConstState __scrypt_ts_curState, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes) {
15
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
16
16
 
17
17
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
18
18
 
@@ -18,8 +18,8 @@ contract CAT721ClosedMinter {
18
18
  this.genesisOutpoint = genesisOutpoint;
19
19
  this.max = max;
20
20
  }
21
- public function mint(CAT721State nftMint, PubKey issuerPubKey, Sig issuerSig, int minterSatoshis, int nftSatoshis, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, TxOut __scrypt_ts_changeInfo, CAT721ClosedMinterState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
22
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
21
+ public function mint(CAT721State nftMint, PubKey issuerPubKey, Sig issuerSig, int minterSatoshis, int nftSatoshis, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, TxOut __scrypt_ts_changeInfo, CAT721ClosedMinterState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
22
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
23
23
 
24
24
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
25
25
 
@@ -22,8 +22,8 @@ contract CAT721OpenMinter {
22
22
  this.premine = premine;
23
23
  this.preminerAddr = preminerAddr;
24
24
  }
25
- public function mint(CAT721State nftMint, CAT721OpenMintInfoState openMintInfo, bytes[15] proof, bool[15] proofNodePos, PubKey preminerPubKey, Sig preminerSig, int minterSatoshis, int nftSatoshis, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, TxOut __scrypt_ts_changeInfo, CAT721OpenMinterState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
26
- require(Tx.checkPreimageSigHashType(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
25
+ public function mint(CAT721State nftMint, CAT721OpenMintInfoState openMintInfo, bytes[15] proof, bool[15] proofNodePos, PubKey preminerPubKey, Sig preminerSig, int minterSatoshis, int nftSatoshis, BacktraceInfo backtraceInfo, SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, TxOut __scrypt_ts_changeInfo, CAT721OpenMinterState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
26
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, ContextUtils.pubKey));
27
27
 
28
28
  int __scrypt_ts_inputCount = ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
29
29
 
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "version": 10,
3
- "compilerVersion": "1.21.0+commit.2ada378",
4
- "contract": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20",
5
- "md5": "d1a217cc3546a930185fdaad1b126182",
3
+ "compilerVersion": "1.22.0+commit.47800da",
4
+ "contract": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20",
5
+ "md5": "d803bcd538736bcbc4072dc471a75052",
6
6
  "structs": [
7
7
  {
8
- "name": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20GuardConstState",
8
+ "name": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20GuardConstState",
9
9
  "params": [
10
10
  {
11
11
  "name": "tokenScriptHashes",
@@ -27,7 +27,7 @@
27
27
  "genericTypes": []
28
28
  },
29
29
  {
30
- "name": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20State",
30
+ "name": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20State",
31
31
  "params": [
32
32
  {
33
33
  "name": "ownerAddr",
@@ -41,7 +41,7 @@
41
41
  "genericTypes": []
42
42
  },
43
43
  {
44
- "name": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20ClosedMinterState",
44
+ "name": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20ClosedMinterState",
45
45
  "params": [
46
46
  {
47
47
  "name": "tokenScriptHash",
@@ -51,7 +51,7 @@
51
51
  "genericTypes": []
52
52
  },
53
53
  {
54
- "name": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20OpenMinterState",
54
+ "name": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20OpenMinterState",
55
55
  "params": [
56
56
  {
57
57
  "name": "tokenScriptHash",
@@ -69,7 +69,7 @@
69
69
  "genericTypes": []
70
70
  },
71
71
  {
72
- "name": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20AdminState",
72
+ "name": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20AdminState",
73
73
  "params": [
74
74
  {
75
75
  "name": "tag",
@@ -83,7 +83,7 @@
83
83
  "genericTypes": []
84
84
  },
85
85
  {
86
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__TxOut",
86
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__TxOut",
87
87
  "params": [
88
88
  {
89
89
  "name": "scriptHash",
@@ -101,7 +101,7 @@
101
101
  "genericTypes": []
102
102
  },
103
103
  {
104
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__TxIn",
104
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__TxIn",
105
105
  "params": [
106
106
  {
107
107
  "name": "prevTxHash",
@@ -123,7 +123,7 @@
123
123
  "genericTypes": []
124
124
  },
125
125
  {
126
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__TxHashPreimage",
126
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__TxHashPreimage",
127
127
  "params": [
128
128
  {
129
129
  "name": "version",
@@ -145,11 +145,11 @@
145
145
  "genericTypes": []
146
146
  },
147
147
  {
148
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__BacktraceInfo",
148
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__BacktraceInfo",
149
149
  "params": [
150
150
  {
151
151
  "name": "prevTxInput",
152
- "type": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__TxIn"
152
+ "type": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__TxIn"
153
153
  },
154
154
  {
155
155
  "name": "prevTxInputIndex",
@@ -157,13 +157,13 @@
157
157
  },
158
158
  {
159
159
  "name": "prevPrevTxPreimage",
160
- "type": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__TxHashPreimage"
160
+ "type": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__TxHashPreimage"
161
161
  }
162
162
  ],
163
163
  "genericTypes": []
164
164
  },
165
165
  {
166
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__SHPreimage",
166
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__SHPreimage",
167
167
  "params": [
168
168
  {
169
169
  "name": "nVersion",
@@ -225,7 +225,7 @@
225
225
  "genericTypes": []
226
226
  },
227
227
  {
228
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__Outpoint",
228
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__Outpoint",
229
229
  "params": [
230
230
  {
231
231
  "name": "txHash",
@@ -239,7 +239,7 @@
239
239
  "genericTypes": []
240
240
  },
241
241
  {
242
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__ChainTxVerifyResponse",
242
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__ChainTxVerifyResponse",
243
243
  "params": [
244
244
  {
245
245
  "name": "prevPrevScript",
@@ -253,7 +253,7 @@
253
253
  "genericTypes": []
254
254
  },
255
255
  {
256
- "name": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20ContractUnlockArgs",
256
+ "name": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20ContractUnlockArgs",
257
257
  "params": [
258
258
  {
259
259
  "name": "spendType",
@@ -275,7 +275,7 @@
275
275
  "genericTypes": []
276
276
  },
277
277
  {
278
- "name": "_opcat_labs_cat_sdk_2_1_2__rs__CAT721ContractUnlockArgs",
278
+ "name": "_opcat_labs_cat_sdk_2_1_3__rs__CAT721ContractUnlockArgs",
279
279
  "params": [
280
280
  {
281
281
  "name": "userPubKey",
@@ -293,7 +293,7 @@
293
293
  "genericTypes": []
294
294
  },
295
295
  {
296
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__ReadVarintResult",
296
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__ReadVarintResult",
297
297
  "params": [
298
298
  {
299
299
  "name": "data",
@@ -309,50 +309,50 @@
309
309
  ],
310
310
  "library": [
311
311
  {
312
- "name": "_opcat_labs_cat_sdk_2_1_2__rs__OwnerUtils",
312
+ "name": "_opcat_labs_cat_sdk_2_1_3__rs__OwnerUtils",
313
313
  "params": [],
314
314
  "properties": [],
315
315
  "genericTypes": []
316
316
  },
317
317
  {
318
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__TxUtils",
318
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__TxUtils",
319
319
  "params": [],
320
320
  "properties": [],
321
321
  "genericTypes": []
322
322
  },
323
323
  {
324
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__StateUtils",
324
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__StateUtils",
325
325
  "params": [],
326
326
  "properties": [],
327
327
  "genericTypes": []
328
328
  },
329
329
  {
330
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__TxHashPreimageUtils",
330
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__TxHashPreimageUtils",
331
331
  "params": [],
332
332
  "properties": [],
333
333
  "genericTypes": []
334
334
  },
335
335
  {
336
- "name": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20GuardStateLib",
336
+ "name": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20GuardStateLib",
337
337
  "params": [],
338
338
  "properties": [],
339
339
  "genericTypes": [],
340
- "stateType": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20GuardConstState"
340
+ "stateType": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20GuardConstState"
341
341
  },
342
342
  {
343
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__Backtrace",
343
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__Backtrace",
344
344
  "params": [],
345
345
  "properties": [],
346
346
  "genericTypes": []
347
347
  },
348
348
  {
349
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__ContextUtils",
349
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils",
350
350
  "params": [],
351
351
  "properties": [],
352
352
  "genericTypes": []
353
353
  },
354
354
  {
355
- "name": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__StdUtils",
355
+ "name": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__StdUtils",
356
356
  "params": [],
357
357
  "properties": [],
358
358
  "genericTypes": []
@@ -367,11 +367,11 @@
367
367
  "params": [
368
368
  {
369
369
  "name": "unlockArgs",
370
- "type": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20ContractUnlockArgs"
370
+ "type": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20ContractUnlockArgs"
371
371
  },
372
372
  {
373
373
  "name": "guardState",
374
- "type": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20GuardConstState"
374
+ "type": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20GuardConstState"
375
375
  },
376
376
  {
377
377
  "name": "guardInputIndex",
@@ -379,15 +379,19 @@
379
379
  },
380
380
  {
381
381
  "name": "backtraceInfo",
382
- "type": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__BacktraceInfo"
382
+ "type": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__BacktraceInfo"
383
383
  },
384
384
  {
385
385
  "name": "__scrypt_ts_shPreimage",
386
- "type": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__SHPreimage"
386
+ "type": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__SHPreimage"
387
+ },
388
+ {
389
+ "name": "__scrypt_ts_preimageSig",
390
+ "type": "Sig"
387
391
  },
388
392
  {
389
393
  "name": "__scrypt_ts_curState",
390
- "type": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20State"
394
+ "type": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20State"
391
395
  },
392
396
  {
393
397
  "name": "__scrypt_ts_prevouts",
@@ -407,7 +411,7 @@
407
411
  },
408
412
  {
409
413
  "name": "__scrypt_ts_prevTxHashPreimage",
410
- "type": "_opcat_labs_scrypt_ts_opcat_2_1_2__rs__TxHashPreimage"
414
+ "type": "_opcat_labs_scrypt_ts_opcat_2_1_3__rs__TxHashPreimage"
411
415
  }
412
416
  ]
413
417
  },
@@ -434,8 +438,8 @@
434
438
  }
435
439
  ],
436
440
  "stateProps": [],
437
- "stateType": "_opcat_labs_cat_sdk_2_1_2__rs__CAT20State",
441
+ "stateType": "_opcat_labs_cat_sdk_2_1_3__rs__CAT20State",
438
442
  "buildType": "release",
439
443
  "file": "../cat20.scrypt",
440
- "hex": "512097dfd76851bf465e8f715593b217714858bbe9570ff3bd5e33840a34e20ff0262102ba79df5f8ae7604a9830f03c7933028186aede0675a16f025dc4f8be8eec0382201008ce7480da41702918d1ec8e6849ba32b4d65b1e40dc669c31a1e6306b266c00000000000000<minterScriptHash><guardVariantScriptHashes[0]><guardVariantScriptHashes[1]><guardVariantScriptHashes[2]><guardVariantScriptHashes[3]><hasAdmin><adminScriptHash>56795e7a755d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5579557955795579607a607a607a607a6d6d5c7a5c7a5c7a5c7a5c7a5c7a5c7a5c7a5c7a78597a75587a587a587a587a587a587a587a587a76587a75577a577a577a577a577a577a577a6d6d6d750122790122790122790122790122790122790122790122790122790122790122790122790122790122795d798277549d5c79827701209d5b79827701209d5a79827701209d597900a26958798277549d5779827701209d5679827701209d5579827701209d5479827701209d5379827701209d527900a2697800a26976519c6476529c6751686476539c67516864760281009c67516864760282009c67516864760283009c675168695d795d797e5c797e5b797e5a79767600a2637609ffffffffffffffff00a16700686976586e8b806e7c7f75007f6b6d6d6d6c7e59797e58797e57797e56797e55797e54797e5379546e8b806e7c7f75007f6b6d6d6c7e5279546e8b806e7c7f75007f6b6d6d6c7e7854807e6b6d6d6d6d6d6d6d6c5b79785c795c79210ac407f0e4bd44bfc207355a778b046225a7068fc59ee7eda43ad905aadbffc800206c266b30e6a1319c66dc401e5bd6b432ba49688eecd118297041da8074ce08105e7956795679aa7676517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e01007e817757795679567956795679537956795479577995939521414136d08c5ed2bf3ba048afe6dcaebafeffffffffffffffffffffffffffffff006e6e9776009f636e936776687777777b757c6e5296a0636e7c947b757c6853798277527982775379012080517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e01205279947f77545379935279930130787e527e54797e58797e527e53797e52797e57797e6b6d6d6d6d6d6d6c765779ac6b6d6d6d6d6d6c7769011179011d7978aa7888785878827d77527997009d6e7c966b6d6d6c77011379012379011a7970aa5379886e9f69765479012478827d77527997009d6e7c967777779d537952798b0124957f7552790124957f7d7701207f75007f777801247f7501207f77768277549d767601007e817777726d726d7b75011279011f7954795279aa527988765379012078827d77527997009d6e7c967777779d6d75011379011e7954795279aa527988765379012078827d77527997009d6e7c967777779d6d75011779011779011c79011a79011a79788277528052797e78827752807e787e5279a95279a97ea97ea877770117797653798b0120957f7553790120957f775279886d75011379011379011379011379011b79012179557955795579557953798277549d5279014878827d77527997009d6e7c967777775279014878827d77527997009d6e7c96777777557952790000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e55797e780000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e54797e53797eaa6b6d6d6d6c76700124950120937f7553790124957f77886d6d6d75013079013079013079013079013079013079013079013079013079011479011e790127798b0120957f750127790120957f77011d795b795b795b795b795b795b795b795b795b7959797656798b0148957f7556790148957f775a795a795a795a795379827701209d76827701209d707600a2637605ffffffff00a16700686976546e8b806e7c7f75007f6b6d6d6c777e787e52797600a2637605ffffffff00a16700686976546e8b806e7c7f75007f6b6d6d6c777e6b6d6d6c88597976567956795679567953798277549d5279014878827d77527997009d6e7c967777775279014878827d77527997009d6e7c96777777557952790000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e55797e780000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e54797e53797eaa6b6d6d6d6c8853795a7901489558930120937f755a7901489558937f77785b797600a2637605ffffffff00a16700686976546e8b806e7c7f75007f6b6d6d6c777e787c726d726d726d726d726d726d785579876478547987675168696d6d6d6d6d6d6d013e79013e79013e79013e79013e79013e79013e79013e79013e79013e79013e79013e79013e79013279012a790140790124790126797853796e8b0120957f75780120957f77777776011e79011e79011e79011e7953766b796c756b6d6d6c876476011e79011e79011e79011e7952766b796c756b6d6d6c876751686476011e79011e79011e79011e7951766b796c756b6d6d6c876751686476011e79011e79011e79011e7900766b796c756b6d6d6c87675168697854796e8b0120957f75780120957f7777770113790113790113790113790113790113790113790113790113790113790113790113790113795c795c795c795c7953766b796c756b6d6d6c827752805d795d795d795d7953766b796c756b6d6d6c7e5d795d795d795d7952766b796c756b6d6d6c827752807e5d795d795d795d7952766b796c756b6d6d6c7e5d795d795d795d7951766b796c756b6d6d6c827752807e5d795d795d795d7951766b796c756b6d6d6c7e5d795d795d795d7900766b796c756b6d6d6c827752807e5d795d795d795d7900766b796c756b6d6d6c7e597959795979597953766b796c756b6d6d6c827752807e597959795979597953766b796c756b6d6d6c7e597959795979597952766b796c756b6d6d6c827752807e597959795979597952766b796c756b6d6d6c7e597959795979597951766b796c756b6d6d6c827752807e597959795979597951766b796c756b6d6d6c7e597959795979597900766b796c756b6d6d6c827752807e597959795979597900766b796c756b6d6d6c7e557955795579557953766b796c756b6d6d6c827752807e557955795579557953766b796c756b6d6d6c7e557955795579557952766b796c756b6d6d6c827752807e557955795579557952766b796c756b6d6d6c7e557955795579557951766b796c756b6d6d6c827752807e557955795579557951766b796c756b6d6d6c7e557955795579557900766b796c756b6d6d6c827752807e557955795579557900766b796c756b6d6d6c7e78827752807e787e5d795d795d795d7953766b796c756b6d6d6ca95e795e795e795e7952766b796c756b6d6d6ca97e5e795e795e795e7951766b796c756b6d6d6ca97e5e795e795e795e7900766b796c756b6d6d6ca97e5a795a795a795a7953766b796c756b6d6d6ca97e5a795a795a795a7952766b796c756b6d6d6ca97e5a795a795a795a7951766b796c756b6d6d6ca97e5a795a795a795a7900766b796c756b6d6d6ca97e567956795679567953766b796c756b6d6d6ca97e567956795679567952766b796c756b6d6d6ca97e567956795679567951766b796c756b6d6d6ca97e567956795679567900766b796c756b6d6d6ca97e5279a97ea97ea86b6d6d6d6d6d6d6c7788567955798b7f7555797f77810113790113790113790113795455797600a26976549f69948c766b796c756b6d6d6c5779886d6d6d6d6d6d6d6d6d6d01427900a26301427952a1670068690001407900a26301407956799f690115790141796e8b0120957f75780120957f6b6d6d6c68014379009c630142795379787676827701219d750376a91478a97e0288ac7e7778886d014179014379ad67014379519c6352797888675779697657798868686d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d51"
444
+ "hex": "2102ba79df5f8ae7604a9830f03c7933028186aede0675a16f025dc4f8be8eec038200000000000000<minterScriptHash><guardVariantScriptHashes[0]><guardVariantScriptHashes[1]><guardVariantScriptHashes[2]><guardVariantScriptHashes[3]><hasAdmin><adminScriptHash>56795e7a755d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5d7a5579557955795579607a607a607a607a6d6d5c7a5c7a5c7a5c7a5c7a5c7a5c7a5c7a5c7a78597a75587a587a587a587a587a587a587a587a76587a75577a577a577a577a577a577a577a6d6d6d7501127901137982778c7f75007f770121790121790121790121790121790121790121790121790121790121790121790121790121790121795d798277549d5c79827701209d5b79827701209d5a79827701209d597900a26958798277549d5779827701209d5679827701209d5579827701209d5479827701209d5379827701209d527900a2697800a26976519c6476529c6751686476539c67516864760281009c67516864760282009c67516864760283009c675168695d795d797e5c797e5b797e5a79767600a2637609ffffffffffffffff00a16700686976586e8b806e7c7f75007f6b6d6d6d6c7e59797e58797e57797e56797e55797e54797e5379546e8b806e7c7f75007f6b6d6d6c7e5279546e8b806e7c7f75007f6b6d6d6c7e7854807e6b6d6d6d6d6d6d6d6ca85979ba630112795879ac670068695e79011b7978aa7888785878827d77527997009d6e7c966b6d6d6c77607901217901187970aa5379886e9f69765479012478827d77527997009d6e7c967777779d537952798b0124957f7552790124957f7d7701207f75007f777801247f7501207f77768277549d767601007e817777726d726d7b755f79011d7954795279aa527988765379012078827d77527997009d6e7c967777779d6d756079011c7954795279aa527988765379012078827d77527997009d6e7c967777779d6d75011479011479011a79011779011779788277528052797e78827752807e787e5279a95279a97ea97ea877770114797653798b0120957f7553790120957f775279886d756079607960796079011879011f79557955795579557953798277549d5279014878827d77527997009d6e7c967777775279014878827d77527997009d6e7c96777777557952790000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e55797e780000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e54797e53797eaa6b6d6d6d6c76700124950120937f7553790124957f77886d6d6d75012e79012e79012e79012e79012e79012e79012e79012e79012e79011479011b790125798b0120957f750125790120957f77011a795b795b795b795b795b795b795b795b795b7959797656798b0148957f7556790148957f775a795a795a795a795379827701209d76827701209d707600a2637605ffffffff00a16700686976546e8b806e7c7f75007f6b6d6d6c777e787e52797600a2637605ffffffff00a16700686976546e8b806e7c7f75007f6b6d6d6c777e6b6d6d6c88597976567956795679567953798277549d5279014878827d77527997009d6e7c967777775279014878827d77527997009d6e7c96777777557952790000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e55797e780000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e54797e53797eaa6b6d6d6d6c8853795a7901489558930120937f755a7901489558937f77785b797600a2637605ffffffff00a16700686976546e8b806e7c7f75007f6b6d6d6c777e787c726d726d726d726d726d726d785579876478547987675168696d6d6d6d6d6d6d013c79013c79013c79013c79013c79013c79013c79013c79013c79013c79013c79013c79013c79013079012879013e790121790123797853796e8b0120957f75780120957f77777776011e79011e79011e79011e7953766b796c756b6d6d6c876476011e79011e79011e79011e7952766b796c756b6d6d6c876751686476011e79011e79011e79011e7951766b796c756b6d6d6c876751686476011e79011e79011e79011e7900766b796c756b6d6d6c87675168697854796e8b0120957f75780120957f7777770113790113790113790113790113790113790113790113790113790113790113790113790113795c795c795c795c7953766b796c756b6d6d6c827752805d795d795d795d7953766b796c756b6d6d6c7e5d795d795d795d7952766b796c756b6d6d6c827752807e5d795d795d795d7952766b796c756b6d6d6c7e5d795d795d795d7951766b796c756b6d6d6c827752807e5d795d795d795d7951766b796c756b6d6d6c7e5d795d795d795d7900766b796c756b6d6d6c827752807e5d795d795d795d7900766b796c756b6d6d6c7e597959795979597953766b796c756b6d6d6c827752807e597959795979597953766b796c756b6d6d6c7e597959795979597952766b796c756b6d6d6c827752807e597959795979597952766b796c756b6d6d6c7e597959795979597951766b796c756b6d6d6c827752807e597959795979597951766b796c756b6d6d6c7e597959795979597900766b796c756b6d6d6c827752807e597959795979597900766b796c756b6d6d6c7e557955795579557953766b796c756b6d6d6c827752807e557955795579557953766b796c756b6d6d6c7e557955795579557952766b796c756b6d6d6c827752807e557955795579557952766b796c756b6d6d6c7e557955795579557951766b796c756b6d6d6c827752807e557955795579557951766b796c756b6d6d6c7e557955795579557900766b796c756b6d6d6c827752807e557955795579557900766b796c756b6d6d6c7e78827752807e787e5d795d795d795d7953766b796c756b6d6d6ca95e795e795e795e7952766b796c756b6d6d6ca97e5e795e795e795e7951766b796c756b6d6d6ca97e5e795e795e795e7900766b796c756b6d6d6ca97e5a795a795a795a7953766b796c756b6d6d6ca97e5a795a795a795a7952766b796c756b6d6d6ca97e5a795a795a795a7951766b796c756b6d6d6ca97e5a795a795a795a7900766b796c756b6d6d6ca97e567956795679567953766b796c756b6d6d6ca97e567956795679567952766b796c756b6d6d6ca97e567956795679567951766b796c756b6d6d6ca97e567956795679567900766b796c756b6d6d6ca97e5279a97ea97ea86b6d6d6d6d6d6d6c7788567955798b7f7555797f77810113790113790113790113795455797600a26976549f69948c766b796c756b6d6d6c5779886d6d6d6d6d6d6d6d6d6d01407900a26301407952a16700686900013e7900a263013e7956799f69011279013f796e8b0120957f75780120957f6b6d6d6c68014179009c630140795379787676827701219d750376a91478a97e0288ac7e7778886d013f79014179ad67014179519c6352797888675779697657798868686d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d51"
441
445
  }
@@ -12,7 +12,7 @@ import "../scrypt-ts-opcat/assets/smart-contract/builtin-libs/stateUtils.scrypt"
12
12
 
13
13
 
14
14
 
15
- contract _opcat_labs_cat_sdk_2_1_2__rs__CAT20 {
15
+ contract _opcat_labs_cat_sdk_2_1_3__rs__CAT20 {
16
16
  bytes minterScriptHash;
17
17
  Sha256[4] guardVariantScriptHashes;
18
18
  bool hasAdmin;
@@ -23,33 +23,33 @@ contract _opcat_labs_cat_sdk_2_1_2__rs__CAT20 {
23
23
  this.hasAdmin = hasAdmin;
24
24
  this.adminScriptHash = adminScriptHash;
25
25
  }
26
- public function unlock(_opcat_labs_cat_sdk_2_1_2__rs__CAT20ContractUnlockArgs unlockArgs, _opcat_labs_cat_sdk_2_1_2__rs__CAT20GuardConstState guardState, int guardInputIndex, _opcat_labs_scrypt_ts_opcat_2_1_2__rs__BacktraceInfo backtraceInfo, _opcat_labs_scrypt_ts_opcat_2_1_2__rs__SHPreimage __scrypt_ts_shPreimage, _opcat_labs_cat_sdk_2_1_2__rs__CAT20State __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, _opcat_labs_scrypt_ts_opcat_2_1_2__rs__TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
27
- require(Tx.checkPreimageSigHashType(_opcat_labs_scrypt_ts_opcat_2_1_2__rs__ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
26
+ public function unlock(_opcat_labs_cat_sdk_2_1_3__rs__CAT20ContractUnlockArgs unlockArgs, _opcat_labs_cat_sdk_2_1_3__rs__CAT20GuardConstState guardState, int guardInputIndex, _opcat_labs_scrypt_ts_opcat_2_1_3__rs__BacktraceInfo backtraceInfo, _opcat_labs_scrypt_ts_opcat_2_1_3__rs__SHPreimage __scrypt_ts_shPreimage, Sig __scrypt_ts_preimageSig, _opcat_labs_cat_sdk_2_1_3__rs__CAT20State __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, _opcat_labs_scrypt_ts_opcat_2_1_3__rs__TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
27
+ require(checkDataSig(Sig(__scrypt_ts_preimageSig[0 : len(__scrypt_ts_preimageSig) - 1]), sha256(_opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage)), _opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils.pubKey) && checkSig(__scrypt_ts_preimageSig, _opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils.pubKey));
28
28
 
29
- int __scrypt_ts_inputCount = _opcat_labs_scrypt_ts_opcat_2_1_2__rs__ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
29
+ int __scrypt_ts_inputCount = _opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
30
30
 
31
- _opcat_labs_scrypt_ts_opcat_2_1_2__rs__Outpoint __scrypt_ts_prevout = _opcat_labs_scrypt_ts_opcat_2_1_2__rs__ContextUtils.checkPrevouts(__scrypt_ts_prevouts, __scrypt_ts_shPreimage.hashPrevouts, __scrypt_ts_shPreimage.inputIndex, __scrypt_ts_inputCount);
31
+ _opcat_labs_scrypt_ts_opcat_2_1_3__rs__Outpoint __scrypt_ts_prevout = _opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils.checkPrevouts(__scrypt_ts_prevouts, __scrypt_ts_shPreimage.hashPrevouts, __scrypt_ts_shPreimage.inputIndex, __scrypt_ts_inputCount);
32
32
 
33
- _opcat_labs_scrypt_ts_opcat_2_1_2__rs__ContextUtils.checkSpentScripts(__scrypt_ts_spentScriptHashes, __scrypt_ts_shPreimage.hashSpentScriptHashes, __scrypt_ts_inputCount);
33
+ _opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils.checkSpentScripts(__scrypt_ts_spentScriptHashes, __scrypt_ts_shPreimage.hashSpentScriptHashes, __scrypt_ts_inputCount);
34
34
 
35
- _opcat_labs_scrypt_ts_opcat_2_1_2__rs__ContextUtils.checkSpentDataHashes(__scrypt_ts_spentDataHashes, __scrypt_ts_shPreimage.hashSpentDataHashes, __scrypt_ts_inputCount);
35
+ _opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils.checkSpentDataHashes(__scrypt_ts_spentDataHashes, __scrypt_ts_shPreimage.hashSpentDataHashes, __scrypt_ts_inputCount);
36
36
 
37
- _opcat_labs_cat_sdk_2_1_2__rs__CAT20State __scrypt_ts_nextState = __scrypt_ts_curState;
37
+ _opcat_labs_cat_sdk_2_1_3__rs__CAT20State __scrypt_ts_nextState = __scrypt_ts_curState;
38
38
 
39
- _opcat_labs_scrypt_ts_opcat_2_1_2__rs__StateUtils.checkInputState(__scrypt_ts_shPreimage.inputIndex, _opcat_labs_cat_sdk_2_1_2__rs__CAT20.stateHash(__scrypt_ts_curState), __scrypt_ts_spentDataHashes);
39
+ _opcat_labs_scrypt_ts_opcat_2_1_3__rs__StateUtils.checkInputState(__scrypt_ts_shPreimage.inputIndex, _opcat_labs_cat_sdk_2_1_3__rs__CAT20.stateHash(__scrypt_ts_curState), __scrypt_ts_spentDataHashes);
40
40
 
41
- _opcat_labs_scrypt_ts_opcat_2_1_2__rs__Backtrace.checkPrevTxHashPreimage(__scrypt_ts_prevTxHashPreimage, __scrypt_ts_prevouts, __scrypt_ts_shPreimage.inputIndex);
41
+ _opcat_labs_scrypt_ts_opcat_2_1_3__rs__Backtrace.checkPrevTxHashPreimage(__scrypt_ts_prevTxHashPreimage, __scrypt_ts_prevouts, __scrypt_ts_shPreimage.inputIndex);
42
42
 
43
- _opcat_labs_scrypt_ts_opcat_2_1_2__rs__Backtrace.verifyFromScript(backtraceInfo, this.minterScriptHash, __scrypt_ts_spentScriptHashes[__scrypt_ts_shPreimage.inputIndex * 32 : (__scrypt_ts_shPreimage.inputIndex + 1) * 32], __scrypt_ts_prevTxHashPreimage.inputList);
43
+ _opcat_labs_scrypt_ts_opcat_2_1_3__rs__Backtrace.verifyFromScript(backtraceInfo, this.minterScriptHash, __scrypt_ts_spentScriptHashes[__scrypt_ts_shPreimage.inputIndex * 32 : (__scrypt_ts_shPreimage.inputIndex + 1) * 32], __scrypt_ts_prevTxHashPreimage.inputList);
44
44
  this.checkGuard(guardState, __scrypt_ts_shPreimage.spentScriptHash, __scrypt_ts_shPreimage.inputIndex, guardInputIndex, __scrypt_ts_spentScriptHashes, __scrypt_ts_spentDataHashes);
45
45
  require(unlockArgs.spendType >= 0 && unlockArgs.spendType <= 2);
46
46
  bytes spentScriptHash = b'';
47
47
  if(unlockArgs.spendScriptInputIndex >= 0) {
48
48
  require(unlockArgs.spendScriptInputIndex < __scrypt_ts_inputCount);
49
- spentScriptHash = _opcat_labs_scrypt_ts_opcat_2_1_2__rs__ContextUtils.getSpentScriptHash(__scrypt_ts_spentScriptHashes, unlockArgs.spendScriptInputIndex);
49
+ spentScriptHash = _opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils.getSpentScriptHash(__scrypt_ts_spentScriptHashes, unlockArgs.spendScriptInputIndex);
50
50
  }
51
51
  if(unlockArgs.spendType == 0) {
52
- _opcat_labs_cat_sdk_2_1_2__rs__OwnerUtils.checkUserOwner(unlockArgs.userPubKey, __scrypt_ts_nextState.ownerAddr);
52
+ _opcat_labs_cat_sdk_2_1_3__rs__OwnerUtils.checkUserOwner(unlockArgs.userPubKey, __scrypt_ts_nextState.ownerAddr);
53
53
  require(checkSig(unlockArgs.userSig, unlockArgs.userPubKey));
54
54
  } else if(unlockArgs.spendType == 1) {
55
55
  require(__scrypt_ts_nextState.ownerAddr == spentScriptHash);
@@ -59,18 +59,18 @@ contract _opcat_labs_cat_sdk_2_1_2__rs__CAT20 {
59
59
  }
60
60
  require(true);
61
61
  }
62
- function checkGuard(_opcat_labs_cat_sdk_2_1_2__rs__CAT20GuardConstState guardState, bytes t_cat20ScriptHash, int t_cat20InputIndexVal, int guardInputIndexVal, bytes t_spentScriptsCtx, bytes t_spentDataHashesCtx) : bool {
63
- bytes guardScriptHash = _opcat_labs_scrypt_ts_opcat_2_1_2__rs__ContextUtils.getSpentScriptHash(t_spentScriptsCtx, guardInputIndexVal);
62
+ function checkGuard(_opcat_labs_cat_sdk_2_1_3__rs__CAT20GuardConstState guardState, bytes t_cat20ScriptHash, int t_cat20InputIndexVal, int guardInputIndexVal, bytes t_spentScriptsCtx, bytes t_spentDataHashesCtx) : bool {
63
+ bytes guardScriptHash = _opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils.getSpentScriptHash(t_spentScriptsCtx, guardInputIndexVal);
64
64
  require(guardScriptHash == this.guardVariantScriptHashes[0] || guardScriptHash == this.guardVariantScriptHashes[1] || guardScriptHash == this.guardVariantScriptHashes[2] || guardScriptHash == this.guardVariantScriptHashes[3]);
65
- require(_opcat_labs_scrypt_ts_opcat_2_1_2__rs__ContextUtils.getSpentDataHash(t_spentDataHashesCtx, guardInputIndexVal) == _opcat_labs_cat_sdk_2_1_2__rs__CAT20GuardStateLib.stateHash(guardState));
65
+ require(_opcat_labs_scrypt_ts_opcat_2_1_3__rs__ContextUtils.getSpentDataHash(t_spentDataHashesCtx, guardInputIndexVal) == _opcat_labs_cat_sdk_2_1_3__rs__CAT20GuardStateLib.stateHash(guardState));
66
66
  int tokenScriptIndex = unpack(guardState.tokenScriptIndexes[t_cat20InputIndexVal : t_cat20InputIndexVal + 1]);
67
67
  require(guardState.tokenScriptHashes[(tokenScriptIndex)] == t_cat20ScriptHash);
68
68
  return true;
69
69
  }
70
- static function serializeState(_opcat_labs_cat_sdk_2_1_2__rs__CAT20State __scrypt_ts_curState): bytes {
70
+ static function serializeState(_opcat_labs_cat_sdk_2_1_3__rs__CAT20State __scrypt_ts_curState): bytes {
71
71
  return num2bin(len(__scrypt_ts_curState.ownerAddr), 2) + __scrypt_ts_curState.ownerAddr + num2bin(len(pack(__scrypt_ts_curState.amount)), 2) + pack(__scrypt_ts_curState.amount) + hash160(hash160(__scrypt_ts_curState.ownerAddr) + hash160(pack(__scrypt_ts_curState.amount)));
72
72
  }
73
- static function stateHash(_opcat_labs_cat_sdk_2_1_2__rs__CAT20State __scrypt_ts_curState): bytes {
73
+ static function stateHash(_opcat_labs_cat_sdk_2_1_3__rs__CAT20State __scrypt_ts_curState): bytes {
74
74
  return sha256(num2bin(len(__scrypt_ts_curState.ownerAddr), 2) + __scrypt_ts_curState.ownerAddr + num2bin(len(pack(__scrypt_ts_curState.amount)), 2) + pack(__scrypt_ts_curState.amount) + hash160(hash160(__scrypt_ts_curState.ownerAddr) + hash160(pack(__scrypt_ts_curState.amount))));
75
75
  }
76
76
  }