@scallop-io/sui-scallop-sdk 1.4.19 → 1.4.20
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/constants/queryKeys.d.ts +2 -2
- package/dist/index.js +255 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +253 -43
- package/dist/index.mjs.map +1 -1
- package/dist/types/query/portfolio.d.ts +4 -0
- package/package.json +1 -1
- package/src/builders/borrowIncentiveBuilder.ts +29 -7
- package/src/builders/coreBuilder.ts +66 -10
- package/src/builders/oracle.ts +44 -4
- package/src/builders/referralBuilder.ts +20 -4
- package/src/builders/spoolBuilder.ts +38 -4
- package/src/builders/vescaBuilder.ts +25 -5
- package/src/constants/queryKeys.ts +2 -2
- package/src/queries/portfolioQuery.ts +16 -5
- package/src/queries/vescaQuery.ts +18 -4
- package/src/types/query/portfolio.ts +4 -0
- package/dist/test.d.ts +0 -1
- package/src/test.ts +0 -17
package/dist/index.mjs
CHANGED
|
@@ -4646,7 +4646,8 @@ var getObligationAccount = async (query, obligation, ownerAddress, indexer = fal
|
|
|
4646
4646
|
};
|
|
4647
4647
|
var getTotalValueLocked = async (query, indexer = false) => {
|
|
4648
4648
|
const market = await query.getMarketPools(void 0, { indexer });
|
|
4649
|
-
let
|
|
4649
|
+
let supplyLendingValue = BigNumber5(0);
|
|
4650
|
+
let supplyCollateralValue = BigNumber5(0);
|
|
4650
4651
|
let borrowValue = BigNumber5(0);
|
|
4651
4652
|
if (indexer) {
|
|
4652
4653
|
const tvlIndexer = await query.indexer.getTotalValueLocked();
|
|
@@ -4656,12 +4657,16 @@ var getTotalValueLocked = async (query, indexer = false) => {
|
|
|
4656
4657
|
borrowValue: tvlIndexer.borrowValue,
|
|
4657
4658
|
borrowValueChangeRatio: tvlIndexer.borrowValueChangeRatio,
|
|
4658
4659
|
totalValue: tvlIndexer.totalValue,
|
|
4659
|
-
totalValueChangeRatio: tvlIndexer.totalValueChangeRatio
|
|
4660
|
+
totalValueChangeRatio: tvlIndexer.totalValueChangeRatio,
|
|
4661
|
+
supplyLendingValue: tvlIndexer.supplyLendingValue,
|
|
4662
|
+
supplyLendingValueChangeRatio: tvlIndexer.supplyLendingValueChangeRatio,
|
|
4663
|
+
supplyCollateralValue: tvlIndexer.supplyCollateralValue,
|
|
4664
|
+
supplyCollateralValueChangeRatio: tvlIndexer.supplyCollateralValueChangeRatio
|
|
4660
4665
|
};
|
|
4661
4666
|
return tvl2;
|
|
4662
4667
|
}
|
|
4663
4668
|
for (const pool of Object.values(market.pools)) {
|
|
4664
|
-
|
|
4669
|
+
supplyLendingValue = supplyLendingValue.plus(
|
|
4665
4670
|
BigNumber5(pool.supplyCoin).multipliedBy(pool.coinPrice)
|
|
4666
4671
|
);
|
|
4667
4672
|
borrowValue = borrowValue.plus(
|
|
@@ -4669,14 +4674,16 @@ var getTotalValueLocked = async (query, indexer = false) => {
|
|
|
4669
4674
|
);
|
|
4670
4675
|
}
|
|
4671
4676
|
for (const collateral of Object.values(market.collaterals)) {
|
|
4672
|
-
|
|
4677
|
+
supplyCollateralValue = supplyCollateralValue.plus(
|
|
4673
4678
|
BigNumber5(collateral.depositCoin).multipliedBy(collateral.coinPrice)
|
|
4674
4679
|
);
|
|
4675
4680
|
}
|
|
4676
4681
|
const tvl = {
|
|
4677
|
-
supplyValue:
|
|
4682
|
+
supplyValue: supplyLendingValue.plus(supplyCollateralValue).toNumber(),
|
|
4683
|
+
supplyLendingValue: supplyLendingValue.toNumber(),
|
|
4684
|
+
supplyCollateralValue: supplyCollateralValue.toNumber(),
|
|
4678
4685
|
borrowValue: borrowValue.toNumber(),
|
|
4679
|
-
totalValue:
|
|
4686
|
+
totalValue: supplyLendingValue.plus(supplyCollateralValue).minus(borrowValue).toNumber()
|
|
4680
4687
|
};
|
|
4681
4688
|
return tvl;
|
|
4682
4689
|
};
|
|
@@ -5508,10 +5515,26 @@ var getTotalVeScaTreasuryAmount = async (utils, veScaTreasury) => {
|
|
|
5508
5515
|
const veScaPkgId = utils.address.get("vesca.id");
|
|
5509
5516
|
const veScaConfig = utils.address.get("vesca.config");
|
|
5510
5517
|
veScaTreasury = veScaTreasury ?? utils.address.get("vesca.treasury");
|
|
5518
|
+
const txb = new SuiTxBlock2();
|
|
5511
5519
|
const refreshQueryTarget = `${veScaPkgId}::treasury::refresh`;
|
|
5512
|
-
const refreshArgs = [
|
|
5520
|
+
const refreshArgs = [
|
|
5521
|
+
veScaConfig,
|
|
5522
|
+
veScaTreasury,
|
|
5523
|
+
txb.sharedObjectRef({
|
|
5524
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
5525
|
+
mutable: false,
|
|
5526
|
+
initialSharedVersion: "1"
|
|
5527
|
+
})
|
|
5528
|
+
];
|
|
5513
5529
|
const veScaAmountQueryTarget = `${veScaPkgId}::treasury::total_ve_sca_amount`;
|
|
5514
|
-
const veScaAmountArgs = [
|
|
5530
|
+
const veScaAmountArgs = [
|
|
5531
|
+
veScaTreasury,
|
|
5532
|
+
txb.sharedObjectRef({
|
|
5533
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
5534
|
+
mutable: false,
|
|
5535
|
+
initialSharedVersion: "1"
|
|
5536
|
+
})
|
|
5537
|
+
];
|
|
5515
5538
|
const resolvedRefreshArgs = await Promise.all(
|
|
5516
5539
|
refreshArgs.map(async (arg) => {
|
|
5517
5540
|
if (typeof arg === "string") {
|
|
@@ -5528,7 +5551,6 @@ var getTotalVeScaTreasuryAmount = async (utils, veScaTreasury) => {
|
|
|
5528
5551
|
return arg;
|
|
5529
5552
|
})
|
|
5530
5553
|
);
|
|
5531
|
-
const txb = new SuiTxBlock2();
|
|
5532
5554
|
txb.moveCall(refreshQueryTarget, resolvedRefreshArgs);
|
|
5533
5555
|
txb.moveCall(veScaAmountQueryTarget, resolvedVeScaAmountArgs);
|
|
5534
5556
|
const txBytes = await txb.txBlock.build({
|
|
@@ -6292,27 +6314,67 @@ var priceUpdateRequest = (txBlock, packageId, xOracleId, coinType) => {
|
|
|
6292
6314
|
var confirmPriceUpdateRequest = (txBlock, packageId, xOracleId, request, coinType) => {
|
|
6293
6315
|
const target = `${packageId}::x_oracle::confirm_price_update_request`;
|
|
6294
6316
|
const typeArgs = [coinType];
|
|
6295
|
-
txBlock.moveCall(
|
|
6317
|
+
txBlock.moveCall(
|
|
6318
|
+
target,
|
|
6319
|
+
[
|
|
6320
|
+
xOracleId,
|
|
6321
|
+
request,
|
|
6322
|
+
txBlock.sharedObjectRef({
|
|
6323
|
+
objectId: SUI_CLOCK_OBJECT_ID2,
|
|
6324
|
+
mutable: false,
|
|
6325
|
+
initialSharedVersion: "1"
|
|
6326
|
+
})
|
|
6327
|
+
],
|
|
6328
|
+
typeArgs
|
|
6329
|
+
);
|
|
6296
6330
|
return txBlock;
|
|
6297
6331
|
};
|
|
6298
6332
|
var updateSupraPrice = (txBlock, packageId, request, holderId, registryId, coinType) => {
|
|
6299
6333
|
txBlock.moveCall(
|
|
6300
6334
|
`${packageId}::rule::set_price`,
|
|
6301
|
-
[
|
|
6335
|
+
[
|
|
6336
|
+
request,
|
|
6337
|
+
holderId,
|
|
6338
|
+
registryId,
|
|
6339
|
+
txBlock.sharedObjectRef({
|
|
6340
|
+
objectId: SUI_CLOCK_OBJECT_ID2,
|
|
6341
|
+
mutable: false,
|
|
6342
|
+
initialSharedVersion: "1"
|
|
6343
|
+
})
|
|
6344
|
+
],
|
|
6302
6345
|
[coinType]
|
|
6303
6346
|
);
|
|
6304
6347
|
};
|
|
6305
6348
|
var updateSwitchboardPrice = (txBlock, packageId, request, aggregatorId, registryId, coinType) => {
|
|
6306
6349
|
txBlock.moveCall(
|
|
6307
6350
|
`${packageId}::rule::set_price`,
|
|
6308
|
-
[
|
|
6351
|
+
[
|
|
6352
|
+
request,
|
|
6353
|
+
aggregatorId,
|
|
6354
|
+
registryId,
|
|
6355
|
+
txBlock.sharedObjectRef({
|
|
6356
|
+
objectId: SUI_CLOCK_OBJECT_ID2,
|
|
6357
|
+
mutable: false,
|
|
6358
|
+
initialSharedVersion: "1"
|
|
6359
|
+
})
|
|
6360
|
+
],
|
|
6309
6361
|
[coinType]
|
|
6310
6362
|
);
|
|
6311
6363
|
};
|
|
6312
6364
|
var updatePythPrice = (txBlock, packageId, request, stateId, feedObjectId, registryId, coinType) => {
|
|
6313
6365
|
txBlock.moveCall(
|
|
6314
6366
|
`${packageId}::rule::set_price`,
|
|
6315
|
-
[
|
|
6367
|
+
[
|
|
6368
|
+
request,
|
|
6369
|
+
stateId,
|
|
6370
|
+
feedObjectId,
|
|
6371
|
+
registryId,
|
|
6372
|
+
txBlock.sharedObjectRef({
|
|
6373
|
+
objectId: SUI_CLOCK_OBJECT_ID2,
|
|
6374
|
+
mutable: false,
|
|
6375
|
+
initialSharedVersion: "1"
|
|
6376
|
+
})
|
|
6377
|
+
],
|
|
6316
6378
|
[coinType]
|
|
6317
6379
|
);
|
|
6318
6380
|
};
|
|
@@ -6392,7 +6454,11 @@ var generateCoreNormalMethod = ({
|
|
|
6392
6454
|
coreIds.coinDecimalsRegistry,
|
|
6393
6455
|
txBlock.pure.u64(amount),
|
|
6394
6456
|
coreIds.xOracle,
|
|
6395
|
-
|
|
6457
|
+
txBlock.sharedObjectRef({
|
|
6458
|
+
objectId: SUI_CLOCK_OBJECT_ID3,
|
|
6459
|
+
mutable: false,
|
|
6460
|
+
initialSharedVersion: "1"
|
|
6461
|
+
})
|
|
6396
6462
|
],
|
|
6397
6463
|
[coinType]
|
|
6398
6464
|
);
|
|
@@ -6402,7 +6468,16 @@ var generateCoreNormalMethod = ({
|
|
|
6402
6468
|
return builder.moveCall(
|
|
6403
6469
|
txBlock,
|
|
6404
6470
|
`${coreIds.protocolPkg}::mint::mint`,
|
|
6405
|
-
[
|
|
6471
|
+
[
|
|
6472
|
+
coreIds.version,
|
|
6473
|
+
coreIds.market,
|
|
6474
|
+
coin,
|
|
6475
|
+
txBlock.sharedObjectRef({
|
|
6476
|
+
objectId: SUI_CLOCK_OBJECT_ID3,
|
|
6477
|
+
mutable: false,
|
|
6478
|
+
initialSharedVersion: "1"
|
|
6479
|
+
})
|
|
6480
|
+
],
|
|
6406
6481
|
[coinType]
|
|
6407
6482
|
);
|
|
6408
6483
|
},
|
|
@@ -6411,7 +6486,16 @@ var generateCoreNormalMethod = ({
|
|
|
6411
6486
|
return builder.moveCall(
|
|
6412
6487
|
txBlock,
|
|
6413
6488
|
`${coreIds.protocolPkg}::mint::mint_entry`,
|
|
6414
|
-
[
|
|
6489
|
+
[
|
|
6490
|
+
coreIds.version,
|
|
6491
|
+
coreIds.market,
|
|
6492
|
+
coin,
|
|
6493
|
+
txBlock.sharedObjectRef({
|
|
6494
|
+
objectId: SUI_CLOCK_OBJECT_ID3,
|
|
6495
|
+
mutable: false,
|
|
6496
|
+
initialSharedVersion: "1"
|
|
6497
|
+
})
|
|
6498
|
+
],
|
|
6415
6499
|
[coinType]
|
|
6416
6500
|
);
|
|
6417
6501
|
},
|
|
@@ -6420,7 +6504,16 @@ var generateCoreNormalMethod = ({
|
|
|
6420
6504
|
return builder.moveCall(
|
|
6421
6505
|
txBlock,
|
|
6422
6506
|
`${coreIds.protocolPkg}::redeem::redeem`,
|
|
6423
|
-
[
|
|
6507
|
+
[
|
|
6508
|
+
coreIds.version,
|
|
6509
|
+
coreIds.market,
|
|
6510
|
+
marketCoin,
|
|
6511
|
+
txBlock.sharedObjectRef({
|
|
6512
|
+
objectId: SUI_CLOCK_OBJECT_ID3,
|
|
6513
|
+
mutable: false,
|
|
6514
|
+
initialSharedVersion: "1"
|
|
6515
|
+
})
|
|
6516
|
+
],
|
|
6424
6517
|
[coinType]
|
|
6425
6518
|
);
|
|
6426
6519
|
},
|
|
@@ -6429,7 +6522,16 @@ var generateCoreNormalMethod = ({
|
|
|
6429
6522
|
return builder.moveCall(
|
|
6430
6523
|
txBlock,
|
|
6431
6524
|
`${coreIds.protocolPkg}::redeem::redeem_entry`,
|
|
6432
|
-
[
|
|
6525
|
+
[
|
|
6526
|
+
coreIds.version,
|
|
6527
|
+
coreIds.market,
|
|
6528
|
+
marketCoin,
|
|
6529
|
+
txBlock.sharedObjectRef({
|
|
6530
|
+
objectId: SUI_CLOCK_OBJECT_ID3,
|
|
6531
|
+
mutable: false,
|
|
6532
|
+
initialSharedVersion: "1"
|
|
6533
|
+
})
|
|
6534
|
+
],
|
|
6433
6535
|
[coinType]
|
|
6434
6536
|
);
|
|
6435
6537
|
},
|
|
@@ -6446,7 +6548,11 @@ var generateCoreNormalMethod = ({
|
|
|
6446
6548
|
coreIds.coinDecimalsRegistry,
|
|
6447
6549
|
amount,
|
|
6448
6550
|
coreIds.xOracle,
|
|
6449
|
-
|
|
6551
|
+
txBlock.sharedObjectRef({
|
|
6552
|
+
objectId: SUI_CLOCK_OBJECT_ID3,
|
|
6553
|
+
mutable: false,
|
|
6554
|
+
initialSharedVersion: "1"
|
|
6555
|
+
})
|
|
6450
6556
|
],
|
|
6451
6557
|
[coinType]
|
|
6452
6558
|
);
|
|
@@ -6465,7 +6571,11 @@ var generateCoreNormalMethod = ({
|
|
|
6465
6571
|
borrowReferral,
|
|
6466
6572
|
typeof amount === "number" ? txBlock.pure.u64(amount) : amount,
|
|
6467
6573
|
coreIds.xOracle,
|
|
6468
|
-
|
|
6574
|
+
txBlock.sharedObjectRef({
|
|
6575
|
+
objectId: SUI_CLOCK_OBJECT_ID3,
|
|
6576
|
+
mutable: false,
|
|
6577
|
+
initialSharedVersion: "1"
|
|
6578
|
+
})
|
|
6469
6579
|
],
|
|
6470
6580
|
[coinType, referralWitnessType]
|
|
6471
6581
|
);
|
|
@@ -6483,7 +6593,11 @@ var generateCoreNormalMethod = ({
|
|
|
6483
6593
|
coreIds.coinDecimalsRegistry,
|
|
6484
6594
|
txBlock.pure.u64(amount),
|
|
6485
6595
|
coreIds.xOracle,
|
|
6486
|
-
|
|
6596
|
+
txBlock.sharedObjectRef({
|
|
6597
|
+
objectId: SUI_CLOCK_OBJECT_ID3,
|
|
6598
|
+
mutable: false,
|
|
6599
|
+
initialSharedVersion: "1"
|
|
6600
|
+
})
|
|
6487
6601
|
],
|
|
6488
6602
|
[coinType]
|
|
6489
6603
|
);
|
|
@@ -6498,7 +6612,11 @@ var generateCoreNormalMethod = ({
|
|
|
6498
6612
|
obligation,
|
|
6499
6613
|
coreIds.market,
|
|
6500
6614
|
coin,
|
|
6501
|
-
|
|
6615
|
+
txBlock.sharedObjectRef({
|
|
6616
|
+
objectId: SUI_CLOCK_OBJECT_ID3,
|
|
6617
|
+
mutable: false,
|
|
6618
|
+
initialSharedVersion: "1"
|
|
6619
|
+
})
|
|
6502
6620
|
],
|
|
6503
6621
|
[coinType]
|
|
6504
6622
|
);
|
|
@@ -6663,7 +6781,7 @@ var generateCoreQuickMethod = ({
|
|
|
6663
6781
|
) ?? [];
|
|
6664
6782
|
const updateCoinNames = [...obligationCoinNames, poolCoinName];
|
|
6665
6783
|
await updateOracles(builder, txBlock, updateCoinNames);
|
|
6666
|
-
return
|
|
6784
|
+
return txBlock.borrowWithReferral(
|
|
6667
6785
|
obligationInfo.obligationId,
|
|
6668
6786
|
obligationInfo.obligationKey,
|
|
6669
6787
|
borrowReferral,
|
|
@@ -6791,7 +6909,14 @@ var generateSpoolNormalMethod = ({
|
|
|
6791
6909
|
return builder.moveCall(
|
|
6792
6910
|
txBlock,
|
|
6793
6911
|
`${spoolIds.spoolPkg}::user::new_spool_account`,
|
|
6794
|
-
[
|
|
6912
|
+
[
|
|
6913
|
+
stakePoolId,
|
|
6914
|
+
txBlock.sharedObjectRef({
|
|
6915
|
+
objectId: SUI_CLOCK_OBJECT_ID4,
|
|
6916
|
+
mutable: false,
|
|
6917
|
+
initialSharedVersion: "1"
|
|
6918
|
+
})
|
|
6919
|
+
],
|
|
6795
6920
|
[marketCoinType]
|
|
6796
6921
|
);
|
|
6797
6922
|
},
|
|
@@ -6803,7 +6928,16 @@ var generateSpoolNormalMethod = ({
|
|
|
6803
6928
|
builder.moveCall(
|
|
6804
6929
|
txBlock,
|
|
6805
6930
|
`${spoolIds.spoolPkg}::user::stake`,
|
|
6806
|
-
[
|
|
6931
|
+
[
|
|
6932
|
+
stakePoolId,
|
|
6933
|
+
stakeAccount,
|
|
6934
|
+
coin,
|
|
6935
|
+
txBlock.sharedObjectRef({
|
|
6936
|
+
objectId: SUI_CLOCK_OBJECT_ID4,
|
|
6937
|
+
mutable: false,
|
|
6938
|
+
initialSharedVersion: "1"
|
|
6939
|
+
})
|
|
6940
|
+
],
|
|
6807
6941
|
[marketCoinType]
|
|
6808
6942
|
);
|
|
6809
6943
|
},
|
|
@@ -6815,7 +6949,16 @@ var generateSpoolNormalMethod = ({
|
|
|
6815
6949
|
return builder.moveCall(
|
|
6816
6950
|
txBlock,
|
|
6817
6951
|
`${spoolIds.spoolPkg}::user::unstake`,
|
|
6818
|
-
[
|
|
6952
|
+
[
|
|
6953
|
+
stakePoolId,
|
|
6954
|
+
stakeAccount,
|
|
6955
|
+
amount,
|
|
6956
|
+
txBlock.sharedObjectRef({
|
|
6957
|
+
objectId: SUI_CLOCK_OBJECT_ID4,
|
|
6958
|
+
mutable: false,
|
|
6959
|
+
initialSharedVersion: "1"
|
|
6960
|
+
})
|
|
6961
|
+
],
|
|
6819
6962
|
[marketCoinType]
|
|
6820
6963
|
);
|
|
6821
6964
|
},
|
|
@@ -6832,7 +6975,16 @@ var generateSpoolNormalMethod = ({
|
|
|
6832
6975
|
return builder.moveCall(
|
|
6833
6976
|
txBlock,
|
|
6834
6977
|
`${spoolIds.spoolPkg}::user::redeem_rewards`,
|
|
6835
|
-
[
|
|
6978
|
+
[
|
|
6979
|
+
stakePoolId,
|
|
6980
|
+
rewardPoolId,
|
|
6981
|
+
stakeAccount,
|
|
6982
|
+
txBlock.sharedObjectRef({
|
|
6983
|
+
objectId: SUI_CLOCK_OBJECT_ID4,
|
|
6984
|
+
mutable: false,
|
|
6985
|
+
initialSharedVersion: "1"
|
|
6986
|
+
})
|
|
6987
|
+
],
|
|
6836
6988
|
[marketCoinType, rewardCoinType]
|
|
6837
6989
|
);
|
|
6838
6990
|
}
|
|
@@ -6967,8 +7119,10 @@ var newSpoolTxBlock = (builder, initTxBlock) => {
|
|
|
6967
7119
|
|
|
6968
7120
|
// src/builders/borrowIncentiveBuilder.ts
|
|
6969
7121
|
import { Transaction as Transaction3 } from "@mysten/sui/transactions";
|
|
6970
|
-
import {
|
|
6971
|
-
|
|
7122
|
+
import {
|
|
7123
|
+
SuiTxBlock as SuiKitTxBlock3,
|
|
7124
|
+
SUI_CLOCK_OBJECT_ID as SUI_CLOCK_OBJECT_ID5
|
|
7125
|
+
} from "@scallop-io/sui-kit";
|
|
6972
7126
|
var requireObligationInfo2 = async (...params) => {
|
|
6973
7127
|
const [builder, txBlock, obligationId, obligationKey] = params;
|
|
6974
7128
|
if (params.length === 4 && obligationId && obligationKey && typeof obligationId === "string") {
|
|
@@ -7020,7 +7174,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
7020
7174
|
obligationKey,
|
|
7021
7175
|
obligationId,
|
|
7022
7176
|
borrowIncentiveIds.obligationAccessStore,
|
|
7023
|
-
|
|
7177
|
+
txBlock.sharedObjectRef({
|
|
7178
|
+
objectId: SUI_CLOCK_OBJECT_ID5,
|
|
7179
|
+
mutable: false,
|
|
7180
|
+
initialSharedVersion: "1"
|
|
7181
|
+
})
|
|
7024
7182
|
]
|
|
7025
7183
|
);
|
|
7026
7184
|
},
|
|
@@ -7039,7 +7197,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
7039
7197
|
veScaIds.treasury,
|
|
7040
7198
|
veScaIds.table,
|
|
7041
7199
|
veScaKey,
|
|
7042
|
-
|
|
7200
|
+
txBlock.sharedObjectRef({
|
|
7201
|
+
objectId: SUI_CLOCK_OBJECT_ID5,
|
|
7202
|
+
mutable: false,
|
|
7203
|
+
initialSharedVersion: "1"
|
|
7204
|
+
})
|
|
7043
7205
|
],
|
|
7044
7206
|
[]
|
|
7045
7207
|
);
|
|
@@ -7054,7 +7216,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
7054
7216
|
borrowIncentiveIds.incentiveAccounts,
|
|
7055
7217
|
obligationKey,
|
|
7056
7218
|
obligationId,
|
|
7057
|
-
|
|
7219
|
+
txBlock.sharedObjectRef({
|
|
7220
|
+
objectId: SUI_CLOCK_OBJECT_ID5,
|
|
7221
|
+
mutable: false,
|
|
7222
|
+
initialSharedVersion: "1"
|
|
7223
|
+
})
|
|
7058
7224
|
]
|
|
7059
7225
|
);
|
|
7060
7226
|
},
|
|
@@ -7069,7 +7235,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
7069
7235
|
borrowIncentiveIds.incentiveAccounts,
|
|
7070
7236
|
obligationKey,
|
|
7071
7237
|
obligationId,
|
|
7072
|
-
|
|
7238
|
+
txBlock.sharedObjectRef({
|
|
7239
|
+
objectId: SUI_CLOCK_OBJECT_ID5,
|
|
7240
|
+
mutable: false,
|
|
7241
|
+
initialSharedVersion: "1"
|
|
7242
|
+
})
|
|
7073
7243
|
],
|
|
7074
7244
|
[rewardType]
|
|
7075
7245
|
);
|
|
@@ -7084,7 +7254,11 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
|
|
|
7084
7254
|
borrowIncentiveIds.incentiveAccounts,
|
|
7085
7255
|
obligation,
|
|
7086
7256
|
veScaKey,
|
|
7087
|
-
|
|
7257
|
+
txBlock.sharedObjectRef({
|
|
7258
|
+
objectId: SUI_CLOCK_OBJECT_ID5,
|
|
7259
|
+
mutable: false,
|
|
7260
|
+
initialSharedVersion: "1"
|
|
7261
|
+
})
|
|
7088
7262
|
]
|
|
7089
7263
|
);
|
|
7090
7264
|
}
|
|
@@ -7239,7 +7413,11 @@ var generateNormalVeScaMethod = ({
|
|
|
7239
7413
|
veScaIds.treasury,
|
|
7240
7414
|
scaCoin,
|
|
7241
7415
|
unlockAtInSecondTimestamp,
|
|
7242
|
-
|
|
7416
|
+
txBlock.sharedObjectRef({
|
|
7417
|
+
objectId: SUI_CLOCK_OBJECT_ID6,
|
|
7418
|
+
mutable: false,
|
|
7419
|
+
initialSharedVersion: "1"
|
|
7420
|
+
})
|
|
7243
7421
|
],
|
|
7244
7422
|
[]
|
|
7245
7423
|
);
|
|
@@ -7254,7 +7432,11 @@ var generateNormalVeScaMethod = ({
|
|
|
7254
7432
|
veScaIds.table,
|
|
7255
7433
|
veScaIds.treasury,
|
|
7256
7434
|
newUnlockAtInSecondTimestamp,
|
|
7257
|
-
|
|
7435
|
+
txBlock.sharedObjectRef({
|
|
7436
|
+
objectId: SUI_CLOCK_OBJECT_ID6,
|
|
7437
|
+
mutable: false,
|
|
7438
|
+
initialSharedVersion: "1"
|
|
7439
|
+
})
|
|
7258
7440
|
],
|
|
7259
7441
|
[]
|
|
7260
7442
|
);
|
|
@@ -7269,7 +7451,11 @@ var generateNormalVeScaMethod = ({
|
|
|
7269
7451
|
veScaIds.table,
|
|
7270
7452
|
veScaIds.treasury,
|
|
7271
7453
|
scaCoin,
|
|
7272
|
-
|
|
7454
|
+
txBlock.sharedObjectRef({
|
|
7455
|
+
objectId: SUI_CLOCK_OBJECT_ID6,
|
|
7456
|
+
mutable: false,
|
|
7457
|
+
initialSharedVersion: "1"
|
|
7458
|
+
})
|
|
7273
7459
|
],
|
|
7274
7460
|
[]
|
|
7275
7461
|
);
|
|
@@ -7285,7 +7471,11 @@ var generateNormalVeScaMethod = ({
|
|
|
7285
7471
|
veScaIds.treasury,
|
|
7286
7472
|
scaCoin,
|
|
7287
7473
|
newUnlockAtInSecondTimestamp,
|
|
7288
|
-
|
|
7474
|
+
txBlock.sharedObjectRef({
|
|
7475
|
+
objectId: SUI_CLOCK_OBJECT_ID6,
|
|
7476
|
+
mutable: false,
|
|
7477
|
+
initialSharedVersion: "1"
|
|
7478
|
+
})
|
|
7289
7479
|
],
|
|
7290
7480
|
[]
|
|
7291
7481
|
);
|
|
@@ -7299,7 +7489,11 @@ var generateNormalVeScaMethod = ({
|
|
|
7299
7489
|
veScaKey,
|
|
7300
7490
|
veScaIds.table,
|
|
7301
7491
|
veScaIds.treasury,
|
|
7302
|
-
|
|
7492
|
+
txBlock.sharedObjectRef({
|
|
7493
|
+
objectId: SUI_CLOCK_OBJECT_ID6,
|
|
7494
|
+
mutable: false,
|
|
7495
|
+
initialSharedVersion: "1"
|
|
7496
|
+
})
|
|
7303
7497
|
],
|
|
7304
7498
|
[]
|
|
7305
7499
|
);
|
|
@@ -7512,7 +7706,11 @@ var generateReferralNormalMethod = ({
|
|
|
7512
7706
|
referralIds.referralBindings,
|
|
7513
7707
|
txBlock.pure.id(veScaKeyId),
|
|
7514
7708
|
veScaTable,
|
|
7515
|
-
|
|
7709
|
+
txBlock.sharedObjectRef({
|
|
7710
|
+
objectId: SUI_CLOCK_OBJECT_ID7,
|
|
7711
|
+
mutable: false,
|
|
7712
|
+
initialSharedVersion: "1"
|
|
7713
|
+
})
|
|
7516
7714
|
],
|
|
7517
7715
|
[]
|
|
7518
7716
|
);
|
|
@@ -7528,7 +7726,11 @@ var generateReferralNormalMethod = ({
|
|
|
7528
7726
|
referralIds.referralBindings,
|
|
7529
7727
|
referralIds.authorizedWitnessList,
|
|
7530
7728
|
referralIds.referralTiers,
|
|
7531
|
-
|
|
7729
|
+
txBlock.sharedObjectRef({
|
|
7730
|
+
objectId: SUI_CLOCK_OBJECT_ID7,
|
|
7731
|
+
mutable: false,
|
|
7732
|
+
initialSharedVersion: "1"
|
|
7733
|
+
})
|
|
7532
7734
|
],
|
|
7533
7735
|
[coinType]
|
|
7534
7736
|
);
|
|
@@ -7542,7 +7744,11 @@ var generateReferralNormalMethod = ({
|
|
|
7542
7744
|
referralIds.version,
|
|
7543
7745
|
ticket,
|
|
7544
7746
|
referralIds.referralRevenuePool,
|
|
7545
|
-
|
|
7747
|
+
txBlock.sharedObjectRef({
|
|
7748
|
+
objectId: SUI_CLOCK_OBJECT_ID7,
|
|
7749
|
+
mutable: false,
|
|
7750
|
+
initialSharedVersion: "1"
|
|
7751
|
+
})
|
|
7546
7752
|
],
|
|
7547
7753
|
[coinType]
|
|
7548
7754
|
);
|
|
@@ -7556,7 +7762,11 @@ var generateReferralNormalMethod = ({
|
|
|
7556
7762
|
referralIds.version,
|
|
7557
7763
|
referralIds.referralRevenuePool,
|
|
7558
7764
|
veScaKey,
|
|
7559
|
-
|
|
7765
|
+
txBlock.sharedObjectRef({
|
|
7766
|
+
objectId: SUI_CLOCK_OBJECT_ID7,
|
|
7767
|
+
mutable: false,
|
|
7768
|
+
initialSharedVersion: "1"
|
|
7769
|
+
})
|
|
7560
7770
|
],
|
|
7561
7771
|
[coinType]
|
|
7562
7772
|
);
|