@magmaprotocol/magma-clmm-sdk 0.5.79 → 0.5.81
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/index.d.ts +25 -14
- package/dist/index.js +124 -107
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +124 -107
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3615,14 +3615,14 @@ var _TransactionUtil = class {
|
|
|
3615
3615
|
static buildCreateLockTransaction(sdk, params, allCoinAsset) {
|
|
3616
3616
|
let tx = new import_transactions.Transaction();
|
|
3617
3617
|
tx.setSender(sdk.senderAddress);
|
|
3618
|
-
const { magma_token } = getPackagerConfigs(sdk.sdkOptions.
|
|
3618
|
+
const { magma_token } = getPackagerConfigs(sdk.sdkOptions.ve33);
|
|
3619
3619
|
const lockCoinInput = _TransactionUtil.buildCoinForAmount(tx, allCoinAsset, BigInt(params.amount), magma_token, false, true);
|
|
3620
3620
|
tx = _TransactionUtil.buildCreateTransactionArgs(tx, params, sdk.sdkOptions, lockCoinInput);
|
|
3621
3621
|
return tx;
|
|
3622
3622
|
}
|
|
3623
3623
|
static buildCreateTransactionArgs(tx, params, sdkOptions, lockCoinInput) {
|
|
3624
|
-
const { integrate } = sdkOptions;
|
|
3625
|
-
const { voting_escrow_id, magma_token } = getPackagerConfigs(
|
|
3624
|
+
const { integrate, ve33 } = sdkOptions;
|
|
3625
|
+
const { voting_escrow_id, magma_token } = getPackagerConfigs(ve33);
|
|
3626
3626
|
const typeArguments = [magma_token];
|
|
3627
3627
|
const functionName = "create_lock";
|
|
3628
3628
|
const coins = tx.makeMoveVec({ elements: [lockCoinInput.targetCoin] });
|
|
@@ -3641,7 +3641,7 @@ var _TransactionUtil = class {
|
|
|
3641
3641
|
return tx;
|
|
3642
3642
|
}
|
|
3643
3643
|
static buildIncreaseLockAmountTransaction(sdk, params, allCoinAsset) {
|
|
3644
|
-
const { magma_token } = getPackagerConfigs(sdk.sdkOptions.
|
|
3644
|
+
const { magma_token } = getPackagerConfigs(sdk.sdkOptions.ve33);
|
|
3645
3645
|
let tx = new import_transactions.Transaction();
|
|
3646
3646
|
tx.setSender(sdk.senderAddress);
|
|
3647
3647
|
const lockCoinInput = _TransactionUtil.buildCoinForAmount(tx, allCoinAsset, BigInt(params.amount), magma_token, false, true);
|
|
@@ -3649,8 +3649,8 @@ var _TransactionUtil = class {
|
|
|
3649
3649
|
return tx;
|
|
3650
3650
|
}
|
|
3651
3651
|
static buildIncreaseLockAmountTransactionArgs(tx, params, sdkOptions, increaseCoinInput) {
|
|
3652
|
-
const { integrate } = sdkOptions;
|
|
3653
|
-
const { voting_escrow_id, magma_token } = getPackagerConfigs(
|
|
3652
|
+
const { integrate, ve33 } = sdkOptions;
|
|
3653
|
+
const { voting_escrow_id, magma_token } = getPackagerConfigs(ve33);
|
|
3654
3654
|
const typeArguments = [magma_token];
|
|
3655
3655
|
const functionName = "increase_amount_single_coin";
|
|
3656
3656
|
const args = [tx.object(voting_escrow_id), tx.object(params.lockId), increaseCoinInput.targetCoin, tx.object(CLOCK_ADDRESS)];
|
|
@@ -3665,8 +3665,8 @@ var _TransactionUtil = class {
|
|
|
3665
3665
|
static buildMergeLockTransaction(sdk, params) {
|
|
3666
3666
|
const tx = new import_transactions.Transaction();
|
|
3667
3667
|
tx.setSender(sdk.senderAddress);
|
|
3668
|
-
const { integrate } = sdk.sdkOptions;
|
|
3669
|
-
const { voter_id, voting_escrow_id, magma_token, distribution_cfg } = getPackagerConfigs(
|
|
3668
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3669
|
+
const { voter_id, voting_escrow_id, magma_token, distribution_cfg } = getPackagerConfigs(ve33);
|
|
3670
3670
|
const typeArguments = [magma_token];
|
|
3671
3671
|
const functionName = "merge_locks";
|
|
3672
3672
|
const args = [
|
|
@@ -3688,8 +3688,8 @@ var _TransactionUtil = class {
|
|
|
3688
3688
|
static buildTransferLockTransaction(sdk, params) {
|
|
3689
3689
|
const tx = new import_transactions.Transaction();
|
|
3690
3690
|
tx.setSender(sdk.senderAddress);
|
|
3691
|
-
const { integrate } = sdk.sdkOptions;
|
|
3692
|
-
const { voting_escrow_id, magma_token } = getPackagerConfigs(
|
|
3691
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3692
|
+
const { voting_escrow_id, magma_token } = getPackagerConfigs(ve33);
|
|
3693
3693
|
const typeArguments = [magma_token];
|
|
3694
3694
|
const functionName = "transfer";
|
|
3695
3695
|
const args = [tx.object(voting_escrow_id), tx.object(params.lockId), tx.object(params.to), tx.object(CLOCK_ADDRESS)];
|
|
@@ -3706,8 +3706,8 @@ var _TransactionUtil = class {
|
|
|
3706
3706
|
tx.setSender(sdk.senderAddress);
|
|
3707
3707
|
const oneDay = 24 * 60 * 60;
|
|
3708
3708
|
const newLockDuration = Math.ceil((params.newLockEndAt - Date.now() / 1e3) / oneDay);
|
|
3709
|
-
const { integrate } = sdk.sdkOptions;
|
|
3710
|
-
const { voting_escrow_id, magma_token } = getPackagerConfigs(
|
|
3709
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3710
|
+
const { voting_escrow_id, magma_token } = getPackagerConfigs(ve33);
|
|
3711
3711
|
const typeArguments = [magma_token];
|
|
3712
3712
|
const functionName = "increase_unlock_time";
|
|
3713
3713
|
const args = [tx.object(voting_escrow_id), tx.object(params.lockId), tx.pure.u64(newLockDuration), tx.object(CLOCK_ADDRESS)];
|
|
@@ -3722,8 +3722,8 @@ var _TransactionUtil = class {
|
|
|
3722
3722
|
static buildLockPermanentTransaction(sdk, params) {
|
|
3723
3723
|
const tx = new import_transactions.Transaction();
|
|
3724
3724
|
tx.setSender(sdk.senderAddress);
|
|
3725
|
-
const { integrate } = sdk.sdkOptions;
|
|
3726
|
-
const { voting_escrow_id, magma_token } = getPackagerConfigs(
|
|
3725
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3726
|
+
const { voting_escrow_id, magma_token } = getPackagerConfigs(ve33);
|
|
3727
3727
|
const typeArguments = [magma_token];
|
|
3728
3728
|
const functionName = "lock_permanent";
|
|
3729
3729
|
const args = [tx.object(voting_escrow_id), tx.object(params.lockId), tx.object(CLOCK_ADDRESS)];
|
|
@@ -3737,8 +3737,8 @@ var _TransactionUtil = class {
|
|
|
3737
3737
|
static buildUnlockPermanentTransaction(sdk, params) {
|
|
3738
3738
|
const tx = new import_transactions.Transaction();
|
|
3739
3739
|
tx.setSender(sdk.senderAddress);
|
|
3740
|
-
const { integrate } = sdk.sdkOptions;
|
|
3741
|
-
const { voting_escrow_id, magma_token, distribution_cfg, voter_id } = getPackagerConfigs(
|
|
3740
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3741
|
+
const { voting_escrow_id, magma_token, distribution_cfg, voter_id } = getPackagerConfigs(ve33);
|
|
3742
3742
|
const typeArguments = [magma_token];
|
|
3743
3743
|
const functionName = "unlock_permanent";
|
|
3744
3744
|
const args = [
|
|
@@ -3758,8 +3758,8 @@ var _TransactionUtil = class {
|
|
|
3758
3758
|
static buildBurnLockTransaction(sdk, lockId) {
|
|
3759
3759
|
const tx = new import_transactions.Transaction();
|
|
3760
3760
|
tx.setSender(sdk.senderAddress);
|
|
3761
|
-
const { integrate } = sdk.sdkOptions;
|
|
3762
|
-
const { voting_escrow_id, magma_token, distribution_cfg, voter_id } = getPackagerConfigs(
|
|
3761
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3762
|
+
const { voting_escrow_id, magma_token, distribution_cfg, voter_id } = getPackagerConfigs(ve33);
|
|
3763
3763
|
const typeArguments = [magma_token];
|
|
3764
3764
|
const functionName = "burn_lock";
|
|
3765
3765
|
const args = [
|
|
@@ -3779,8 +3779,8 @@ var _TransactionUtil = class {
|
|
|
3779
3779
|
static buildSplitLockTransaction(sdk, lockId, splitAmount) {
|
|
3780
3780
|
const tx = new import_transactions.Transaction();
|
|
3781
3781
|
tx.setSender(sdk.senderAddress);
|
|
3782
|
-
const { integrate } = sdk.sdkOptions;
|
|
3783
|
-
const { voting_escrow_id, magma_token, distribution_cfg, voter_id } = getPackagerConfigs(
|
|
3782
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3783
|
+
const { voting_escrow_id, magma_token, distribution_cfg, voter_id } = getPackagerConfigs(ve33);
|
|
3784
3784
|
const typeArguments = [magma_token];
|
|
3785
3785
|
const functionName = "split_lock";
|
|
3786
3786
|
const args = [
|
|
@@ -3801,8 +3801,8 @@ var _TransactionUtil = class {
|
|
|
3801
3801
|
static buildVoteTransaction(sdk, params) {
|
|
3802
3802
|
const tx = new import_transactions.Transaction();
|
|
3803
3803
|
tx.setSender(sdk.senderAddress);
|
|
3804
|
-
const { integrate } = sdk.sdkOptions;
|
|
3805
|
-
const { distribution_cfg, voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(
|
|
3804
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3805
|
+
const { distribution_cfg, voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
3806
3806
|
const typeArguments = [magma_token];
|
|
3807
3807
|
const functionName = "vote";
|
|
3808
3808
|
const pools = tx.pure.vector("id", params.pools);
|
|
@@ -3829,8 +3829,8 @@ var _TransactionUtil = class {
|
|
|
3829
3829
|
static buildClaimVotingRewardsTransaction(sdk, params) {
|
|
3830
3830
|
const tx = new import_transactions.Transaction();
|
|
3831
3831
|
tx.setSender(sdk.senderAddress);
|
|
3832
|
-
const { integrate } = sdk.sdkOptions;
|
|
3833
|
-
const { voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(
|
|
3832
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3833
|
+
const { voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
3834
3834
|
const typeArguments = [magma_token, params.coinAType, params.coinBType];
|
|
3835
3835
|
const functionName = "claim_voting_fee_rewards_single";
|
|
3836
3836
|
const args = [tx.object(voter_id), tx.object(voting_escrow_id), tx.object(params.locks), tx.object(CLOCK_ADDRESS)];
|
|
@@ -3844,8 +3844,8 @@ var _TransactionUtil = class {
|
|
|
3844
3844
|
static buildClaimVotingRewardsPoolsTransaction(sdk, params) {
|
|
3845
3845
|
const tx = new import_transactions.Transaction();
|
|
3846
3846
|
tx.setSender(sdk.senderAddress);
|
|
3847
|
-
const { integrate, distribution } = sdk.sdkOptions;
|
|
3848
|
-
const { voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(
|
|
3847
|
+
const { integrate, distribution, ve33 } = sdk.sdkOptions;
|
|
3848
|
+
const { voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
3849
3849
|
const typeArguments = [magma_token, params.coinAType, params.coinBType];
|
|
3850
3850
|
const functionName = "claim_voting_fee_rewards";
|
|
3851
3851
|
const locks = tx.makeMoveVec({
|
|
@@ -3863,8 +3863,8 @@ var _TransactionUtil = class {
|
|
|
3863
3863
|
static buildClaimAndLockRebases(sdk, params) {
|
|
3864
3864
|
const tx = new import_transactions.Transaction();
|
|
3865
3865
|
tx.setSender(sdk.senderAddress);
|
|
3866
|
-
const { integrate } = sdk.sdkOptions;
|
|
3867
|
-
const { voting_escrow_id, magma_token, reward_distributor_id } = getPackagerConfigs(
|
|
3866
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3867
|
+
const { voting_escrow_id, magma_token, reward_distributor_id } = getPackagerConfigs(ve33);
|
|
3868
3868
|
const typeArguments = [magma_token];
|
|
3869
3869
|
const functionName = "claim_and_lock";
|
|
3870
3870
|
const args = [tx.object(reward_distributor_id), tx.object(voting_escrow_id), tx.object(params.lockId), tx.object(CLOCK_ADDRESS)];
|
|
@@ -3878,8 +3878,8 @@ var _TransactionUtil = class {
|
|
|
3878
3878
|
static buildPoke(sdk, params) {
|
|
3879
3879
|
const tx = new import_transactions.Transaction();
|
|
3880
3880
|
tx.setSender(sdk.senderAddress);
|
|
3881
|
-
const { integrate } = sdk.sdkOptions;
|
|
3882
|
-
const { distribution_cfg, voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(
|
|
3881
|
+
const { integrate, ve33 } = sdk.sdkOptions;
|
|
3882
|
+
const { distribution_cfg, voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
3883
3883
|
const typeArguments = [magma_token];
|
|
3884
3884
|
const functionName = "poke";
|
|
3885
3885
|
const args = [
|
|
@@ -3899,8 +3899,8 @@ var _TransactionUtil = class {
|
|
|
3899
3899
|
static buildClaimVotingBribe(sdk, locks, incentive_tokens) {
|
|
3900
3900
|
const tx = new import_transactions.Transaction();
|
|
3901
3901
|
tx.setSender(sdk.senderAddress);
|
|
3902
|
-
const { integrate, distribution } = sdk.sdkOptions;
|
|
3903
|
-
const { voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(
|
|
3902
|
+
const { integrate, distribution, ve33 } = sdk.sdkOptions;
|
|
3903
|
+
const { voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
3904
3904
|
const typeArguments = [magma_token, ...incentive_tokens];
|
|
3905
3905
|
let targetFunc = `${integrate.published_at}::${Voter}::claim_voting_bribes_${incentive_tokens.length}`;
|
|
3906
3906
|
if (incentive_tokens.length === 1) {
|
|
@@ -7743,8 +7743,8 @@ var SwapModule = class {
|
|
|
7743
7743
|
* @returns {Promise<PreSwapParams>} A promise that resolves to the swap data.
|
|
7744
7744
|
*/
|
|
7745
7745
|
async preswap(params) {
|
|
7746
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
7747
|
-
const { global_config_id } = getPackagerConfigs(
|
|
7746
|
+
const { integrate, simulationAccount, clmm_pool } = this.sdk.sdkOptions;
|
|
7747
|
+
const { global_config_id } = getPackagerConfigs(clmm_pool);
|
|
7748
7748
|
const tx = new import_transactions8.Transaction();
|
|
7749
7749
|
const typeArguments = [params.coinTypeA, params.coinTypeB];
|
|
7750
7750
|
const args = [
|
|
@@ -8011,8 +8011,8 @@ var LockModule = class {
|
|
|
8011
8011
|
}
|
|
8012
8012
|
const tx = new import_transactions9.Transaction();
|
|
8013
8013
|
tx.setSender(this.sdk.senderAddress);
|
|
8014
|
-
const { integrate } = this.sdk.sdkOptions;
|
|
8015
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8014
|
+
const { integrate, ve33 } = this.sdk.sdkOptions;
|
|
8015
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8016
8016
|
const typeArguments = [magma_token, params.coinType];
|
|
8017
8017
|
const allCoinAsset = await this._sdk.getOwnerCoinAssets(this._sdk.senderAddress);
|
|
8018
8018
|
const coinInput = TransactionUtil.buildCoinForAmount(tx, allCoinAsset, BigInt(params.amount), params.coinType, false, true);
|
|
@@ -8037,8 +8037,8 @@ var LockModule = class {
|
|
|
8037
8037
|
if (incentiveTokens.length < 1 || incentiveTokens.length > 3) {
|
|
8038
8038
|
throw Error("incentiveTokens length must be between 1 and 3");
|
|
8039
8039
|
}
|
|
8040
|
-
const { integrate } = this.sdk.sdkOptions;
|
|
8041
|
-
const { voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(
|
|
8040
|
+
const { integrate, ve33 } = this.sdk.sdkOptions;
|
|
8041
|
+
const { voting_escrow_id, magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8042
8042
|
const typeArguments = [magma_token, ...feeTokens, ...incentiveTokens];
|
|
8043
8043
|
let targetFunc = `${integrate.published_at}::${Voter}::claim_voting_bribes_for_single_pool${incentiveTokens.length}`;
|
|
8044
8044
|
if (incentiveTokens.length === 1) {
|
|
@@ -8056,8 +8056,8 @@ var LockModule = class {
|
|
|
8056
8056
|
}
|
|
8057
8057
|
async fastLocksOfUser(user) {
|
|
8058
8058
|
const locksInfo = { owner: user, lockInfo: [] };
|
|
8059
|
-
const { distribution } = this._sdk.sdkOptions;
|
|
8060
|
-
const { magma_token } = getPackagerConfigs(
|
|
8059
|
+
const { distribution, ve33 } = this._sdk.sdkOptions;
|
|
8060
|
+
const { magma_token } = getPackagerConfigs(ve33);
|
|
8061
8061
|
const ownerRes = await this._sdk.fullClient.getOwnedObjectsByPage(user, {
|
|
8062
8062
|
options: { showType: true, showContent: true, showDisplay: true, showOwner: true },
|
|
8063
8063
|
filter: {
|
|
@@ -8091,8 +8091,8 @@ var LockModule = class {
|
|
|
8091
8091
|
}
|
|
8092
8092
|
async locksOfUserV2(user) {
|
|
8093
8093
|
const locksInfo = { owner: user, lockInfo: [] };
|
|
8094
|
-
const { distribution } = this._sdk.sdkOptions;
|
|
8095
|
-
const { magma_token } = getPackagerConfigs(
|
|
8094
|
+
const { distribution, ve33 } = this._sdk.sdkOptions;
|
|
8095
|
+
const { magma_token } = getPackagerConfigs(ve33);
|
|
8096
8096
|
const ownerRes = await this._sdk.fullClient.getOwnedObjectsByPage(user, {
|
|
8097
8097
|
options: { showType: true, showContent: true, showDisplay: true, showOwner: true },
|
|
8098
8098
|
filter: {
|
|
@@ -8142,8 +8142,8 @@ var LockModule = class {
|
|
|
8142
8142
|
}
|
|
8143
8143
|
async locksOfUser(user) {
|
|
8144
8144
|
const locksInfo = { owner: user, lockInfo: [] };
|
|
8145
|
-
const { distribution } = this._sdk.sdkOptions;
|
|
8146
|
-
const { magma_token } = getPackagerConfigs(
|
|
8145
|
+
const { distribution, ve33 } = this._sdk.sdkOptions;
|
|
8146
|
+
const { magma_token } = getPackagerConfigs(ve33);
|
|
8147
8147
|
const ownerRes = await this._sdk.fullClient.getOwnedObjectsByPage(user, {
|
|
8148
8148
|
options: { showType: true, showContent: true, showDisplay: true, showOwner: true },
|
|
8149
8149
|
filter: {
|
|
@@ -8231,7 +8231,7 @@ var LockModule = class {
|
|
|
8231
8231
|
"InvalidLockObject" /* InvalidLockObject */
|
|
8232
8232
|
);
|
|
8233
8233
|
}
|
|
8234
|
-
const { magma_token } = getPackagerConfigs(this.sdk.sdkOptions.
|
|
8234
|
+
const { magma_token } = getPackagerConfigs(this.sdk.sdkOptions.ve33);
|
|
8235
8235
|
const aLockSummary = await this.aLockSummary(lockId);
|
|
8236
8236
|
const poolIncentiveTokens = await this.getVotingBribeRewardTokens(lockId);
|
|
8237
8237
|
const poolFeeTokens = await this.getVotingFeeRewardTokens(lockId);
|
|
@@ -8289,8 +8289,8 @@ var LockModule = class {
|
|
|
8289
8289
|
}
|
|
8290
8290
|
async aLockSummary(lock_id) {
|
|
8291
8291
|
const tx = new import_transactions9.Transaction();
|
|
8292
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8293
|
-
const { voting_escrow_id, magma_token, voter_id, reward_distributor_id } = getPackagerConfigs(
|
|
8292
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8293
|
+
const { voting_escrow_id, magma_token, voter_id, reward_distributor_id } = getPackagerConfigs(ve33);
|
|
8294
8294
|
const typeArguments = [magma_token];
|
|
8295
8295
|
const args = [
|
|
8296
8296
|
tx.object(voter_id),
|
|
@@ -8342,8 +8342,8 @@ var LockModule = class {
|
|
|
8342
8342
|
}
|
|
8343
8343
|
async _aLockSummary(lock_id, tx) {
|
|
8344
8344
|
tx = tx || new import_transactions9.Transaction();
|
|
8345
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8346
|
-
const { voting_escrow_id, magma_token, voter_id, reward_distributor_id } = getPackagerConfigs(
|
|
8345
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8346
|
+
const { voting_escrow_id, magma_token, voter_id, reward_distributor_id } = getPackagerConfigs(ve33);
|
|
8347
8347
|
const typeArguments = [magma_token];
|
|
8348
8348
|
if (!checkInvalidSuiAddress(simulationAccount.address)) {
|
|
8349
8349
|
throw Error("this config simulationAccount is not set right");
|
|
@@ -8385,8 +8385,8 @@ var LockModule = class {
|
|
|
8385
8385
|
}
|
|
8386
8386
|
async allLockSummary() {
|
|
8387
8387
|
const tx = new import_transactions9.Transaction();
|
|
8388
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8389
|
-
const { voting_escrow_id, magma_token, voter_id, minter_id } = getPackagerConfigs(
|
|
8388
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8389
|
+
const { voting_escrow_id, magma_token, voter_id, minter_id } = getPackagerConfigs(ve33);
|
|
8390
8390
|
const typeArguments = [magma_token];
|
|
8391
8391
|
const args = [tx.object(minter_id), tx.object(voter_id), tx.object(voting_escrow_id), tx.object(CLOCK_ADDRESS)];
|
|
8392
8392
|
tx.moveCall({
|
|
@@ -8430,8 +8430,8 @@ var LockModule = class {
|
|
|
8430
8430
|
}
|
|
8431
8431
|
async poolWeights(pools) {
|
|
8432
8432
|
const tx = new import_transactions9.Transaction();
|
|
8433
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8434
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8433
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8434
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8435
8435
|
const typeArguments = [magma_token];
|
|
8436
8436
|
const poolsParams = tx.pure.vector("id", pools);
|
|
8437
8437
|
const args = [tx.object(voter_id), poolsParams];
|
|
@@ -8472,8 +8472,8 @@ var LockModule = class {
|
|
|
8472
8472
|
}
|
|
8473
8473
|
async _getVotingFeeRewardTokens(lock_id, tx) {
|
|
8474
8474
|
tx = tx || new import_transactions9.Transaction();
|
|
8475
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8476
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8475
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8476
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8477
8477
|
const typeArguments = [magma_token];
|
|
8478
8478
|
const args = [tx.object(voter_id), tx.object(lock_id)];
|
|
8479
8479
|
if (!checkInvalidSuiAddress(simulationAccount.address)) {
|
|
@@ -8513,8 +8513,8 @@ var LockModule = class {
|
|
|
8513
8513
|
}
|
|
8514
8514
|
async getVotingFeeRewardTokens(lock_id) {
|
|
8515
8515
|
const tx = new import_transactions9.Transaction();
|
|
8516
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8517
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8516
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8517
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8518
8518
|
const typeArguments = [magma_token];
|
|
8519
8519
|
const args = [tx.object(voter_id), tx.object(lock_id)];
|
|
8520
8520
|
if (!checkInvalidSuiAddress(simulationAccount.address)) {
|
|
@@ -8557,8 +8557,8 @@ var LockModule = class {
|
|
|
8557
8557
|
}
|
|
8558
8558
|
async _getVotingBribeRewardTokens(lock_id, tx) {
|
|
8559
8559
|
tx = tx || new import_transactions9.Transaction();
|
|
8560
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8561
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8560
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8561
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8562
8562
|
const typeArguments = [magma_token];
|
|
8563
8563
|
if (!checkInvalidSuiAddress(simulationAccount.address)) {
|
|
8564
8564
|
throw Error("this config simulationAccount is not set right");
|
|
@@ -8599,8 +8599,8 @@ var LockModule = class {
|
|
|
8599
8599
|
// Return PoolId => tokens
|
|
8600
8600
|
async getVotingBribeRewardTokens(lock_id) {
|
|
8601
8601
|
const tx = new import_transactions9.Transaction();
|
|
8602
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8603
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8602
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8603
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8604
8604
|
const typeArguments = [magma_token];
|
|
8605
8605
|
if (!checkInvalidSuiAddress(simulationAccount.address)) {
|
|
8606
8606
|
throw Error("this config simulationAccount is not set right");
|
|
@@ -8651,8 +8651,8 @@ var LockModule = class {
|
|
|
8651
8651
|
}
|
|
8652
8652
|
_getFeeRewardsInner(lock_id, token_a, token_b, tx) {
|
|
8653
8653
|
tx = tx || new import_transactions9.Transaction();
|
|
8654
|
-
const { integrate } = this.sdk.sdkOptions;
|
|
8655
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8654
|
+
const { integrate, ve33 } = this.sdk.sdkOptions;
|
|
8655
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8656
8656
|
const typeArguments = [magma_token, token_a, token_b];
|
|
8657
8657
|
const args = [tx.object(voter_id), tx.object(lock_id), tx.object(CLOCK_ADDRESS)];
|
|
8658
8658
|
const targetFunc = `${integrate.published_at}::${Voter}::claimable_voting_fee_rewards`;
|
|
@@ -8711,8 +8711,8 @@ var LockModule = class {
|
|
|
8711
8711
|
// if you have many tokens, call this function multi times
|
|
8712
8712
|
async _getPoolFeeRewards(lock_id, token_a, token_b, poolFeeRewardTokens) {
|
|
8713
8713
|
const tx = new import_transactions9.Transaction();
|
|
8714
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8715
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8714
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8715
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8716
8716
|
const typeArguments = [magma_token, token_a, token_b];
|
|
8717
8717
|
const args = [tx.object(voter_id), tx.object(lock_id), tx.object(CLOCK_ADDRESS)];
|
|
8718
8718
|
const targetFunc = `${integrate.published_at}::${Voter}::claimable_voting_fee_rewards`;
|
|
@@ -8766,8 +8766,8 @@ var LockModule = class {
|
|
|
8766
8766
|
if (incentive_tokens.length > 3) {
|
|
8767
8767
|
throw Error("Too many tokens");
|
|
8768
8768
|
}
|
|
8769
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8770
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8769
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8770
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8771
8771
|
const typeArguments = [magma_token, ...incentive_tokens];
|
|
8772
8772
|
const args = [tx.object(voter_id), tx.object(locksId), tx.object(CLOCK_ADDRESS)];
|
|
8773
8773
|
let targetFunc = `${integrate.published_at}::${Voter}::claimable_voting_bribes_${incentive_tokens.length}`;
|
|
@@ -8835,8 +8835,8 @@ var LockModule = class {
|
|
|
8835
8835
|
throw Error("Too many tokens");
|
|
8836
8836
|
}
|
|
8837
8837
|
const tx = new import_transactions9.Transaction();
|
|
8838
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8839
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8838
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8839
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8840
8840
|
const typeArguments = [magma_token, ...incentive_tokens];
|
|
8841
8841
|
const args = [tx.object(voter_id), tx.object(locksId), tx.object(CLOCK_ADDRESS)];
|
|
8842
8842
|
let targetFunc = `${integrate.published_at}::${Voter}::claimable_voting_bribes_${incentive_tokens.length}`;
|
|
@@ -8874,8 +8874,8 @@ var LockModule = class {
|
|
|
8874
8874
|
}
|
|
8875
8875
|
async getPoolBribeRewardTokens(pool_id) {
|
|
8876
8876
|
const tx = new import_transactions9.Transaction();
|
|
8877
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8878
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8877
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8878
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8879
8879
|
const typeArguments = [magma_token];
|
|
8880
8880
|
const args = [tx.object(voter_id), tx.object(pool_id)];
|
|
8881
8881
|
tx.moveCall({
|
|
@@ -8910,8 +8910,8 @@ var LockModule = class {
|
|
|
8910
8910
|
}
|
|
8911
8911
|
async getLockVotingStats(lockId) {
|
|
8912
8912
|
const tx = new import_transactions9.Transaction();
|
|
8913
|
-
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
8914
|
-
const { magma_token, voter_id } = getPackagerConfigs(
|
|
8913
|
+
const { integrate, simulationAccount, ve33 } = this.sdk.sdkOptions;
|
|
8914
|
+
const { magma_token, voter_id } = getPackagerConfigs(ve33);
|
|
8915
8915
|
const args = [tx.object(voter_id), tx.object(lockId), tx.object(CLOCK_ADDRESS)];
|
|
8916
8916
|
const typeArguments = [magma_token];
|
|
8917
8917
|
tx.moveCall({
|
|
@@ -10014,16 +10014,9 @@ var ConfigModule = class {
|
|
|
10014
10014
|
launchpad_pools_id: "",
|
|
10015
10015
|
clmm_pools_id: "",
|
|
10016
10016
|
admin_cap_id: "",
|
|
10017
|
-
global_config_id: "",
|
|
10018
10017
|
coin_list_handle: "",
|
|
10019
10018
|
launchpad_pools_handle: "",
|
|
10020
|
-
clmm_pools_handle: ""
|
|
10021
|
-
voter_id: "",
|
|
10022
|
-
minter_id: "",
|
|
10023
|
-
reward_distributor_id: "",
|
|
10024
|
-
distribution_cfg: "",
|
|
10025
|
-
magma_token: "",
|
|
10026
|
-
voting_escrow_id: ""
|
|
10019
|
+
clmm_pools_handle: ""
|
|
10027
10020
|
};
|
|
10028
10021
|
if (objects.data.length > 0) {
|
|
10029
10022
|
for (const item of objects.data) {
|
|
@@ -10039,7 +10032,6 @@ var ConfigModule = class {
|
|
|
10039
10032
|
tokenConfig.clmm_pools_id = item.parsedJson.pools_id;
|
|
10040
10033
|
break;
|
|
10041
10034
|
case `InitConfigEvent`:
|
|
10042
|
-
tokenConfig.global_config_id = item.parsedJson.global_config_id;
|
|
10043
10035
|
tokenConfig.admin_cap_id = item.parsedJson.admin_cap_id;
|
|
10044
10036
|
break;
|
|
10045
10037
|
default:
|
|
@@ -10312,7 +10304,7 @@ var GaugeModule = class {
|
|
|
10312
10304
|
if (gauge === void 0) {
|
|
10313
10305
|
throw Error(`Fetch gauge of pool ${params.poolId} failed`);
|
|
10314
10306
|
}
|
|
10315
|
-
const { distribution_cfg, magma_token } = getPackagerConfigs(this.sdk.sdkOptions.
|
|
10307
|
+
const { distribution_cfg, magma_token } = getPackagerConfigs(this.sdk.sdkOptions.ve33);
|
|
10316
10308
|
const { clmm_pool, integrate } = this.sdk.sdkOptions;
|
|
10317
10309
|
const clmmConfig = getPackagerConfigs(clmm_pool);
|
|
10318
10310
|
const typeArguments = [params.coinTypeA, params.coinTypeB, magma_token];
|
|
@@ -10339,7 +10331,7 @@ var GaugeModule = class {
|
|
|
10339
10331
|
if (gauge === void 0) {
|
|
10340
10332
|
throw Error(`Fetch gauge of pool ${params.poolId} failed`);
|
|
10341
10333
|
}
|
|
10342
|
-
const { magma_token } = getPackagerConfigs(this.sdk.sdkOptions.
|
|
10334
|
+
const { magma_token } = getPackagerConfigs(this.sdk.sdkOptions.ve33);
|
|
10343
10335
|
const { integrate } = this.sdk.sdkOptions;
|
|
10344
10336
|
const typeArguments = [params.coinTypeA, params.coinTypeB, magma_token];
|
|
10345
10337
|
const args = [tx.object(gauge), tx.object(params.poolId), tx.object(params.positionId), tx.object(CLOCK_ADDRESS)];
|
|
@@ -10389,7 +10381,7 @@ var GaugeModule = class {
|
|
|
10389
10381
|
async getUserStakedPositionInfoOfPool(userAddr, pool, gauger, poolCoinA, poolCoinB) {
|
|
10390
10382
|
const tx = new import_transactions11.Transaction();
|
|
10391
10383
|
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
10392
|
-
const { magma_token, voter_id } = getPackagerConfigs(this.sdk.sdkOptions.
|
|
10384
|
+
const { magma_token, voter_id } = getPackagerConfigs(this.sdk.sdkOptions.ve33);
|
|
10393
10385
|
const typeArguments = [poolCoinA, poolCoinB, magma_token];
|
|
10394
10386
|
const args = [tx.object(voter_id), tx.object(gauger), tx.object(pool), tx.pure.address(userAddr), tx.object(CLOCK_ADDRESS)];
|
|
10395
10387
|
tx.moveCall({
|
|
@@ -10413,7 +10405,7 @@ var GaugeModule = class {
|
|
|
10413
10405
|
async getPoolGaguers() {
|
|
10414
10406
|
const tx = new import_transactions11.Transaction();
|
|
10415
10407
|
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
10416
|
-
const { magma_token, voter_id } = getPackagerConfigs(this.sdk.sdkOptions.
|
|
10408
|
+
const { magma_token, voter_id } = getPackagerConfigs(this.sdk.sdkOptions.ve33);
|
|
10417
10409
|
const typeArguments = [magma_token];
|
|
10418
10410
|
const args = [tx.object(voter_id)];
|
|
10419
10411
|
tx.moveCall({
|
|
@@ -10453,7 +10445,7 @@ var GaugeModule = class {
|
|
|
10453
10445
|
async getEmissions() {
|
|
10454
10446
|
const tx = new import_transactions11.Transaction();
|
|
10455
10447
|
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
10456
|
-
const { magma_token, minter_id, voting_escrow_id } = getPackagerConfigs(this.sdk.sdkOptions.
|
|
10448
|
+
const { magma_token, minter_id, voting_escrow_id } = getPackagerConfigs(this.sdk.sdkOptions.ve33);
|
|
10457
10449
|
const typeArguments = [magma_token];
|
|
10458
10450
|
const args = [tx.object(minter_id), tx.object(voting_escrow_id)];
|
|
10459
10451
|
tx.moveCall({
|
|
@@ -10487,7 +10479,7 @@ var GaugeModule = class {
|
|
|
10487
10479
|
async getRewardByPosition(params) {
|
|
10488
10480
|
const tx = new import_transactions11.Transaction();
|
|
10489
10481
|
const { integrate } = this.sdk.sdkOptions;
|
|
10490
|
-
const { magma_token } = getPackagerConfigs(this.sdk.sdkOptions.
|
|
10482
|
+
const { magma_token } = getPackagerConfigs(this.sdk.sdkOptions.ve33);
|
|
10491
10483
|
const typeArguments = [params.coinTypeA, params.coinTypeB, magma_token];
|
|
10492
10484
|
const args = [tx.object(params.gaugeId), tx.object(params.poolId), tx.object(params.positionId), tx.object(CLOCK_ADDRESS)];
|
|
10493
10485
|
tx.moveCall({
|
|
@@ -10500,7 +10492,7 @@ var GaugeModule = class {
|
|
|
10500
10492
|
async getAllRewardByPositions(paramsList) {
|
|
10501
10493
|
const tx = new import_transactions11.Transaction();
|
|
10502
10494
|
const { integrate } = this.sdk.sdkOptions;
|
|
10503
|
-
const { magma_token } = getPackagerConfigs(this.sdk.sdkOptions.
|
|
10495
|
+
const { magma_token } = getPackagerConfigs(this.sdk.sdkOptions.ve33);
|
|
10504
10496
|
paramsList.forEach((params) => {
|
|
10505
10497
|
const typeArguments = [params.coinTypeA, params.coinTypeB, magma_token];
|
|
10506
10498
|
const args = [tx.object(params.gaugeId), tx.object(params.poolId), tx.object(params.positionId), tx.object(CLOCK_ADDRESS)];
|
|
@@ -10515,7 +10507,7 @@ var GaugeModule = class {
|
|
|
10515
10507
|
async getEpochRewardByPool(pool, incentive_tokens) {
|
|
10516
10508
|
const tx = new import_transactions11.Transaction();
|
|
10517
10509
|
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
10518
|
-
const { magma_token, voter_id } = getPackagerConfigs(this.sdk.sdkOptions.
|
|
10510
|
+
const { magma_token, voter_id } = getPackagerConfigs(this.sdk.sdkOptions.ve33);
|
|
10519
10511
|
const typeArguments = [magma_token, ...incentive_tokens];
|
|
10520
10512
|
const args = [tx.object(voter_id), tx.object(pool), tx.object(CLOCK_ADDRESS)];
|
|
10521
10513
|
let targetFunc = `${integrate.published_at}::${Voter}::epoch_reward_by_pool${incentive_tokens.length}`;
|
|
@@ -10646,8 +10638,18 @@ var DlmmModule = class {
|
|
|
10646
10638
|
});
|
|
10647
10639
|
return tx;
|
|
10648
10640
|
}
|
|
10649
|
-
// async mintByStrategySingle(params: MintByStrategySingleParams): Promise<Transaction> {}
|
|
10650
10641
|
async mintByStrategy(params) {
|
|
10642
|
+
if (params.fixCoinA && params.fixCoinB) {
|
|
10643
|
+
if (params.amountATotal === 0 || params.amountBTotal === 0) {
|
|
10644
|
+
if (params.active_bin < params.max_bin && params.active_bin > params.min_bin) {
|
|
10645
|
+
if (params.amountATotal > 0) {
|
|
10646
|
+
params.min_bin = params.active_bin;
|
|
10647
|
+
} else if (params.amountBTotal > 0) {
|
|
10648
|
+
params.max_bin = params.active_bin;
|
|
10649
|
+
}
|
|
10650
|
+
}
|
|
10651
|
+
}
|
|
10652
|
+
}
|
|
10651
10653
|
const tx = new import_transactions12.Transaction();
|
|
10652
10654
|
const slippage = new import_decimal13.default(params.slippage);
|
|
10653
10655
|
const lower_slippage = new import_decimal13.default(1).sub(slippage.div(new import_decimal13.default(1e4)));
|
|
@@ -10667,7 +10669,7 @@ var DlmmModule = class {
|
|
|
10667
10669
|
let amount_min = 0;
|
|
10668
10670
|
let amount_max = 0;
|
|
10669
10671
|
if (params.fixCoinA && params.fixCoinB) {
|
|
10670
|
-
primaryCoinAInputs = TransactionUtil.buildCoinForAmount(tx, allCoins, BigInt(params.amountATotal), params.
|
|
10672
|
+
primaryCoinAInputs = TransactionUtil.buildCoinForAmount(tx, allCoins, BigInt(params.amountATotal), params.coinTypeA, false, true);
|
|
10671
10673
|
primaryCoinBInputs = TransactionUtil.buildCoinForAmount(tx, allCoins, BigInt(params.amountBTotal), params.coinTypeB, false, true);
|
|
10672
10674
|
} else if (params.fixCoinA) {
|
|
10673
10675
|
amount_min = new import_decimal13.default(params.amountBTotal).mul(lower_slippage).toDecimalPlaces(0).toNumber();
|
|
@@ -10676,7 +10678,7 @@ var DlmmModule = class {
|
|
|
10676
10678
|
} else if (params.fixCoinB) {
|
|
10677
10679
|
amount_min = new import_decimal13.default(params.amountATotal).mul(lower_slippage).toDecimalPlaces(0).toNumber();
|
|
10678
10680
|
amount_max = new import_decimal13.default(params.amountATotal).mul(upper_slippage).toDecimalPlaces(0).toNumber();
|
|
10679
|
-
primaryCoinAInputs = TransactionUtil.buildCoinForAmount(tx, allCoins, BigInt(amount_max), params.
|
|
10681
|
+
primaryCoinAInputs = TransactionUtil.buildCoinForAmount(tx, allCoins, BigInt(amount_max), params.coinTypeA, false, true);
|
|
10680
10682
|
}
|
|
10681
10683
|
if (params.fixCoinA && params.fixCoinB) {
|
|
10682
10684
|
} else if (params.fixCoinA) {
|
|
@@ -10689,7 +10691,9 @@ var DlmmModule = class {
|
|
|
10689
10691
|
tx.object(dlmmConfig.factory),
|
|
10690
10692
|
primaryCoinAInputs.targetCoin,
|
|
10691
10693
|
primaryCoinBInputs.targetCoin,
|
|
10694
|
+
tx.pure.bool(params.fixCoinA),
|
|
10692
10695
|
tx.pure.u64(params.amountATotal),
|
|
10696
|
+
tx.pure.bool(params.fixCoinB),
|
|
10693
10697
|
tx.pure.u64(params.amountBTotal),
|
|
10694
10698
|
tx.pure.u8(params.strategy),
|
|
10695
10699
|
tx.pure.u32((0, import_calc_dlmm3.get_storage_id_from_real_id)(params.min_bin)),
|
|
@@ -11722,8 +11726,9 @@ var SDKConfig = {
|
|
|
11722
11726
|
admin_cap_id: "0x39d78781750e193ce35c45ff32c6c0c3f2941fa3ddaf8595c90c555589ddb113",
|
|
11723
11727
|
coin_list_handle: "0x49136005e90e28c4695419ed4194cc240603f1ea8eb84e62275eaff088a71063",
|
|
11724
11728
|
launchpad_pools_handle: "0x5e194a8efcf653830daf85a85b52e3ae8f65dc39481d54b2382acda25068375c",
|
|
11725
|
-
clmm_pools_handle: "0x37f60eb2d9d227949b95da8fea810db3c32d1e1fa8ed87434fc51664f87d83cb"
|
|
11726
|
-
|
|
11729
|
+
clmm_pools_handle: "0x37f60eb2d9d227949b95da8fea810db3c32d1e1fa8ed87434fc51664f87d83cb"
|
|
11730
|
+
},
|
|
11731
|
+
ve33Config: {
|
|
11727
11732
|
voter_id: "0xaab0f3a90da96d29d743e09c269e1ae48ec1bae52a28cd38c49c5dc8c1bf92b8",
|
|
11728
11733
|
voting_escrow_id: "0x7ab45fbe01da26e07ba21757916d540c8747cf7daa88f3171e13db17373d5adc",
|
|
11729
11734
|
reward_distributor_id: "0x9f4f882245e49fd9213278dfbcb63a14fdbdd2ce7e25e9353a0cecdca30de853",
|
|
@@ -11741,6 +11746,11 @@ var clmmMainnet = {
|
|
|
11741
11746
|
simulationAccount: {
|
|
11742
11747
|
address: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
11743
11748
|
},
|
|
11749
|
+
ve33: {
|
|
11750
|
+
package_id: "0x7ab45fbe01da26e07ba21757916d540c8747cf7daa88f3171e13db17373d5adc",
|
|
11751
|
+
published_at: "0x7ab45fbe01da26e07ba21757916d540c8747cf7daa88f3171e13db17373d5adc",
|
|
11752
|
+
config: SDKConfig.ve33Config
|
|
11753
|
+
},
|
|
11744
11754
|
magma_config: {
|
|
11745
11755
|
package_id: "0x95b8d278b876cae22206131fb9724f701c9444515813042f54f0a426c9a3bc2f",
|
|
11746
11756
|
published_at: "0x95b8d278b876cae22206131fb9724f701c9444515813042f54f0a426c9a3bc2f",
|
|
@@ -11789,8 +11799,8 @@ function initMainnetSDK(fullNodeUrl, simulationAccount) {
|
|
|
11789
11799
|
var import_client3 = require("@mysten/sui/client");
|
|
11790
11800
|
var SDKConfig2 = {
|
|
11791
11801
|
clmmConfig: {
|
|
11792
|
-
pools_id: "
|
|
11793
|
-
global_config_id: "
|
|
11802
|
+
pools_id: "0xd7037b38ae757d7a69b61146b27c288600b9aefbffbf884b856881dff6a4f27b",
|
|
11803
|
+
global_config_id: "0x83baa8b07800029302f75ac6906240e86cf05066d37eedcabc61a0d6b6dc6eda",
|
|
11794
11804
|
global_vault_id: "0xf78d2ee3c312f298882cb680695e5e8c81b1d441a646caccc058006c2851ddea",
|
|
11795
11805
|
admin_cap_id: "0xa456f86a53fc31e1243f065738ff1fc93f5a62cc080ff894a0fb3747556a799b"
|
|
11796
11806
|
},
|
|
@@ -11798,11 +11808,13 @@ var SDKConfig2 = {
|
|
|
11798
11808
|
coin_list_id: "0x257eb2ba592a5480bba0a97d05338fab17cc3283f8df6998a0e12e4ab9b84478",
|
|
11799
11809
|
launchpad_pools_id: "0xdc3a7bd66a6dcff73c77c866e87d73826e446e9171f34e1c1b656377314f94da",
|
|
11800
11810
|
clmm_pools_id: "0x26c85500f5dd2983bf35123918a144de24e18936d0b234ef2b49fbb2d3d6307d",
|
|
11801
|
-
admin_cap_id: "
|
|
11811
|
+
admin_cap_id: "0xd328ff427794b8ca0a69c3ebb0c0e4d2e81267ec4ba36e11487362c6508a4c0f",
|
|
11802
11812
|
coin_list_handle: "0x3204350fc603609c91675e07b8f9ac0999b9607d83845086321fca7f469de235",
|
|
11803
11813
|
launchpad_pools_handle: "0xae67ff87c34aceea4d28107f9c6c62e297a111e9f8e70b9abbc2f4c9f5ec20fd",
|
|
11804
|
-
clmm_pools_handle: "0xd28736923703342b4752f5ed8c2f2a5c0cb2336c30e1fed42b387234ce8408ec"
|
|
11805
|
-
|
|
11814
|
+
clmm_pools_handle: "0xd28736923703342b4752f5ed8c2f2a5c0cb2336c30e1fed42b387234ce8408ec"
|
|
11815
|
+
},
|
|
11816
|
+
ve33Config: {
|
|
11817
|
+
// global_config_id: '0xbbe54f3c2bd06c5ab7f93950025bff6710c9a83836d7145636fea383b315774d',
|
|
11806
11818
|
voter_id: "0x59571991a5c7041c4376d980061af5c7a6d8345006d6b5167bd1f00fc17b8ddb",
|
|
11807
11819
|
voting_escrow_id: "0x9081c8044719135da4ff2d52907fcd40c19e2a40750cbba4c1d6a59610ae1446",
|
|
11808
11820
|
reward_distributor_id: "0xdf213d8e0ca49c8f4a508e7d3b3a6983c4aafd639f7c99479fc75fb4451d752e",
|
|
@@ -11817,13 +11829,18 @@ var SDKConfig2 = {
|
|
|
11817
11829
|
var clmmTestnet = {
|
|
11818
11830
|
fullRpcUrl: (0, import_client3.getFullnodeUrl)("testnet"),
|
|
11819
11831
|
magma_config: {
|
|
11820
|
-
package_id: "
|
|
11821
|
-
published_at: "
|
|
11832
|
+
package_id: "",
|
|
11833
|
+
published_at: "",
|
|
11822
11834
|
config: SDKConfig2.magmaConfig
|
|
11823
11835
|
},
|
|
11836
|
+
ve33: {
|
|
11837
|
+
package_id: "0x7ab45fbe01da26e07ba21757916d540c8747cf7daa88f3171e13db17373d5adc",
|
|
11838
|
+
published_at: "0x7ab45fbe01da26e07ba21757916d540c8747cf7daa88f3171e13db17373d5adc",
|
|
11839
|
+
config: SDKConfig2.ve33Config
|
|
11840
|
+
},
|
|
11824
11841
|
clmm_pool: {
|
|
11825
|
-
package_id: "
|
|
11826
|
-
published_at: "
|
|
11842
|
+
package_id: "0xca1b84a430d03e22dae08a7273c8e9dcfdb40b7f559574105f008600eeb7b4bd",
|
|
11843
|
+
published_at: "0xca1b84a430d03e22dae08a7273c8e9dcfdb40b7f559574105f008600eeb7b4bd",
|
|
11827
11844
|
config: SDKConfig2.clmmConfig
|
|
11828
11845
|
},
|
|
11829
11846
|
dlmm_pool: {
|
|
@@ -11836,8 +11853,8 @@ var clmmTestnet = {
|
|
|
11836
11853
|
published_at: "0x45ac2371c33ca0df8dc784d62c8ce5126d42edd8c56820396524dff2ae0619b1"
|
|
11837
11854
|
},
|
|
11838
11855
|
integrate: {
|
|
11839
|
-
package_id: "
|
|
11840
|
-
published_at: "
|
|
11856
|
+
package_id: "0x975672d26fc9ba026a35f2001951fbcf5e37e75aca41db7c762d61b4e1e64986",
|
|
11857
|
+
published_at: "0x975672d26fc9ba026a35f2001951fbcf5e37e75aca41db7c762d61b4e1e64986"
|
|
11841
11858
|
},
|
|
11842
11859
|
simulationAccount: {
|
|
11843
11860
|
address: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
@@ -11854,7 +11871,7 @@ var clmmTestnet = {
|
|
|
11854
11871
|
package_id: "0x56d90d0c055edb534b11e7548270bb458fd47c69b77bf40c14d5eb00e6e6cf64",
|
|
11855
11872
|
published_at: "0x56d90d0c055edb534b11e7548270bb458fd47c69b77bf40c14d5eb00e6e6cf64"
|
|
11856
11873
|
},
|
|
11857
|
-
aggregatorUrl: "https://
|
|
11874
|
+
aggregatorUrl: "https://testnet.magmafinance.io/api/router",
|
|
11858
11875
|
swapCountUrl: "https://api-sui.devmagma.com/v2/sui/swap/count"
|
|
11859
11876
|
};
|
|
11860
11877
|
function initTestnetSDK(fullNodeUrl, simulationAccount) {
|