@sign-global/tokentable 0.4.1-beta.7 → 0.4.1-beta.9

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 (28) hide show
  1. package/dist/cjs/airdrop/contracts/solana/AirdropSignatureClient.js +4 -1
  2. package/dist/cjs/airdrop/contracts/solana/AirdropSignatureClient.js.map +1 -1
  3. package/dist/cjs/airdrop/contracts/solana/SignatureAirdropService.d.ts +0 -4
  4. package/dist/cjs/airdrop/contracts/solana/SignatureAirdropService.js +0 -16
  5. package/dist/cjs/airdrop/contracts/solana/SignatureAirdropService.js.map +1 -1
  6. package/dist/cjs/airdrop/contracts/solana/SolanaContractClient.js +1 -1
  7. package/dist/cjs/airdrop/contracts/solana/fee_collector.d.ts +30 -81
  8. package/dist/cjs/airdrop/contracts/solana/fee_collector.json +30 -81
  9. package/dist/cjs/airdrop/contracts/solana/fungible_token_distributor_solana.d.ts +71 -81
  10. package/dist/cjs/airdrop/contracts/solana/fungible_token_distributor_solana.json +72 -82
  11. package/dist/esm/airdrop/contracts/solana/AirdropSignatureClient.js +5 -2
  12. package/dist/esm/airdrop/contracts/solana/AirdropSignatureClient.js.map +1 -1
  13. package/dist/esm/airdrop/contracts/solana/SignatureAirdropService.d.ts +0 -4
  14. package/dist/esm/airdrop/contracts/solana/SignatureAirdropService.js +0 -16
  15. package/dist/esm/airdrop/contracts/solana/SignatureAirdropService.js.map +1 -1
  16. package/dist/esm/airdrop/contracts/solana/SolanaContractClient.js +1 -1
  17. package/dist/esm/airdrop/contracts/solana/fee_collector.d.ts +30 -81
  18. package/dist/esm/airdrop/contracts/solana/fee_collector.json +30 -81
  19. package/dist/esm/airdrop/contracts/solana/fungible_token_distributor_solana.d.ts +71 -81
  20. package/dist/esm/airdrop/contracts/solana/fungible_token_distributor_solana.json +72 -82
  21. package/package.json +1 -1
  22. package/src/airdrop/contracts/solana/AirdropSignatureClient.ts +5 -2
  23. package/src/airdrop/contracts/solana/SignatureAirdropService.ts +0 -20
  24. package/src/airdrop/contracts/solana/SolanaContractClient.ts +1 -1
  25. package/src/airdrop/contracts/solana/fee_collector.json +30 -81
  26. package/src/airdrop/contracts/solana/fee_collector.ts +30 -81
  27. package/src/airdrop/contracts/solana/fungible_token_distributor_solana.json +72 -82
  28. package/src/airdrop/contracts/solana/fungible_token_distributor_solana.ts +72 -82
@@ -1,5 +1,5 @@
1
1
  {
2
- "address": "4dfP4CMvznzUuuYLhybXy71zasrhtjrFkChSFjtqS3on",
2
+ "address": "FCAaMMWdkNJnbFvz71rkXtsHPL1voheMHXdKucT3EUd8",
3
3
  "metadata": {
4
4
  "name": "fee_collector",
5
5
  "version": "0.1.0",
@@ -98,41 +98,8 @@
98
98
  "path": "authority"
99
99
  },
100
100
  {
101
- "kind": "const",
102
- "value": [
103
- 6,
104
- 221,
105
- 246,
106
- 225,
107
- 215,
108
- 101,
109
- 161,
110
- 147,
111
- 217,
112
- 203,
113
- 225,
114
- 70,
115
- 206,
116
- 235,
117
- 121,
118
- 172,
119
- 28,
120
- 180,
121
- 133,
122
- 237,
123
- 95,
124
- 91,
125
- 55,
126
- 145,
127
- 58,
128
- 140,
129
- 245,
130
- 133,
131
- 126,
132
- 255,
133
- 0,
134
- 169
135
- ]
101
+ "kind": "account",
102
+ "path": "token_program"
136
103
  },
137
104
  {
138
105
  "kind": "arg",
@@ -469,16 +436,16 @@
469
436
  "args": []
470
437
  },
471
438
  {
472
- "name": "renounce_ownership",
439
+ "name": "receive_ownership",
473
440
  "discriminator": [
474
- 19,
475
- 143,
476
- 91,
477
- 79,
478
- 34,
479
- 168,
480
- 174,
481
- 125
441
+ 156,
442
+ 163,
443
+ 211,
444
+ 191,
445
+ 160,
446
+ 158,
447
+ 61,
448
+ 55
482
449
  ],
483
450
  "accounts": [
484
451
  {
@@ -749,6 +716,12 @@
749
716
  "writable": true,
750
717
  "signer": true
751
718
  },
719
+ {
720
+ "name": "new_owner",
721
+ "writable": true,
722
+ "signer": true,
723
+ "optional": true
724
+ },
752
725
  {
753
726
  "name": "system_program",
754
727
  "address": "11111111111111111111111111111111"
@@ -833,41 +806,8 @@
833
806
  "path": "authority"
834
807
  },
835
808
  {
836
- "kind": "const",
837
- "value": [
838
- 6,
839
- 221,
840
- 246,
841
- 225,
842
- 215,
843
- 101,
844
- 161,
845
- 147,
846
- 217,
847
- 203,
848
- 225,
849
- 70,
850
- 206,
851
- 235,
852
- 121,
853
- 172,
854
- 28,
855
- 180,
856
- 133,
857
- 237,
858
- 95,
859
- 91,
860
- 55,
861
- 145,
862
- 58,
863
- 140,
864
- 245,
865
- 133,
866
- 126,
867
- 255,
868
- 0,
869
- 169
870
- ]
809
+ "kind": "account",
810
+ "path": "token_program"
871
811
  },
872
812
  {
873
813
  "kind": "account",
@@ -1019,11 +959,16 @@
1019
959
  },
1020
960
  {
1021
961
  "code": 6002,
962
+ "name": "NotPermissioned",
963
+ "msg": "NotPermissioned"
964
+ },
965
+ {
966
+ "code": 6003,
1022
967
  "name": "FeesTooHigh",
1023
968
  "msg": "FeesTooHigh"
1024
969
  },
1025
970
  {
1026
- "code": 6003,
971
+ "code": 6004,
1027
972
  "name": "InvalidCallData",
1028
973
  "msg": "InvalidCallData"
1029
974
  }
@@ -1102,6 +1047,10 @@
1102
1047
  "name": "owner",
1103
1048
  "type": "pubkey"
1104
1049
  },
1050
+ {
1051
+ "name": "new_owner",
1052
+ "type": "pubkey"
1053
+ },
1105
1054
  {
1106
1055
  "name": "default_fees_bips",
1107
1056
  "type": "u64"
@@ -5,7 +5,7 @@
5
5
  * IDL can be found at `target/idl/fungible_token_distributor_solana.json`.
6
6
  */
7
7
  export type FungibleTokenDistributorSolana = {
8
- "address": "FCkSnf5Qd5Jva3ZdjFNGyZNhpCxmvjikXDkpWgE1vD3R";
8
+ "address": "2fLgxHG1eCxQmfUMn8LYffxE7EQKWzeJhDpcAsyb1VKA";
9
9
  "metadata": {
10
10
  "name": "fungibleTokenDistributorSolana";
11
11
  "version": "0.1.0";
@@ -86,41 +86,8 @@ export type FungibleTokenDistributorSolana = {
86
86
  "path": "authority";
87
87
  },
88
88
  {
89
- "kind": "const";
90
- "value": [
91
- 6,
92
- 221,
93
- 246,
94
- 225,
95
- 215,
96
- 101,
97
- 161,
98
- 147,
99
- 217,
100
- 203,
101
- 225,
102
- 70,
103
- 206,
104
- 235,
105
- 121,
106
- 172,
107
- 28,
108
- 180,
109
- 133,
110
- 237,
111
- 95,
112
- 91,
113
- 55,
114
- 145,
115
- 58,
116
- 140,
117
- 245,
118
- 133,
119
- 126,
120
- 255,
121
- 0,
122
- 169
123
- ];
89
+ "kind": "account";
90
+ "path": "tokenProgram";
124
91
  },
125
92
  {
126
93
  "kind": "account";
@@ -213,7 +180,7 @@ export type FungibleTokenDistributorSolana = {
213
180
  {
214
181
  "name": "feeCollector";
215
182
  "optional": true;
216
- "address": "4dfP4CMvznzUuuYLhybXy71zasrhtjrFkChSFjtqS3on";
183
+ "address": "FCAaMMWdkNJnbFvz71rkXtsHPL1voheMHXdKucT3EUd8";
217
184
  },
218
185
  {
219
186
  "name": "feeTokenMint";
@@ -231,6 +198,9 @@ export type FungibleTokenDistributorSolana = {
231
198
  {
232
199
  "name": "tokenProgram";
233
200
  },
201
+ {
202
+ "name": "feeTokenProgram";
203
+ },
234
204
  {
235
205
  "name": "associatedTokenProgram";
236
206
  "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
@@ -503,7 +473,7 @@ export type FungibleTokenDistributorSolana = {
503
473
  {
504
474
  "name": "feeCollector";
505
475
  "optional": true;
506
- "address": "4dfP4CMvznzUuuYLhybXy71zasrhtjrFkChSFjtqS3on";
476
+ "address": "FCAaMMWdkNJnbFvz71rkXtsHPL1voheMHXdKucT3EUd8";
507
477
  },
508
478
  {
509
479
  "name": "feeCollectorStorage";
@@ -547,6 +517,50 @@ export type FungibleTokenDistributorSolana = {
547
517
  }
548
518
  ];
549
519
  },
520
+ {
521
+ "name": "receiveProgramAdmin";
522
+ "discriminator": [
523
+ 238,
524
+ 172,
525
+ 61,
526
+ 197,
527
+ 23,
528
+ 72,
529
+ 249,
530
+ 87
531
+ ];
532
+ "accounts": [
533
+ {
534
+ "name": "config";
535
+ "writable": true;
536
+ "pda": {
537
+ "seeds": [
538
+ {
539
+ "kind": "const";
540
+ "value": [
541
+ 99,
542
+ 111,
543
+ 110,
544
+ 102,
545
+ 105,
546
+ 103
547
+ ];
548
+ }
549
+ ];
550
+ };
551
+ },
552
+ {
553
+ "name": "authority";
554
+ "writable": true;
555
+ "signer": true;
556
+ },
557
+ {
558
+ "name": "systemProgram";
559
+ "address": "11111111111111111111111111111111";
560
+ }
561
+ ];
562
+ "args": [];
563
+ },
550
564
  {
551
565
  "name": "setBaseParams";
552
566
  "discriminator": [
@@ -680,7 +694,7 @@ export type FungibleTokenDistributorSolana = {
680
694
  {
681
695
  "name": "feeCollector";
682
696
  "optional": true;
683
- "address": "4dfP4CMvznzUuuYLhybXy71zasrhtjrFkChSFjtqS3on";
697
+ "address": "FCAaMMWdkNJnbFvz71rkXtsHPL1voheMHXdKucT3EUd8";
684
698
  },
685
699
  {
686
700
  "name": "feeCollectorStorage";
@@ -883,11 +897,6 @@ export type FungibleTokenDistributorSolana = {
883
897
  "writable": true;
884
898
  "signer": true;
885
899
  },
886
- {
887
- "name": "newOwner";
888
- "writable": true;
889
- "signer": true;
890
- },
891
900
  {
892
901
  "name": "systemProgram";
893
902
  "address": "11111111111111111111111111111111";
@@ -945,6 +954,7 @@ export type FungibleTokenDistributorSolana = {
945
954
  "name": "newAdmin";
946
955
  "writable": true;
947
956
  "signer": true;
957
+ "optional": true;
948
958
  },
949
959
  {
950
960
  "name": "systemProgram";
@@ -1129,41 +1139,8 @@ export type FungibleTokenDistributorSolana = {
1129
1139
  "path": "authority";
1130
1140
  },
1131
1141
  {
1132
- "kind": "const";
1133
- "value": [
1134
- 6,
1135
- 221,
1136
- 246,
1137
- 225,
1138
- 215,
1139
- 101,
1140
- 161,
1141
- 147,
1142
- 217,
1143
- 203,
1144
- 225,
1145
- 70,
1146
- 206,
1147
- 235,
1148
- 121,
1149
- 172,
1150
- 28,
1151
- 180,
1152
- 133,
1153
- 237,
1154
- 95,
1155
- 91,
1156
- 55,
1157
- 145,
1158
- 58,
1159
- 140,
1160
- 245,
1161
- 133,
1162
- 126,
1163
- 255,
1164
- 0,
1165
- 169
1166
- ];
1142
+ "kind": "account";
1143
+ "path": "tokenProgram";
1167
1144
  },
1168
1145
  {
1169
1146
  "kind": "account";
@@ -1401,16 +1378,21 @@ export type FungibleTokenDistributorSolana = {
1401
1378
  },
1402
1379
  {
1403
1380
  "code": 6009;
1381
+ "name": "notPermissioned";
1382
+ "msg": "notPermissioned";
1383
+ },
1384
+ {
1385
+ "code": 6010;
1404
1386
  "name": "ownableUnauthorizedAccount";
1405
1387
  "msg": "ownableUnauthorizedAccount";
1406
1388
  },
1407
1389
  {
1408
- "code": 6010;
1390
+ "code": 6011;
1409
1391
  "name": "invalidFeeCollector";
1410
1392
  "msg": "invalidFeeCollector";
1411
1393
  },
1412
1394
  {
1413
- "code": 6011;
1395
+ "code": 6012;
1414
1396
  "name": "paused";
1415
1397
  "msg": "paused";
1416
1398
  }
@@ -1517,6 +1499,10 @@ export type FungibleTokenDistributorSolana = {
1517
1499
  {
1518
1500
  "name": "admin";
1519
1501
  "type": "pubkey";
1502
+ },
1503
+ {
1504
+ "name": "newAdmin";
1505
+ "type": "pubkey";
1520
1506
  }
1521
1507
  ];
1522
1508
  };
@@ -1537,6 +1523,10 @@ export type FungibleTokenDistributorSolana = {
1537
1523
  "name": "owner";
1538
1524
  "type": "pubkey";
1539
1525
  },
1526
+ {
1527
+ "name": "newOwner";
1528
+ "type": "pubkey";
1529
+ },
1540
1530
  {
1541
1531
  "name": "defaultFeesBips";
1542
1532
  "type": "u64";
@@ -1,5 +1,5 @@
1
1
  {
2
- "address": "FCkSnf5Qd5Jva3ZdjFNGyZNhpCxmvjikXDkpWgE1vD3R",
2
+ "address": "2fLgxHG1eCxQmfUMn8LYffxE7EQKWzeJhDpcAsyb1VKA",
3
3
  "metadata": {
4
4
  "name": "fungible_token_distributor_solana",
5
5
  "version": "0.1.0",
@@ -80,41 +80,8 @@
80
80
  "path": "authority"
81
81
  },
82
82
  {
83
- "kind": "const",
84
- "value": [
85
- 6,
86
- 221,
87
- 246,
88
- 225,
89
- 215,
90
- 101,
91
- 161,
92
- 147,
93
- 217,
94
- 203,
95
- 225,
96
- 70,
97
- 206,
98
- 235,
99
- 121,
100
- 172,
101
- 28,
102
- 180,
103
- 133,
104
- 237,
105
- 95,
106
- 91,
107
- 55,
108
- 145,
109
- 58,
110
- 140,
111
- 245,
112
- 133,
113
- 126,
114
- 255,
115
- 0,
116
- 169
117
- ]
83
+ "kind": "account",
84
+ "path": "token_program"
118
85
  },
119
86
  {
120
87
  "kind": "account",
@@ -207,7 +174,7 @@
207
174
  {
208
175
  "name": "fee_collector",
209
176
  "optional": true,
210
- "address": "4dfP4CMvznzUuuYLhybXy71zasrhtjrFkChSFjtqS3on"
177
+ "address": "FCAaMMWdkNJnbFvz71rkXtsHPL1voheMHXdKucT3EUd8"
211
178
  },
212
179
  {
213
180
  "name": "fee_token_mint",
@@ -225,6 +192,9 @@
225
192
  {
226
193
  "name": "token_program"
227
194
  },
195
+ {
196
+ "name": "fee_token_program"
197
+ },
228
198
  {
229
199
  "name": "associated_token_program",
230
200
  "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
@@ -497,7 +467,7 @@
497
467
  {
498
468
  "name": "fee_collector",
499
469
  "optional": true,
500
- "address": "4dfP4CMvznzUuuYLhybXy71zasrhtjrFkChSFjtqS3on"
470
+ "address": "FCAaMMWdkNJnbFvz71rkXtsHPL1voheMHXdKucT3EUd8"
501
471
  },
502
472
  {
503
473
  "name": "fee_collector_storage",
@@ -541,6 +511,50 @@
541
511
  }
542
512
  ]
543
513
  },
514
+ {
515
+ "name": "receive_program_admin",
516
+ "discriminator": [
517
+ 238,
518
+ 172,
519
+ 61,
520
+ 197,
521
+ 23,
522
+ 72,
523
+ 249,
524
+ 87
525
+ ],
526
+ "accounts": [
527
+ {
528
+ "name": "config",
529
+ "writable": true,
530
+ "pda": {
531
+ "seeds": [
532
+ {
533
+ "kind": "const",
534
+ "value": [
535
+ 99,
536
+ 111,
537
+ 110,
538
+ 102,
539
+ 105,
540
+ 103
541
+ ]
542
+ }
543
+ ]
544
+ }
545
+ },
546
+ {
547
+ "name": "authority",
548
+ "writable": true,
549
+ "signer": true
550
+ },
551
+ {
552
+ "name": "system_program",
553
+ "address": "11111111111111111111111111111111"
554
+ }
555
+ ],
556
+ "args": []
557
+ },
544
558
  {
545
559
  "name": "set_base_params",
546
560
  "discriminator": [
@@ -674,7 +688,7 @@
674
688
  {
675
689
  "name": "fee_collector",
676
690
  "optional": true,
677
- "address": "4dfP4CMvznzUuuYLhybXy71zasrhtjrFkChSFjtqS3on"
691
+ "address": "FCAaMMWdkNJnbFvz71rkXtsHPL1voheMHXdKucT3EUd8"
678
692
  },
679
693
  {
680
694
  "name": "fee_collector_storage",
@@ -877,11 +891,6 @@
877
891
  "writable": true,
878
892
  "signer": true
879
893
  },
880
- {
881
- "name": "new_owner",
882
- "writable": true,
883
- "signer": true
884
- },
885
894
  {
886
895
  "name": "system_program",
887
896
  "address": "11111111111111111111111111111111"
@@ -938,7 +947,8 @@
938
947
  {
939
948
  "name": "new_admin",
940
949
  "writable": true,
941
- "signer": true
950
+ "signer": true,
951
+ "optional": true
942
952
  },
943
953
  {
944
954
  "name": "system_program",
@@ -1123,41 +1133,8 @@
1123
1133
  "path": "authority"
1124
1134
  },
1125
1135
  {
1126
- "kind": "const",
1127
- "value": [
1128
- 6,
1129
- 221,
1130
- 246,
1131
- 225,
1132
- 215,
1133
- 101,
1134
- 161,
1135
- 147,
1136
- 217,
1137
- 203,
1138
- 225,
1139
- 70,
1140
- 206,
1141
- 235,
1142
- 121,
1143
- 172,
1144
- 28,
1145
- 180,
1146
- 133,
1147
- 237,
1148
- 95,
1149
- 91,
1150
- 55,
1151
- 145,
1152
- 58,
1153
- 140,
1154
- 245,
1155
- 133,
1156
- 126,
1157
- 255,
1158
- 0,
1159
- 169
1160
- ]
1136
+ "kind": "account",
1137
+ "path": "token_program"
1161
1138
  },
1162
1139
  {
1163
1140
  "kind": "account",
@@ -1395,16 +1372,21 @@
1395
1372
  },
1396
1373
  {
1397
1374
  "code": 6009,
1375
+ "name": "NotPermissioned",
1376
+ "msg": "NotPermissioned"
1377
+ },
1378
+ {
1379
+ "code": 6010,
1398
1380
  "name": "OwnableUnauthorizedAccount",
1399
1381
  "msg": "OwnableUnauthorizedAccount"
1400
1382
  },
1401
1383
  {
1402
- "code": 6010,
1384
+ "code": 6011,
1403
1385
  "name": "InvalidFeeCollector",
1404
1386
  "msg": "InvalidFeeCollector"
1405
1387
  },
1406
1388
  {
1407
- "code": 6011,
1389
+ "code": 6012,
1408
1390
  "name": "Paused",
1409
1391
  "msg": "Paused"
1410
1392
  }
@@ -1511,6 +1493,10 @@
1511
1493
  {
1512
1494
  "name": "admin",
1513
1495
  "type": "pubkey"
1496
+ },
1497
+ {
1498
+ "name": "new_admin",
1499
+ "type": "pubkey"
1514
1500
  }
1515
1501
  ]
1516
1502
  }
@@ -1531,6 +1517,10 @@
1531
1517
  "name": "owner",
1532
1518
  "type": "pubkey"
1533
1519
  },
1520
+ {
1521
+ "name": "new_owner",
1522
+ "type": "pubkey"
1523
+ },
1534
1524
  {
1535
1525
  "name": "default_fees_bips",
1536
1526
  "type": "u64"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sign-global/tokentable",
3
- "version": "0.4.1-beta.7",
3
+ "version": "0.4.1-beta.9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -3,7 +3,7 @@ import { SolanaContractClientBase, SolanaContractInfo } from './SolanaContractCl
3
3
  import IDL from './fungible_token_distributor_solana.json';
4
4
  import * as anchor from '@coral-xyz/anchor';
5
5
  import { FungibleTokenDistributorSolana } from './fungible_token_distributor_solana';
6
- import { TOKEN_2022_PROGRAM_ID } from '@solana/spl-token';
6
+ import { TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID } from '@solana/spl-token';
7
7
  import { FeeCollectorClient } from './FeeCollectorClient';
8
8
  import { fetchTokenVersion, getOrCreateAssociatedTokenAccount, hexStrToU8Array } from '../../../utils';
9
9
 
@@ -223,12 +223,15 @@ export class AirdropSignatureClient extends SolanaContractClientBase<FungibleTok
223
223
  fee: feePDA,
224
224
  authorityFeeAta: null,
225
225
  tokenProgram: tokenVersion?.programId || TOKEN_2022_PROGRAM_ID,
226
+ feeTokenProgram: TOKEN_PROGRAM_ID,
226
227
  feeTokenMint: null
227
228
  })
228
229
  .transaction()
229
230
  );
230
231
 
231
- const hash = await this.program.provider.sendAndConfirm?.(tx);
232
+ const hash = await this.program.provider.sendAndConfirm?.(tx, [], {
233
+ commitment: 'finalized'
234
+ });
232
235
 
233
236
  lastHash = hash!;
234
237
  }