@opcat-labs/cat-sdk 1.0.1 → 1.0.2
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.
- package/artifacts/cat20/cat20.json +34 -34
- package/artifacts/cat20/cat20.scrypt +17 -17
- package/artifacts/cat20/cat20Guard.json +31 -31
- package/artifacts/cat20/cat20Guard.scrypt +21 -21
- package/artifacts/cat20/cat20GuardStateLib.json +22 -22
- package/artifacts/cat20/cat20GuardStateLib.scrypt +5 -5
- package/artifacts/cat20/cat20StateLib.json +24 -24
- package/artifacts/cat20/cat20StateLib.scrypt +6 -6
- package/artifacts/cat20/minters/cat20ClosedMinter.json +34 -34
- package/artifacts/cat20/minters/cat20ClosedMinter.scrypt +22 -22
- package/artifacts/cat20/minters/cat20ClosedMinterMetadata.json +10 -10
- package/artifacts/cat20/minters/cat20ClosedMinterMetadata.scrypt +3 -3
- package/artifacts/cat20/minters/cat20OpenMinter.json +37 -37
- package/artifacts/cat20/minters/cat20OpenMinter.scrypt +20 -20
- package/artifacts/cat20/minters/cat20OpenMinterMetadata.json +10 -10
- package/artifacts/cat20/minters/cat20OpenMinterMetadata.scrypt +3 -3
- package/artifacts/cat20/types.json +6 -6
- package/artifacts/cat20/types.scrypt +6 -6
- package/artifacts/cat20Incinerator.json +23 -23
- package/artifacts/cat20Incinerator.scrypt +9 -9
- package/artifacts/constants.json +2 -2
- package/artifacts/constants.scrypt +1 -1
- package/artifacts/counter.json +19 -19
- package/artifacts/counter.scrypt +12 -12
- package/artifacts/p2pkh.json +13 -13
- package/artifacts/p2pkh.scrypt +1 -1
- package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/backtrace.scrypt +12 -12
- package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/contextUtils.scrypt +16 -16
- package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/stateUtils.scrypt +1 -1
- package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/stdUtils.scrypt +12 -12
- package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/txHashPreimageUtils.scrypt +7 -7
- package/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/txUtils.scrypt +12 -12
- package/artifacts/scrypt-ts-opcat/assets/smart-contract/types/structs.scrypt +8 -8
- package/artifacts/types.json +1 -1
- package/artifacts/types.scrypt +1 -1
- package/artifacts/utils/ownerUtils.json +14 -14
- package/artifacts/utils/ownerUtils.scrypt +3 -3
- package/artifacts/utils/safeMath.json +14 -14
- package/artifacts/utils/safeMath.scrypt +1 -1
- package/dist/artifacts/cat20/cat20.json +34 -34
- package/dist/artifacts/cat20/cat20.scrypt +17 -17
- package/dist/artifacts/cat20/cat20Guard.json +31 -31
- package/dist/artifacts/cat20/cat20Guard.scrypt +21 -21
- package/dist/artifacts/cat20/cat20GuardStateLib.json +22 -22
- package/dist/artifacts/cat20/cat20GuardStateLib.scrypt +5 -5
- package/dist/artifacts/cat20/cat20StateLib.json +24 -24
- package/dist/artifacts/cat20/cat20StateLib.scrypt +6 -6
- package/dist/artifacts/cat20/minters/cat20ClosedMinter.json +34 -34
- package/dist/artifacts/cat20/minters/cat20ClosedMinter.scrypt +22 -22
- package/dist/artifacts/cat20/minters/cat20ClosedMinterMetadata.json +10 -10
- package/dist/artifacts/cat20/minters/cat20ClosedMinterMetadata.scrypt +3 -3
- package/dist/artifacts/cat20/minters/cat20OpenMinter.json +37 -37
- package/dist/artifacts/cat20/minters/cat20OpenMinter.scrypt +20 -20
- package/dist/artifacts/cat20/minters/cat20OpenMinterMetadata.json +10 -10
- package/dist/artifacts/cat20/minters/cat20OpenMinterMetadata.scrypt +3 -3
- package/dist/artifacts/cat20/types.json +6 -6
- package/dist/artifacts/cat20/types.scrypt +6 -6
- package/dist/artifacts/cat20Incinerator.json +23 -23
- package/dist/artifacts/cat20Incinerator.scrypt +9 -9
- package/dist/artifacts/constants.json +2 -2
- package/dist/artifacts/constants.scrypt +1 -1
- package/dist/artifacts/counter.json +19 -19
- package/dist/artifacts/counter.scrypt +12 -12
- package/dist/artifacts/p2pkh.json +13 -13
- package/dist/artifacts/p2pkh.scrypt +1 -1
- package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/backtrace.scrypt +12 -12
- package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/contextUtils.scrypt +16 -16
- package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/stateUtils.scrypt +1 -1
- package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/stdUtils.scrypt +12 -12
- package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/txHashPreimageUtils.scrypt +7 -7
- package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/builtin-libs/txUtils.scrypt +12 -12
- package/dist/artifacts/scrypt-ts-opcat/assets/smart-contract/types/structs.scrypt +8 -8
- package/dist/artifacts/types.json +1 -1
- package/dist/artifacts/types.scrypt +1 -1
- package/dist/artifacts/utils/ownerUtils.json +14 -14
- package/dist/artifacts/utils/ownerUtils.scrypt +3 -3
- package/dist/artifacts/utils/safeMath.json +14 -14
- package/dist/artifacts/utils/safeMath.scrypt +1 -1
- package/dist/cjs/features/cat20/send/contractSend.js +1 -1
- package/dist/cjs/features/cat20/send/contractSend.js.map +1 -1
- package/dist/esm/features/cat20/send/contractSend.js +1 -1
- package/dist/esm/features/cat20/send/contractSend.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 10,
|
|
3
3
|
"compilerVersion": "1.21.0+commit.2ada378",
|
|
4
|
-
"contract": "
|
|
4
|
+
"contract": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinter",
|
|
5
5
|
"md5": "eefb663fc79f1977d9045aa18afe8bcc",
|
|
6
6
|
"structs": [
|
|
7
7
|
{
|
|
8
|
-
"name": "
|
|
8
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__ReadVarintResult",
|
|
9
9
|
"params": [
|
|
10
10
|
{
|
|
11
11
|
"name": "data",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"genericTypes": []
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
"name": "
|
|
22
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxOut",
|
|
23
23
|
"params": [
|
|
24
24
|
{
|
|
25
25
|
"name": "scriptHash",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"genericTypes": []
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
"name": "
|
|
40
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxIn",
|
|
41
41
|
"params": [
|
|
42
42
|
{
|
|
43
43
|
"name": "prevTxHash",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"genericTypes": []
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
"name": "
|
|
62
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxHashPreimage",
|
|
63
63
|
"params": [
|
|
64
64
|
{
|
|
65
65
|
"name": "version",
|
|
@@ -81,11 +81,11 @@
|
|
|
81
81
|
"genericTypes": []
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
"name": "
|
|
84
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__BacktraceInfo",
|
|
85
85
|
"params": [
|
|
86
86
|
{
|
|
87
87
|
"name": "prevTxInput",
|
|
88
|
-
"type": "
|
|
88
|
+
"type": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxIn"
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
"name": "prevTxInputIndex",
|
|
@@ -93,13 +93,13 @@
|
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "prevPrevTxPreimage",
|
|
96
|
-
"type": "
|
|
96
|
+
"type": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxHashPreimage"
|
|
97
97
|
}
|
|
98
98
|
],
|
|
99
99
|
"genericTypes": []
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
|
-
"name": "
|
|
102
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__SHPreimage",
|
|
103
103
|
"params": [
|
|
104
104
|
{
|
|
105
105
|
"name": "nVersion",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"genericTypes": []
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
|
-
"name": "
|
|
164
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__Outpoint",
|
|
165
165
|
"params": [
|
|
166
166
|
{
|
|
167
167
|
"name": "txHash",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"genericTypes": []
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
|
-
"name": "
|
|
178
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__ChainTxVerifyResponse",
|
|
179
179
|
"params": [
|
|
180
180
|
{
|
|
181
181
|
"name": "prevPrevScript",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"genericTypes": []
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
|
-
"name": "
|
|
192
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20GuardConstState",
|
|
193
193
|
"params": [
|
|
194
194
|
{
|
|
195
195
|
"name": "tokenScriptHashes",
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
"genericTypes": []
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
|
-
"name": "
|
|
214
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20State",
|
|
215
215
|
"params": [
|
|
216
216
|
{
|
|
217
217
|
"name": "tag",
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
"genericTypes": []
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
|
-
"name": "
|
|
232
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterState",
|
|
233
233
|
"params": [
|
|
234
234
|
{
|
|
235
235
|
"name": "tag",
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"genericTypes": []
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
|
-
"name": "
|
|
246
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__ClosedMinterCAT20Meta",
|
|
247
247
|
"params": [
|
|
248
248
|
{
|
|
249
249
|
"name": "tag",
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
"genericTypes": []
|
|
270
270
|
},
|
|
271
271
|
{
|
|
272
|
-
"name": "
|
|
272
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__OpenMinterCAT20Meta",
|
|
273
273
|
"params": [
|
|
274
274
|
{
|
|
275
275
|
"name": "tag",
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
"genericTypes": []
|
|
312
312
|
},
|
|
313
313
|
{
|
|
314
|
-
"name": "
|
|
314
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20OpenMinterState",
|
|
315
315
|
"params": [
|
|
316
316
|
{
|
|
317
317
|
"name": "tag",
|
|
@@ -335,56 +335,56 @@
|
|
|
335
335
|
],
|
|
336
336
|
"library": [
|
|
337
337
|
{
|
|
338
|
-
"name": "
|
|
338
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxHashPreimageUtils",
|
|
339
339
|
"params": [],
|
|
340
340
|
"properties": [],
|
|
341
341
|
"genericTypes": []
|
|
342
342
|
},
|
|
343
343
|
{
|
|
344
|
-
"name": "
|
|
344
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__ConstantsLib",
|
|
345
345
|
"params": [],
|
|
346
346
|
"properties": [],
|
|
347
347
|
"genericTypes": []
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
|
-
"name": "
|
|
350
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20StateLib",
|
|
351
351
|
"params": [],
|
|
352
352
|
"properties": [],
|
|
353
353
|
"genericTypes": [],
|
|
354
|
-
"stateType": "
|
|
354
|
+
"stateType": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20State"
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
|
-
"name": "
|
|
357
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__StdUtils",
|
|
358
358
|
"params": [],
|
|
359
359
|
"properties": [],
|
|
360
360
|
"genericTypes": []
|
|
361
361
|
},
|
|
362
362
|
{
|
|
363
|
-
"name": "
|
|
363
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__OwnerUtils",
|
|
364
364
|
"params": [],
|
|
365
365
|
"properties": [],
|
|
366
366
|
"genericTypes": []
|
|
367
367
|
},
|
|
368
368
|
{
|
|
369
|
-
"name": "
|
|
369
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__ContextUtils",
|
|
370
370
|
"params": [],
|
|
371
371
|
"properties": [],
|
|
372
372
|
"genericTypes": []
|
|
373
373
|
},
|
|
374
374
|
{
|
|
375
|
-
"name": "
|
|
375
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__Backtrace",
|
|
376
376
|
"params": [],
|
|
377
377
|
"properties": [],
|
|
378
378
|
"genericTypes": []
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
|
-
"name": "
|
|
381
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__StateUtils",
|
|
382
382
|
"params": [],
|
|
383
383
|
"properties": [],
|
|
384
384
|
"genericTypes": []
|
|
385
385
|
},
|
|
386
386
|
{
|
|
387
|
-
"name": "
|
|
387
|
+
"name": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxUtils",
|
|
388
388
|
"params": [],
|
|
389
389
|
"properties": [],
|
|
390
390
|
"genericTypes": []
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
"params": [
|
|
400
400
|
{
|
|
401
401
|
"name": "tokenMint",
|
|
402
|
-
"type": "
|
|
402
|
+
"type": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20State"
|
|
403
403
|
},
|
|
404
404
|
{
|
|
405
405
|
"name": "issuerPubKey",
|
|
@@ -419,19 +419,19 @@
|
|
|
419
419
|
},
|
|
420
420
|
{
|
|
421
421
|
"name": "backtraceInfo",
|
|
422
|
-
"type": "
|
|
422
|
+
"type": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__BacktraceInfo"
|
|
423
423
|
},
|
|
424
424
|
{
|
|
425
425
|
"name": "__scrypt_ts_shPreimage",
|
|
426
|
-
"type": "
|
|
426
|
+
"type": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__SHPreimage"
|
|
427
427
|
},
|
|
428
428
|
{
|
|
429
429
|
"name": "__scrypt_ts_changeInfo",
|
|
430
|
-
"type": "
|
|
430
|
+
"type": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxOut"
|
|
431
431
|
},
|
|
432
432
|
{
|
|
433
433
|
"name": "__scrypt_ts_curState",
|
|
434
|
-
"type": "
|
|
434
|
+
"type": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterState"
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
437
|
"name": "__scrypt_ts_prevouts",
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
},
|
|
452
452
|
{
|
|
453
453
|
"name": "__scrypt_ts_prevTxHashPreimage",
|
|
454
|
-
"type": "
|
|
454
|
+
"type": "_opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxHashPreimage"
|
|
455
455
|
}
|
|
456
456
|
]
|
|
457
457
|
},
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
}
|
|
471
471
|
],
|
|
472
472
|
"stateProps": [],
|
|
473
|
-
"stateType": "
|
|
473
|
+
"stateType": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterState",
|
|
474
474
|
"buildType": "release",
|
|
475
475
|
"file": "..\\cat20ClosedMinter.scrypt",
|
|
476
476
|
"hex": "512097dfd76851bf465e8f715593b217714858bbe9570ff3bd5e33840a34e20ff0262102ba79df5f8ae7604a9830f03c7933028186aede0675a16f025dc4f8be8eec0382201008ce7480da41702918d1ec8e6849ba32b4d65b1e40dc669c31a1e6306b266c076f7063617401020000<ownerAddress><genesisOutpoint>78547a7572537a76537a7577770121790121790121790121790121790121790121790121790121790121790121790121790121790121795d798277549d5c79827701209d5b79827701209d5a79827701209d597900a26958798277549d5779827701209d5679827701209d5579827701209d5479827701209d5379827701209d527900a2697800a26976519c6476529c6751686476539c67516864760281009c67516864760282009c67516864760283009c675168695d795d797e5c797e5b797e5a79767600a2637609ffffffffffffffff00a16700686976586e8b806e7c7f75007f6b6d6d6d6c7e59797e58797e57797e56797e55797e54797e5379546e8b806e7c7f75007f6b6d6d6c7e5279546e8b806e7c7f75007f6b6d6d6c7e7854807e6b6d6d6d6d6d6d6d6c57797858795879210ac407f0e4bd44bfc207355a778b046225a7068fc59ee7eda43ad905aadbffc800206c266b30e6a1319c66dc401e5bd6b432ba49688eecd118297041da8074ce08105a7956795679aa7676517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e01007e817757795679567956795679537956795479577995939521414136d08c5ed2bf3ba048afe6dcaebafeffffffffffffffffffffffffffffff006e6e9776009f636e936776687777777b757c6e5296a0636e7c947b757c6853798277527982775379012080517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e01205279947f77545379935279930130787e527e54797e58797e527e53797e52797e57797e6b6d6d6d6d6d6d6c765779ac6b6d6d6d6d6d6c77695d79011c7978aa7888785878827d77527997009d6e7c966b6d6d6c775f7901227901197970aa5379886e9f69765479012478827d77527997009d6e7c967777779d537952798b0124957f7552790124957f7d7701207f75007f777801247f7501207f77768277549d767601007e817777726d726d7b755e79011e7954795279aa527988765379012078827d77527997009d6e7c967777779d6d755f79011d7954795279aa527988765379012078827d77527997009d6e7c967777779d6d75011379011379011b79011679011679788277528052797e78827752807e787e5279a95279a97ea97ea877770113797653798b0120957f7553790120957f775279886d755f795f795f795f79011779012079557955795579557953798277549d5279014878827d77527997009d6e7c967777775279014878827d77527997009d6e7c96777777557952790000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e55797e780000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e54797e53797eaa6b6d6d6d6c76700124950120937f7553790124957f77886d6d6d750124790130790130790130790130790130790130790130790130790130795f79011b790127798b0120957f750127790120957f77011a795b795b795b795b795b795b795b795b795b7959797656798b0148957f7556790148957f775a795a795a795a795379827701209d76827701209d707600a2637605ffffffff00a16700686976546e8b806e7c7f75007f6b6d6d6c777e787e52797600a2637605ffffffff00a16700686976546e8b806e7c7f75007f6b6d6d6c777e6b6d6d6c88597976567956795679567953798277549d5279014878827d77527997009d6e7c967777775279014878827d77527997009d6e7c96777777557952790000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e55797e780000527902fd009f637551675279030000019f6301fd7b757c52776752790500000000019f6301fe7b757c54776701ff7b757c587768686878537952796e8b806e7c7f75007f6b6d6d6c7e7777777e54797e53797eaa6b6d6d6d6c8853795a7901489558930120937f755a7901489558937f77785b797600a2637605ffffffff00a16700686976546e8b806e7c7f75007f6b6d6d6c777e787c726d726d726d726d726d726d765579876478547987675168696d6d6d6d6d6d6d0134795879787676827701219d750376a91478a97e0288ac7e7778886d013379013579ad6f7576827701209d6d0001337900a06378013479012779527982777882777801209d7601209d537900a2695379767600a2637609ffffffffffffffff00a16700686976586e8b806e7c7f75007f6b6d6d6d6c55797e53797e6b6d6d6d6c680138790138790138797876827d7701199c647601209c675168696d51787700a06952795d79886d7501387901387901387952798277528053797e5279827752807e52797e78827752807e787e5379a95379a97e5279a97ea97ea877777753790134796f7582777882777801209d7601209d537900a2695379767600a2637609ffffffffffffffff00a16700686976586e8b806e7c7f75007f6b6d6d6d6c55797e53797e6b6d6d6c775279787e011b7900a063011d79011c796e00a8527982777882777801209d7601209d537900a2695379767600a2637609ffffffffffffffff00a16700686976586e8b806e7c7f75007f6b6d6d6d6c55797e53797e6b6d6d6d6c776700687eaa012179876b6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6d6c77"
|
|
@@ -11,53 +11,53 @@ import "../../scrypt-ts-opcat/assets/smart-contract/builtin-libs/stateUtils.scry
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
contract
|
|
14
|
+
contract _opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinter {
|
|
15
15
|
bytes issuerAddress;
|
|
16
16
|
bytes genesisOutpoint;
|
|
17
17
|
constructor(bytes ownerAddress, bytes genesisOutpoint) {
|
|
18
18
|
this.issuerAddress = ownerAddress;
|
|
19
19
|
this.genesisOutpoint = genesisOutpoint;
|
|
20
20
|
}
|
|
21
|
-
public function mint(
|
|
22
|
-
require(Tx.checkPreimageSigHashType(
|
|
21
|
+
public function mint(_opcat_labs_cat_sdk_1_0_2__rs__CAT20State tokenMint, PubKey issuerPubKey, Sig issuerSig, int minterSatoshis, int tokenSatoshis, _opcat_labs_scrypt_ts_opcat_1_0_4__rs__BacktraceInfo backtraceInfo, _opcat_labs_scrypt_ts_opcat_1_0_4__rs__SHPreimage __scrypt_ts_shPreimage, _opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxOut __scrypt_ts_changeInfo, _opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterState __scrypt_ts_curState, bytes __scrypt_ts_prevouts, bytes __scrypt_ts_spentAmounts, bytes __scrypt_ts_spentDataHashes, bytes __scrypt_ts_spentScriptHashes, _opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxHashPreimage __scrypt_ts_prevTxHashPreimage) {
|
|
22
|
+
require(Tx.checkPreimageSigHashType(_opcat_labs_scrypt_ts_opcat_1_0_4__rs__ContextUtils.serializeSHPreimage(__scrypt_ts_shPreimage), SigHash.ALL));
|
|
23
23
|
|
|
24
|
-
int __scrypt_ts_inputCount =
|
|
24
|
+
int __scrypt_ts_inputCount = _opcat_labs_scrypt_ts_opcat_1_0_4__rs__ContextUtils.checkSpentAmounts(__scrypt_ts_spentAmounts, __scrypt_ts_shPreimage.hashSpentAmounts);
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
_opcat_labs_scrypt_ts_opcat_1_0_4__rs__Outpoint __scrypt_ts_prevout = _opcat_labs_scrypt_ts_opcat_1_0_4__rs__ContextUtils.checkPrevouts(__scrypt_ts_prevouts, __scrypt_ts_shPreimage.hashPrevouts, __scrypt_ts_shPreimage.inputIndex, __scrypt_ts_inputCount);
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
_opcat_labs_scrypt_ts_opcat_1_0_4__rs__ContextUtils.checkSpentScripts(__scrypt_ts_spentScriptHashes, __scrypt_ts_shPreimage.hashSpentScriptHashes, __scrypt_ts_inputCount);
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
_opcat_labs_scrypt_ts_opcat_1_0_4__rs__ContextUtils.checkSpentDataHashes(__scrypt_ts_spentDataHashes, __scrypt_ts_shPreimage.hashSpentDataHashes, __scrypt_ts_inputCount);
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterState __scrypt_ts_nextState = __scrypt_ts_curState;
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
_opcat_labs_scrypt_ts_opcat_1_0_4__rs__StateUtils.checkInputState(__scrypt_ts_shPreimage.inputIndex, _opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinter.stateHash(__scrypt_ts_curState), __scrypt_ts_spentDataHashes);
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
_opcat_labs_scrypt_ts_opcat_1_0_4__rs__Backtrace.checkPrevTxHashPreimage(__scrypt_ts_prevTxHashPreimage, __scrypt_ts_prevouts, __scrypt_ts_shPreimage.inputIndex);
|
|
37
37
|
|
|
38
38
|
bytes minterScript = __scrypt_ts_shPreimage.spentScriptHash;
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
_opcat_labs_scrypt_ts_opcat_1_0_4__rs__Backtrace.verifyFromOutpoint(backtraceInfo, this.genesisOutpoint, __scrypt_ts_spentScriptHashes[__scrypt_ts_shPreimage.inputIndex * 32 : (__scrypt_ts_shPreimage.inputIndex + 1) * 32], __scrypt_ts_prevTxHashPreimage.inputList);
|
|
40
|
+
_opcat_labs_cat_sdk_1_0_2__rs__OwnerUtils.checkUserOwner(issuerPubKey, this.issuerAddress);
|
|
41
41
|
require(checkSig(issuerSig, issuerPubKey));
|
|
42
|
-
|
|
42
|
+
_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinter.checkState(__scrypt_ts_nextState);
|
|
43
43
|
bytes minterOutput = b'';
|
|
44
|
-
if(minterSatoshis >
|
|
45
|
-
minterOutput =
|
|
44
|
+
if(minterSatoshis > _opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxUtils.ZERO_SATS) {
|
|
45
|
+
minterOutput = _opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxUtils.buildDataOutput(minterScript, minterSatoshis, __scrypt_ts_shPreimage.spentDataHash);
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
bytes tokenStateHash =
|
|
49
|
-
bytes tokenOutput =
|
|
47
|
+
_opcat_labs_cat_sdk_1_0_2__rs__CAT20StateLib.checkState(tokenMint);
|
|
48
|
+
bytes tokenStateHash = _opcat_labs_cat_sdk_1_0_2__rs__CAT20StateLib.stateHash(tokenMint);
|
|
49
|
+
bytes tokenOutput = _opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxUtils.buildDataOutput(__scrypt_ts_nextState.tokenScriptHash, tokenSatoshis, tokenStateHash);
|
|
50
50
|
require(hash256(minterOutput + tokenOutput +
|
|
51
|
-
(__scrypt_ts_changeInfo.satoshis > 0 ?
|
|
51
|
+
(__scrypt_ts_changeInfo.satoshis > 0 ? _opcat_labs_scrypt_ts_opcat_1_0_4__rs__TxUtils.buildOutput(__scrypt_ts_changeInfo.scriptHash, __scrypt_ts_changeInfo.satoshis) : b'')) == __scrypt_ts_shPreimage.hashOutputs);
|
|
52
52
|
}
|
|
53
|
-
static function checkState(
|
|
53
|
+
static function checkState(_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterState _state) : bool {
|
|
54
54
|
require(len(_state.tokenScriptHash) == 32);
|
|
55
55
|
return true;
|
|
56
56
|
}
|
|
57
|
-
static function serializeState(
|
|
57
|
+
static function serializeState(_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterState __scrypt_ts_curState): bytes {
|
|
58
58
|
return num2bin(len(__scrypt_ts_curState.tag), 2) + __scrypt_ts_curState.tag + num2bin(len(__scrypt_ts_curState.tokenScriptHash), 2) + __scrypt_ts_curState.tokenScriptHash + hash160(hash160(__scrypt_ts_curState.tag) + hash160(__scrypt_ts_curState.tokenScriptHash));
|
|
59
59
|
}
|
|
60
|
-
static function stateHash(
|
|
60
|
+
static function stateHash(_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterState __scrypt_ts_curState): bytes {
|
|
61
61
|
return sha256(num2bin(len(__scrypt_ts_curState.tag), 2) + __scrypt_ts_curState.tag + num2bin(len(__scrypt_ts_curState.tokenScriptHash), 2) + __scrypt_ts_curState.tokenScriptHash + hash160(hash160(__scrypt_ts_curState.tag) + hash160(__scrypt_ts_curState.tokenScriptHash)));
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 10,
|
|
3
3
|
"compilerVersion": "1.21.0+commit.2ada378",
|
|
4
|
-
"contract": "
|
|
4
|
+
"contract": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterMetadata",
|
|
5
5
|
"md5": "d41d8cd98f00b204e9800998ecf8427e",
|
|
6
6
|
"structs": [
|
|
7
7
|
{
|
|
8
|
-
"name": "
|
|
8
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20GuardConstState",
|
|
9
9
|
"params": [
|
|
10
10
|
{
|
|
11
11
|
"name": "tokenScriptHashes",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"genericTypes": []
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"name": "
|
|
30
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20State",
|
|
31
31
|
"params": [
|
|
32
32
|
{
|
|
33
33
|
"name": "tag",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"genericTypes": []
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
-
"name": "
|
|
48
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterState",
|
|
49
49
|
"params": [
|
|
50
50
|
{
|
|
51
51
|
"name": "tag",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"genericTypes": []
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
"name": "
|
|
62
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__ClosedMinterCAT20Meta",
|
|
63
63
|
"params": [
|
|
64
64
|
{
|
|
65
65
|
"name": "tag",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"genericTypes": []
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
|
-
"name": "
|
|
88
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__OpenMinterCAT20Meta",
|
|
89
89
|
"params": [
|
|
90
90
|
{
|
|
91
91
|
"name": "tag",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"genericTypes": []
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
|
-
"name": "
|
|
130
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20OpenMinterState",
|
|
131
131
|
"params": [
|
|
132
132
|
{
|
|
133
133
|
"name": "tag",
|
|
@@ -151,11 +151,11 @@
|
|
|
151
151
|
],
|
|
152
152
|
"library": [
|
|
153
153
|
{
|
|
154
|
-
"name": "
|
|
154
|
+
"name": "_opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterMetadata",
|
|
155
155
|
"params": [],
|
|
156
156
|
"properties": [],
|
|
157
157
|
"genericTypes": [],
|
|
158
|
-
"stateType": "
|
|
158
|
+
"stateType": "_opcat_labs_cat_sdk_1_0_2__rs__ClosedMinterCAT20Meta"
|
|
159
159
|
}
|
|
160
160
|
],
|
|
161
161
|
"alias": [],
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
}
|
|
167
167
|
],
|
|
168
168
|
"stateProps": [],
|
|
169
|
-
"stateType": "
|
|
169
|
+
"stateType": "_opcat_labs_cat_sdk_1_0_2__rs__ClosedMinterCAT20Meta",
|
|
170
170
|
"buildType": "release",
|
|
171
171
|
"file": "..\\cat20ClosedMinterMetadata.scrypt",
|
|
172
172
|
"hex": ""
|
|
@@ -3,11 +3,11 @@ import "../types.scrypt";
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
library
|
|
7
|
-
static function serializeState(
|
|
6
|
+
library _opcat_labs_cat_sdk_1_0_2__rs__CAT20ClosedMinterMetadata {
|
|
7
|
+
static function serializeState(_opcat_labs_cat_sdk_1_0_2__rs__ClosedMinterCAT20Meta __scrypt_ts_curState): bytes {
|
|
8
8
|
return num2bin(len(__scrypt_ts_curState.tag), 2) + __scrypt_ts_curState.tag + num2bin(len(__scrypt_ts_curState.name), 2) + __scrypt_ts_curState.name + num2bin(len(__scrypt_ts_curState.symbol), 2) + __scrypt_ts_curState.symbol + num2bin(len(pack(__scrypt_ts_curState.decimals)), 2) + pack(__scrypt_ts_curState.decimals) + num2bin(len(__scrypt_ts_curState.minterMd5), 2) + __scrypt_ts_curState.minterMd5 + hash160(hash160(__scrypt_ts_curState.tag) + hash160(__scrypt_ts_curState.name) + hash160(__scrypt_ts_curState.symbol) + hash160(pack(__scrypt_ts_curState.decimals)) + hash160(__scrypt_ts_curState.minterMd5));
|
|
9
9
|
}
|
|
10
|
-
static function stateHash(
|
|
10
|
+
static function stateHash(_opcat_labs_cat_sdk_1_0_2__rs__ClosedMinterCAT20Meta __scrypt_ts_curState): bytes {
|
|
11
11
|
return sha256(num2bin(len(__scrypt_ts_curState.tag), 2) + __scrypt_ts_curState.tag + num2bin(len(__scrypt_ts_curState.name), 2) + __scrypt_ts_curState.name + num2bin(len(__scrypt_ts_curState.symbol), 2) + __scrypt_ts_curState.symbol + num2bin(len(pack(__scrypt_ts_curState.decimals)), 2) + pack(__scrypt_ts_curState.decimals) + num2bin(len(__scrypt_ts_curState.minterMd5), 2) + __scrypt_ts_curState.minterMd5 + hash160(hash160(__scrypt_ts_curState.tag) + hash160(__scrypt_ts_curState.name) + hash160(__scrypt_ts_curState.symbol) + hash160(pack(__scrypt_ts_curState.decimals)) + hash160(__scrypt_ts_curState.minterMd5)));
|
|
12
12
|
}
|
|
13
13
|
}
|