@thalalabs/surf 0.0.13 → 0.0.15

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 (98) hide show
  1. package/.changeset/README.md +1 -1
  2. package/.github/dependabot.yml +3 -3
  3. package/.github/workflows/publish.yml +2 -2
  4. package/CHANGELOG.md +12 -0
  5. package/README.md +18 -11
  6. package/build/cjs/abi/aggregator.js +56 -74
  7. package/build/cjs/abi/aggregator.js.map +1 -1
  8. package/build/cjs/abi/aptos_coin.js +98 -125
  9. package/build/cjs/abi/aptos_coin.js.map +1 -1
  10. package/build/cjs/abi/coin.js +456 -587
  11. package/build/cjs/abi/coin.js.map +1 -1
  12. package/build/cjs/abi/event.js +66 -106
  13. package/build/cjs/abi/event.js.map +1 -1
  14. package/build/cjs/abi/fixed_point64.js +287 -320
  15. package/build/cjs/abi/fixed_point64.js.map +1 -1
  16. package/build/cjs/abi/guid.js +84 -129
  17. package/build/cjs/abi/guid.js.map +1 -1
  18. package/build/cjs/abi/optional_aggregator.js +79 -108
  19. package/build/cjs/abi/optional_aggregator.js.map +1 -1
  20. package/build/cjs/abi/table.js +131 -222
  21. package/build/cjs/abi/table.js.map +1 -1
  22. package/build/cjs/core/Client.js +6 -2
  23. package/build/cjs/core/Client.js.map +1 -1
  24. package/build/cjs/core/createEntryPayload.js.map +1 -1
  25. package/build/cjs/core/createViewPayload.js +10 -6
  26. package/build/cjs/core/createViewPayload.js.map +1 -1
  27. package/build/cjs/ensureTypes.js +11 -10
  28. package/build/cjs/ensureTypes.js.map +1 -1
  29. package/build/cjs/index.js.map +1 -1
  30. package/build/esm/abi/aggregator.js +56 -74
  31. package/build/esm/abi/aggregator.js.map +1 -1
  32. package/build/esm/abi/aptos_coin.js +98 -125
  33. package/build/esm/abi/aptos_coin.js.map +1 -1
  34. package/build/esm/abi/coin.js +456 -587
  35. package/build/esm/abi/coin.js.map +1 -1
  36. package/build/esm/abi/event.js +66 -106
  37. package/build/esm/abi/event.js.map +1 -1
  38. package/build/esm/abi/fixed_point64.js +287 -320
  39. package/build/esm/abi/fixed_point64.js.map +1 -1
  40. package/build/esm/abi/guid.js +84 -129
  41. package/build/esm/abi/guid.js.map +1 -1
  42. package/build/esm/abi/optional_aggregator.js +79 -108
  43. package/build/esm/abi/optional_aggregator.js.map +1 -1
  44. package/build/esm/abi/table.js +131 -222
  45. package/build/esm/abi/table.js.map +1 -1
  46. package/build/esm/core/Client.js +6 -2
  47. package/build/esm/core/Client.js.map +1 -1
  48. package/build/esm/core/createEntryPayload.js.map +1 -1
  49. package/build/esm/core/createViewPayload.js +10 -6
  50. package/build/esm/core/createViewPayload.js.map +1 -1
  51. package/build/esm/ensureTypes.js +11 -10
  52. package/build/esm/ensureTypes.js.map +1 -1
  53. package/build/esm/index.js +1 -1
  54. package/build/esm/index.js.map +1 -1
  55. package/build/types/abi/aggregator.d.ts.map +1 -1
  56. package/build/types/abi/aptos_coin.d.ts.map +1 -1
  57. package/build/types/abi/coin.d.ts.map +1 -1
  58. package/build/types/abi/event.d.ts.map +1 -1
  59. package/build/types/abi/fixed_point64.d.ts.map +1 -1
  60. package/build/types/abi/guid.d.ts.map +1 -1
  61. package/build/types/abi/optional_aggregator.d.ts.map +1 -1
  62. package/build/types/abi/table.d.ts.map +1 -1
  63. package/build/types/core/Client.d.ts.map +1 -1
  64. package/build/types/ensureTypes.d.ts.map +1 -1
  65. package/build/types/index.d.ts +2 -2
  66. package/build/types/index.d.ts.map +1 -1
  67. package/build/types/types/client/abiClient.d.ts +2 -0
  68. package/build/types/types/client/abiClient.d.ts.map +1 -1
  69. package/build/types/types/convertor/argsConvertor.d.ts +1 -1
  70. package/build/types/types/convertor/argsConvertor.d.ts.map +1 -1
  71. package/build/types/types/convertor/structConvertor.d.ts.map +1 -1
  72. package/build/types/types/moveTypes.d.ts.map +1 -1
  73. package/package.json +5 -5
  74. package/src/abi/aggregator.ts +73 -91
  75. package/src/abi/aptos_coin.ts +117 -144
  76. package/src/abi/coin.ts +646 -777
  77. package/src/abi/event.ts +83 -123
  78. package/src/abi/fixed_point64.ts +340 -373
  79. package/src/abi/guid.ts +102 -147
  80. package/src/abi/optional_aggregator.ts +103 -132
  81. package/src/abi/table.ts +181 -272
  82. package/src/core/Client.ts +6 -1
  83. package/src/core/__tests__/accountResource.test.ts +54 -14
  84. package/src/core/__tests__/createEntryPayload.test.ts +244 -250
  85. package/src/core/__tests__/createViewPayload.test.ts +44 -58
  86. package/src/core/__tests__/option.test.ts +1 -1
  87. package/src/core/__tests__/submitTransaction.test.ts +14 -0
  88. package/src/core/__tests__/useABI.test.ts +72 -63
  89. package/src/core/__tests__/view.test.ts +76 -60
  90. package/src/core/__tests__/view_vector.test.ts +14 -0
  91. package/src/core/createEntryPayload.ts +4 -5
  92. package/src/core/createViewPayload.ts +12 -8
  93. package/src/ensureTypes.ts +31 -28
  94. package/src/index.ts +8 -8
  95. package/src/types/client/abiClient.ts +2 -0
  96. package/src/types/convertor/argsConvertor.ts +3 -1
  97. package/src/types/convertor/structConvertor.ts +16 -15
  98. package/src/types/moveTypes.ts +5 -1
package/src/abi/coin.ts CHANGED
@@ -1,779 +1,648 @@
1
1
  export const COIN_ABI = {
2
- "address": "0x1",
3
- "name": "coin",
4
- "friends": [
5
- "0x1::aptos_coin",
6
- "0x1::genesis",
7
- "0x1::transaction_fee"
8
- ],
9
- "exposed_functions": [
10
- {
11
- "name": "allow_supply_upgrades",
12
- "visibility": "public",
13
- "is_entry": false,
14
- "is_view": false,
15
- "generic_type_params": [],
16
- "params": [
17
- "&signer",
18
- "bool"
19
- ],
20
- "return": []
21
- },
22
- {
23
- "name": "balance",
24
- "visibility": "public",
25
- "is_entry": false,
26
- "is_view": true,
27
- "generic_type_params": [
28
- {
29
- "constraints": []
30
- }
31
- ],
32
- "params": [
33
- "address"
34
- ],
35
- "return": [
36
- "u64"
37
- ]
38
- },
39
- {
40
- "name": "burn",
41
- "visibility": "public",
42
- "is_entry": false,
43
- "is_view": false,
44
- "generic_type_params": [
45
- {
46
- "constraints": []
47
- }
48
- ],
49
- "params": [
50
- "0x1::coin::Coin<T0>",
51
- "&0x1::coin::BurnCapability<T0>"
52
- ],
53
- "return": []
54
- },
55
- {
56
- "name": "burn_from",
57
- "visibility": "public",
58
- "is_entry": false,
59
- "is_view": false,
60
- "generic_type_params": [
61
- {
62
- "constraints": []
63
- }
64
- ],
65
- "params": [
66
- "address",
67
- "u64",
68
- "&0x1::coin::BurnCapability<T0>"
69
- ],
70
- "return": []
71
- },
72
- {
73
- "name": "collect_into_aggregatable_coin",
74
- "visibility": "friend",
75
- "is_entry": false,
76
- "is_view": false,
77
- "generic_type_params": [
78
- {
79
- "constraints": []
80
- }
81
- ],
82
- "params": [
83
- "address",
84
- "u64",
85
- "&mut 0x1::coin::AggregatableCoin<T0>"
86
- ],
87
- "return": []
88
- },
89
- {
90
- "name": "decimals",
91
- "visibility": "public",
92
- "is_entry": false,
93
- "is_view": true,
94
- "generic_type_params": [
95
- {
96
- "constraints": []
97
- }
98
- ],
99
- "params": [],
100
- "return": [
101
- "u8"
102
- ]
103
- },
104
- {
105
- "name": "deposit",
106
- "visibility": "public",
107
- "is_entry": false,
108
- "is_view": false,
109
- "generic_type_params": [
110
- {
111
- "constraints": []
112
- }
113
- ],
114
- "params": [
115
- "address",
116
- "0x1::coin::Coin<T0>"
117
- ],
118
- "return": []
119
- },
120
- {
121
- "name": "destroy_burn_cap",
122
- "visibility": "public",
123
- "is_entry": false,
124
- "is_view": false,
125
- "generic_type_params": [
126
- {
127
- "constraints": []
128
- }
129
- ],
130
- "params": [
131
- "0x1::coin::BurnCapability<T0>"
132
- ],
133
- "return": []
134
- },
135
- {
136
- "name": "destroy_freeze_cap",
137
- "visibility": "public",
138
- "is_entry": false,
139
- "is_view": false,
140
- "generic_type_params": [
141
- {
142
- "constraints": []
143
- }
144
- ],
145
- "params": [
146
- "0x1::coin::FreezeCapability<T0>"
147
- ],
148
- "return": []
149
- },
150
- {
151
- "name": "destroy_mint_cap",
152
- "visibility": "public",
153
- "is_entry": false,
154
- "is_view": false,
155
- "generic_type_params": [
156
- {
157
- "constraints": []
158
- }
159
- ],
160
- "params": [
161
- "0x1::coin::MintCapability<T0>"
162
- ],
163
- "return": []
164
- },
165
- {
166
- "name": "destroy_zero",
167
- "visibility": "public",
168
- "is_entry": false,
169
- "is_view": false,
170
- "generic_type_params": [
171
- {
172
- "constraints": []
173
- }
174
- ],
175
- "params": [
176
- "0x1::coin::Coin<T0>"
177
- ],
178
- "return": []
179
- },
180
- {
181
- "name": "drain_aggregatable_coin",
182
- "visibility": "friend",
183
- "is_entry": false,
184
- "is_view": false,
185
- "generic_type_params": [
186
- {
187
- "constraints": []
188
- }
189
- ],
190
- "params": [
191
- "&mut 0x1::coin::AggregatableCoin<T0>"
192
- ],
193
- "return": [
194
- "0x1::coin::Coin<T0>"
195
- ]
196
- },
197
- {
198
- "name": "extract",
199
- "visibility": "public",
200
- "is_entry": false,
201
- "is_view": false,
202
- "generic_type_params": [
203
- {
204
- "constraints": []
205
- }
206
- ],
207
- "params": [
208
- "&mut 0x1::coin::Coin<T0>",
209
- "u64"
210
- ],
211
- "return": [
212
- "0x1::coin::Coin<T0>"
213
- ]
214
- },
215
- {
216
- "name": "extract_all",
217
- "visibility": "public",
218
- "is_entry": false,
219
- "is_view": false,
220
- "generic_type_params": [
221
- {
222
- "constraints": []
223
- }
224
- ],
225
- "params": [
226
- "&mut 0x1::coin::Coin<T0>"
227
- ],
228
- "return": [
229
- "0x1::coin::Coin<T0>"
230
- ]
231
- },
232
- {
233
- "name": "freeze_coin_store",
234
- "visibility": "public",
235
- "is_entry": true,
236
- "is_view": false,
237
- "generic_type_params": [
238
- {
239
- "constraints": []
240
- }
241
- ],
242
- "params": [
243
- "address",
244
- "&0x1::coin::FreezeCapability<T0>"
245
- ],
246
- "return": []
247
- },
248
- {
249
- "name": "initialize",
250
- "visibility": "public",
251
- "is_entry": false,
252
- "is_view": false,
253
- "generic_type_params": [
254
- {
255
- "constraints": []
256
- }
257
- ],
258
- "params": [
259
- "&signer",
260
- "0x1::string::String",
261
- "0x1::string::String",
262
- "u8",
263
- "bool"
264
- ],
265
- "return": [
266
- "0x1::coin::BurnCapability<T0>",
267
- "0x1::coin::FreezeCapability<T0>",
268
- "0x1::coin::MintCapability<T0>"
269
- ]
270
- },
271
- {
272
- "name": "initialize_aggregatable_coin",
273
- "visibility": "friend",
274
- "is_entry": false,
275
- "is_view": false,
276
- "generic_type_params": [
277
- {
278
- "constraints": []
279
- }
280
- ],
281
- "params": [
282
- "&signer"
283
- ],
284
- "return": [
285
- "0x1::coin::AggregatableCoin<T0>"
286
- ]
287
- },
288
- {
289
- "name": "initialize_supply_config",
290
- "visibility": "friend",
291
- "is_entry": false,
292
- "is_view": false,
293
- "generic_type_params": [],
294
- "params": [
295
- "&signer"
296
- ],
297
- "return": []
298
- },
299
- {
300
- "name": "initialize_with_parallelizable_supply",
301
- "visibility": "friend",
302
- "is_entry": false,
303
- "is_view": false,
304
- "generic_type_params": [
305
- {
306
- "constraints": []
307
- }
308
- ],
309
- "params": [
310
- "&signer",
311
- "0x1::string::String",
312
- "0x1::string::String",
313
- "u8",
314
- "bool"
315
- ],
316
- "return": [
317
- "0x1::coin::BurnCapability<T0>",
318
- "0x1::coin::FreezeCapability<T0>",
319
- "0x1::coin::MintCapability<T0>"
320
- ]
321
- },
322
- {
323
- "name": "is_account_registered",
324
- "visibility": "public",
325
- "is_entry": false,
326
- "is_view": true,
327
- "generic_type_params": [
328
- {
329
- "constraints": []
330
- }
331
- ],
332
- "params": [
333
- "address"
334
- ],
335
- "return": [
336
- "bool"
337
- ]
338
- },
339
- {
340
- "name": "is_aggregatable_coin_zero",
341
- "visibility": "friend",
342
- "is_entry": false,
343
- "is_view": false,
344
- "generic_type_params": [
345
- {
346
- "constraints": []
347
- }
348
- ],
349
- "params": [
350
- "&0x1::coin::AggregatableCoin<T0>"
351
- ],
352
- "return": [
353
- "bool"
354
- ]
355
- },
356
- {
357
- "name": "is_coin_initialized",
358
- "visibility": "public",
359
- "is_entry": false,
360
- "is_view": true,
361
- "generic_type_params": [
362
- {
363
- "constraints": []
364
- }
365
- ],
366
- "params": [],
367
- "return": [
368
- "bool"
369
- ]
370
- },
371
- {
372
- "name": "merge",
373
- "visibility": "public",
374
- "is_entry": false,
375
- "is_view": false,
376
- "generic_type_params": [
377
- {
378
- "constraints": []
379
- }
380
- ],
381
- "params": [
382
- "&mut 0x1::coin::Coin<T0>",
383
- "0x1::coin::Coin<T0>"
384
- ],
385
- "return": []
386
- },
387
- {
388
- "name": "merge_aggregatable_coin",
389
- "visibility": "friend",
390
- "is_entry": false,
391
- "is_view": false,
392
- "generic_type_params": [
393
- {
394
- "constraints": []
395
- }
396
- ],
397
- "params": [
398
- "&mut 0x1::coin::AggregatableCoin<T0>",
399
- "0x1::coin::Coin<T0>"
400
- ],
401
- "return": []
402
- },
403
- {
404
- "name": "mint",
405
- "visibility": "public",
406
- "is_entry": false,
407
- "is_view": false,
408
- "generic_type_params": [
409
- {
410
- "constraints": []
411
- }
412
- ],
413
- "params": [
414
- "u64",
415
- "&0x1::coin::MintCapability<T0>"
416
- ],
417
- "return": [
418
- "0x1::coin::Coin<T0>"
419
- ]
420
- },
421
- {
422
- "name": "name",
423
- "visibility": "public",
424
- "is_entry": false,
425
- "is_view": true,
426
- "generic_type_params": [
427
- {
428
- "constraints": []
429
- }
430
- ],
431
- "params": [],
432
- "return": [
433
- "0x1::string::String"
434
- ]
435
- },
436
- {
437
- "name": "register",
438
- "visibility": "public",
439
- "is_entry": false,
440
- "is_view": false,
441
- "generic_type_params": [
442
- {
443
- "constraints": []
444
- }
445
- ],
446
- "params": [
447
- "&signer"
448
- ],
449
- "return": []
450
- },
451
- {
452
- "name": "supply",
453
- "visibility": "public",
454
- "is_entry": false,
455
- "is_view": true,
456
- "generic_type_params": [
457
- {
458
- "constraints": []
459
- }
460
- ],
461
- "params": [],
462
- "return": [
463
- "0x1::option::Option<u128>"
464
- ]
465
- },
466
- {
467
- "name": "symbol",
468
- "visibility": "public",
469
- "is_entry": false,
470
- "is_view": true,
471
- "generic_type_params": [
472
- {
473
- "constraints": []
474
- }
475
- ],
476
- "params": [],
477
- "return": [
478
- "0x1::string::String"
479
- ]
480
- },
481
- {
482
- "name": "transfer",
483
- "visibility": "public",
484
- "is_entry": true,
485
- "is_view": false,
486
- "generic_type_params": [
487
- {
488
- "constraints": []
489
- }
490
- ],
491
- "params": [
492
- "&signer",
493
- "address",
494
- "u64"
495
- ],
496
- "return": []
497
- },
498
- {
499
- "name": "unfreeze_coin_store",
500
- "visibility": "public",
501
- "is_entry": true,
502
- "is_view": false,
503
- "generic_type_params": [
504
- {
505
- "constraints": []
506
- }
507
- ],
508
- "params": [
509
- "address",
510
- "&0x1::coin::FreezeCapability<T0>"
511
- ],
512
- "return": []
513
- },
514
- {
515
- "name": "upgrade_supply",
516
- "visibility": "public",
517
- "is_entry": true,
518
- "is_view": false,
519
- "generic_type_params": [
520
- {
521
- "constraints": []
522
- }
523
- ],
524
- "params": [
525
- "&signer"
526
- ],
527
- "return": []
528
- },
529
- {
530
- "name": "value",
531
- "visibility": "public",
532
- "is_entry": false,
533
- "is_view": false,
534
- "generic_type_params": [
535
- {
536
- "constraints": []
537
- }
538
- ],
539
- "params": [
540
- "&0x1::coin::Coin<T0>"
541
- ],
542
- "return": [
543
- "u64"
544
- ]
545
- },
546
- {
547
- "name": "withdraw",
548
- "visibility": "public",
549
- "is_entry": false,
550
- "is_view": false,
551
- "generic_type_params": [
552
- {
553
- "constraints": []
554
- }
555
- ],
556
- "params": [
557
- "&signer",
558
- "u64"
559
- ],
560
- "return": [
561
- "0x1::coin::Coin<T0>"
562
- ]
563
- },
564
- {
565
- "name": "zero",
566
- "visibility": "public",
567
- "is_entry": false,
568
- "is_view": false,
569
- "generic_type_params": [
570
- {
571
- "constraints": []
572
- }
573
- ],
574
- "params": [],
575
- "return": [
576
- "0x1::coin::Coin<T0>"
577
- ]
578
- }
579
- ],
580
- "structs": [
581
- {
582
- "name": "AggregatableCoin",
583
- "is_native": false,
584
- "abilities": [
585
- "store"
586
- ],
587
- "generic_type_params": [
588
- {
589
- "constraints": []
590
- }
591
- ],
592
- "fields": [
593
- {
594
- "name": "value",
595
- "type": "0x1::aggregator::Aggregator"
596
- }
597
- ]
598
- },
599
- {
600
- "name": "BurnCapability",
601
- "is_native": false,
602
- "abilities": [
603
- "copy",
604
- "store"
605
- ],
606
- "generic_type_params": [
607
- {
608
- "constraints": []
609
- }
610
- ],
611
- "fields": [
612
- {
613
- "name": "dummy_field",
614
- "type": "bool"
615
- }
616
- ]
617
- },
618
- {
619
- "name": "Coin",
620
- "is_native": false,
621
- "abilities": [
622
- "store"
623
- ],
624
- "generic_type_params": [
625
- {
626
- "constraints": []
627
- }
628
- ],
629
- "fields": [
630
- {
631
- "name": "value",
632
- "type": "u64"
633
- }
634
- ]
635
- },
636
- {
637
- "name": "CoinInfo",
638
- "is_native": false,
639
- "abilities": [
640
- "key"
641
- ],
642
- "generic_type_params": [
643
- {
644
- "constraints": []
645
- }
646
- ],
647
- "fields": [
648
- {
649
- "name": "name",
650
- "type": "0x1::string::String"
651
- },
652
- {
653
- "name": "symbol",
654
- "type": "0x1::string::String"
655
- },
656
- {
657
- "name": "decimals",
658
- "type": "u8"
659
- },
660
- {
661
- "name": "supply",
662
- "type": "0x1::option::Option<0x1::optional_aggregator::OptionalAggregator>"
663
- }
664
- ]
665
- },
666
- {
667
- "name": "CoinStore",
668
- "is_native": false,
669
- "abilities": [
670
- "key"
671
- ],
672
- "generic_type_params": [
673
- {
674
- "constraints": []
675
- }
676
- ],
677
- "fields": [
678
- {
679
- "name": "coin",
680
- "type": "0x1::coin::Coin<T0>"
681
- },
682
- {
683
- "name": "frozen",
684
- "type": "bool"
685
- },
686
- {
687
- "name": "deposit_events",
688
- "type": "0x1::event::EventHandle<0x1::coin::DepositEvent>"
689
- },
690
- {
691
- "name": "withdraw_events",
692
- "type": "0x1::event::EventHandle<0x1::coin::WithdrawEvent>"
693
- }
694
- ]
695
- },
696
- {
697
- "name": "DepositEvent",
698
- "is_native": false,
699
- "abilities": [
700
- "drop",
701
- "store"
702
- ],
703
- "generic_type_params": [],
704
- "fields": [
705
- {
706
- "name": "amount",
707
- "type": "u64"
708
- }
709
- ]
710
- },
711
- {
712
- "name": "FreezeCapability",
713
- "is_native": false,
714
- "abilities": [
715
- "copy",
716
- "store"
717
- ],
718
- "generic_type_params": [
719
- {
720
- "constraints": []
721
- }
722
- ],
723
- "fields": [
724
- {
725
- "name": "dummy_field",
726
- "type": "bool"
727
- }
728
- ]
729
- },
730
- {
731
- "name": "MintCapability",
732
- "is_native": false,
733
- "abilities": [
734
- "copy",
735
- "store"
736
- ],
737
- "generic_type_params": [
738
- {
739
- "constraints": []
740
- }
741
- ],
742
- "fields": [
743
- {
744
- "name": "dummy_field",
745
- "type": "bool"
746
- }
747
- ]
748
- },
749
- {
750
- "name": "SupplyConfig",
751
- "is_native": false,
752
- "abilities": [
753
- "key"
754
- ],
755
- "generic_type_params": [],
756
- "fields": [
757
- {
758
- "name": "allow_upgrades",
759
- "type": "bool"
760
- }
761
- ]
762
- },
763
- {
764
- "name": "WithdrawEvent",
765
- "is_native": false,
766
- "abilities": [
767
- "drop",
768
- "store"
769
- ],
770
- "generic_type_params": [],
771
- "fields": [
772
- {
773
- "name": "amount",
774
- "type": "u64"
775
- }
776
- ]
777
- }
778
- ]
2
+ address: '0x1',
3
+ name: 'coin',
4
+ friends: ['0x1::aptos_coin', '0x1::genesis', '0x1::transaction_fee'],
5
+ exposed_functions: [
6
+ {
7
+ name: 'allow_supply_upgrades',
8
+ visibility: 'public',
9
+ is_entry: false,
10
+ is_view: false,
11
+ generic_type_params: [],
12
+ params: ['&signer', 'bool'],
13
+ return: [],
14
+ },
15
+ {
16
+ name: 'balance',
17
+ visibility: 'public',
18
+ is_entry: false,
19
+ is_view: true,
20
+ generic_type_params: [
21
+ {
22
+ constraints: [],
23
+ },
24
+ ],
25
+ params: ['address'],
26
+ return: ['u64'],
27
+ },
28
+ {
29
+ name: 'burn',
30
+ visibility: 'public',
31
+ is_entry: false,
32
+ is_view: false,
33
+ generic_type_params: [
34
+ {
35
+ constraints: [],
36
+ },
37
+ ],
38
+ params: ['0x1::coin::Coin<T0>', '&0x1::coin::BurnCapability<T0>'],
39
+ return: [],
40
+ },
41
+ {
42
+ name: 'burn_from',
43
+ visibility: 'public',
44
+ is_entry: false,
45
+ is_view: false,
46
+ generic_type_params: [
47
+ {
48
+ constraints: [],
49
+ },
50
+ ],
51
+ params: ['address', 'u64', '&0x1::coin::BurnCapability<T0>'],
52
+ return: [],
53
+ },
54
+ {
55
+ name: 'collect_into_aggregatable_coin',
56
+ visibility: 'friend',
57
+ is_entry: false,
58
+ is_view: false,
59
+ generic_type_params: [
60
+ {
61
+ constraints: [],
62
+ },
63
+ ],
64
+ params: ['address', 'u64', '&mut 0x1::coin::AggregatableCoin<T0>'],
65
+ return: [],
66
+ },
67
+ {
68
+ name: 'decimals',
69
+ visibility: 'public',
70
+ is_entry: false,
71
+ is_view: true,
72
+ generic_type_params: [
73
+ {
74
+ constraints: [],
75
+ },
76
+ ],
77
+ params: [],
78
+ return: ['u8'],
79
+ },
80
+ {
81
+ name: 'deposit',
82
+ visibility: 'public',
83
+ is_entry: false,
84
+ is_view: false,
85
+ generic_type_params: [
86
+ {
87
+ constraints: [],
88
+ },
89
+ ],
90
+ params: ['address', '0x1::coin::Coin<T0>'],
91
+ return: [],
92
+ },
93
+ {
94
+ name: 'destroy_burn_cap',
95
+ visibility: 'public',
96
+ is_entry: false,
97
+ is_view: false,
98
+ generic_type_params: [
99
+ {
100
+ constraints: [],
101
+ },
102
+ ],
103
+ params: ['0x1::coin::BurnCapability<T0>'],
104
+ return: [],
105
+ },
106
+ {
107
+ name: 'destroy_freeze_cap',
108
+ visibility: 'public',
109
+ is_entry: false,
110
+ is_view: false,
111
+ generic_type_params: [
112
+ {
113
+ constraints: [],
114
+ },
115
+ ],
116
+ params: ['0x1::coin::FreezeCapability<T0>'],
117
+ return: [],
118
+ },
119
+ {
120
+ name: 'destroy_mint_cap',
121
+ visibility: 'public',
122
+ is_entry: false,
123
+ is_view: false,
124
+ generic_type_params: [
125
+ {
126
+ constraints: [],
127
+ },
128
+ ],
129
+ params: ['0x1::coin::MintCapability<T0>'],
130
+ return: [],
131
+ },
132
+ {
133
+ name: 'destroy_zero',
134
+ visibility: 'public',
135
+ is_entry: false,
136
+ is_view: false,
137
+ generic_type_params: [
138
+ {
139
+ constraints: [],
140
+ },
141
+ ],
142
+ params: ['0x1::coin::Coin<T0>'],
143
+ return: [],
144
+ },
145
+ {
146
+ name: 'drain_aggregatable_coin',
147
+ visibility: 'friend',
148
+ is_entry: false,
149
+ is_view: false,
150
+ generic_type_params: [
151
+ {
152
+ constraints: [],
153
+ },
154
+ ],
155
+ params: ['&mut 0x1::coin::AggregatableCoin<T0>'],
156
+ return: ['0x1::coin::Coin<T0>'],
157
+ },
158
+ {
159
+ name: 'extract',
160
+ visibility: 'public',
161
+ is_entry: false,
162
+ is_view: false,
163
+ generic_type_params: [
164
+ {
165
+ constraints: [],
166
+ },
167
+ ],
168
+ params: ['&mut 0x1::coin::Coin<T0>', 'u64'],
169
+ return: ['0x1::coin::Coin<T0>'],
170
+ },
171
+ {
172
+ name: 'extract_all',
173
+ visibility: 'public',
174
+ is_entry: false,
175
+ is_view: false,
176
+ generic_type_params: [
177
+ {
178
+ constraints: [],
179
+ },
180
+ ],
181
+ params: ['&mut 0x1::coin::Coin<T0>'],
182
+ return: ['0x1::coin::Coin<T0>'],
183
+ },
184
+ {
185
+ name: 'freeze_coin_store',
186
+ visibility: 'public',
187
+ is_entry: true,
188
+ is_view: false,
189
+ generic_type_params: [
190
+ {
191
+ constraints: [],
192
+ },
193
+ ],
194
+ params: ['address', '&0x1::coin::FreezeCapability<T0>'],
195
+ return: [],
196
+ },
197
+ {
198
+ name: 'initialize',
199
+ visibility: 'public',
200
+ is_entry: false,
201
+ is_view: false,
202
+ generic_type_params: [
203
+ {
204
+ constraints: [],
205
+ },
206
+ ],
207
+ params: [
208
+ '&signer',
209
+ '0x1::string::String',
210
+ '0x1::string::String',
211
+ 'u8',
212
+ 'bool',
213
+ ],
214
+ return: [
215
+ '0x1::coin::BurnCapability<T0>',
216
+ '0x1::coin::FreezeCapability<T0>',
217
+ '0x1::coin::MintCapability<T0>',
218
+ ],
219
+ },
220
+ {
221
+ name: 'initialize_aggregatable_coin',
222
+ visibility: 'friend',
223
+ is_entry: false,
224
+ is_view: false,
225
+ generic_type_params: [
226
+ {
227
+ constraints: [],
228
+ },
229
+ ],
230
+ params: ['&signer'],
231
+ return: ['0x1::coin::AggregatableCoin<T0>'],
232
+ },
233
+ {
234
+ name: 'initialize_supply_config',
235
+ visibility: 'friend',
236
+ is_entry: false,
237
+ is_view: false,
238
+ generic_type_params: [],
239
+ params: ['&signer'],
240
+ return: [],
241
+ },
242
+ {
243
+ name: 'initialize_with_parallelizable_supply',
244
+ visibility: 'friend',
245
+ is_entry: false,
246
+ is_view: false,
247
+ generic_type_params: [
248
+ {
249
+ constraints: [],
250
+ },
251
+ ],
252
+ params: [
253
+ '&signer',
254
+ '0x1::string::String',
255
+ '0x1::string::String',
256
+ 'u8',
257
+ 'bool',
258
+ ],
259
+ return: [
260
+ '0x1::coin::BurnCapability<T0>',
261
+ '0x1::coin::FreezeCapability<T0>',
262
+ '0x1::coin::MintCapability<T0>',
263
+ ],
264
+ },
265
+ {
266
+ name: 'is_account_registered',
267
+ visibility: 'public',
268
+ is_entry: false,
269
+ is_view: true,
270
+ generic_type_params: [
271
+ {
272
+ constraints: [],
273
+ },
274
+ ],
275
+ params: ['address'],
276
+ return: ['bool'],
277
+ },
278
+ {
279
+ name: 'is_aggregatable_coin_zero',
280
+ visibility: 'friend',
281
+ is_entry: false,
282
+ is_view: false,
283
+ generic_type_params: [
284
+ {
285
+ constraints: [],
286
+ },
287
+ ],
288
+ params: ['&0x1::coin::AggregatableCoin<T0>'],
289
+ return: ['bool'],
290
+ },
291
+ {
292
+ name: 'is_coin_initialized',
293
+ visibility: 'public',
294
+ is_entry: false,
295
+ is_view: true,
296
+ generic_type_params: [
297
+ {
298
+ constraints: [],
299
+ },
300
+ ],
301
+ params: [],
302
+ return: ['bool'],
303
+ },
304
+ {
305
+ name: 'merge',
306
+ visibility: 'public',
307
+ is_entry: false,
308
+ is_view: false,
309
+ generic_type_params: [
310
+ {
311
+ constraints: [],
312
+ },
313
+ ],
314
+ params: ['&mut 0x1::coin::Coin<T0>', '0x1::coin::Coin<T0>'],
315
+ return: [],
316
+ },
317
+ {
318
+ name: 'merge_aggregatable_coin',
319
+ visibility: 'friend',
320
+ is_entry: false,
321
+ is_view: false,
322
+ generic_type_params: [
323
+ {
324
+ constraints: [],
325
+ },
326
+ ],
327
+ params: ['&mut 0x1::coin::AggregatableCoin<T0>', '0x1::coin::Coin<T0>'],
328
+ return: [],
329
+ },
330
+ {
331
+ name: 'mint',
332
+ visibility: 'public',
333
+ is_entry: false,
334
+ is_view: false,
335
+ generic_type_params: [
336
+ {
337
+ constraints: [],
338
+ },
339
+ ],
340
+ params: ['u64', '&0x1::coin::MintCapability<T0>'],
341
+ return: ['0x1::coin::Coin<T0>'],
342
+ },
343
+ {
344
+ name: 'name',
345
+ visibility: 'public',
346
+ is_entry: false,
347
+ is_view: true,
348
+ generic_type_params: [
349
+ {
350
+ constraints: [],
351
+ },
352
+ ],
353
+ params: [],
354
+ return: ['0x1::string::String'],
355
+ },
356
+ {
357
+ name: 'register',
358
+ visibility: 'public',
359
+ is_entry: false,
360
+ is_view: false,
361
+ generic_type_params: [
362
+ {
363
+ constraints: [],
364
+ },
365
+ ],
366
+ params: ['&signer'],
367
+ return: [],
368
+ },
369
+ {
370
+ name: 'supply',
371
+ visibility: 'public',
372
+ is_entry: false,
373
+ is_view: true,
374
+ generic_type_params: [
375
+ {
376
+ constraints: [],
377
+ },
378
+ ],
379
+ params: [],
380
+ return: ['0x1::option::Option<u128>'],
381
+ },
382
+ {
383
+ name: 'symbol',
384
+ visibility: 'public',
385
+ is_entry: false,
386
+ is_view: true,
387
+ generic_type_params: [
388
+ {
389
+ constraints: [],
390
+ },
391
+ ],
392
+ params: [],
393
+ return: ['0x1::string::String'],
394
+ },
395
+ {
396
+ name: 'transfer',
397
+ visibility: 'public',
398
+ is_entry: true,
399
+ is_view: false,
400
+ generic_type_params: [
401
+ {
402
+ constraints: [],
403
+ },
404
+ ],
405
+ params: ['&signer', 'address', 'u64'],
406
+ return: [],
407
+ },
408
+ {
409
+ name: 'unfreeze_coin_store',
410
+ visibility: 'public',
411
+ is_entry: true,
412
+ is_view: false,
413
+ generic_type_params: [
414
+ {
415
+ constraints: [],
416
+ },
417
+ ],
418
+ params: ['address', '&0x1::coin::FreezeCapability<T0>'],
419
+ return: [],
420
+ },
421
+ {
422
+ name: 'upgrade_supply',
423
+ visibility: 'public',
424
+ is_entry: true,
425
+ is_view: false,
426
+ generic_type_params: [
427
+ {
428
+ constraints: [],
429
+ },
430
+ ],
431
+ params: ['&signer'],
432
+ return: [],
433
+ },
434
+ {
435
+ name: 'value',
436
+ visibility: 'public',
437
+ is_entry: false,
438
+ is_view: false,
439
+ generic_type_params: [
440
+ {
441
+ constraints: [],
442
+ },
443
+ ],
444
+ params: ['&0x1::coin::Coin<T0>'],
445
+ return: ['u64'],
446
+ },
447
+ {
448
+ name: 'withdraw',
449
+ visibility: 'public',
450
+ is_entry: false,
451
+ is_view: false,
452
+ generic_type_params: [
453
+ {
454
+ constraints: [],
455
+ },
456
+ ],
457
+ params: ['&signer', 'u64'],
458
+ return: ['0x1::coin::Coin<T0>'],
459
+ },
460
+ {
461
+ name: 'zero',
462
+ visibility: 'public',
463
+ is_entry: false,
464
+ is_view: false,
465
+ generic_type_params: [
466
+ {
467
+ constraints: [],
468
+ },
469
+ ],
470
+ params: [],
471
+ return: ['0x1::coin::Coin<T0>'],
472
+ },
473
+ ],
474
+ structs: [
475
+ {
476
+ name: 'AggregatableCoin',
477
+ is_native: false,
478
+ abilities: ['store'],
479
+ generic_type_params: [
480
+ {
481
+ constraints: [],
482
+ },
483
+ ],
484
+ fields: [
485
+ {
486
+ name: 'value',
487
+ type: '0x1::aggregator::Aggregator',
488
+ },
489
+ ],
490
+ },
491
+ {
492
+ name: 'BurnCapability',
493
+ is_native: false,
494
+ abilities: ['copy', 'store'],
495
+ generic_type_params: [
496
+ {
497
+ constraints: [],
498
+ },
499
+ ],
500
+ fields: [
501
+ {
502
+ name: 'dummy_field',
503
+ type: 'bool',
504
+ },
505
+ ],
506
+ },
507
+ {
508
+ name: 'Coin',
509
+ is_native: false,
510
+ abilities: ['store'],
511
+ generic_type_params: [
512
+ {
513
+ constraints: [],
514
+ },
515
+ ],
516
+ fields: [
517
+ {
518
+ name: 'value',
519
+ type: 'u64',
520
+ },
521
+ ],
522
+ },
523
+ {
524
+ name: 'CoinInfo',
525
+ is_native: false,
526
+ abilities: ['key'],
527
+ generic_type_params: [
528
+ {
529
+ constraints: [],
530
+ },
531
+ ],
532
+ fields: [
533
+ {
534
+ name: 'name',
535
+ type: '0x1::string::String',
536
+ },
537
+ {
538
+ name: 'symbol',
539
+ type: '0x1::string::String',
540
+ },
541
+ {
542
+ name: 'decimals',
543
+ type: 'u8',
544
+ },
545
+ {
546
+ name: 'supply',
547
+ type: '0x1::option::Option<0x1::optional_aggregator::OptionalAggregator>',
548
+ },
549
+ ],
550
+ },
551
+ {
552
+ name: 'CoinStore',
553
+ is_native: false,
554
+ abilities: ['key'],
555
+ generic_type_params: [
556
+ {
557
+ constraints: [],
558
+ },
559
+ ],
560
+ fields: [
561
+ {
562
+ name: 'coin',
563
+ type: '0x1::coin::Coin<T0>',
564
+ },
565
+ {
566
+ name: 'frozen',
567
+ type: 'bool',
568
+ },
569
+ {
570
+ name: 'deposit_events',
571
+ type: '0x1::event::EventHandle<0x1::coin::DepositEvent>',
572
+ },
573
+ {
574
+ name: 'withdraw_events',
575
+ type: '0x1::event::EventHandle<0x1::coin::WithdrawEvent>',
576
+ },
577
+ ],
578
+ },
579
+ {
580
+ name: 'DepositEvent',
581
+ is_native: false,
582
+ abilities: ['drop', 'store'],
583
+ generic_type_params: [],
584
+ fields: [
585
+ {
586
+ name: 'amount',
587
+ type: 'u64',
588
+ },
589
+ ],
590
+ },
591
+ {
592
+ name: 'FreezeCapability',
593
+ is_native: false,
594
+ abilities: ['copy', 'store'],
595
+ generic_type_params: [
596
+ {
597
+ constraints: [],
598
+ },
599
+ ],
600
+ fields: [
601
+ {
602
+ name: 'dummy_field',
603
+ type: 'bool',
604
+ },
605
+ ],
606
+ },
607
+ {
608
+ name: 'MintCapability',
609
+ is_native: false,
610
+ abilities: ['copy', 'store'],
611
+ generic_type_params: [
612
+ {
613
+ constraints: [],
614
+ },
615
+ ],
616
+ fields: [
617
+ {
618
+ name: 'dummy_field',
619
+ type: 'bool',
620
+ },
621
+ ],
622
+ },
623
+ {
624
+ name: 'SupplyConfig',
625
+ is_native: false,
626
+ abilities: ['key'],
627
+ generic_type_params: [],
628
+ fields: [
629
+ {
630
+ name: 'allow_upgrades',
631
+ type: 'bool',
632
+ },
633
+ ],
634
+ },
635
+ {
636
+ name: 'WithdrawEvent',
637
+ is_native: false,
638
+ abilities: ['drop', 'store'],
639
+ generic_type_params: [],
640
+ fields: [
641
+ {
642
+ name: 'amount',
643
+ type: 'u64',
644
+ },
645
+ ],
646
+ },
647
+ ],
779
648
  } as const;