@typemove/aptos 1.0.0-rc.16 → 1.0.0-rc.18
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/dist/builtin/0x1.d.ts.map +1 -1
- package/dist/builtin/0x1.js +673 -316
- package/dist/builtin/0x1.js.map +1 -1
- package/dist/builtin/0x3.d.ts.map +1 -1
- package/dist/builtin/0x3.js +31 -16
- package/dist/builtin/0x3.js.map +1 -1
- package/dist/codegen/codegen.js +8 -3
- package/dist/codegen/codegen.js.map +1 -1
- package/package.json +2 -2
- package/src/builtin/0x1.ts +673 -316
- package/src/builtin/0x3.ts +31 -16
- package/src/codegen/codegen.ts +8 -3
package/dist/builtin/0x1.js
CHANGED
|
@@ -88,11 +88,12 @@ export var code;
|
|
|
88
88
|
let entry;
|
|
89
89
|
(function (entry) {
|
|
90
90
|
async function publishPackageTxn(client, account, request, extraArgs) {
|
|
91
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
91
92
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
92
93
|
sender: account.address(),
|
|
93
94
|
...extraArgs,
|
|
94
95
|
});
|
|
95
|
-
const txn = await builder.build("0x1::code::publish_package_txn", request.type_arguments, request.arguments);
|
|
96
|
+
const txn = await builder.build("0x1::code::publish_package_txn", request.type_arguments, coder.encodeArray(request.arguments));
|
|
96
97
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
97
98
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
98
99
|
}
|
|
@@ -194,41 +195,45 @@ export var coin;
|
|
|
194
195
|
let entry;
|
|
195
196
|
(function (entry) {
|
|
196
197
|
async function freezeCoinStore(client, account, request, extraArgs) {
|
|
198
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
197
199
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
198
200
|
sender: account.address(),
|
|
199
201
|
...extraArgs,
|
|
200
202
|
});
|
|
201
|
-
const txn = await builder.build("0x1::coin::freeze_coin_store", request.type_arguments, request.arguments);
|
|
203
|
+
const txn = await builder.build("0x1::coin::freeze_coin_store", request.type_arguments, coder.encodeArray(request.arguments));
|
|
202
204
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
203
205
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
204
206
|
}
|
|
205
207
|
entry.freezeCoinStore = freezeCoinStore;
|
|
206
208
|
async function transfer(client, account, request, extraArgs) {
|
|
209
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
207
210
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
208
211
|
sender: account.address(),
|
|
209
212
|
...extraArgs,
|
|
210
213
|
});
|
|
211
|
-
const txn = await builder.build("0x1::coin::transfer", request.type_arguments, request.arguments);
|
|
214
|
+
const txn = await builder.build("0x1::coin::transfer", request.type_arguments, coder.encodeArray(request.arguments));
|
|
212
215
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
213
216
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
214
217
|
}
|
|
215
218
|
entry.transfer = transfer;
|
|
216
219
|
async function unfreezeCoinStore(client, account, request, extraArgs) {
|
|
220
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
217
221
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
218
222
|
sender: account.address(),
|
|
219
223
|
...extraArgs,
|
|
220
224
|
});
|
|
221
|
-
const txn = await builder.build("0x1::coin::unfreeze_coin_store", request.type_arguments, request.arguments);
|
|
225
|
+
const txn = await builder.build("0x1::coin::unfreeze_coin_store", request.type_arguments, coder.encodeArray(request.arguments));
|
|
222
226
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
223
227
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
224
228
|
}
|
|
225
229
|
entry.unfreezeCoinStore = unfreezeCoinStore;
|
|
226
230
|
async function upgradeSupply(client, account, request, extraArgs) {
|
|
231
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
227
232
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
228
233
|
sender: account.address(),
|
|
229
234
|
...extraArgs,
|
|
230
235
|
});
|
|
231
|
-
const txn = await builder.build("0x1::coin::upgrade_supply", request.type_arguments, request.arguments);
|
|
236
|
+
const txn = await builder.build("0x1::coin::upgrade_supply", request.type_arguments, coder.encodeArray(request.arguments));
|
|
232
237
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
233
238
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
234
239
|
}
|
|
@@ -237,57 +242,85 @@ export var coin;
|
|
|
237
242
|
let view;
|
|
238
243
|
(function (view) {
|
|
239
244
|
async function balance(client, request, version) {
|
|
240
|
-
const data = { ...request, function: "0x1::coin::balance" };
|
|
241
|
-
const res = await client.view(data, version?.toString());
|
|
242
245
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
246
|
+
const data = {
|
|
247
|
+
type_arguments: request.type_arguments,
|
|
248
|
+
arguments: coder.encodeArray(request.arguments),
|
|
249
|
+
function: "0x1::coin::balance",
|
|
250
|
+
};
|
|
251
|
+
const res = await client.view(data, version?.toString());
|
|
243
252
|
const type = await coder.getMoveFunction("0x1::coin::balance");
|
|
244
253
|
return (await coder.decodeArray(res, type.return));
|
|
245
254
|
}
|
|
246
255
|
view.balance = balance;
|
|
247
256
|
async function decimals(client, request, version) {
|
|
248
|
-
const data = { ...request, function: "0x1::coin::decimals" };
|
|
249
|
-
const res = await client.view(data, version?.toString());
|
|
250
257
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
258
|
+
const data = {
|
|
259
|
+
type_arguments: request.type_arguments,
|
|
260
|
+
arguments: coder.encodeArray(request.arguments),
|
|
261
|
+
function: "0x1::coin::decimals",
|
|
262
|
+
};
|
|
263
|
+
const res = await client.view(data, version?.toString());
|
|
251
264
|
const type = await coder.getMoveFunction("0x1::coin::decimals");
|
|
252
265
|
return (await coder.decodeArray(res, type.return));
|
|
253
266
|
}
|
|
254
267
|
view.decimals = decimals;
|
|
255
268
|
async function isAccountRegistered(client, request, version) {
|
|
256
|
-
const data = { ...request, function: "0x1::coin::is_account_registered" };
|
|
257
|
-
const res = await client.view(data, version?.toString());
|
|
258
269
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
270
|
+
const data = {
|
|
271
|
+
type_arguments: request.type_arguments,
|
|
272
|
+
arguments: coder.encodeArray(request.arguments),
|
|
273
|
+
function: "0x1::coin::is_account_registered",
|
|
274
|
+
};
|
|
275
|
+
const res = await client.view(data, version?.toString());
|
|
259
276
|
const type = await coder.getMoveFunction("0x1::coin::is_account_registered");
|
|
260
277
|
return (await coder.decodeArray(res, type.return));
|
|
261
278
|
}
|
|
262
279
|
view.isAccountRegistered = isAccountRegistered;
|
|
263
280
|
async function isCoinInitialized(client, request, version) {
|
|
264
|
-
const data = { ...request, function: "0x1::coin::is_coin_initialized" };
|
|
265
|
-
const res = await client.view(data, version?.toString());
|
|
266
281
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
282
|
+
const data = {
|
|
283
|
+
type_arguments: request.type_arguments,
|
|
284
|
+
arguments: coder.encodeArray(request.arguments),
|
|
285
|
+
function: "0x1::coin::is_coin_initialized",
|
|
286
|
+
};
|
|
287
|
+
const res = await client.view(data, version?.toString());
|
|
267
288
|
const type = await coder.getMoveFunction("0x1::coin::is_coin_initialized");
|
|
268
289
|
return (await coder.decodeArray(res, type.return));
|
|
269
290
|
}
|
|
270
291
|
view.isCoinInitialized = isCoinInitialized;
|
|
271
292
|
async function name(client, request, version) {
|
|
272
|
-
const data = { ...request, function: "0x1::coin::name" };
|
|
273
|
-
const res = await client.view(data, version?.toString());
|
|
274
293
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
294
|
+
const data = {
|
|
295
|
+
type_arguments: request.type_arguments,
|
|
296
|
+
arguments: coder.encodeArray(request.arguments),
|
|
297
|
+
function: "0x1::coin::name",
|
|
298
|
+
};
|
|
299
|
+
const res = await client.view(data, version?.toString());
|
|
275
300
|
const type = await coder.getMoveFunction("0x1::coin::name");
|
|
276
301
|
return (await coder.decodeArray(res, type.return));
|
|
277
302
|
}
|
|
278
303
|
view.name = name;
|
|
279
304
|
async function supply(client, request, version) {
|
|
280
|
-
const data = { ...request, function: "0x1::coin::supply" };
|
|
281
|
-
const res = await client.view(data, version?.toString());
|
|
282
305
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
306
|
+
const data = {
|
|
307
|
+
type_arguments: request.type_arguments,
|
|
308
|
+
arguments: coder.encodeArray(request.arguments),
|
|
309
|
+
function: "0x1::coin::supply",
|
|
310
|
+
};
|
|
311
|
+
const res = await client.view(data, version?.toString());
|
|
283
312
|
const type = await coder.getMoveFunction("0x1::coin::supply");
|
|
284
313
|
return (await coder.decodeArray(res, type.return));
|
|
285
314
|
}
|
|
286
315
|
view.supply = supply;
|
|
287
316
|
async function symbol(client, request, version) {
|
|
288
|
-
const data = { ...request, function: "0x1::coin::symbol" };
|
|
289
|
-
const res = await client.view(data, version?.toString());
|
|
290
317
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
318
|
+
const data = {
|
|
319
|
+
type_arguments: request.type_arguments,
|
|
320
|
+
arguments: coder.encodeArray(request.arguments),
|
|
321
|
+
function: "0x1::coin::symbol",
|
|
322
|
+
};
|
|
323
|
+
const res = await client.view(data, version?.toString());
|
|
291
324
|
const type = await coder.getMoveFunction("0x1::coin::symbol");
|
|
292
325
|
return (await coder.decodeArray(res, type.return));
|
|
293
326
|
}
|
|
@@ -347,23 +380,25 @@ export var block;
|
|
|
347
380
|
let view;
|
|
348
381
|
(function (view) {
|
|
349
382
|
async function getCurrentBlockHeight(client, request, version) {
|
|
383
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
350
384
|
const data = {
|
|
351
|
-
|
|
385
|
+
type_arguments: request.type_arguments,
|
|
386
|
+
arguments: coder.encodeArray(request.arguments),
|
|
352
387
|
function: "0x1::block::get_current_block_height",
|
|
353
388
|
};
|
|
354
389
|
const res = await client.view(data, version?.toString());
|
|
355
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
356
390
|
const type = await coder.getMoveFunction("0x1::block::get_current_block_height");
|
|
357
391
|
return (await coder.decodeArray(res, type.return));
|
|
358
392
|
}
|
|
359
393
|
view.getCurrentBlockHeight = getCurrentBlockHeight;
|
|
360
394
|
async function getEpochIntervalSecs(client, request, version) {
|
|
395
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
361
396
|
const data = {
|
|
362
|
-
|
|
397
|
+
type_arguments: request.type_arguments,
|
|
398
|
+
arguments: coder.encodeArray(request.arguments),
|
|
363
399
|
function: "0x1::block::get_epoch_interval_secs",
|
|
364
400
|
};
|
|
365
401
|
const res = await client.view(data, version?.toString());
|
|
366
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
367
402
|
const type = await coder.getMoveFunction("0x1::block::get_epoch_interval_secs");
|
|
368
403
|
return (await coder.decodeArray(res, type.return));
|
|
369
404
|
}
|
|
@@ -585,131 +620,144 @@ export var stake;
|
|
|
585
620
|
let entry;
|
|
586
621
|
(function (entry) {
|
|
587
622
|
async function addStake(client, account, request, extraArgs) {
|
|
623
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
588
624
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
589
625
|
sender: account.address(),
|
|
590
626
|
...extraArgs,
|
|
591
627
|
});
|
|
592
|
-
const txn = await builder.build("0x1::stake::add_stake", request.type_arguments, request.arguments);
|
|
628
|
+
const txn = await builder.build("0x1::stake::add_stake", request.type_arguments, coder.encodeArray(request.arguments));
|
|
593
629
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
594
630
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
595
631
|
}
|
|
596
632
|
entry.addStake = addStake;
|
|
597
633
|
async function increaseLockup(client, account, request, extraArgs) {
|
|
634
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
598
635
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
599
636
|
sender: account.address(),
|
|
600
637
|
...extraArgs,
|
|
601
638
|
});
|
|
602
|
-
const txn = await builder.build("0x1::stake::increase_lockup", request.type_arguments, request.arguments);
|
|
639
|
+
const txn = await builder.build("0x1::stake::increase_lockup", request.type_arguments, coder.encodeArray(request.arguments));
|
|
603
640
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
604
641
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
605
642
|
}
|
|
606
643
|
entry.increaseLockup = increaseLockup;
|
|
607
644
|
async function initializeStakeOwner(client, account, request, extraArgs) {
|
|
645
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
608
646
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
609
647
|
sender: account.address(),
|
|
610
648
|
...extraArgs,
|
|
611
649
|
});
|
|
612
|
-
const txn = await builder.build("0x1::stake::initialize_stake_owner", request.type_arguments, request.arguments);
|
|
650
|
+
const txn = await builder.build("0x1::stake::initialize_stake_owner", request.type_arguments, coder.encodeArray(request.arguments));
|
|
613
651
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
614
652
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
615
653
|
}
|
|
616
654
|
entry.initializeStakeOwner = initializeStakeOwner;
|
|
617
655
|
async function initializeValidator(client, account, request, extraArgs) {
|
|
656
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
618
657
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
619
658
|
sender: account.address(),
|
|
620
659
|
...extraArgs,
|
|
621
660
|
});
|
|
622
|
-
const txn = await builder.build("0x1::stake::initialize_validator", request.type_arguments, request.arguments);
|
|
661
|
+
const txn = await builder.build("0x1::stake::initialize_validator", request.type_arguments, coder.encodeArray(request.arguments));
|
|
623
662
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
624
663
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
625
664
|
}
|
|
626
665
|
entry.initializeValidator = initializeValidator;
|
|
627
666
|
async function joinValidatorSet(client, account, request, extraArgs) {
|
|
667
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
628
668
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
629
669
|
sender: account.address(),
|
|
630
670
|
...extraArgs,
|
|
631
671
|
});
|
|
632
|
-
const txn = await builder.build("0x1::stake::join_validator_set", request.type_arguments, request.arguments);
|
|
672
|
+
const txn = await builder.build("0x1::stake::join_validator_set", request.type_arguments, coder.encodeArray(request.arguments));
|
|
633
673
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
634
674
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
635
675
|
}
|
|
636
676
|
entry.joinValidatorSet = joinValidatorSet;
|
|
637
677
|
async function leaveValidatorSet(client, account, request, extraArgs) {
|
|
678
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
638
679
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
639
680
|
sender: account.address(),
|
|
640
681
|
...extraArgs,
|
|
641
682
|
});
|
|
642
|
-
const txn = await builder.build("0x1::stake::leave_validator_set", request.type_arguments, request.arguments);
|
|
683
|
+
const txn = await builder.build("0x1::stake::leave_validator_set", request.type_arguments, coder.encodeArray(request.arguments));
|
|
643
684
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
644
685
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
645
686
|
}
|
|
646
687
|
entry.leaveValidatorSet = leaveValidatorSet;
|
|
647
688
|
async function reactivateStake(client, account, request, extraArgs) {
|
|
689
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
648
690
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
649
691
|
sender: account.address(),
|
|
650
692
|
...extraArgs,
|
|
651
693
|
});
|
|
652
|
-
const txn = await builder.build("0x1::stake::reactivate_stake", request.type_arguments, request.arguments);
|
|
694
|
+
const txn = await builder.build("0x1::stake::reactivate_stake", request.type_arguments, coder.encodeArray(request.arguments));
|
|
653
695
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
654
696
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
655
697
|
}
|
|
656
698
|
entry.reactivateStake = reactivateStake;
|
|
657
699
|
async function rotateConsensusKey(client, account, request, extraArgs) {
|
|
700
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
658
701
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
659
702
|
sender: account.address(),
|
|
660
703
|
...extraArgs,
|
|
661
704
|
});
|
|
662
|
-
const txn = await builder.build("0x1::stake::rotate_consensus_key", request.type_arguments, request.arguments);
|
|
705
|
+
const txn = await builder.build("0x1::stake::rotate_consensus_key", request.type_arguments, coder.encodeArray(request.arguments));
|
|
663
706
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
664
707
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
665
708
|
}
|
|
666
709
|
entry.rotateConsensusKey = rotateConsensusKey;
|
|
667
710
|
async function setDelegatedVoter(client, account, request, extraArgs) {
|
|
711
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
668
712
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
669
713
|
sender: account.address(),
|
|
670
714
|
...extraArgs,
|
|
671
715
|
});
|
|
672
|
-
const txn = await builder.build("0x1::stake::set_delegated_voter", request.type_arguments, request.arguments);
|
|
716
|
+
const txn = await builder.build("0x1::stake::set_delegated_voter", request.type_arguments, coder.encodeArray(request.arguments));
|
|
673
717
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
674
718
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
675
719
|
}
|
|
676
720
|
entry.setDelegatedVoter = setDelegatedVoter;
|
|
677
721
|
async function setOperator(client, account, request, extraArgs) {
|
|
722
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
678
723
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
679
724
|
sender: account.address(),
|
|
680
725
|
...extraArgs,
|
|
681
726
|
});
|
|
682
|
-
const txn = await builder.build("0x1::stake::set_operator", request.type_arguments, request.arguments);
|
|
727
|
+
const txn = await builder.build("0x1::stake::set_operator", request.type_arguments, coder.encodeArray(request.arguments));
|
|
683
728
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
684
729
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
685
730
|
}
|
|
686
731
|
entry.setOperator = setOperator;
|
|
687
732
|
async function unlock(client, account, request, extraArgs) {
|
|
733
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
688
734
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
689
735
|
sender: account.address(),
|
|
690
736
|
...extraArgs,
|
|
691
737
|
});
|
|
692
|
-
const txn = await builder.build("0x1::stake::unlock", request.type_arguments, request.arguments);
|
|
738
|
+
const txn = await builder.build("0x1::stake::unlock", request.type_arguments, coder.encodeArray(request.arguments));
|
|
693
739
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
694
740
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
695
741
|
}
|
|
696
742
|
entry.unlock = unlock;
|
|
697
743
|
async function updateNetworkAndFullnodeAddresses(client, account, request, extraArgs) {
|
|
744
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
698
745
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
699
746
|
sender: account.address(),
|
|
700
747
|
...extraArgs,
|
|
701
748
|
});
|
|
702
|
-
const txn = await builder.build("0x1::stake::update_network_and_fullnode_addresses", request.type_arguments, request.arguments);
|
|
749
|
+
const txn = await builder.build("0x1::stake::update_network_and_fullnode_addresses", request.type_arguments, coder.encodeArray(request.arguments));
|
|
703
750
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
704
751
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
705
752
|
}
|
|
706
753
|
entry.updateNetworkAndFullnodeAddresses = updateNetworkAndFullnodeAddresses;
|
|
707
754
|
async function withdraw(client, account, request, extraArgs) {
|
|
755
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
708
756
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
709
757
|
sender: account.address(),
|
|
710
758
|
...extraArgs,
|
|
711
759
|
});
|
|
712
|
-
const txn = await builder.build("0x1::stake::withdraw", request.type_arguments, request.arguments);
|
|
760
|
+
const txn = await builder.build("0x1::stake::withdraw", request.type_arguments, coder.encodeArray(request.arguments));
|
|
713
761
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
714
762
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
715
763
|
}
|
|
@@ -718,98 +766,133 @@ export var stake;
|
|
|
718
766
|
let view;
|
|
719
767
|
(function (view) {
|
|
720
768
|
async function getCurrentEpochProposalCounts(client, request, version) {
|
|
769
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
721
770
|
const data = {
|
|
722
|
-
|
|
771
|
+
type_arguments: request.type_arguments,
|
|
772
|
+
arguments: coder.encodeArray(request.arguments),
|
|
723
773
|
function: "0x1::stake::get_current_epoch_proposal_counts",
|
|
724
774
|
};
|
|
725
775
|
const res = await client.view(data, version?.toString());
|
|
726
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
727
776
|
const type = await coder.getMoveFunction("0x1::stake::get_current_epoch_proposal_counts");
|
|
728
777
|
return (await coder.decodeArray(res, type.return));
|
|
729
778
|
}
|
|
730
779
|
view.getCurrentEpochProposalCounts = getCurrentEpochProposalCounts;
|
|
731
780
|
async function getCurrentEpochVotingPower(client, request, version) {
|
|
781
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
732
782
|
const data = {
|
|
733
|
-
|
|
783
|
+
type_arguments: request.type_arguments,
|
|
784
|
+
arguments: coder.encodeArray(request.arguments),
|
|
734
785
|
function: "0x1::stake::get_current_epoch_voting_power",
|
|
735
786
|
};
|
|
736
787
|
const res = await client.view(data, version?.toString());
|
|
737
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
738
788
|
const type = await coder.getMoveFunction("0x1::stake::get_current_epoch_voting_power");
|
|
739
789
|
return (await coder.decodeArray(res, type.return));
|
|
740
790
|
}
|
|
741
791
|
view.getCurrentEpochVotingPower = getCurrentEpochVotingPower;
|
|
742
792
|
async function getDelegatedVoter(client, request, version) {
|
|
743
|
-
const data = { ...request, function: "0x1::stake::get_delegated_voter" };
|
|
744
|
-
const res = await client.view(data, version?.toString());
|
|
745
793
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
794
|
+
const data = {
|
|
795
|
+
type_arguments: request.type_arguments,
|
|
796
|
+
arguments: coder.encodeArray(request.arguments),
|
|
797
|
+
function: "0x1::stake::get_delegated_voter",
|
|
798
|
+
};
|
|
799
|
+
const res = await client.view(data, version?.toString());
|
|
746
800
|
const type = await coder.getMoveFunction("0x1::stake::get_delegated_voter");
|
|
747
801
|
return (await coder.decodeArray(res, type.return));
|
|
748
802
|
}
|
|
749
803
|
view.getDelegatedVoter = getDelegatedVoter;
|
|
750
804
|
async function getLockupSecs(client, request, version) {
|
|
751
|
-
const data = { ...request, function: "0x1::stake::get_lockup_secs" };
|
|
752
|
-
const res = await client.view(data, version?.toString());
|
|
753
805
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
806
|
+
const data = {
|
|
807
|
+
type_arguments: request.type_arguments,
|
|
808
|
+
arguments: coder.encodeArray(request.arguments),
|
|
809
|
+
function: "0x1::stake::get_lockup_secs",
|
|
810
|
+
};
|
|
811
|
+
const res = await client.view(data, version?.toString());
|
|
754
812
|
const type = await coder.getMoveFunction("0x1::stake::get_lockup_secs");
|
|
755
813
|
return (await coder.decodeArray(res, type.return));
|
|
756
814
|
}
|
|
757
815
|
view.getLockupSecs = getLockupSecs;
|
|
758
816
|
async function getOperator(client, request, version) {
|
|
759
|
-
const data = { ...request, function: "0x1::stake::get_operator" };
|
|
760
|
-
const res = await client.view(data, version?.toString());
|
|
761
817
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
818
|
+
const data = {
|
|
819
|
+
type_arguments: request.type_arguments,
|
|
820
|
+
arguments: coder.encodeArray(request.arguments),
|
|
821
|
+
function: "0x1::stake::get_operator",
|
|
822
|
+
};
|
|
823
|
+
const res = await client.view(data, version?.toString());
|
|
762
824
|
const type = await coder.getMoveFunction("0x1::stake::get_operator");
|
|
763
825
|
return (await coder.decodeArray(res, type.return));
|
|
764
826
|
}
|
|
765
827
|
view.getOperator = getOperator;
|
|
766
828
|
async function getRemainingLockupSecs(client, request, version) {
|
|
829
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
767
830
|
const data = {
|
|
768
|
-
|
|
831
|
+
type_arguments: request.type_arguments,
|
|
832
|
+
arguments: coder.encodeArray(request.arguments),
|
|
769
833
|
function: "0x1::stake::get_remaining_lockup_secs",
|
|
770
834
|
};
|
|
771
835
|
const res = await client.view(data, version?.toString());
|
|
772
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
773
836
|
const type = await coder.getMoveFunction("0x1::stake::get_remaining_lockup_secs");
|
|
774
837
|
return (await coder.decodeArray(res, type.return));
|
|
775
838
|
}
|
|
776
839
|
view.getRemainingLockupSecs = getRemainingLockupSecs;
|
|
777
840
|
async function getStake(client, request, version) {
|
|
778
|
-
const data = { ...request, function: "0x1::stake::get_stake" };
|
|
779
|
-
const res = await client.view(data, version?.toString());
|
|
780
841
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
842
|
+
const data = {
|
|
843
|
+
type_arguments: request.type_arguments,
|
|
844
|
+
arguments: coder.encodeArray(request.arguments),
|
|
845
|
+
function: "0x1::stake::get_stake",
|
|
846
|
+
};
|
|
847
|
+
const res = await client.view(data, version?.toString());
|
|
781
848
|
const type = await coder.getMoveFunction("0x1::stake::get_stake");
|
|
782
849
|
return (await coder.decodeArray(res, type.return));
|
|
783
850
|
}
|
|
784
851
|
view.getStake = getStake;
|
|
785
852
|
async function getValidatorConfig(client, request, version) {
|
|
786
|
-
const data = { ...request, function: "0x1::stake::get_validator_config" };
|
|
787
|
-
const res = await client.view(data, version?.toString());
|
|
788
853
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
854
|
+
const data = {
|
|
855
|
+
type_arguments: request.type_arguments,
|
|
856
|
+
arguments: coder.encodeArray(request.arguments),
|
|
857
|
+
function: "0x1::stake::get_validator_config",
|
|
858
|
+
};
|
|
859
|
+
const res = await client.view(data, version?.toString());
|
|
789
860
|
const type = await coder.getMoveFunction("0x1::stake::get_validator_config");
|
|
790
861
|
return (await coder.decodeArray(res, type.return));
|
|
791
862
|
}
|
|
792
863
|
view.getValidatorConfig = getValidatorConfig;
|
|
793
864
|
async function getValidatorIndex(client, request, version) {
|
|
794
|
-
const data = { ...request, function: "0x1::stake::get_validator_index" };
|
|
795
|
-
const res = await client.view(data, version?.toString());
|
|
796
865
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
866
|
+
const data = {
|
|
867
|
+
type_arguments: request.type_arguments,
|
|
868
|
+
arguments: coder.encodeArray(request.arguments),
|
|
869
|
+
function: "0x1::stake::get_validator_index",
|
|
870
|
+
};
|
|
871
|
+
const res = await client.view(data, version?.toString());
|
|
797
872
|
const type = await coder.getMoveFunction("0x1::stake::get_validator_index");
|
|
798
873
|
return (await coder.decodeArray(res, type.return));
|
|
799
874
|
}
|
|
800
875
|
view.getValidatorIndex = getValidatorIndex;
|
|
801
876
|
async function getValidatorState(client, request, version) {
|
|
802
|
-
const data = { ...request, function: "0x1::stake::get_validator_state" };
|
|
803
|
-
const res = await client.view(data, version?.toString());
|
|
804
877
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
878
|
+
const data = {
|
|
879
|
+
type_arguments: request.type_arguments,
|
|
880
|
+
arguments: coder.encodeArray(request.arguments),
|
|
881
|
+
function: "0x1::stake::get_validator_state",
|
|
882
|
+
};
|
|
883
|
+
const res = await client.view(data, version?.toString());
|
|
805
884
|
const type = await coder.getMoveFunction("0x1::stake::get_validator_state");
|
|
806
885
|
return (await coder.decodeArray(res, type.return));
|
|
807
886
|
}
|
|
808
887
|
view.getValidatorState = getValidatorState;
|
|
809
888
|
async function stakePoolExists(client, request, version) {
|
|
810
|
-
const data = { ...request, function: "0x1::stake::stake_pool_exists" };
|
|
811
|
-
const res = await client.view(data, version?.toString());
|
|
812
889
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
890
|
+
const data = {
|
|
891
|
+
type_arguments: request.type_arguments,
|
|
892
|
+
arguments: coder.encodeArray(request.arguments),
|
|
893
|
+
function: "0x1::stake::stake_pool_exists",
|
|
894
|
+
};
|
|
895
|
+
const res = await client.view(data, version?.toString());
|
|
813
896
|
const type = await coder.getMoveFunction("0x1::stake::stake_pool_exists");
|
|
814
897
|
return (await coder.decodeArray(res, type.return));
|
|
815
898
|
}
|
|
@@ -932,31 +1015,34 @@ export var object_;
|
|
|
932
1015
|
let entry;
|
|
933
1016
|
(function (entry) {
|
|
934
1017
|
async function transfer(client, account, request, extraArgs) {
|
|
1018
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
935
1019
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
936
1020
|
sender: account.address(),
|
|
937
1021
|
...extraArgs,
|
|
938
1022
|
});
|
|
939
|
-
const txn = await builder.build("0x1::object::transfer", request.type_arguments, request.arguments);
|
|
1023
|
+
const txn = await builder.build("0x1::object::transfer", request.type_arguments, coder.encodeArray(request.arguments));
|
|
940
1024
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
941
1025
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
942
1026
|
}
|
|
943
1027
|
entry.transfer = transfer;
|
|
944
1028
|
async function transferCall(client, account, request, extraArgs) {
|
|
1029
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
945
1030
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
946
1031
|
sender: account.address(),
|
|
947
1032
|
...extraArgs,
|
|
948
1033
|
});
|
|
949
|
-
const txn = await builder.build("0x1::object::transfer_call", request.type_arguments, request.arguments);
|
|
1034
|
+
const txn = await builder.build("0x1::object::transfer_call", request.type_arguments, coder.encodeArray(request.arguments));
|
|
950
1035
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
951
1036
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
952
1037
|
}
|
|
953
1038
|
entry.transferCall = transferCall;
|
|
954
1039
|
async function transferToObject(client, account, request, extraArgs) {
|
|
1040
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
955
1041
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
956
1042
|
sender: account.address(),
|
|
957
1043
|
...extraArgs,
|
|
958
1044
|
});
|
|
959
|
-
const txn = await builder.build("0x1::object::transfer_to_object", request.type_arguments, request.arguments);
|
|
1045
|
+
const txn = await builder.build("0x1::object::transfer_to_object", request.type_arguments, coder.encodeArray(request.arguments));
|
|
960
1046
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
961
1047
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
962
1048
|
}
|
|
@@ -1055,104 +1141,133 @@ export var voting;
|
|
|
1055
1141
|
let view;
|
|
1056
1142
|
(function (view) {
|
|
1057
1143
|
async function getEarlyResolutionVoteThreshold(client, request, version) {
|
|
1144
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1058
1145
|
const data = {
|
|
1059
|
-
|
|
1146
|
+
type_arguments: request.type_arguments,
|
|
1147
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1060
1148
|
function: "0x1::voting::get_early_resolution_vote_threshold",
|
|
1061
1149
|
};
|
|
1062
1150
|
const res = await client.view(data, version?.toString());
|
|
1063
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1064
1151
|
const type = await coder.getMoveFunction("0x1::voting::get_early_resolution_vote_threshold");
|
|
1065
1152
|
return (await coder.decodeArray(res, type.return));
|
|
1066
1153
|
}
|
|
1067
1154
|
view.getEarlyResolutionVoteThreshold = getEarlyResolutionVoteThreshold;
|
|
1068
1155
|
async function getExecutionHash(client, request, version) {
|
|
1069
|
-
const data = { ...request, function: "0x1::voting::get_execution_hash" };
|
|
1070
|
-
const res = await client.view(data, version?.toString());
|
|
1071
1156
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1157
|
+
const data = {
|
|
1158
|
+
type_arguments: request.type_arguments,
|
|
1159
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1160
|
+
function: "0x1::voting::get_execution_hash",
|
|
1161
|
+
};
|
|
1162
|
+
const res = await client.view(data, version?.toString());
|
|
1072
1163
|
const type = await coder.getMoveFunction("0x1::voting::get_execution_hash");
|
|
1073
1164
|
return (await coder.decodeArray(res, type.return));
|
|
1074
1165
|
}
|
|
1075
1166
|
view.getExecutionHash = getExecutionHash;
|
|
1076
1167
|
async function getMinVoteThreshold(client, request, version) {
|
|
1168
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1077
1169
|
const data = {
|
|
1078
|
-
|
|
1170
|
+
type_arguments: request.type_arguments,
|
|
1171
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1079
1172
|
function: "0x1::voting::get_min_vote_threshold",
|
|
1080
1173
|
};
|
|
1081
1174
|
const res = await client.view(data, version?.toString());
|
|
1082
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1083
1175
|
const type = await coder.getMoveFunction("0x1::voting::get_min_vote_threshold");
|
|
1084
1176
|
return (await coder.decodeArray(res, type.return));
|
|
1085
1177
|
}
|
|
1086
1178
|
view.getMinVoteThreshold = getMinVoteThreshold;
|
|
1087
1179
|
async function getProposalCreationSecs(client, request, version) {
|
|
1180
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1088
1181
|
const data = {
|
|
1089
|
-
|
|
1182
|
+
type_arguments: request.type_arguments,
|
|
1183
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1090
1184
|
function: "0x1::voting::get_proposal_creation_secs",
|
|
1091
1185
|
};
|
|
1092
1186
|
const res = await client.view(data, version?.toString());
|
|
1093
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1094
1187
|
const type = await coder.getMoveFunction("0x1::voting::get_proposal_creation_secs");
|
|
1095
1188
|
return (await coder.decodeArray(res, type.return));
|
|
1096
1189
|
}
|
|
1097
1190
|
view.getProposalCreationSecs = getProposalCreationSecs;
|
|
1098
1191
|
async function getProposalExpirationSecs(client, request, version) {
|
|
1192
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1099
1193
|
const data = {
|
|
1100
|
-
|
|
1194
|
+
type_arguments: request.type_arguments,
|
|
1195
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1101
1196
|
function: "0x1::voting::get_proposal_expiration_secs",
|
|
1102
1197
|
};
|
|
1103
1198
|
const res = await client.view(data, version?.toString());
|
|
1104
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1105
1199
|
const type = await coder.getMoveFunction("0x1::voting::get_proposal_expiration_secs");
|
|
1106
1200
|
return (await coder.decodeArray(res, type.return));
|
|
1107
1201
|
}
|
|
1108
1202
|
view.getProposalExpirationSecs = getProposalExpirationSecs;
|
|
1109
1203
|
async function getProposalState(client, request, version) {
|
|
1110
|
-
const data = { ...request, function: "0x1::voting::get_proposal_state" };
|
|
1111
|
-
const res = await client.view(data, version?.toString());
|
|
1112
1204
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1205
|
+
const data = {
|
|
1206
|
+
type_arguments: request.type_arguments,
|
|
1207
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1208
|
+
function: "0x1::voting::get_proposal_state",
|
|
1209
|
+
};
|
|
1210
|
+
const res = await client.view(data, version?.toString());
|
|
1113
1211
|
const type = await coder.getMoveFunction("0x1::voting::get_proposal_state");
|
|
1114
1212
|
return (await coder.decodeArray(res, type.return));
|
|
1115
1213
|
}
|
|
1116
1214
|
view.getProposalState = getProposalState;
|
|
1117
1215
|
async function getVotes(client, request, version) {
|
|
1118
|
-
const data = { ...request, function: "0x1::voting::get_votes" };
|
|
1119
|
-
const res = await client.view(data, version?.toString());
|
|
1120
1216
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1217
|
+
const data = {
|
|
1218
|
+
type_arguments: request.type_arguments,
|
|
1219
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1220
|
+
function: "0x1::voting::get_votes",
|
|
1221
|
+
};
|
|
1222
|
+
const res = await client.view(data, version?.toString());
|
|
1121
1223
|
const type = await coder.getMoveFunction("0x1::voting::get_votes");
|
|
1122
1224
|
return (await coder.decodeArray(res, type.return));
|
|
1123
1225
|
}
|
|
1124
1226
|
view.getVotes = getVotes;
|
|
1125
1227
|
async function isMultiStepProposalInExecution(client, request, version) {
|
|
1228
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1126
1229
|
const data = {
|
|
1127
|
-
|
|
1230
|
+
type_arguments: request.type_arguments,
|
|
1231
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1128
1232
|
function: "0x1::voting::is_multi_step_proposal_in_execution",
|
|
1129
1233
|
};
|
|
1130
1234
|
const res = await client.view(data, version?.toString());
|
|
1131
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1132
1235
|
const type = await coder.getMoveFunction("0x1::voting::is_multi_step_proposal_in_execution");
|
|
1133
1236
|
return (await coder.decodeArray(res, type.return));
|
|
1134
1237
|
}
|
|
1135
1238
|
view.isMultiStepProposalInExecution = isMultiStepProposalInExecution;
|
|
1136
1239
|
async function isResolved(client, request, version) {
|
|
1137
|
-
const data = { ...request, function: "0x1::voting::is_resolved" };
|
|
1138
|
-
const res = await client.view(data, version?.toString());
|
|
1139
1240
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1241
|
+
const data = {
|
|
1242
|
+
type_arguments: request.type_arguments,
|
|
1243
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1244
|
+
function: "0x1::voting::is_resolved",
|
|
1245
|
+
};
|
|
1246
|
+
const res = await client.view(data, version?.toString());
|
|
1140
1247
|
const type = await coder.getMoveFunction("0x1::voting::is_resolved");
|
|
1141
1248
|
return (await coder.decodeArray(res, type.return));
|
|
1142
1249
|
}
|
|
1143
1250
|
view.isResolved = isResolved;
|
|
1144
1251
|
async function isVotingClosed(client, request, version) {
|
|
1145
|
-
const data = { ...request, function: "0x1::voting::is_voting_closed" };
|
|
1146
|
-
const res = await client.view(data, version?.toString());
|
|
1147
1252
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1253
|
+
const data = {
|
|
1254
|
+
type_arguments: request.type_arguments,
|
|
1255
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1256
|
+
function: "0x1::voting::is_voting_closed",
|
|
1257
|
+
};
|
|
1258
|
+
const res = await client.view(data, version?.toString());
|
|
1148
1259
|
const type = await coder.getMoveFunction("0x1::voting::is_voting_closed");
|
|
1149
1260
|
return (await coder.decodeArray(res, type.return));
|
|
1150
1261
|
}
|
|
1151
1262
|
view.isVotingClosed = isVotingClosed;
|
|
1152
1263
|
async function nextProposalId(client, request, version) {
|
|
1153
|
-
const data = { ...request, function: "0x1::voting::next_proposal_id" };
|
|
1154
|
-
const res = await client.view(data, version?.toString());
|
|
1155
1264
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1265
|
+
const data = {
|
|
1266
|
+
type_arguments: request.type_arguments,
|
|
1267
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1268
|
+
function: "0x1::voting::next_proposal_id",
|
|
1269
|
+
};
|
|
1270
|
+
const res = await client.view(data, version?.toString());
|
|
1156
1271
|
const type = await coder.getMoveFunction("0x1::voting::next_proposal_id");
|
|
1157
1272
|
return (await coder.decodeArray(res, type.return));
|
|
1158
1273
|
}
|
|
@@ -1272,81 +1387,89 @@ export var account;
|
|
|
1272
1387
|
let entry;
|
|
1273
1388
|
(function (entry) {
|
|
1274
1389
|
async function offerRotationCapability(client, account, request, extraArgs) {
|
|
1390
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1275
1391
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1276
1392
|
sender: account.address(),
|
|
1277
1393
|
...extraArgs,
|
|
1278
1394
|
});
|
|
1279
|
-
const txn = await builder.build("0x1::account::offer_rotation_capability", request.type_arguments, request.arguments);
|
|
1395
|
+
const txn = await builder.build("0x1::account::offer_rotation_capability", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1280
1396
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1281
1397
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1282
1398
|
}
|
|
1283
1399
|
entry.offerRotationCapability = offerRotationCapability;
|
|
1284
1400
|
async function offerSignerCapability(client, account, request, extraArgs) {
|
|
1401
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1285
1402
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1286
1403
|
sender: account.address(),
|
|
1287
1404
|
...extraArgs,
|
|
1288
1405
|
});
|
|
1289
|
-
const txn = await builder.build("0x1::account::offer_signer_capability", request.type_arguments, request.arguments);
|
|
1406
|
+
const txn = await builder.build("0x1::account::offer_signer_capability", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1290
1407
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1291
1408
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1292
1409
|
}
|
|
1293
1410
|
entry.offerSignerCapability = offerSignerCapability;
|
|
1294
1411
|
async function revokeAnyRotationCapability(client, account, request, extraArgs) {
|
|
1412
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1295
1413
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1296
1414
|
sender: account.address(),
|
|
1297
1415
|
...extraArgs,
|
|
1298
1416
|
});
|
|
1299
|
-
const txn = await builder.build("0x1::account::revoke_any_rotation_capability", request.type_arguments, request.arguments);
|
|
1417
|
+
const txn = await builder.build("0x1::account::revoke_any_rotation_capability", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1300
1418
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1301
1419
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1302
1420
|
}
|
|
1303
1421
|
entry.revokeAnyRotationCapability = revokeAnyRotationCapability;
|
|
1304
1422
|
async function revokeAnySignerCapability(client, account, request, extraArgs) {
|
|
1423
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1305
1424
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1306
1425
|
sender: account.address(),
|
|
1307
1426
|
...extraArgs,
|
|
1308
1427
|
});
|
|
1309
|
-
const txn = await builder.build("0x1::account::revoke_any_signer_capability", request.type_arguments, request.arguments);
|
|
1428
|
+
const txn = await builder.build("0x1::account::revoke_any_signer_capability", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1310
1429
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1311
1430
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1312
1431
|
}
|
|
1313
1432
|
entry.revokeAnySignerCapability = revokeAnySignerCapability;
|
|
1314
1433
|
async function revokeRotationCapability(client, account, request, extraArgs) {
|
|
1434
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1315
1435
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1316
1436
|
sender: account.address(),
|
|
1317
1437
|
...extraArgs,
|
|
1318
1438
|
});
|
|
1319
|
-
const txn = await builder.build("0x1::account::revoke_rotation_capability", request.type_arguments, request.arguments);
|
|
1439
|
+
const txn = await builder.build("0x1::account::revoke_rotation_capability", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1320
1440
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1321
1441
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1322
1442
|
}
|
|
1323
1443
|
entry.revokeRotationCapability = revokeRotationCapability;
|
|
1324
1444
|
async function revokeSignerCapability(client, account, request, extraArgs) {
|
|
1445
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1325
1446
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1326
1447
|
sender: account.address(),
|
|
1327
1448
|
...extraArgs,
|
|
1328
1449
|
});
|
|
1329
|
-
const txn = await builder.build("0x1::account::revoke_signer_capability", request.type_arguments, request.arguments);
|
|
1450
|
+
const txn = await builder.build("0x1::account::revoke_signer_capability", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1330
1451
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1331
1452
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1332
1453
|
}
|
|
1333
1454
|
entry.revokeSignerCapability = revokeSignerCapability;
|
|
1334
1455
|
async function rotateAuthenticationKey(client, account, request, extraArgs) {
|
|
1456
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1335
1457
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1336
1458
|
sender: account.address(),
|
|
1337
1459
|
...extraArgs,
|
|
1338
1460
|
});
|
|
1339
|
-
const txn = await builder.build("0x1::account::rotate_authentication_key", request.type_arguments, request.arguments);
|
|
1461
|
+
const txn = await builder.build("0x1::account::rotate_authentication_key", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1340
1462
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1341
1463
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1342
1464
|
}
|
|
1343
1465
|
entry.rotateAuthenticationKey = rotateAuthenticationKey;
|
|
1344
1466
|
async function rotateAuthenticationKeyWithRotationCapability(client, account, request, extraArgs) {
|
|
1467
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1345
1468
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1346
1469
|
sender: account.address(),
|
|
1347
1470
|
...extraArgs,
|
|
1348
1471
|
});
|
|
1349
|
-
const txn = await builder.build("0x1::account::rotate_authentication_key_with_rotation_capability", request.type_arguments, request.arguments);
|
|
1472
|
+
const txn = await builder.build("0x1::account::rotate_authentication_key_with_rotation_capability", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1350
1473
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1351
1474
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1352
1475
|
}
|
|
@@ -1355,64 +1478,73 @@ export var account;
|
|
|
1355
1478
|
let view;
|
|
1356
1479
|
(function (view) {
|
|
1357
1480
|
async function existsAt(client, request, version) {
|
|
1358
|
-
const data = { ...request, function: "0x1::account::exists_at" };
|
|
1359
|
-
const res = await client.view(data, version?.toString());
|
|
1360
1481
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1482
|
+
const data = {
|
|
1483
|
+
type_arguments: request.type_arguments,
|
|
1484
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1485
|
+
function: "0x1::account::exists_at",
|
|
1486
|
+
};
|
|
1487
|
+
const res = await client.view(data, version?.toString());
|
|
1361
1488
|
const type = await coder.getMoveFunction("0x1::account::exists_at");
|
|
1362
1489
|
return (await coder.decodeArray(res, type.return));
|
|
1363
1490
|
}
|
|
1364
1491
|
view.existsAt = existsAt;
|
|
1365
1492
|
async function getAuthenticationKey(client, request, version) {
|
|
1493
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1366
1494
|
const data = {
|
|
1367
|
-
|
|
1495
|
+
type_arguments: request.type_arguments,
|
|
1496
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1368
1497
|
function: "0x1::account::get_authentication_key",
|
|
1369
1498
|
};
|
|
1370
1499
|
const res = await client.view(data, version?.toString());
|
|
1371
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1372
1500
|
const type = await coder.getMoveFunction("0x1::account::get_authentication_key");
|
|
1373
1501
|
return (await coder.decodeArray(res, type.return));
|
|
1374
1502
|
}
|
|
1375
1503
|
view.getAuthenticationKey = getAuthenticationKey;
|
|
1376
1504
|
async function getGuidNextCreationNum(client, request, version) {
|
|
1505
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1377
1506
|
const data = {
|
|
1378
|
-
|
|
1507
|
+
type_arguments: request.type_arguments,
|
|
1508
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1379
1509
|
function: "0x1::account::get_guid_next_creation_num",
|
|
1380
1510
|
};
|
|
1381
1511
|
const res = await client.view(data, version?.toString());
|
|
1382
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1383
1512
|
const type = await coder.getMoveFunction("0x1::account::get_guid_next_creation_num");
|
|
1384
1513
|
return (await coder.decodeArray(res, type.return));
|
|
1385
1514
|
}
|
|
1386
1515
|
view.getGuidNextCreationNum = getGuidNextCreationNum;
|
|
1387
1516
|
async function getSequenceNumber(client, request, version) {
|
|
1517
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1388
1518
|
const data = {
|
|
1389
|
-
|
|
1519
|
+
type_arguments: request.type_arguments,
|
|
1520
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1390
1521
|
function: "0x1::account::get_sequence_number",
|
|
1391
1522
|
};
|
|
1392
1523
|
const res = await client.view(data, version?.toString());
|
|
1393
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1394
1524
|
const type = await coder.getMoveFunction("0x1::account::get_sequence_number");
|
|
1395
1525
|
return (await coder.decodeArray(res, type.return));
|
|
1396
1526
|
}
|
|
1397
1527
|
view.getSequenceNumber = getSequenceNumber;
|
|
1398
1528
|
async function getSignerCapabilityOfferFor(client, request, version) {
|
|
1529
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1399
1530
|
const data = {
|
|
1400
|
-
|
|
1531
|
+
type_arguments: request.type_arguments,
|
|
1532
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1401
1533
|
function: "0x1::account::get_signer_capability_offer_for",
|
|
1402
1534
|
};
|
|
1403
1535
|
const res = await client.view(data, version?.toString());
|
|
1404
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1405
1536
|
const type = await coder.getMoveFunction("0x1::account::get_signer_capability_offer_for");
|
|
1406
1537
|
return (await coder.decodeArray(res, type.return));
|
|
1407
1538
|
}
|
|
1408
1539
|
view.getSignerCapabilityOfferFor = getSignerCapabilityOfferFor;
|
|
1409
1540
|
async function isSignerCapabilityOffered(client, request, version) {
|
|
1541
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1410
1542
|
const data = {
|
|
1411
|
-
|
|
1543
|
+
type_arguments: request.type_arguments,
|
|
1544
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1412
1545
|
function: "0x1::account::is_signer_capability_offered",
|
|
1413
1546
|
};
|
|
1414
1547
|
const res = await client.view(data, version?.toString());
|
|
1415
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1416
1548
|
const type = await coder.getMoveFunction("0x1::account::is_signer_capability_offered");
|
|
1417
1549
|
return (await coder.decodeArray(res, type.return));
|
|
1418
1550
|
}
|
|
@@ -1520,11 +1652,12 @@ export var version;
|
|
|
1520
1652
|
let entry;
|
|
1521
1653
|
(function (entry) {
|
|
1522
1654
|
async function setVersion(client, account, request, extraArgs) {
|
|
1655
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1523
1656
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1524
1657
|
sender: account.address(),
|
|
1525
1658
|
...extraArgs,
|
|
1526
1659
|
});
|
|
1527
|
-
const txn = await builder.build("0x1::version::set_version", request.type_arguments, request.arguments);
|
|
1660
|
+
const txn = await builder.build("0x1::version::set_version", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1528
1661
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1529
1662
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1530
1663
|
}
|
|
@@ -1671,161 +1804,177 @@ export var vesting;
|
|
|
1671
1804
|
let entry;
|
|
1672
1805
|
(function (entry) {
|
|
1673
1806
|
async function adminWithdraw(client, account, request, extraArgs) {
|
|
1807
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1674
1808
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1675
1809
|
sender: account.address(),
|
|
1676
1810
|
...extraArgs,
|
|
1677
1811
|
});
|
|
1678
|
-
const txn = await builder.build("0x1::vesting::admin_withdraw", request.type_arguments, request.arguments);
|
|
1812
|
+
const txn = await builder.build("0x1::vesting::admin_withdraw", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1679
1813
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1680
1814
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1681
1815
|
}
|
|
1682
1816
|
entry.adminWithdraw = adminWithdraw;
|
|
1683
1817
|
async function distribute(client, account, request, extraArgs) {
|
|
1818
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1684
1819
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1685
1820
|
sender: account.address(),
|
|
1686
1821
|
...extraArgs,
|
|
1687
1822
|
});
|
|
1688
|
-
const txn = await builder.build("0x1::vesting::distribute", request.type_arguments, request.arguments);
|
|
1823
|
+
const txn = await builder.build("0x1::vesting::distribute", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1689
1824
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1690
1825
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1691
1826
|
}
|
|
1692
1827
|
entry.distribute = distribute;
|
|
1693
1828
|
async function distributeMany(client, account, request, extraArgs) {
|
|
1829
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1694
1830
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1695
1831
|
sender: account.address(),
|
|
1696
1832
|
...extraArgs,
|
|
1697
1833
|
});
|
|
1698
|
-
const txn = await builder.build("0x1::vesting::distribute_many", request.type_arguments, request.arguments);
|
|
1834
|
+
const txn = await builder.build("0x1::vesting::distribute_many", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1699
1835
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1700
1836
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1701
1837
|
}
|
|
1702
1838
|
entry.distributeMany = distributeMany;
|
|
1703
1839
|
async function resetBeneficiary(client, account, request, extraArgs) {
|
|
1840
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1704
1841
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1705
1842
|
sender: account.address(),
|
|
1706
1843
|
...extraArgs,
|
|
1707
1844
|
});
|
|
1708
|
-
const txn = await builder.build("0x1::vesting::reset_beneficiary", request.type_arguments, request.arguments);
|
|
1845
|
+
const txn = await builder.build("0x1::vesting::reset_beneficiary", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1709
1846
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1710
1847
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1711
1848
|
}
|
|
1712
1849
|
entry.resetBeneficiary = resetBeneficiary;
|
|
1713
1850
|
async function resetLockup(client, account, request, extraArgs) {
|
|
1851
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1714
1852
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1715
1853
|
sender: account.address(),
|
|
1716
1854
|
...extraArgs,
|
|
1717
1855
|
});
|
|
1718
|
-
const txn = await builder.build("0x1::vesting::reset_lockup", request.type_arguments, request.arguments);
|
|
1856
|
+
const txn = await builder.build("0x1::vesting::reset_lockup", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1719
1857
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1720
1858
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1721
1859
|
}
|
|
1722
1860
|
entry.resetLockup = resetLockup;
|
|
1723
1861
|
async function setBeneficiary(client, account, request, extraArgs) {
|
|
1862
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1724
1863
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1725
1864
|
sender: account.address(),
|
|
1726
1865
|
...extraArgs,
|
|
1727
1866
|
});
|
|
1728
|
-
const txn = await builder.build("0x1::vesting::set_beneficiary", request.type_arguments, request.arguments);
|
|
1867
|
+
const txn = await builder.build("0x1::vesting::set_beneficiary", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1729
1868
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1730
1869
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1731
1870
|
}
|
|
1732
1871
|
entry.setBeneficiary = setBeneficiary;
|
|
1733
1872
|
async function setBeneficiaryResetter(client, account, request, extraArgs) {
|
|
1873
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1734
1874
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1735
1875
|
sender: account.address(),
|
|
1736
1876
|
...extraArgs,
|
|
1737
1877
|
});
|
|
1738
|
-
const txn = await builder.build("0x1::vesting::set_beneficiary_resetter", request.type_arguments, request.arguments);
|
|
1878
|
+
const txn = await builder.build("0x1::vesting::set_beneficiary_resetter", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1739
1879
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1740
1880
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1741
1881
|
}
|
|
1742
1882
|
entry.setBeneficiaryResetter = setBeneficiaryResetter;
|
|
1743
1883
|
async function setManagementRole(client, account, request, extraArgs) {
|
|
1884
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1744
1885
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1745
1886
|
sender: account.address(),
|
|
1746
1887
|
...extraArgs,
|
|
1747
1888
|
});
|
|
1748
|
-
const txn = await builder.build("0x1::vesting::set_management_role", request.type_arguments, request.arguments);
|
|
1889
|
+
const txn = await builder.build("0x1::vesting::set_management_role", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1749
1890
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1750
1891
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1751
1892
|
}
|
|
1752
1893
|
entry.setManagementRole = setManagementRole;
|
|
1753
1894
|
async function terminateVestingContract(client, account, request, extraArgs) {
|
|
1895
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1754
1896
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1755
1897
|
sender: account.address(),
|
|
1756
1898
|
...extraArgs,
|
|
1757
1899
|
});
|
|
1758
|
-
const txn = await builder.build("0x1::vesting::terminate_vesting_contract", request.type_arguments, request.arguments);
|
|
1900
|
+
const txn = await builder.build("0x1::vesting::terminate_vesting_contract", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1759
1901
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1760
1902
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1761
1903
|
}
|
|
1762
1904
|
entry.terminateVestingContract = terminateVestingContract;
|
|
1763
1905
|
async function unlockRewards(client, account, request, extraArgs) {
|
|
1906
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1764
1907
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1765
1908
|
sender: account.address(),
|
|
1766
1909
|
...extraArgs,
|
|
1767
1910
|
});
|
|
1768
|
-
const txn = await builder.build("0x1::vesting::unlock_rewards", request.type_arguments, request.arguments);
|
|
1911
|
+
const txn = await builder.build("0x1::vesting::unlock_rewards", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1769
1912
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1770
1913
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1771
1914
|
}
|
|
1772
1915
|
entry.unlockRewards = unlockRewards;
|
|
1773
1916
|
async function unlockRewardsMany(client, account, request, extraArgs) {
|
|
1917
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1774
1918
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1775
1919
|
sender: account.address(),
|
|
1776
1920
|
...extraArgs,
|
|
1777
1921
|
});
|
|
1778
|
-
const txn = await builder.build("0x1::vesting::unlock_rewards_many", request.type_arguments, request.arguments);
|
|
1922
|
+
const txn = await builder.build("0x1::vesting::unlock_rewards_many", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1779
1923
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1780
1924
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1781
1925
|
}
|
|
1782
1926
|
entry.unlockRewardsMany = unlockRewardsMany;
|
|
1783
1927
|
async function updateOperator(client, account, request, extraArgs) {
|
|
1928
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1784
1929
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1785
1930
|
sender: account.address(),
|
|
1786
1931
|
...extraArgs,
|
|
1787
1932
|
});
|
|
1788
|
-
const txn = await builder.build("0x1::vesting::update_operator", request.type_arguments, request.arguments);
|
|
1933
|
+
const txn = await builder.build("0x1::vesting::update_operator", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1789
1934
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1790
1935
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1791
1936
|
}
|
|
1792
1937
|
entry.updateOperator = updateOperator;
|
|
1793
1938
|
async function updateOperatorWithSameCommission(client, account, request, extraArgs) {
|
|
1939
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1794
1940
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1795
1941
|
sender: account.address(),
|
|
1796
1942
|
...extraArgs,
|
|
1797
1943
|
});
|
|
1798
|
-
const txn = await builder.build("0x1::vesting::update_operator_with_same_commission", request.type_arguments, request.arguments);
|
|
1944
|
+
const txn = await builder.build("0x1::vesting::update_operator_with_same_commission", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1799
1945
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1800
1946
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1801
1947
|
}
|
|
1802
1948
|
entry.updateOperatorWithSameCommission = updateOperatorWithSameCommission;
|
|
1803
1949
|
async function updateVoter(client, account, request, extraArgs) {
|
|
1950
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1804
1951
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1805
1952
|
sender: account.address(),
|
|
1806
1953
|
...extraArgs,
|
|
1807
1954
|
});
|
|
1808
|
-
const txn = await builder.build("0x1::vesting::update_voter", request.type_arguments, request.arguments);
|
|
1955
|
+
const txn = await builder.build("0x1::vesting::update_voter", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1809
1956
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1810
1957
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1811
1958
|
}
|
|
1812
1959
|
entry.updateVoter = updateVoter;
|
|
1813
1960
|
async function vest(client, account, request, extraArgs) {
|
|
1961
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1814
1962
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1815
1963
|
sender: account.address(),
|
|
1816
1964
|
...extraArgs,
|
|
1817
1965
|
});
|
|
1818
|
-
const txn = await builder.build("0x1::vesting::vest", request.type_arguments, request.arguments);
|
|
1966
|
+
const txn = await builder.build("0x1::vesting::vest", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1819
1967
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1820
1968
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1821
1969
|
}
|
|
1822
1970
|
entry.vest = vest;
|
|
1823
1971
|
async function vestMany(client, account, request, extraArgs) {
|
|
1972
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1824
1973
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
1825
1974
|
sender: account.address(),
|
|
1826
1975
|
...extraArgs,
|
|
1827
1976
|
});
|
|
1828
|
-
const txn = await builder.build("0x1::vesting::vest_many", request.type_arguments, request.arguments);
|
|
1977
|
+
const txn = await builder.build("0x1::vesting::vest_many", request.type_arguments, coder.encodeArray(request.arguments));
|
|
1829
1978
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
1830
1979
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
1831
1980
|
}
|
|
@@ -1834,125 +1983,169 @@ export var vesting;
|
|
|
1834
1983
|
let view;
|
|
1835
1984
|
(function (view) {
|
|
1836
1985
|
async function accumulatedRewards(client, request, version) {
|
|
1986
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1837
1987
|
const data = {
|
|
1838
|
-
|
|
1988
|
+
type_arguments: request.type_arguments,
|
|
1989
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1839
1990
|
function: "0x1::vesting::accumulated_rewards",
|
|
1840
1991
|
};
|
|
1841
1992
|
const res = await client.view(data, version?.toString());
|
|
1842
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1843
1993
|
const type = await coder.getMoveFunction("0x1::vesting::accumulated_rewards");
|
|
1844
1994
|
return (await coder.decodeArray(res, type.return));
|
|
1845
1995
|
}
|
|
1846
1996
|
view.accumulatedRewards = accumulatedRewards;
|
|
1847
1997
|
async function beneficiary(client, request, version) {
|
|
1848
|
-
const data = { ...request, function: "0x1::vesting::beneficiary" };
|
|
1849
|
-
const res = await client.view(data, version?.toString());
|
|
1850
1998
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1999
|
+
const data = {
|
|
2000
|
+
type_arguments: request.type_arguments,
|
|
2001
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2002
|
+
function: "0x1::vesting::beneficiary",
|
|
2003
|
+
};
|
|
2004
|
+
const res = await client.view(data, version?.toString());
|
|
1851
2005
|
const type = await coder.getMoveFunction("0x1::vesting::beneficiary");
|
|
1852
2006
|
return (await coder.decodeArray(res, type.return));
|
|
1853
2007
|
}
|
|
1854
2008
|
view.beneficiary = beneficiary;
|
|
1855
2009
|
async function operator(client, request, version) {
|
|
1856
|
-
const data = { ...request, function: "0x1::vesting::operator" };
|
|
1857
|
-
const res = await client.view(data, version?.toString());
|
|
1858
2010
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2011
|
+
const data = {
|
|
2012
|
+
type_arguments: request.type_arguments,
|
|
2013
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2014
|
+
function: "0x1::vesting::operator",
|
|
2015
|
+
};
|
|
2016
|
+
const res = await client.view(data, version?.toString());
|
|
1859
2017
|
const type = await coder.getMoveFunction("0x1::vesting::operator");
|
|
1860
2018
|
return (await coder.decodeArray(res, type.return));
|
|
1861
2019
|
}
|
|
1862
2020
|
view.operator = operator;
|
|
1863
2021
|
async function operatorCommissionPercentage(client, request, version) {
|
|
2022
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1864
2023
|
const data = {
|
|
1865
|
-
|
|
2024
|
+
type_arguments: request.type_arguments,
|
|
2025
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1866
2026
|
function: "0x1::vesting::operator_commission_percentage",
|
|
1867
2027
|
};
|
|
1868
2028
|
const res = await client.view(data, version?.toString());
|
|
1869
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1870
2029
|
const type = await coder.getMoveFunction("0x1::vesting::operator_commission_percentage");
|
|
1871
2030
|
return (await coder.decodeArray(res, type.return));
|
|
1872
2031
|
}
|
|
1873
2032
|
view.operatorCommissionPercentage = operatorCommissionPercentage;
|
|
1874
2033
|
async function periodDurationSecs(client, request, version) {
|
|
2034
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1875
2035
|
const data = {
|
|
1876
|
-
|
|
2036
|
+
type_arguments: request.type_arguments,
|
|
2037
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1877
2038
|
function: "0x1::vesting::period_duration_secs",
|
|
1878
2039
|
};
|
|
1879
2040
|
const res = await client.view(data, version?.toString());
|
|
1880
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1881
2041
|
const type = await coder.getMoveFunction("0x1::vesting::period_duration_secs");
|
|
1882
2042
|
return (await coder.decodeArray(res, type.return));
|
|
1883
2043
|
}
|
|
1884
2044
|
view.periodDurationSecs = periodDurationSecs;
|
|
1885
2045
|
async function remainingGrant(client, request, version) {
|
|
1886
|
-
const data = { ...request, function: "0x1::vesting::remaining_grant" };
|
|
1887
|
-
const res = await client.view(data, version?.toString());
|
|
1888
2046
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2047
|
+
const data = {
|
|
2048
|
+
type_arguments: request.type_arguments,
|
|
2049
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2050
|
+
function: "0x1::vesting::remaining_grant",
|
|
2051
|
+
};
|
|
2052
|
+
const res = await client.view(data, version?.toString());
|
|
1889
2053
|
const type = await coder.getMoveFunction("0x1::vesting::remaining_grant");
|
|
1890
2054
|
return (await coder.decodeArray(res, type.return));
|
|
1891
2055
|
}
|
|
1892
2056
|
view.remainingGrant = remainingGrant;
|
|
1893
2057
|
async function shareholder(client, request, version) {
|
|
1894
|
-
const data = { ...request, function: "0x1::vesting::shareholder" };
|
|
1895
|
-
const res = await client.view(data, version?.toString());
|
|
1896
2058
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2059
|
+
const data = {
|
|
2060
|
+
type_arguments: request.type_arguments,
|
|
2061
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2062
|
+
function: "0x1::vesting::shareholder",
|
|
2063
|
+
};
|
|
2064
|
+
const res = await client.view(data, version?.toString());
|
|
1897
2065
|
const type = await coder.getMoveFunction("0x1::vesting::shareholder");
|
|
1898
2066
|
return (await coder.decodeArray(res, type.return));
|
|
1899
2067
|
}
|
|
1900
2068
|
view.shareholder = shareholder;
|
|
1901
2069
|
async function shareholders(client, request, version) {
|
|
1902
|
-
const data = { ...request, function: "0x1::vesting::shareholders" };
|
|
1903
|
-
const res = await client.view(data, version?.toString());
|
|
1904
2070
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2071
|
+
const data = {
|
|
2072
|
+
type_arguments: request.type_arguments,
|
|
2073
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2074
|
+
function: "0x1::vesting::shareholders",
|
|
2075
|
+
};
|
|
2076
|
+
const res = await client.view(data, version?.toString());
|
|
1905
2077
|
const type = await coder.getMoveFunction("0x1::vesting::shareholders");
|
|
1906
2078
|
return (await coder.decodeArray(res, type.return));
|
|
1907
2079
|
}
|
|
1908
2080
|
view.shareholders = shareholders;
|
|
1909
2081
|
async function stakePoolAddress(client, request, version) {
|
|
1910
|
-
const data = { ...request, function: "0x1::vesting::stake_pool_address" };
|
|
1911
|
-
const res = await client.view(data, version?.toString());
|
|
1912
2082
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2083
|
+
const data = {
|
|
2084
|
+
type_arguments: request.type_arguments,
|
|
2085
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2086
|
+
function: "0x1::vesting::stake_pool_address",
|
|
2087
|
+
};
|
|
2088
|
+
const res = await client.view(data, version?.toString());
|
|
1913
2089
|
const type = await coder.getMoveFunction("0x1::vesting::stake_pool_address");
|
|
1914
2090
|
return (await coder.decodeArray(res, type.return));
|
|
1915
2091
|
}
|
|
1916
2092
|
view.stakePoolAddress = stakePoolAddress;
|
|
1917
2093
|
async function totalAccumulatedRewards(client, request, version) {
|
|
2094
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1918
2095
|
const data = {
|
|
1919
|
-
|
|
2096
|
+
type_arguments: request.type_arguments,
|
|
2097
|
+
arguments: coder.encodeArray(request.arguments),
|
|
1920
2098
|
function: "0x1::vesting::total_accumulated_rewards",
|
|
1921
2099
|
};
|
|
1922
2100
|
const res = await client.view(data, version?.toString());
|
|
1923
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
1924
2101
|
const type = await coder.getMoveFunction("0x1::vesting::total_accumulated_rewards");
|
|
1925
2102
|
return (await coder.decodeArray(res, type.return));
|
|
1926
2103
|
}
|
|
1927
2104
|
view.totalAccumulatedRewards = totalAccumulatedRewards;
|
|
1928
2105
|
async function vestingContracts(client, request, version) {
|
|
1929
|
-
const data = { ...request, function: "0x1::vesting::vesting_contracts" };
|
|
1930
|
-
const res = await client.view(data, version?.toString());
|
|
1931
2106
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2107
|
+
const data = {
|
|
2108
|
+
type_arguments: request.type_arguments,
|
|
2109
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2110
|
+
function: "0x1::vesting::vesting_contracts",
|
|
2111
|
+
};
|
|
2112
|
+
const res = await client.view(data, version?.toString());
|
|
1932
2113
|
const type = await coder.getMoveFunction("0x1::vesting::vesting_contracts");
|
|
1933
2114
|
return (await coder.decodeArray(res, type.return));
|
|
1934
2115
|
}
|
|
1935
2116
|
view.vestingContracts = vestingContracts;
|
|
1936
2117
|
async function vestingSchedule(client, request, version) {
|
|
1937
|
-
const data = { ...request, function: "0x1::vesting::vesting_schedule" };
|
|
1938
|
-
const res = await client.view(data, version?.toString());
|
|
1939
2118
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2119
|
+
const data = {
|
|
2120
|
+
type_arguments: request.type_arguments,
|
|
2121
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2122
|
+
function: "0x1::vesting::vesting_schedule",
|
|
2123
|
+
};
|
|
2124
|
+
const res = await client.view(data, version?.toString());
|
|
1940
2125
|
const type = await coder.getMoveFunction("0x1::vesting::vesting_schedule");
|
|
1941
2126
|
return (await coder.decodeArray(res, type.return));
|
|
1942
2127
|
}
|
|
1943
2128
|
view.vestingSchedule = vestingSchedule;
|
|
1944
2129
|
async function vestingStartSecs(client, request, version) {
|
|
1945
|
-
const data = { ...request, function: "0x1::vesting::vesting_start_secs" };
|
|
1946
|
-
const res = await client.view(data, version?.toString());
|
|
1947
2130
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2131
|
+
const data = {
|
|
2132
|
+
type_arguments: request.type_arguments,
|
|
2133
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2134
|
+
function: "0x1::vesting::vesting_start_secs",
|
|
2135
|
+
};
|
|
2136
|
+
const res = await client.view(data, version?.toString());
|
|
1948
2137
|
const type = await coder.getMoveFunction("0x1::vesting::vesting_start_secs");
|
|
1949
2138
|
return (await coder.decodeArray(res, type.return));
|
|
1950
2139
|
}
|
|
1951
2140
|
view.vestingStartSecs = vestingStartSecs;
|
|
1952
2141
|
async function voter(client, request, version) {
|
|
1953
|
-
const data = { ...request, function: "0x1::vesting::voter" };
|
|
1954
|
-
const res = await client.view(data, version?.toString());
|
|
1955
2142
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2143
|
+
const data = {
|
|
2144
|
+
type_arguments: request.type_arguments,
|
|
2145
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2146
|
+
function: "0x1::vesting::voter",
|
|
2147
|
+
};
|
|
2148
|
+
const res = await client.view(data, version?.toString());
|
|
1956
2149
|
const type = await coder.getMoveFunction("0x1::vesting::voter");
|
|
1957
2150
|
return (await coder.decodeArray(res, type.return));
|
|
1958
2151
|
}
|
|
@@ -2030,9 +2223,13 @@ export var chain_id;
|
|
|
2030
2223
|
let view;
|
|
2031
2224
|
(function (view) {
|
|
2032
2225
|
async function get(client, request, version) {
|
|
2033
|
-
const data = { ...request, function: "0x1::chain_id::get" };
|
|
2034
|
-
const res = await client.view(data, version?.toString());
|
|
2035
2226
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2227
|
+
const data = {
|
|
2228
|
+
type_arguments: request.type_arguments,
|
|
2229
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2230
|
+
function: "0x1::chain_id::get",
|
|
2231
|
+
};
|
|
2232
|
+
const res = await client.view(data, version?.toString());
|
|
2036
2233
|
const type = await coder.getMoveFunction("0x1::chain_id::get");
|
|
2037
2234
|
return (await coder.decodeArray(res, type.return));
|
|
2038
2235
|
}
|
|
@@ -2098,17 +2295,25 @@ export var timestamp;
|
|
|
2098
2295
|
let view;
|
|
2099
2296
|
(function (view) {
|
|
2100
2297
|
async function nowMicroseconds(client, request, version) {
|
|
2101
|
-
const data = { ...request, function: "0x1::timestamp::now_microseconds" };
|
|
2102
|
-
const res = await client.view(data, version?.toString());
|
|
2103
2298
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2299
|
+
const data = {
|
|
2300
|
+
type_arguments: request.type_arguments,
|
|
2301
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2302
|
+
function: "0x1::timestamp::now_microseconds",
|
|
2303
|
+
};
|
|
2304
|
+
const res = await client.view(data, version?.toString());
|
|
2104
2305
|
const type = await coder.getMoveFunction("0x1::timestamp::now_microseconds");
|
|
2105
2306
|
return (await coder.decodeArray(res, type.return));
|
|
2106
2307
|
}
|
|
2107
2308
|
view.nowMicroseconds = nowMicroseconds;
|
|
2108
2309
|
async function nowSeconds(client, request, version) {
|
|
2109
|
-
const data = { ...request, function: "0x1::timestamp::now_seconds" };
|
|
2110
|
-
const res = await client.view(data, version?.toString());
|
|
2111
2310
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2311
|
+
const data = {
|
|
2312
|
+
type_arguments: request.type_arguments,
|
|
2313
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2314
|
+
function: "0x1::timestamp::now_seconds",
|
|
2315
|
+
};
|
|
2316
|
+
const res = await client.view(data, version?.toString());
|
|
2112
2317
|
const type = await coder.getMoveFunction("0x1::timestamp::now_seconds");
|
|
2113
2318
|
return (await coder.decodeArray(res, type.return));
|
|
2114
2319
|
}
|
|
@@ -2180,31 +2385,34 @@ export var aptos_coin;
|
|
|
2180
2385
|
let entry;
|
|
2181
2386
|
(function (entry) {
|
|
2182
2387
|
async function claimMintCapability(client, account, request, extraArgs) {
|
|
2388
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2183
2389
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2184
2390
|
sender: account.address(),
|
|
2185
2391
|
...extraArgs,
|
|
2186
2392
|
});
|
|
2187
|
-
const txn = await builder.build("0x1::aptos_coin::claim_mint_capability", request.type_arguments, request.arguments);
|
|
2393
|
+
const txn = await builder.build("0x1::aptos_coin::claim_mint_capability", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2188
2394
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2189
2395
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2190
2396
|
}
|
|
2191
2397
|
entry.claimMintCapability = claimMintCapability;
|
|
2192
2398
|
async function delegateMintCapability(client, account, request, extraArgs) {
|
|
2399
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2193
2400
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2194
2401
|
sender: account.address(),
|
|
2195
2402
|
...extraArgs,
|
|
2196
2403
|
});
|
|
2197
|
-
const txn = await builder.build("0x1::aptos_coin::delegate_mint_capability", request.type_arguments, request.arguments);
|
|
2404
|
+
const txn = await builder.build("0x1::aptos_coin::delegate_mint_capability", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2198
2405
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2199
2406
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2200
2407
|
}
|
|
2201
2408
|
entry.delegateMintCapability = delegateMintCapability;
|
|
2202
2409
|
async function mint(client, account, request, extraArgs) {
|
|
2410
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2203
2411
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2204
2412
|
sender: account.address(),
|
|
2205
2413
|
...extraArgs,
|
|
2206
2414
|
});
|
|
2207
|
-
const txn = await builder.build("0x1::aptos_coin::mint", request.type_arguments, request.arguments);
|
|
2415
|
+
const txn = await builder.build("0x1::aptos_coin::mint", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2208
2416
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2209
2417
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2210
2418
|
}
|
|
@@ -2390,17 +2598,25 @@ export var chain_status;
|
|
|
2390
2598
|
let view;
|
|
2391
2599
|
(function (view) {
|
|
2392
2600
|
async function isGenesis(client, request, version) {
|
|
2393
|
-
const data = { ...request, function: "0x1::chain_status::is_genesis" };
|
|
2394
|
-
const res = await client.view(data, version?.toString());
|
|
2395
2601
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2602
|
+
const data = {
|
|
2603
|
+
type_arguments: request.type_arguments,
|
|
2604
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2605
|
+
function: "0x1::chain_status::is_genesis",
|
|
2606
|
+
};
|
|
2607
|
+
const res = await client.view(data, version?.toString());
|
|
2396
2608
|
const type = await coder.getMoveFunction("0x1::chain_status::is_genesis");
|
|
2397
2609
|
return (await coder.decodeArray(res, type.return));
|
|
2398
2610
|
}
|
|
2399
2611
|
view.isGenesis = isGenesis;
|
|
2400
2612
|
async function isOperating(client, request, version) {
|
|
2401
|
-
const data = { ...request, function: "0x1::chain_status::is_operating" };
|
|
2402
|
-
const res = await client.view(data, version?.toString());
|
|
2403
2613
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2614
|
+
const data = {
|
|
2615
|
+
type_arguments: request.type_arguments,
|
|
2616
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2617
|
+
function: "0x1::chain_status::is_operating",
|
|
2618
|
+
};
|
|
2619
|
+
const res = await client.view(data, version?.toString());
|
|
2404
2620
|
const type = await coder.getMoveFunction("0x1::chain_status::is_operating");
|
|
2405
2621
|
return (await coder.decodeArray(res, type.return));
|
|
2406
2622
|
}
|
|
@@ -2463,41 +2679,45 @@ export var managed_coin;
|
|
|
2463
2679
|
let entry;
|
|
2464
2680
|
(function (entry) {
|
|
2465
2681
|
async function burn(client, account, request, extraArgs) {
|
|
2682
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2466
2683
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2467
2684
|
sender: account.address(),
|
|
2468
2685
|
...extraArgs,
|
|
2469
2686
|
});
|
|
2470
|
-
const txn = await builder.build("0x1::managed_coin::burn", request.type_arguments, request.arguments);
|
|
2687
|
+
const txn = await builder.build("0x1::managed_coin::burn", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2471
2688
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2472
2689
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2473
2690
|
}
|
|
2474
2691
|
entry.burn = burn;
|
|
2475
2692
|
async function initialize(client, account, request, extraArgs) {
|
|
2693
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2476
2694
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2477
2695
|
sender: account.address(),
|
|
2478
2696
|
...extraArgs,
|
|
2479
2697
|
});
|
|
2480
|
-
const txn = await builder.build("0x1::managed_coin::initialize", request.type_arguments, request.arguments);
|
|
2698
|
+
const txn = await builder.build("0x1::managed_coin::initialize", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2481
2699
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2482
2700
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2483
2701
|
}
|
|
2484
2702
|
entry.initialize = initialize;
|
|
2485
2703
|
async function mint(client, account, request, extraArgs) {
|
|
2704
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2486
2705
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2487
2706
|
sender: account.address(),
|
|
2488
2707
|
...extraArgs,
|
|
2489
2708
|
});
|
|
2490
|
-
const txn = await builder.build("0x1::managed_coin::mint", request.type_arguments, request.arguments);
|
|
2709
|
+
const txn = await builder.build("0x1::managed_coin::mint", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2491
2710
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2492
2711
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2493
2712
|
}
|
|
2494
2713
|
entry.mint = mint;
|
|
2495
2714
|
async function register(client, account, request, extraArgs) {
|
|
2715
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2496
2716
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2497
2717
|
sender: account.address(),
|
|
2498
2718
|
...extraArgs,
|
|
2499
2719
|
});
|
|
2500
|
-
const txn = await builder.build("0x1::managed_coin::register", request.type_arguments, request.arguments);
|
|
2720
|
+
const txn = await builder.build("0x1::managed_coin::register", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2501
2721
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2502
2722
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2503
2723
|
}
|
|
@@ -2599,61 +2819,67 @@ export var aptos_account;
|
|
|
2599
2819
|
let entry;
|
|
2600
2820
|
(function (entry) {
|
|
2601
2821
|
async function batchTransfer(client, account, request, extraArgs) {
|
|
2822
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2602
2823
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2603
2824
|
sender: account.address(),
|
|
2604
2825
|
...extraArgs,
|
|
2605
2826
|
});
|
|
2606
|
-
const txn = await builder.build("0x1::aptos_account::batch_transfer", request.type_arguments, request.arguments);
|
|
2827
|
+
const txn = await builder.build("0x1::aptos_account::batch_transfer", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2607
2828
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2608
2829
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2609
2830
|
}
|
|
2610
2831
|
entry.batchTransfer = batchTransfer;
|
|
2611
2832
|
async function batchTransferCoins(client, account, request, extraArgs) {
|
|
2833
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2612
2834
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2613
2835
|
sender: account.address(),
|
|
2614
2836
|
...extraArgs,
|
|
2615
2837
|
});
|
|
2616
|
-
const txn = await builder.build("0x1::aptos_account::batch_transfer_coins", request.type_arguments, request.arguments);
|
|
2838
|
+
const txn = await builder.build("0x1::aptos_account::batch_transfer_coins", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2617
2839
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2618
2840
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2619
2841
|
}
|
|
2620
2842
|
entry.batchTransferCoins = batchTransferCoins;
|
|
2621
2843
|
async function createAccount(client, account, request, extraArgs) {
|
|
2844
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2622
2845
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2623
2846
|
sender: account.address(),
|
|
2624
2847
|
...extraArgs,
|
|
2625
2848
|
});
|
|
2626
|
-
const txn = await builder.build("0x1::aptos_account::create_account", request.type_arguments, request.arguments);
|
|
2849
|
+
const txn = await builder.build("0x1::aptos_account::create_account", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2627
2850
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2628
2851
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2629
2852
|
}
|
|
2630
2853
|
entry.createAccount = createAccount;
|
|
2631
2854
|
async function setAllowDirectCoinTransfers(client, account, request, extraArgs) {
|
|
2855
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2632
2856
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2633
2857
|
sender: account.address(),
|
|
2634
2858
|
...extraArgs,
|
|
2635
2859
|
});
|
|
2636
|
-
const txn = await builder.build("0x1::aptos_account::set_allow_direct_coin_transfers", request.type_arguments, request.arguments);
|
|
2860
|
+
const txn = await builder.build("0x1::aptos_account::set_allow_direct_coin_transfers", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2637
2861
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2638
2862
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2639
2863
|
}
|
|
2640
2864
|
entry.setAllowDirectCoinTransfers = setAllowDirectCoinTransfers;
|
|
2641
2865
|
async function transfer(client, account, request, extraArgs) {
|
|
2866
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2642
2867
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2643
2868
|
sender: account.address(),
|
|
2644
2869
|
...extraArgs,
|
|
2645
2870
|
});
|
|
2646
|
-
const txn = await builder.build("0x1::aptos_account::transfer", request.type_arguments, request.arguments);
|
|
2871
|
+
const txn = await builder.build("0x1::aptos_account::transfer", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2647
2872
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2648
2873
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2649
2874
|
}
|
|
2650
2875
|
entry.transfer = transfer;
|
|
2651
2876
|
async function transferCoins(client, account, request, extraArgs) {
|
|
2877
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2652
2878
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2653
2879
|
sender: account.address(),
|
|
2654
2880
|
...extraArgs,
|
|
2655
2881
|
});
|
|
2656
|
-
const txn = await builder.build("0x1::aptos_account::transfer_coins", request.type_arguments, request.arguments);
|
|
2882
|
+
const txn = await builder.build("0x1::aptos_account::transfer_coins", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2657
2883
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2658
2884
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2659
2885
|
}
|
|
@@ -2662,12 +2888,13 @@ export var aptos_account;
|
|
|
2662
2888
|
let view;
|
|
2663
2889
|
(function (view) {
|
|
2664
2890
|
async function canReceiveDirectCoinTransfers(client, request, version) {
|
|
2891
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2665
2892
|
const data = {
|
|
2666
|
-
|
|
2893
|
+
type_arguments: request.type_arguments,
|
|
2894
|
+
arguments: coder.encodeArray(request.arguments),
|
|
2667
2895
|
function: "0x1::aptos_account::can_receive_direct_coin_transfers",
|
|
2668
2896
|
};
|
|
2669
2897
|
const res = await client.view(data, version?.toString());
|
|
2670
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2671
2898
|
const type = await coder.getMoveFunction("0x1::aptos_account::can_receive_direct_coin_transfers");
|
|
2672
2899
|
return (await coder.decodeArray(res, type.return));
|
|
2673
2900
|
}
|
|
@@ -2733,81 +2960,89 @@ export var staking_proxy;
|
|
|
2733
2960
|
let entry;
|
|
2734
2961
|
(function (entry) {
|
|
2735
2962
|
async function setOperator(client, account, request, extraArgs) {
|
|
2963
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2736
2964
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2737
2965
|
sender: account.address(),
|
|
2738
2966
|
...extraArgs,
|
|
2739
2967
|
});
|
|
2740
|
-
const txn = await builder.build("0x1::staking_proxy::set_operator", request.type_arguments, request.arguments);
|
|
2968
|
+
const txn = await builder.build("0x1::staking_proxy::set_operator", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2741
2969
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2742
2970
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2743
2971
|
}
|
|
2744
2972
|
entry.setOperator = setOperator;
|
|
2745
2973
|
async function setStakePoolOperator(client, account, request, extraArgs) {
|
|
2974
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2746
2975
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2747
2976
|
sender: account.address(),
|
|
2748
2977
|
...extraArgs,
|
|
2749
2978
|
});
|
|
2750
|
-
const txn = await builder.build("0x1::staking_proxy::set_stake_pool_operator", request.type_arguments, request.arguments);
|
|
2979
|
+
const txn = await builder.build("0x1::staking_proxy::set_stake_pool_operator", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2751
2980
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2752
2981
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2753
2982
|
}
|
|
2754
2983
|
entry.setStakePoolOperator = setStakePoolOperator;
|
|
2755
2984
|
async function setStakePoolVoter(client, account, request, extraArgs) {
|
|
2985
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2756
2986
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2757
2987
|
sender: account.address(),
|
|
2758
2988
|
...extraArgs,
|
|
2759
2989
|
});
|
|
2760
|
-
const txn = await builder.build("0x1::staking_proxy::set_stake_pool_voter", request.type_arguments, request.arguments);
|
|
2990
|
+
const txn = await builder.build("0x1::staking_proxy::set_stake_pool_voter", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2761
2991
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2762
2992
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2763
2993
|
}
|
|
2764
2994
|
entry.setStakePoolVoter = setStakePoolVoter;
|
|
2765
2995
|
async function setStakingContractOperator(client, account, request, extraArgs) {
|
|
2996
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2766
2997
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2767
2998
|
sender: account.address(),
|
|
2768
2999
|
...extraArgs,
|
|
2769
3000
|
});
|
|
2770
|
-
const txn = await builder.build("0x1::staking_proxy::set_staking_contract_operator", request.type_arguments, request.arguments);
|
|
3001
|
+
const txn = await builder.build("0x1::staking_proxy::set_staking_contract_operator", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2771
3002
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2772
3003
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2773
3004
|
}
|
|
2774
3005
|
entry.setStakingContractOperator = setStakingContractOperator;
|
|
2775
3006
|
async function setStakingContractVoter(client, account, request, extraArgs) {
|
|
3007
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2776
3008
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2777
3009
|
sender: account.address(),
|
|
2778
3010
|
...extraArgs,
|
|
2779
3011
|
});
|
|
2780
|
-
const txn = await builder.build("0x1::staking_proxy::set_staking_contract_voter", request.type_arguments, request.arguments);
|
|
3012
|
+
const txn = await builder.build("0x1::staking_proxy::set_staking_contract_voter", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2781
3013
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2782
3014
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2783
3015
|
}
|
|
2784
3016
|
entry.setStakingContractVoter = setStakingContractVoter;
|
|
2785
3017
|
async function setVestingContractOperator(client, account, request, extraArgs) {
|
|
3018
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2786
3019
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2787
3020
|
sender: account.address(),
|
|
2788
3021
|
...extraArgs,
|
|
2789
3022
|
});
|
|
2790
|
-
const txn = await builder.build("0x1::staking_proxy::set_vesting_contract_operator", request.type_arguments, request.arguments);
|
|
3023
|
+
const txn = await builder.build("0x1::staking_proxy::set_vesting_contract_operator", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2791
3024
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2792
3025
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2793
3026
|
}
|
|
2794
3027
|
entry.setVestingContractOperator = setVestingContractOperator;
|
|
2795
3028
|
async function setVestingContractVoter(client, account, request, extraArgs) {
|
|
3029
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2796
3030
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2797
3031
|
sender: account.address(),
|
|
2798
3032
|
...extraArgs,
|
|
2799
3033
|
});
|
|
2800
|
-
const txn = await builder.build("0x1::staking_proxy::set_vesting_contract_voter", request.type_arguments, request.arguments);
|
|
3034
|
+
const txn = await builder.build("0x1::staking_proxy::set_vesting_contract_voter", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2801
3035
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2802
3036
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2803
3037
|
}
|
|
2804
3038
|
entry.setVestingContractVoter = setVestingContractVoter;
|
|
2805
3039
|
async function setVoter(client, account, request, extraArgs) {
|
|
3040
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2806
3041
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2807
3042
|
sender: account.address(),
|
|
2808
3043
|
...extraArgs,
|
|
2809
3044
|
});
|
|
2810
|
-
const txn = await builder.build("0x1::staking_proxy::set_voter", request.type_arguments, request.arguments);
|
|
3045
|
+
const txn = await builder.build("0x1::staking_proxy::set_voter", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2811
3046
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2812
3047
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2813
3048
|
}
|
|
@@ -2960,11 +3195,12 @@ export var fungible_asset;
|
|
|
2960
3195
|
let entry;
|
|
2961
3196
|
(function (entry) {
|
|
2962
3197
|
async function transfer(client, account, request, extraArgs) {
|
|
3198
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
2963
3199
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
2964
3200
|
sender: account.address(),
|
|
2965
3201
|
...extraArgs,
|
|
2966
3202
|
});
|
|
2967
|
-
const txn = await builder.build("0x1::fungible_asset::transfer", request.type_arguments, request.arguments);
|
|
3203
|
+
const txn = await builder.build("0x1::fungible_asset::transfer", request.type_arguments, coder.encodeArray(request.arguments));
|
|
2968
3204
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
2969
3205
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
2970
3206
|
}
|
|
@@ -2973,79 +3209,109 @@ export var fungible_asset;
|
|
|
2973
3209
|
let view;
|
|
2974
3210
|
(function (view) {
|
|
2975
3211
|
async function balance(client, request, version) {
|
|
2976
|
-
const data = { ...request, function: "0x1::fungible_asset::balance" };
|
|
2977
|
-
const res = await client.view(data, version?.toString());
|
|
2978
3212
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3213
|
+
const data = {
|
|
3214
|
+
type_arguments: request.type_arguments,
|
|
3215
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3216
|
+
function: "0x1::fungible_asset::balance",
|
|
3217
|
+
};
|
|
3218
|
+
const res = await client.view(data, version?.toString());
|
|
2979
3219
|
const type = await coder.getMoveFunction("0x1::fungible_asset::balance");
|
|
2980
3220
|
return (await coder.decodeArray(res, type.return));
|
|
2981
3221
|
}
|
|
2982
3222
|
view.balance = balance;
|
|
2983
3223
|
async function decimals(client, request, version) {
|
|
2984
|
-
const data = { ...request, function: "0x1::fungible_asset::decimals" };
|
|
2985
|
-
const res = await client.view(data, version?.toString());
|
|
2986
3224
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3225
|
+
const data = {
|
|
3226
|
+
type_arguments: request.type_arguments,
|
|
3227
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3228
|
+
function: "0x1::fungible_asset::decimals",
|
|
3229
|
+
};
|
|
3230
|
+
const res = await client.view(data, version?.toString());
|
|
2987
3231
|
const type = await coder.getMoveFunction("0x1::fungible_asset::decimals");
|
|
2988
3232
|
return (await coder.decodeArray(res, type.return));
|
|
2989
3233
|
}
|
|
2990
3234
|
view.decimals = decimals;
|
|
2991
3235
|
async function isFrozen(client, request, version) {
|
|
2992
|
-
const data = { ...request, function: "0x1::fungible_asset::is_frozen" };
|
|
2993
|
-
const res = await client.view(data, version?.toString());
|
|
2994
3236
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3237
|
+
const data = {
|
|
3238
|
+
type_arguments: request.type_arguments,
|
|
3239
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3240
|
+
function: "0x1::fungible_asset::is_frozen",
|
|
3241
|
+
};
|
|
3242
|
+
const res = await client.view(data, version?.toString());
|
|
2995
3243
|
const type = await coder.getMoveFunction("0x1::fungible_asset::is_frozen");
|
|
2996
3244
|
return (await coder.decodeArray(res, type.return));
|
|
2997
3245
|
}
|
|
2998
3246
|
view.isFrozen = isFrozen;
|
|
2999
3247
|
async function maximum(client, request, version) {
|
|
3000
|
-
const data = { ...request, function: "0x1::fungible_asset::maximum" };
|
|
3001
|
-
const res = await client.view(data, version?.toString());
|
|
3002
3248
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3249
|
+
const data = {
|
|
3250
|
+
type_arguments: request.type_arguments,
|
|
3251
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3252
|
+
function: "0x1::fungible_asset::maximum",
|
|
3253
|
+
};
|
|
3254
|
+
const res = await client.view(data, version?.toString());
|
|
3003
3255
|
const type = await coder.getMoveFunction("0x1::fungible_asset::maximum");
|
|
3004
3256
|
return (await coder.decodeArray(res, type.return));
|
|
3005
3257
|
}
|
|
3006
3258
|
view.maximum = maximum;
|
|
3007
3259
|
async function name(client, request, version) {
|
|
3008
|
-
const data = { ...request, function: "0x1::fungible_asset::name" };
|
|
3009
|
-
const res = await client.view(data, version?.toString());
|
|
3010
3260
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3261
|
+
const data = {
|
|
3262
|
+
type_arguments: request.type_arguments,
|
|
3263
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3264
|
+
function: "0x1::fungible_asset::name",
|
|
3265
|
+
};
|
|
3266
|
+
const res = await client.view(data, version?.toString());
|
|
3011
3267
|
const type = await coder.getMoveFunction("0x1::fungible_asset::name");
|
|
3012
3268
|
return (await coder.decodeArray(res, type.return));
|
|
3013
3269
|
}
|
|
3014
3270
|
view.name = name;
|
|
3015
3271
|
async function storeExists(client, request, version) {
|
|
3272
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3016
3273
|
const data = {
|
|
3017
|
-
|
|
3274
|
+
type_arguments: request.type_arguments,
|
|
3275
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3018
3276
|
function: "0x1::fungible_asset::store_exists",
|
|
3019
3277
|
};
|
|
3020
3278
|
const res = await client.view(data, version?.toString());
|
|
3021
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3022
3279
|
const type = await coder.getMoveFunction("0x1::fungible_asset::store_exists");
|
|
3023
3280
|
return (await coder.decodeArray(res, type.return));
|
|
3024
3281
|
}
|
|
3025
3282
|
view.storeExists = storeExists;
|
|
3026
3283
|
async function storeMetadata(client, request, version) {
|
|
3284
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3027
3285
|
const data = {
|
|
3028
|
-
|
|
3286
|
+
type_arguments: request.type_arguments,
|
|
3287
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3029
3288
|
function: "0x1::fungible_asset::store_metadata",
|
|
3030
3289
|
};
|
|
3031
3290
|
const res = await client.view(data, version?.toString());
|
|
3032
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3033
3291
|
const type = await coder.getMoveFunction("0x1::fungible_asset::store_metadata");
|
|
3034
3292
|
return (await coder.decodeArray(res, type.return));
|
|
3035
3293
|
}
|
|
3036
3294
|
view.storeMetadata = storeMetadata;
|
|
3037
3295
|
async function supply(client, request, version) {
|
|
3038
|
-
const data = { ...request, function: "0x1::fungible_asset::supply" };
|
|
3039
|
-
const res = await client.view(data, version?.toString());
|
|
3040
3296
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3297
|
+
const data = {
|
|
3298
|
+
type_arguments: request.type_arguments,
|
|
3299
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3300
|
+
function: "0x1::fungible_asset::supply",
|
|
3301
|
+
};
|
|
3302
|
+
const res = await client.view(data, version?.toString());
|
|
3041
3303
|
const type = await coder.getMoveFunction("0x1::fungible_asset::supply");
|
|
3042
3304
|
return (await coder.decodeArray(res, type.return));
|
|
3043
3305
|
}
|
|
3044
3306
|
view.supply = supply;
|
|
3045
3307
|
async function symbol(client, request, version) {
|
|
3046
|
-
const data = { ...request, function: "0x1::fungible_asset::symbol" };
|
|
3047
|
-
const res = await client.view(data, version?.toString());
|
|
3048
3308
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3309
|
+
const data = {
|
|
3310
|
+
type_arguments: request.type_arguments,
|
|
3311
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3312
|
+
function: "0x1::fungible_asset::symbol",
|
|
3313
|
+
};
|
|
3314
|
+
const res = await client.view(data, version?.toString());
|
|
3049
3315
|
const type = await coder.getMoveFunction("0x1::fungible_asset::symbol");
|
|
3050
3316
|
return (await coder.decodeArray(res, type.return));
|
|
3051
3317
|
}
|
|
@@ -3150,81 +3416,89 @@ export var delegation_pool;
|
|
|
3150
3416
|
let entry;
|
|
3151
3417
|
(function (entry) {
|
|
3152
3418
|
async function addStake(client, account, request, extraArgs) {
|
|
3419
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3153
3420
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3154
3421
|
sender: account.address(),
|
|
3155
3422
|
...extraArgs,
|
|
3156
3423
|
});
|
|
3157
|
-
const txn = await builder.build("0x1::delegation_pool::add_stake", request.type_arguments, request.arguments);
|
|
3424
|
+
const txn = await builder.build("0x1::delegation_pool::add_stake", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3158
3425
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3159
3426
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3160
3427
|
}
|
|
3161
3428
|
entry.addStake = addStake;
|
|
3162
3429
|
async function initializeDelegationPool(client, account, request, extraArgs) {
|
|
3430
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3163
3431
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3164
3432
|
sender: account.address(),
|
|
3165
3433
|
...extraArgs,
|
|
3166
3434
|
});
|
|
3167
|
-
const txn = await builder.build("0x1::delegation_pool::initialize_delegation_pool", request.type_arguments, request.arguments);
|
|
3435
|
+
const txn = await builder.build("0x1::delegation_pool::initialize_delegation_pool", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3168
3436
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3169
3437
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3170
3438
|
}
|
|
3171
3439
|
entry.initializeDelegationPool = initializeDelegationPool;
|
|
3172
3440
|
async function reactivateStake(client, account, request, extraArgs) {
|
|
3441
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3173
3442
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3174
3443
|
sender: account.address(),
|
|
3175
3444
|
...extraArgs,
|
|
3176
3445
|
});
|
|
3177
|
-
const txn = await builder.build("0x1::delegation_pool::reactivate_stake", request.type_arguments, request.arguments);
|
|
3446
|
+
const txn = await builder.build("0x1::delegation_pool::reactivate_stake", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3178
3447
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3179
3448
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3180
3449
|
}
|
|
3181
3450
|
entry.reactivateStake = reactivateStake;
|
|
3182
3451
|
async function setDelegatedVoter(client, account, request, extraArgs) {
|
|
3452
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3183
3453
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3184
3454
|
sender: account.address(),
|
|
3185
3455
|
...extraArgs,
|
|
3186
3456
|
});
|
|
3187
|
-
const txn = await builder.build("0x1::delegation_pool::set_delegated_voter", request.type_arguments, request.arguments);
|
|
3457
|
+
const txn = await builder.build("0x1::delegation_pool::set_delegated_voter", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3188
3458
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3189
3459
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3190
3460
|
}
|
|
3191
3461
|
entry.setDelegatedVoter = setDelegatedVoter;
|
|
3192
3462
|
async function setOperator(client, account, request, extraArgs) {
|
|
3463
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3193
3464
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3194
3465
|
sender: account.address(),
|
|
3195
3466
|
...extraArgs,
|
|
3196
3467
|
});
|
|
3197
|
-
const txn = await builder.build("0x1::delegation_pool::set_operator", request.type_arguments, request.arguments);
|
|
3468
|
+
const txn = await builder.build("0x1::delegation_pool::set_operator", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3198
3469
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3199
3470
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3200
3471
|
}
|
|
3201
3472
|
entry.setOperator = setOperator;
|
|
3202
3473
|
async function synchronizeDelegationPool(client, account, request, extraArgs) {
|
|
3474
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3203
3475
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3204
3476
|
sender: account.address(),
|
|
3205
3477
|
...extraArgs,
|
|
3206
3478
|
});
|
|
3207
|
-
const txn = await builder.build("0x1::delegation_pool::synchronize_delegation_pool", request.type_arguments, request.arguments);
|
|
3479
|
+
const txn = await builder.build("0x1::delegation_pool::synchronize_delegation_pool", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3208
3480
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3209
3481
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3210
3482
|
}
|
|
3211
3483
|
entry.synchronizeDelegationPool = synchronizeDelegationPool;
|
|
3212
3484
|
async function unlock(client, account, request, extraArgs) {
|
|
3485
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3213
3486
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3214
3487
|
sender: account.address(),
|
|
3215
3488
|
...extraArgs,
|
|
3216
3489
|
});
|
|
3217
|
-
const txn = await builder.build("0x1::delegation_pool::unlock", request.type_arguments, request.arguments);
|
|
3490
|
+
const txn = await builder.build("0x1::delegation_pool::unlock", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3218
3491
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3219
3492
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3220
3493
|
}
|
|
3221
3494
|
entry.unlock = unlock;
|
|
3222
3495
|
async function withdraw(client, account, request, extraArgs) {
|
|
3496
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3223
3497
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3224
3498
|
sender: account.address(),
|
|
3225
3499
|
...extraArgs,
|
|
3226
3500
|
});
|
|
3227
|
-
const txn = await builder.build("0x1::delegation_pool::withdraw", request.type_arguments, request.arguments);
|
|
3501
|
+
const txn = await builder.build("0x1::delegation_pool::withdraw", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3228
3502
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3229
3503
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3230
3504
|
}
|
|
@@ -3233,119 +3507,133 @@ export var delegation_pool;
|
|
|
3233
3507
|
let view;
|
|
3234
3508
|
(function (view) {
|
|
3235
3509
|
async function canWithdrawPendingInactive(client, request, version) {
|
|
3510
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3236
3511
|
const data = {
|
|
3237
|
-
|
|
3512
|
+
type_arguments: request.type_arguments,
|
|
3513
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3238
3514
|
function: "0x1::delegation_pool::can_withdraw_pending_inactive",
|
|
3239
3515
|
};
|
|
3240
3516
|
const res = await client.view(data, version?.toString());
|
|
3241
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3242
3517
|
const type = await coder.getMoveFunction("0x1::delegation_pool::can_withdraw_pending_inactive");
|
|
3243
3518
|
return (await coder.decodeArray(res, type.return));
|
|
3244
3519
|
}
|
|
3245
3520
|
view.canWithdrawPendingInactive = canWithdrawPendingInactive;
|
|
3246
3521
|
async function delegationPoolExists(client, request, version) {
|
|
3522
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3247
3523
|
const data = {
|
|
3248
|
-
|
|
3524
|
+
type_arguments: request.type_arguments,
|
|
3525
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3249
3526
|
function: "0x1::delegation_pool::delegation_pool_exists",
|
|
3250
3527
|
};
|
|
3251
3528
|
const res = await client.view(data, version?.toString());
|
|
3252
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3253
3529
|
const type = await coder.getMoveFunction("0x1::delegation_pool::delegation_pool_exists");
|
|
3254
3530
|
return (await coder.decodeArray(res, type.return));
|
|
3255
3531
|
}
|
|
3256
3532
|
view.delegationPoolExists = delegationPoolExists;
|
|
3257
3533
|
async function getAddStakeFee(client, request, version) {
|
|
3534
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3258
3535
|
const data = {
|
|
3259
|
-
|
|
3536
|
+
type_arguments: request.type_arguments,
|
|
3537
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3260
3538
|
function: "0x1::delegation_pool::get_add_stake_fee",
|
|
3261
3539
|
};
|
|
3262
3540
|
const res = await client.view(data, version?.toString());
|
|
3263
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3264
3541
|
const type = await coder.getMoveFunction("0x1::delegation_pool::get_add_stake_fee");
|
|
3265
3542
|
return (await coder.decodeArray(res, type.return));
|
|
3266
3543
|
}
|
|
3267
3544
|
view.getAddStakeFee = getAddStakeFee;
|
|
3268
3545
|
async function getDelegationPoolStake(client, request, version) {
|
|
3546
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3269
3547
|
const data = {
|
|
3270
|
-
|
|
3548
|
+
type_arguments: request.type_arguments,
|
|
3549
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3271
3550
|
function: "0x1::delegation_pool::get_delegation_pool_stake",
|
|
3272
3551
|
};
|
|
3273
3552
|
const res = await client.view(data, version?.toString());
|
|
3274
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3275
3553
|
const type = await coder.getMoveFunction("0x1::delegation_pool::get_delegation_pool_stake");
|
|
3276
3554
|
return (await coder.decodeArray(res, type.return));
|
|
3277
3555
|
}
|
|
3278
3556
|
view.getDelegationPoolStake = getDelegationPoolStake;
|
|
3279
3557
|
async function getOwnedPoolAddress(client, request, version) {
|
|
3558
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3280
3559
|
const data = {
|
|
3281
|
-
|
|
3560
|
+
type_arguments: request.type_arguments,
|
|
3561
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3282
3562
|
function: "0x1::delegation_pool::get_owned_pool_address",
|
|
3283
3563
|
};
|
|
3284
3564
|
const res = await client.view(data, version?.toString());
|
|
3285
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3286
3565
|
const type = await coder.getMoveFunction("0x1::delegation_pool::get_owned_pool_address");
|
|
3287
3566
|
return (await coder.decodeArray(res, type.return));
|
|
3288
3567
|
}
|
|
3289
3568
|
view.getOwnedPoolAddress = getOwnedPoolAddress;
|
|
3290
3569
|
async function getPendingWithdrawal(client, request, version) {
|
|
3570
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3291
3571
|
const data = {
|
|
3292
|
-
|
|
3572
|
+
type_arguments: request.type_arguments,
|
|
3573
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3293
3574
|
function: "0x1::delegation_pool::get_pending_withdrawal",
|
|
3294
3575
|
};
|
|
3295
3576
|
const res = await client.view(data, version?.toString());
|
|
3296
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3297
3577
|
const type = await coder.getMoveFunction("0x1::delegation_pool::get_pending_withdrawal");
|
|
3298
3578
|
return (await coder.decodeArray(res, type.return));
|
|
3299
3579
|
}
|
|
3300
3580
|
view.getPendingWithdrawal = getPendingWithdrawal;
|
|
3301
3581
|
async function getStake(client, request, version) {
|
|
3302
|
-
const data = { ...request, function: "0x1::delegation_pool::get_stake" };
|
|
3303
|
-
const res = await client.view(data, version?.toString());
|
|
3304
3582
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3583
|
+
const data = {
|
|
3584
|
+
type_arguments: request.type_arguments,
|
|
3585
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3586
|
+
function: "0x1::delegation_pool::get_stake",
|
|
3587
|
+
};
|
|
3588
|
+
const res = await client.view(data, version?.toString());
|
|
3305
3589
|
const type = await coder.getMoveFunction("0x1::delegation_pool::get_stake");
|
|
3306
3590
|
return (await coder.decodeArray(res, type.return));
|
|
3307
3591
|
}
|
|
3308
3592
|
view.getStake = getStake;
|
|
3309
3593
|
async function observedLockupCycle(client, request, version) {
|
|
3594
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3310
3595
|
const data = {
|
|
3311
|
-
|
|
3596
|
+
type_arguments: request.type_arguments,
|
|
3597
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3312
3598
|
function: "0x1::delegation_pool::observed_lockup_cycle",
|
|
3313
3599
|
};
|
|
3314
3600
|
const res = await client.view(data, version?.toString());
|
|
3315
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3316
3601
|
const type = await coder.getMoveFunction("0x1::delegation_pool::observed_lockup_cycle");
|
|
3317
3602
|
return (await coder.decodeArray(res, type.return));
|
|
3318
3603
|
}
|
|
3319
3604
|
view.observedLockupCycle = observedLockupCycle;
|
|
3320
3605
|
async function operatorCommissionPercentage(client, request, version) {
|
|
3606
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3321
3607
|
const data = {
|
|
3322
|
-
|
|
3608
|
+
type_arguments: request.type_arguments,
|
|
3609
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3323
3610
|
function: "0x1::delegation_pool::operator_commission_percentage",
|
|
3324
3611
|
};
|
|
3325
3612
|
const res = await client.view(data, version?.toString());
|
|
3326
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3327
3613
|
const type = await coder.getMoveFunction("0x1::delegation_pool::operator_commission_percentage");
|
|
3328
3614
|
return (await coder.decodeArray(res, type.return));
|
|
3329
3615
|
}
|
|
3330
3616
|
view.operatorCommissionPercentage = operatorCommissionPercentage;
|
|
3331
3617
|
async function ownerCapExists(client, request, version) {
|
|
3618
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3332
3619
|
const data = {
|
|
3333
|
-
|
|
3620
|
+
type_arguments: request.type_arguments,
|
|
3621
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3334
3622
|
function: "0x1::delegation_pool::owner_cap_exists",
|
|
3335
3623
|
};
|
|
3336
3624
|
const res = await client.view(data, version?.toString());
|
|
3337
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3338
3625
|
const type = await coder.getMoveFunction("0x1::delegation_pool::owner_cap_exists");
|
|
3339
3626
|
return (await coder.decodeArray(res, type.return));
|
|
3340
3627
|
}
|
|
3341
3628
|
view.ownerCapExists = ownerCapExists;
|
|
3342
3629
|
async function shareholdersCountActivePool(client, request, version) {
|
|
3630
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3343
3631
|
const data = {
|
|
3344
|
-
|
|
3632
|
+
type_arguments: request.type_arguments,
|
|
3633
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3345
3634
|
function: "0x1::delegation_pool::shareholders_count_active_pool",
|
|
3346
3635
|
};
|
|
3347
3636
|
const res = await client.view(data, version?.toString());
|
|
3348
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3349
3637
|
const type = await coder.getMoveFunction("0x1::delegation_pool::shareholders_count_active_pool");
|
|
3350
3638
|
return (await coder.decodeArray(res, type.return));
|
|
3351
3639
|
}
|
|
@@ -3489,41 +3777,45 @@ export var aptos_governance;
|
|
|
3489
3777
|
let entry;
|
|
3490
3778
|
(function (entry) {
|
|
3491
3779
|
async function addApprovedScriptHashScript(client, account, request, extraArgs) {
|
|
3780
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3492
3781
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3493
3782
|
sender: account.address(),
|
|
3494
3783
|
...extraArgs,
|
|
3495
3784
|
});
|
|
3496
|
-
const txn = await builder.build("0x1::aptos_governance::add_approved_script_hash_script", request.type_arguments, request.arguments);
|
|
3785
|
+
const txn = await builder.build("0x1::aptos_governance::add_approved_script_hash_script", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3497
3786
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3498
3787
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3499
3788
|
}
|
|
3500
3789
|
entry.addApprovedScriptHashScript = addApprovedScriptHashScript;
|
|
3501
3790
|
async function createProposal(client, account, request, extraArgs) {
|
|
3791
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3502
3792
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3503
3793
|
sender: account.address(),
|
|
3504
3794
|
...extraArgs,
|
|
3505
3795
|
});
|
|
3506
|
-
const txn = await builder.build("0x1::aptos_governance::create_proposal", request.type_arguments, request.arguments);
|
|
3796
|
+
const txn = await builder.build("0x1::aptos_governance::create_proposal", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3507
3797
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3508
3798
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3509
3799
|
}
|
|
3510
3800
|
entry.createProposal = createProposal;
|
|
3511
3801
|
async function createProposalV2(client, account, request, extraArgs) {
|
|
3802
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3512
3803
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3513
3804
|
sender: account.address(),
|
|
3514
3805
|
...extraArgs,
|
|
3515
3806
|
});
|
|
3516
|
-
const txn = await builder.build("0x1::aptos_governance::create_proposal_v2", request.type_arguments, request.arguments);
|
|
3807
|
+
const txn = await builder.build("0x1::aptos_governance::create_proposal_v2", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3517
3808
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3518
3809
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3519
3810
|
}
|
|
3520
3811
|
entry.createProposalV2 = createProposalV2;
|
|
3521
3812
|
async function vote(client, account, request, extraArgs) {
|
|
3813
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3522
3814
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3523
3815
|
sender: account.address(),
|
|
3524
3816
|
...extraArgs,
|
|
3525
3817
|
});
|
|
3526
|
-
const txn = await builder.build("0x1::aptos_governance::vote", request.type_arguments, request.arguments);
|
|
3818
|
+
const txn = await builder.build("0x1::aptos_governance::vote", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3527
3819
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3528
3820
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3529
3821
|
}
|
|
@@ -3532,34 +3824,37 @@ export var aptos_governance;
|
|
|
3532
3824
|
let view;
|
|
3533
3825
|
(function (view) {
|
|
3534
3826
|
async function getMinVotingThreshold(client, request, version) {
|
|
3827
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3535
3828
|
const data = {
|
|
3536
|
-
|
|
3829
|
+
type_arguments: request.type_arguments,
|
|
3830
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3537
3831
|
function: "0x1::aptos_governance::get_min_voting_threshold",
|
|
3538
3832
|
};
|
|
3539
3833
|
const res = await client.view(data, version?.toString());
|
|
3540
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3541
3834
|
const type = await coder.getMoveFunction("0x1::aptos_governance::get_min_voting_threshold");
|
|
3542
3835
|
return (await coder.decodeArray(res, type.return));
|
|
3543
3836
|
}
|
|
3544
3837
|
view.getMinVotingThreshold = getMinVotingThreshold;
|
|
3545
3838
|
async function getRequiredProposerStake(client, request, version) {
|
|
3839
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3546
3840
|
const data = {
|
|
3547
|
-
|
|
3841
|
+
type_arguments: request.type_arguments,
|
|
3842
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3548
3843
|
function: "0x1::aptos_governance::get_required_proposer_stake",
|
|
3549
3844
|
};
|
|
3550
3845
|
const res = await client.view(data, version?.toString());
|
|
3551
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3552
3846
|
const type = await coder.getMoveFunction("0x1::aptos_governance::get_required_proposer_stake");
|
|
3553
3847
|
return (await coder.decodeArray(res, type.return));
|
|
3554
3848
|
}
|
|
3555
3849
|
view.getRequiredProposerStake = getRequiredProposerStake;
|
|
3556
3850
|
async function getVotingDurationSecs(client, request, version) {
|
|
3851
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3557
3852
|
const data = {
|
|
3558
|
-
|
|
3853
|
+
type_arguments: request.type_arguments,
|
|
3854
|
+
arguments: coder.encodeArray(request.arguments),
|
|
3559
3855
|
function: "0x1::aptos_governance::get_voting_duration_secs",
|
|
3560
3856
|
};
|
|
3561
3857
|
const res = await client.view(data, version?.toString());
|
|
3562
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3563
3858
|
const type = await coder.getMoveFunction("0x1::aptos_governance::get_voting_duration_secs");
|
|
3564
3859
|
return (await coder.decodeArray(res, type.return));
|
|
3565
3860
|
}
|
|
@@ -3850,151 +4145,166 @@ export var multisig_account;
|
|
|
3850
4145
|
let entry;
|
|
3851
4146
|
(function (entry) {
|
|
3852
4147
|
async function addOwner(client, account, request, extraArgs) {
|
|
4148
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3853
4149
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3854
4150
|
sender: account.address(),
|
|
3855
4151
|
...extraArgs,
|
|
3856
4152
|
});
|
|
3857
|
-
const txn = await builder.build("0x1::multisig_account::add_owner", request.type_arguments, request.arguments);
|
|
4153
|
+
const txn = await builder.build("0x1::multisig_account::add_owner", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3858
4154
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3859
4155
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3860
4156
|
}
|
|
3861
4157
|
entry.addOwner = addOwner;
|
|
3862
4158
|
async function addOwners(client, account, request, extraArgs) {
|
|
4159
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3863
4160
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3864
4161
|
sender: account.address(),
|
|
3865
4162
|
...extraArgs,
|
|
3866
4163
|
});
|
|
3867
|
-
const txn = await builder.build("0x1::multisig_account::add_owners", request.type_arguments, request.arguments);
|
|
4164
|
+
const txn = await builder.build("0x1::multisig_account::add_owners", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3868
4165
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3869
4166
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3870
4167
|
}
|
|
3871
4168
|
entry.addOwners = addOwners;
|
|
3872
4169
|
async function approveTransaction(client, account, request, extraArgs) {
|
|
4170
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3873
4171
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3874
4172
|
sender: account.address(),
|
|
3875
4173
|
...extraArgs,
|
|
3876
4174
|
});
|
|
3877
|
-
const txn = await builder.build("0x1::multisig_account::approve_transaction", request.type_arguments, request.arguments);
|
|
4175
|
+
const txn = await builder.build("0x1::multisig_account::approve_transaction", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3878
4176
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3879
4177
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3880
4178
|
}
|
|
3881
4179
|
entry.approveTransaction = approveTransaction;
|
|
3882
4180
|
async function create(client, account, request, extraArgs) {
|
|
4181
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3883
4182
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3884
4183
|
sender: account.address(),
|
|
3885
4184
|
...extraArgs,
|
|
3886
4185
|
});
|
|
3887
|
-
const txn = await builder.build("0x1::multisig_account::create", request.type_arguments, request.arguments);
|
|
4186
|
+
const txn = await builder.build("0x1::multisig_account::create", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3888
4187
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3889
4188
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3890
4189
|
}
|
|
3891
4190
|
entry.create = create;
|
|
3892
4191
|
async function createTransaction(client, account, request, extraArgs) {
|
|
4192
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3893
4193
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3894
4194
|
sender: account.address(),
|
|
3895
4195
|
...extraArgs,
|
|
3896
4196
|
});
|
|
3897
|
-
const txn = await builder.build("0x1::multisig_account::create_transaction", request.type_arguments, request.arguments);
|
|
4197
|
+
const txn = await builder.build("0x1::multisig_account::create_transaction", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3898
4198
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3899
4199
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3900
4200
|
}
|
|
3901
4201
|
entry.createTransaction = createTransaction;
|
|
3902
4202
|
async function createTransactionWithHash(client, account, request, extraArgs) {
|
|
4203
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3903
4204
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3904
4205
|
sender: account.address(),
|
|
3905
4206
|
...extraArgs,
|
|
3906
4207
|
});
|
|
3907
|
-
const txn = await builder.build("0x1::multisig_account::create_transaction_with_hash", request.type_arguments, request.arguments);
|
|
4208
|
+
const txn = await builder.build("0x1::multisig_account::create_transaction_with_hash", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3908
4209
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3909
4210
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3910
4211
|
}
|
|
3911
4212
|
entry.createTransactionWithHash = createTransactionWithHash;
|
|
3912
4213
|
async function createWithExistingAccount(client, account, request, extraArgs) {
|
|
4214
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3913
4215
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3914
4216
|
sender: account.address(),
|
|
3915
4217
|
...extraArgs,
|
|
3916
4218
|
});
|
|
3917
|
-
const txn = await builder.build("0x1::multisig_account::create_with_existing_account", request.type_arguments, request.arguments);
|
|
4219
|
+
const txn = await builder.build("0x1::multisig_account::create_with_existing_account", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3918
4220
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3919
4221
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3920
4222
|
}
|
|
3921
4223
|
entry.createWithExistingAccount = createWithExistingAccount;
|
|
3922
4224
|
async function createWithOwners(client, account, request, extraArgs) {
|
|
4225
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3923
4226
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3924
4227
|
sender: account.address(),
|
|
3925
4228
|
...extraArgs,
|
|
3926
4229
|
});
|
|
3927
|
-
const txn = await builder.build("0x1::multisig_account::create_with_owners", request.type_arguments, request.arguments);
|
|
4230
|
+
const txn = await builder.build("0x1::multisig_account::create_with_owners", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3928
4231
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3929
4232
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3930
4233
|
}
|
|
3931
4234
|
entry.createWithOwners = createWithOwners;
|
|
3932
4235
|
async function executeRejectedTransaction(client, account, request, extraArgs) {
|
|
4236
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3933
4237
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3934
4238
|
sender: account.address(),
|
|
3935
4239
|
...extraArgs,
|
|
3936
4240
|
});
|
|
3937
|
-
const txn = await builder.build("0x1::multisig_account::execute_rejected_transaction", request.type_arguments, request.arguments);
|
|
4241
|
+
const txn = await builder.build("0x1::multisig_account::execute_rejected_transaction", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3938
4242
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3939
4243
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3940
4244
|
}
|
|
3941
4245
|
entry.executeRejectedTransaction = executeRejectedTransaction;
|
|
3942
4246
|
async function rejectTransaction(client, account, request, extraArgs) {
|
|
4247
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3943
4248
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3944
4249
|
sender: account.address(),
|
|
3945
4250
|
...extraArgs,
|
|
3946
4251
|
});
|
|
3947
|
-
const txn = await builder.build("0x1::multisig_account::reject_transaction", request.type_arguments, request.arguments);
|
|
4252
|
+
const txn = await builder.build("0x1::multisig_account::reject_transaction", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3948
4253
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3949
4254
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3950
4255
|
}
|
|
3951
4256
|
entry.rejectTransaction = rejectTransaction;
|
|
3952
4257
|
async function removeOwner(client, account, request, extraArgs) {
|
|
4258
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3953
4259
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3954
4260
|
sender: account.address(),
|
|
3955
4261
|
...extraArgs,
|
|
3956
4262
|
});
|
|
3957
|
-
const txn = await builder.build("0x1::multisig_account::remove_owner", request.type_arguments, request.arguments);
|
|
4263
|
+
const txn = await builder.build("0x1::multisig_account::remove_owner", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3958
4264
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3959
4265
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3960
4266
|
}
|
|
3961
4267
|
entry.removeOwner = removeOwner;
|
|
3962
4268
|
async function removeOwners(client, account, request, extraArgs) {
|
|
4269
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3963
4270
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3964
4271
|
sender: account.address(),
|
|
3965
4272
|
...extraArgs,
|
|
3966
4273
|
});
|
|
3967
|
-
const txn = await builder.build("0x1::multisig_account::remove_owners", request.type_arguments, request.arguments);
|
|
4274
|
+
const txn = await builder.build("0x1::multisig_account::remove_owners", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3968
4275
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3969
4276
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3970
4277
|
}
|
|
3971
4278
|
entry.removeOwners = removeOwners;
|
|
3972
4279
|
async function updateMetadata(client, account, request, extraArgs) {
|
|
4280
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3973
4281
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3974
4282
|
sender: account.address(),
|
|
3975
4283
|
...extraArgs,
|
|
3976
4284
|
});
|
|
3977
|
-
const txn = await builder.build("0x1::multisig_account::update_metadata", request.type_arguments, request.arguments);
|
|
4285
|
+
const txn = await builder.build("0x1::multisig_account::update_metadata", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3978
4286
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3979
4287
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3980
4288
|
}
|
|
3981
4289
|
entry.updateMetadata = updateMetadata;
|
|
3982
4290
|
async function updateSignaturesRequired(client, account, request, extraArgs) {
|
|
4291
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3983
4292
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3984
4293
|
sender: account.address(),
|
|
3985
4294
|
...extraArgs,
|
|
3986
4295
|
});
|
|
3987
|
-
const txn = await builder.build("0x1::multisig_account::update_signatures_required", request.type_arguments, request.arguments);
|
|
4296
|
+
const txn = await builder.build("0x1::multisig_account::update_signatures_required", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3988
4297
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3989
4298
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
3990
4299
|
}
|
|
3991
4300
|
entry.updateSignaturesRequired = updateSignaturesRequired;
|
|
3992
4301
|
async function voteTransanction(client, account, request, extraArgs) {
|
|
4302
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
3993
4303
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
3994
4304
|
sender: account.address(),
|
|
3995
4305
|
...extraArgs,
|
|
3996
4306
|
});
|
|
3997
|
-
const txn = await builder.build("0x1::multisig_account::vote_transanction", request.type_arguments, request.arguments);
|
|
4307
|
+
const txn = await builder.build("0x1::multisig_account::vote_transanction", request.type_arguments, coder.encodeArray(request.arguments));
|
|
3998
4308
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
3999
4309
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4000
4310
|
}
|
|
@@ -4003,124 +4313,145 @@ export var multisig_account;
|
|
|
4003
4313
|
let view;
|
|
4004
4314
|
(function (view) {
|
|
4005
4315
|
async function canBeExecuted(client, request, version) {
|
|
4316
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4006
4317
|
const data = {
|
|
4007
|
-
|
|
4318
|
+
type_arguments: request.type_arguments,
|
|
4319
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4008
4320
|
function: "0x1::multisig_account::can_be_executed",
|
|
4009
4321
|
};
|
|
4010
4322
|
const res = await client.view(data, version?.toString());
|
|
4011
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4012
4323
|
const type = await coder.getMoveFunction("0x1::multisig_account::can_be_executed");
|
|
4013
4324
|
return (await coder.decodeArray(res, type.return));
|
|
4014
4325
|
}
|
|
4015
4326
|
view.canBeExecuted = canBeExecuted;
|
|
4016
4327
|
async function canBeRejected(client, request, version) {
|
|
4328
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4017
4329
|
const data = {
|
|
4018
|
-
|
|
4330
|
+
type_arguments: request.type_arguments,
|
|
4331
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4019
4332
|
function: "0x1::multisig_account::can_be_rejected",
|
|
4020
4333
|
};
|
|
4021
4334
|
const res = await client.view(data, version?.toString());
|
|
4022
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4023
4335
|
const type = await coder.getMoveFunction("0x1::multisig_account::can_be_rejected");
|
|
4024
4336
|
return (await coder.decodeArray(res, type.return));
|
|
4025
4337
|
}
|
|
4026
4338
|
view.canBeRejected = canBeRejected;
|
|
4027
4339
|
async function getNextMultisigAccountAddress(client, request, version) {
|
|
4340
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4028
4341
|
const data = {
|
|
4029
|
-
|
|
4342
|
+
type_arguments: request.type_arguments,
|
|
4343
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4030
4344
|
function: "0x1::multisig_account::get_next_multisig_account_address",
|
|
4031
4345
|
};
|
|
4032
4346
|
const res = await client.view(data, version?.toString());
|
|
4033
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4034
4347
|
const type = await coder.getMoveFunction("0x1::multisig_account::get_next_multisig_account_address");
|
|
4035
4348
|
return (await coder.decodeArray(res, type.return));
|
|
4036
4349
|
}
|
|
4037
4350
|
view.getNextMultisigAccountAddress = getNextMultisigAccountAddress;
|
|
4038
4351
|
async function getNextTransactionPayload(client, request, version) {
|
|
4352
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4039
4353
|
const data = {
|
|
4040
|
-
|
|
4354
|
+
type_arguments: request.type_arguments,
|
|
4355
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4041
4356
|
function: "0x1::multisig_account::get_next_transaction_payload",
|
|
4042
4357
|
};
|
|
4043
4358
|
const res = await client.view(data, version?.toString());
|
|
4044
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4045
4359
|
const type = await coder.getMoveFunction("0x1::multisig_account::get_next_transaction_payload");
|
|
4046
4360
|
return (await coder.decodeArray(res, type.return));
|
|
4047
4361
|
}
|
|
4048
4362
|
view.getNextTransactionPayload = getNextTransactionPayload;
|
|
4049
4363
|
async function getPendingTransactions(client, request, version) {
|
|
4364
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4050
4365
|
const data = {
|
|
4051
|
-
|
|
4366
|
+
type_arguments: request.type_arguments,
|
|
4367
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4052
4368
|
function: "0x1::multisig_account::get_pending_transactions",
|
|
4053
4369
|
};
|
|
4054
4370
|
const res = await client.view(data, version?.toString());
|
|
4055
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4056
4371
|
const type = await coder.getMoveFunction("0x1::multisig_account::get_pending_transactions");
|
|
4057
4372
|
return (await coder.decodeArray(res, type.return));
|
|
4058
4373
|
}
|
|
4059
4374
|
view.getPendingTransactions = getPendingTransactions;
|
|
4060
4375
|
async function getTransaction(client, request, version) {
|
|
4376
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4061
4377
|
const data = {
|
|
4062
|
-
|
|
4378
|
+
type_arguments: request.type_arguments,
|
|
4379
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4063
4380
|
function: "0x1::multisig_account::get_transaction",
|
|
4064
4381
|
};
|
|
4065
4382
|
const res = await client.view(data, version?.toString());
|
|
4066
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4067
4383
|
const type = await coder.getMoveFunction("0x1::multisig_account::get_transaction");
|
|
4068
4384
|
return (await coder.decodeArray(res, type.return));
|
|
4069
4385
|
}
|
|
4070
4386
|
view.getTransaction = getTransaction;
|
|
4071
4387
|
async function lastResolvedSequenceNumber(client, request, version) {
|
|
4388
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4072
4389
|
const data = {
|
|
4073
|
-
|
|
4390
|
+
type_arguments: request.type_arguments,
|
|
4391
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4074
4392
|
function: "0x1::multisig_account::last_resolved_sequence_number",
|
|
4075
4393
|
};
|
|
4076
4394
|
const res = await client.view(data, version?.toString());
|
|
4077
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4078
4395
|
const type = await coder.getMoveFunction("0x1::multisig_account::last_resolved_sequence_number");
|
|
4079
4396
|
return (await coder.decodeArray(res, type.return));
|
|
4080
4397
|
}
|
|
4081
4398
|
view.lastResolvedSequenceNumber = lastResolvedSequenceNumber;
|
|
4082
4399
|
async function metadata(client, request, version) {
|
|
4083
|
-
const data = { ...request, function: "0x1::multisig_account::metadata" };
|
|
4084
|
-
const res = await client.view(data, version?.toString());
|
|
4085
4400
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4401
|
+
const data = {
|
|
4402
|
+
type_arguments: request.type_arguments,
|
|
4403
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4404
|
+
function: "0x1::multisig_account::metadata",
|
|
4405
|
+
};
|
|
4406
|
+
const res = await client.view(data, version?.toString());
|
|
4086
4407
|
const type = await coder.getMoveFunction("0x1::multisig_account::metadata");
|
|
4087
4408
|
return (await coder.decodeArray(res, type.return));
|
|
4088
4409
|
}
|
|
4089
4410
|
view.metadata = metadata;
|
|
4090
4411
|
async function nextSequenceNumber(client, request, version) {
|
|
4412
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4091
4413
|
const data = {
|
|
4092
|
-
|
|
4414
|
+
type_arguments: request.type_arguments,
|
|
4415
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4093
4416
|
function: "0x1::multisig_account::next_sequence_number",
|
|
4094
4417
|
};
|
|
4095
4418
|
const res = await client.view(data, version?.toString());
|
|
4096
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4097
4419
|
const type = await coder.getMoveFunction("0x1::multisig_account::next_sequence_number");
|
|
4098
4420
|
return (await coder.decodeArray(res, type.return));
|
|
4099
4421
|
}
|
|
4100
4422
|
view.nextSequenceNumber = nextSequenceNumber;
|
|
4101
4423
|
async function numSignaturesRequired(client, request, version) {
|
|
4424
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4102
4425
|
const data = {
|
|
4103
|
-
|
|
4426
|
+
type_arguments: request.type_arguments,
|
|
4427
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4104
4428
|
function: "0x1::multisig_account::num_signatures_required",
|
|
4105
4429
|
};
|
|
4106
4430
|
const res = await client.view(data, version?.toString());
|
|
4107
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4108
4431
|
const type = await coder.getMoveFunction("0x1::multisig_account::num_signatures_required");
|
|
4109
4432
|
return (await coder.decodeArray(res, type.return));
|
|
4110
4433
|
}
|
|
4111
4434
|
view.numSignaturesRequired = numSignaturesRequired;
|
|
4112
4435
|
async function owners(client, request, version) {
|
|
4113
|
-
const data = { ...request, function: "0x1::multisig_account::owners" };
|
|
4114
|
-
const res = await client.view(data, version?.toString());
|
|
4115
4436
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4437
|
+
const data = {
|
|
4438
|
+
type_arguments: request.type_arguments,
|
|
4439
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4440
|
+
function: "0x1::multisig_account::owners",
|
|
4441
|
+
};
|
|
4442
|
+
const res = await client.view(data, version?.toString());
|
|
4116
4443
|
const type = await coder.getMoveFunction("0x1::multisig_account::owners");
|
|
4117
4444
|
return (await coder.decodeArray(res, type.return));
|
|
4118
4445
|
}
|
|
4119
4446
|
view.owners = owners;
|
|
4120
4447
|
async function vote(client, request, version) {
|
|
4121
|
-
const data = { ...request, function: "0x1::multisig_account::vote" };
|
|
4122
|
-
const res = await client.view(data, version?.toString());
|
|
4123
4448
|
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4449
|
+
const data = {
|
|
4450
|
+
type_arguments: request.type_arguments,
|
|
4451
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4452
|
+
function: "0x1::multisig_account::vote",
|
|
4453
|
+
};
|
|
4454
|
+
const res = await client.view(data, version?.toString());
|
|
4124
4455
|
const type = await coder.getMoveFunction("0x1::multisig_account::vote");
|
|
4125
4456
|
return (await coder.decodeArray(res, type.return));
|
|
4126
4457
|
}
|
|
@@ -4153,31 +4484,34 @@ export var resource_account;
|
|
|
4153
4484
|
let entry;
|
|
4154
4485
|
(function (entry) {
|
|
4155
4486
|
async function createResourceAccount(client, account, request, extraArgs) {
|
|
4487
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4156
4488
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4157
4489
|
sender: account.address(),
|
|
4158
4490
|
...extraArgs,
|
|
4159
4491
|
});
|
|
4160
|
-
const txn = await builder.build("0x1::resource_account::create_resource_account", request.type_arguments, request.arguments);
|
|
4492
|
+
const txn = await builder.build("0x1::resource_account::create_resource_account", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4161
4493
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4162
4494
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4163
4495
|
}
|
|
4164
4496
|
entry.createResourceAccount = createResourceAccount;
|
|
4165
4497
|
async function createResourceAccountAndFund(client, account, request, extraArgs) {
|
|
4498
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4166
4499
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4167
4500
|
sender: account.address(),
|
|
4168
4501
|
...extraArgs,
|
|
4169
4502
|
});
|
|
4170
|
-
const txn = await builder.build("0x1::resource_account::create_resource_account_and_fund", request.type_arguments, request.arguments);
|
|
4503
|
+
const txn = await builder.build("0x1::resource_account::create_resource_account_and_fund", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4171
4504
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4172
4505
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4173
4506
|
}
|
|
4174
4507
|
entry.createResourceAccountAndFund = createResourceAccountAndFund;
|
|
4175
4508
|
async function createResourceAccountAndPublishPackage(client, account, request, extraArgs) {
|
|
4509
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4176
4510
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4177
4511
|
sender: account.address(),
|
|
4178
4512
|
...extraArgs,
|
|
4179
4513
|
});
|
|
4180
|
-
const txn = await builder.build("0x1::resource_account::create_resource_account_and_publish_package", request.type_arguments, request.arguments);
|
|
4514
|
+
const txn = await builder.build("0x1::resource_account::create_resource_account_and_publish_package", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4181
4515
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4182
4516
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4183
4517
|
}
|
|
@@ -4315,111 +4649,122 @@ export var staking_contract;
|
|
|
4315
4649
|
let entry;
|
|
4316
4650
|
(function (entry) {
|
|
4317
4651
|
async function addStake(client, account, request, extraArgs) {
|
|
4652
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4318
4653
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4319
4654
|
sender: account.address(),
|
|
4320
4655
|
...extraArgs,
|
|
4321
4656
|
});
|
|
4322
|
-
const txn = await builder.build("0x1::staking_contract::add_stake", request.type_arguments, request.arguments);
|
|
4657
|
+
const txn = await builder.build("0x1::staking_contract::add_stake", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4323
4658
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4324
4659
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4325
4660
|
}
|
|
4326
4661
|
entry.addStake = addStake;
|
|
4327
4662
|
async function createStakingContract(client, account, request, extraArgs) {
|
|
4663
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4328
4664
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4329
4665
|
sender: account.address(),
|
|
4330
4666
|
...extraArgs,
|
|
4331
4667
|
});
|
|
4332
|
-
const txn = await builder.build("0x1::staking_contract::create_staking_contract", request.type_arguments, request.arguments);
|
|
4668
|
+
const txn = await builder.build("0x1::staking_contract::create_staking_contract", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4333
4669
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4334
4670
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4335
4671
|
}
|
|
4336
4672
|
entry.createStakingContract = createStakingContract;
|
|
4337
4673
|
async function distribute(client, account, request, extraArgs) {
|
|
4674
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4338
4675
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4339
4676
|
sender: account.address(),
|
|
4340
4677
|
...extraArgs,
|
|
4341
4678
|
});
|
|
4342
|
-
const txn = await builder.build("0x1::staking_contract::distribute", request.type_arguments, request.arguments);
|
|
4679
|
+
const txn = await builder.build("0x1::staking_contract::distribute", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4343
4680
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4344
4681
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4345
4682
|
}
|
|
4346
4683
|
entry.distribute = distribute;
|
|
4347
4684
|
async function requestCommission(client, account, request, extraArgs) {
|
|
4685
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4348
4686
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4349
4687
|
sender: account.address(),
|
|
4350
4688
|
...extraArgs,
|
|
4351
4689
|
});
|
|
4352
|
-
const txn = await builder.build("0x1::staking_contract::request_commission", request.type_arguments, request.arguments);
|
|
4690
|
+
const txn = await builder.build("0x1::staking_contract::request_commission", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4353
4691
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4354
4692
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4355
4693
|
}
|
|
4356
4694
|
entry.requestCommission = requestCommission;
|
|
4357
4695
|
async function resetLockup(client, account, request, extraArgs) {
|
|
4696
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4358
4697
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4359
4698
|
sender: account.address(),
|
|
4360
4699
|
...extraArgs,
|
|
4361
4700
|
});
|
|
4362
|
-
const txn = await builder.build("0x1::staking_contract::reset_lockup", request.type_arguments, request.arguments);
|
|
4701
|
+
const txn = await builder.build("0x1::staking_contract::reset_lockup", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4363
4702
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4364
4703
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4365
4704
|
}
|
|
4366
4705
|
entry.resetLockup = resetLockup;
|
|
4367
4706
|
async function switchOperator(client, account, request, extraArgs) {
|
|
4707
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4368
4708
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4369
4709
|
sender: account.address(),
|
|
4370
4710
|
...extraArgs,
|
|
4371
4711
|
});
|
|
4372
|
-
const txn = await builder.build("0x1::staking_contract::switch_operator", request.type_arguments, request.arguments);
|
|
4712
|
+
const txn = await builder.build("0x1::staking_contract::switch_operator", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4373
4713
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4374
4714
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4375
4715
|
}
|
|
4376
4716
|
entry.switchOperator = switchOperator;
|
|
4377
4717
|
async function switchOperatorWithSameCommission(client, account, request, extraArgs) {
|
|
4718
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4378
4719
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4379
4720
|
sender: account.address(),
|
|
4380
4721
|
...extraArgs,
|
|
4381
4722
|
});
|
|
4382
|
-
const txn = await builder.build("0x1::staking_contract::switch_operator_with_same_commission", request.type_arguments, request.arguments);
|
|
4723
|
+
const txn = await builder.build("0x1::staking_contract::switch_operator_with_same_commission", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4383
4724
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4384
4725
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4385
4726
|
}
|
|
4386
4727
|
entry.switchOperatorWithSameCommission = switchOperatorWithSameCommission;
|
|
4387
4728
|
async function unlockRewards(client, account, request, extraArgs) {
|
|
4729
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4388
4730
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4389
4731
|
sender: account.address(),
|
|
4390
4732
|
...extraArgs,
|
|
4391
4733
|
});
|
|
4392
|
-
const txn = await builder.build("0x1::staking_contract::unlock_rewards", request.type_arguments, request.arguments);
|
|
4734
|
+
const txn = await builder.build("0x1::staking_contract::unlock_rewards", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4393
4735
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4394
4736
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4395
4737
|
}
|
|
4396
4738
|
entry.unlockRewards = unlockRewards;
|
|
4397
4739
|
async function unlockStake(client, account, request, extraArgs) {
|
|
4740
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4398
4741
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4399
4742
|
sender: account.address(),
|
|
4400
4743
|
...extraArgs,
|
|
4401
4744
|
});
|
|
4402
|
-
const txn = await builder.build("0x1::staking_contract::unlock_stake", request.type_arguments, request.arguments);
|
|
4745
|
+
const txn = await builder.build("0x1::staking_contract::unlock_stake", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4403
4746
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4404
4747
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4405
4748
|
}
|
|
4406
4749
|
entry.unlockStake = unlockStake;
|
|
4407
4750
|
async function updateCommision(client, account, request, extraArgs) {
|
|
4751
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4408
4752
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4409
4753
|
sender: account.address(),
|
|
4410
4754
|
...extraArgs,
|
|
4411
4755
|
});
|
|
4412
|
-
const txn = await builder.build("0x1::staking_contract::update_commision", request.type_arguments, request.arguments);
|
|
4756
|
+
const txn = await builder.build("0x1::staking_contract::update_commision", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4413
4757
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4414
4758
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4415
4759
|
}
|
|
4416
4760
|
entry.updateCommision = updateCommision;
|
|
4417
4761
|
async function updateVoter(client, account, request, extraArgs) {
|
|
4762
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4418
4763
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4419
4764
|
sender: account.address(),
|
|
4420
4765
|
...extraArgs,
|
|
4421
4766
|
});
|
|
4422
|
-
const txn = await builder.build("0x1::staking_contract::update_voter", request.type_arguments, request.arguments);
|
|
4767
|
+
const txn = await builder.build("0x1::staking_contract::update_voter", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4423
4768
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4424
4769
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4425
4770
|
}
|
|
@@ -4428,67 +4773,73 @@ export var staking_contract;
|
|
|
4428
4773
|
let view;
|
|
4429
4774
|
(function (view) {
|
|
4430
4775
|
async function commissionPercentage(client, request, version) {
|
|
4776
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4431
4777
|
const data = {
|
|
4432
|
-
|
|
4778
|
+
type_arguments: request.type_arguments,
|
|
4779
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4433
4780
|
function: "0x1::staking_contract::commission_percentage",
|
|
4434
4781
|
};
|
|
4435
4782
|
const res = await client.view(data, version?.toString());
|
|
4436
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4437
4783
|
const type = await coder.getMoveFunction("0x1::staking_contract::commission_percentage");
|
|
4438
4784
|
return (await coder.decodeArray(res, type.return));
|
|
4439
4785
|
}
|
|
4440
4786
|
view.commissionPercentage = commissionPercentage;
|
|
4441
4787
|
async function lastRecordedPrincipal(client, request, version) {
|
|
4788
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4442
4789
|
const data = {
|
|
4443
|
-
|
|
4790
|
+
type_arguments: request.type_arguments,
|
|
4791
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4444
4792
|
function: "0x1::staking_contract::last_recorded_principal",
|
|
4445
4793
|
};
|
|
4446
4794
|
const res = await client.view(data, version?.toString());
|
|
4447
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4448
4795
|
const type = await coder.getMoveFunction("0x1::staking_contract::last_recorded_principal");
|
|
4449
4796
|
return (await coder.decodeArray(res, type.return));
|
|
4450
4797
|
}
|
|
4451
4798
|
view.lastRecordedPrincipal = lastRecordedPrincipal;
|
|
4452
4799
|
async function pendingDistributionCounts(client, request, version) {
|
|
4800
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4453
4801
|
const data = {
|
|
4454
|
-
|
|
4802
|
+
type_arguments: request.type_arguments,
|
|
4803
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4455
4804
|
function: "0x1::staking_contract::pending_distribution_counts",
|
|
4456
4805
|
};
|
|
4457
4806
|
const res = await client.view(data, version?.toString());
|
|
4458
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4459
4807
|
const type = await coder.getMoveFunction("0x1::staking_contract::pending_distribution_counts");
|
|
4460
4808
|
return (await coder.decodeArray(res, type.return));
|
|
4461
4809
|
}
|
|
4462
4810
|
view.pendingDistributionCounts = pendingDistributionCounts;
|
|
4463
4811
|
async function stakePoolAddress(client, request, version) {
|
|
4812
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4464
4813
|
const data = {
|
|
4465
|
-
|
|
4814
|
+
type_arguments: request.type_arguments,
|
|
4815
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4466
4816
|
function: "0x1::staking_contract::stake_pool_address",
|
|
4467
4817
|
};
|
|
4468
4818
|
const res = await client.view(data, version?.toString());
|
|
4469
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4470
4819
|
const type = await coder.getMoveFunction("0x1::staking_contract::stake_pool_address");
|
|
4471
4820
|
return (await coder.decodeArray(res, type.return));
|
|
4472
4821
|
}
|
|
4473
4822
|
view.stakePoolAddress = stakePoolAddress;
|
|
4474
4823
|
async function stakingContractAmounts(client, request, version) {
|
|
4824
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4475
4825
|
const data = {
|
|
4476
|
-
|
|
4826
|
+
type_arguments: request.type_arguments,
|
|
4827
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4477
4828
|
function: "0x1::staking_contract::staking_contract_amounts",
|
|
4478
4829
|
};
|
|
4479
4830
|
const res = await client.view(data, version?.toString());
|
|
4480
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4481
4831
|
const type = await coder.getMoveFunction("0x1::staking_contract::staking_contract_amounts");
|
|
4482
4832
|
return (await coder.decodeArray(res, type.return));
|
|
4483
4833
|
}
|
|
4484
4834
|
view.stakingContractAmounts = stakingContractAmounts;
|
|
4485
4835
|
async function stakingContractExists(client, request, version) {
|
|
4836
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4486
4837
|
const data = {
|
|
4487
|
-
|
|
4838
|
+
type_arguments: request.type_arguments,
|
|
4839
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4488
4840
|
function: "0x1::staking_contract::staking_contract_exists",
|
|
4489
4841
|
};
|
|
4490
4842
|
const res = await client.view(data, version?.toString());
|
|
4491
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4492
4843
|
const type = await coder.getMoveFunction("0x1::staking_contract::staking_contract_exists");
|
|
4493
4844
|
return (await coder.decodeArray(res, type.return));
|
|
4494
4845
|
}
|
|
@@ -4566,11 +4917,12 @@ export var primary_fungible_store;
|
|
|
4566
4917
|
let entry;
|
|
4567
4918
|
(function (entry) {
|
|
4568
4919
|
async function transfer(client, account, request, extraArgs) {
|
|
4920
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4569
4921
|
const builder = new TransactionBuilderRemoteABI(client, {
|
|
4570
4922
|
sender: account.address(),
|
|
4571
4923
|
...extraArgs,
|
|
4572
4924
|
});
|
|
4573
|
-
const txn = await builder.build("0x1::primary_fungible_store::transfer", request.type_arguments, request.arguments);
|
|
4925
|
+
const txn = await builder.build("0x1::primary_fungible_store::transfer", request.type_arguments, coder.encodeArray(request.arguments));
|
|
4574
4926
|
const bcsTxn = AptosClient.generateBCSTransaction(account, txn);
|
|
4575
4927
|
return await client.submitSignedBCSTransaction(bcsTxn);
|
|
4576
4928
|
}
|
|
@@ -4579,56 +4931,61 @@ export var primary_fungible_store;
|
|
|
4579
4931
|
let view;
|
|
4580
4932
|
(function (view) {
|
|
4581
4933
|
async function balance(client, request, version) {
|
|
4934
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4582
4935
|
const data = {
|
|
4583
|
-
|
|
4936
|
+
type_arguments: request.type_arguments,
|
|
4937
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4584
4938
|
function: "0x1::primary_fungible_store::balance",
|
|
4585
4939
|
};
|
|
4586
4940
|
const res = await client.view(data, version?.toString());
|
|
4587
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4588
4941
|
const type = await coder.getMoveFunction("0x1::primary_fungible_store::balance");
|
|
4589
4942
|
return (await coder.decodeArray(res, type.return));
|
|
4590
4943
|
}
|
|
4591
4944
|
view.balance = balance;
|
|
4592
4945
|
async function isFrozen(client, request, version) {
|
|
4946
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4593
4947
|
const data = {
|
|
4594
|
-
|
|
4948
|
+
type_arguments: request.type_arguments,
|
|
4949
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4595
4950
|
function: "0x1::primary_fungible_store::is_frozen",
|
|
4596
4951
|
};
|
|
4597
4952
|
const res = await client.view(data, version?.toString());
|
|
4598
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4599
4953
|
const type = await coder.getMoveFunction("0x1::primary_fungible_store::is_frozen");
|
|
4600
4954
|
return (await coder.decodeArray(res, type.return));
|
|
4601
4955
|
}
|
|
4602
4956
|
view.isFrozen = isFrozen;
|
|
4603
4957
|
async function primaryStore(client, request, version) {
|
|
4958
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4604
4959
|
const data = {
|
|
4605
|
-
|
|
4960
|
+
type_arguments: request.type_arguments,
|
|
4961
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4606
4962
|
function: "0x1::primary_fungible_store::primary_store",
|
|
4607
4963
|
};
|
|
4608
4964
|
const res = await client.view(data, version?.toString());
|
|
4609
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4610
4965
|
const type = await coder.getMoveFunction("0x1::primary_fungible_store::primary_store");
|
|
4611
4966
|
return (await coder.decodeArray(res, type.return));
|
|
4612
4967
|
}
|
|
4613
4968
|
view.primaryStore = primaryStore;
|
|
4614
4969
|
async function primaryStoreAddress(client, request, version) {
|
|
4970
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4615
4971
|
const data = {
|
|
4616
|
-
|
|
4972
|
+
type_arguments: request.type_arguments,
|
|
4973
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4617
4974
|
function: "0x1::primary_fungible_store::primary_store_address",
|
|
4618
4975
|
};
|
|
4619
4976
|
const res = await client.view(data, version?.toString());
|
|
4620
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4621
4977
|
const type = await coder.getMoveFunction("0x1::primary_fungible_store::primary_store_address");
|
|
4622
4978
|
return (await coder.decodeArray(res, type.return));
|
|
4623
4979
|
}
|
|
4624
4980
|
view.primaryStoreAddress = primaryStoreAddress;
|
|
4625
4981
|
async function primaryStoreExists(client, request, version) {
|
|
4982
|
+
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4626
4983
|
const data = {
|
|
4627
|
-
|
|
4984
|
+
type_arguments: request.type_arguments,
|
|
4985
|
+
arguments: coder.encodeArray(request.arguments),
|
|
4628
4986
|
function: "0x1::primary_fungible_store::primary_store_exists",
|
|
4629
4987
|
};
|
|
4630
4988
|
const res = await client.view(data, version?.toString());
|
|
4631
|
-
const coder = defaultMoveCoder(client.nodeUrl);
|
|
4632
4989
|
const type = await coder.getMoveFunction("0x1::primary_fungible_store::primary_store_exists");
|
|
4633
4990
|
return (await coder.decodeArray(res, type.return));
|
|
4634
4991
|
}
|