stackswap-front-api-test-02 1.2.12 → 1.2.14
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/esm/index.d.ts +1 -0
- package/dist/esm/index.js +4 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stackswap/manager/bridge.manager.js +11 -11
- package/dist/esm/stackswap/manager/bridge.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/farm.manager.js +15 -15
- package/dist/esm/stackswap/manager/farm.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/farm2.manager.js +18 -18
- package/dist/esm/stackswap/manager/farm2.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/farm3.manager.js +14 -14
- package/dist/esm/stackswap/manager/farm3.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/governance.manager.js +3 -3
- package/dist/esm/stackswap/manager/governance.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/groupfarm.manager.d.ts +1 -2
- package/dist/esm/stackswap/manager/groupfarm.manager.js +23 -23
- package/dist/esm/stackswap/manager/groupfarm.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/launchpad.manager.js +6 -6
- package/dist/esm/stackswap/manager/launchpad.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/lbtc.manager.js +9 -9
- package/dist/esm/stackswap/manager/lbtc.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/lbtcstaking.manager.js +15 -15
- package/dist/esm/stackswap/manager/lbtcstaking.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/multisig.manager.js +3 -3
- package/dist/esm/stackswap/manager/multisig.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/nft.manager.js +12 -12
- package/dist/esm/stackswap/manager/nft.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/operator.manager.js +3 -3
- package/dist/esm/stackswap/manager/operator.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/other.manager.js +3 -3
- package/dist/esm/stackswap/manager/other.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/pool.manager.js +5 -5
- package/dist/esm/stackswap/manager/pool.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/poxl.manager.js +3 -3
- package/dist/esm/stackswap/manager/poxl.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/staking.manager.js +16 -16
- package/dist/esm/stackswap/manager/staking.manager.js.map +1 -1
- package/dist/esm/stackswap/manager/token.manager.js +6 -6
- package/dist/esm/stackswap/manager/token.manager.js.map +1 -1
- package/dist/esm/stackswap/util.d.ts +3 -8
- package/dist/esm/stackswap/util.js +10 -63
- package/dist/esm/stackswap/util.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/stackswap/manager/bridge.manager.js +10 -10
- package/dist/stackswap/manager/bridge.manager.js.map +1 -1
- package/dist/stackswap/manager/farm.manager.js +14 -14
- package/dist/stackswap/manager/farm.manager.js.map +1 -1
- package/dist/stackswap/manager/farm2.manager.js +17 -17
- package/dist/stackswap/manager/farm2.manager.js.map +1 -1
- package/dist/stackswap/manager/farm3.manager.js +13 -13
- package/dist/stackswap/manager/farm3.manager.js.map +1 -1
- package/dist/stackswap/manager/governance.manager.js +2 -2
- package/dist/stackswap/manager/governance.manager.js.map +1 -1
- package/dist/stackswap/manager/groupfarm.manager.d.ts +1 -2
- package/dist/stackswap/manager/groupfarm.manager.js +21 -21
- package/dist/stackswap/manager/groupfarm.manager.js.map +1 -1
- package/dist/stackswap/manager/launchpad.manager.js +5 -5
- package/dist/stackswap/manager/launchpad.manager.js.map +1 -1
- package/dist/stackswap/manager/lbtc.manager.js +8 -8
- package/dist/stackswap/manager/lbtc.manager.js.map +1 -1
- package/dist/stackswap/manager/lbtcstaking.manager.js +13 -13
- package/dist/stackswap/manager/lbtcstaking.manager.js.map +1 -1
- package/dist/stackswap/manager/multisig.manager.js +2 -2
- package/dist/stackswap/manager/multisig.manager.js.map +1 -1
- package/dist/stackswap/manager/nft.manager.js +10 -10
- package/dist/stackswap/manager/nft.manager.js.map +1 -1
- package/dist/stackswap/manager/operator.manager.js +2 -2
- package/dist/stackswap/manager/operator.manager.js.map +1 -1
- package/dist/stackswap/manager/other.manager.js +2 -2
- package/dist/stackswap/manager/other.manager.js.map +1 -1
- package/dist/stackswap/manager/pool.manager.js +4 -4
- package/dist/stackswap/manager/pool.manager.js.map +1 -1
- package/dist/stackswap/manager/poxl.manager.js +2 -2
- package/dist/stackswap/manager/poxl.manager.js.map +1 -1
- package/dist/stackswap/manager/staking.manager.js +15 -15
- package/dist/stackswap/manager/staking.manager.js.map +1 -1
- package/dist/stackswap/manager/token.manager.js +5 -5
- package/dist/stackswap/manager/token.manager.js.map +1 -1
- package/dist/stackswap/util.d.ts +3 -8
- package/dist/stackswap/util.js +11 -67
- package/dist/stackswap/util.js.map +1 -1
- package/package.json +3 -4
- package/src/index.ts +7 -9
- package/src/stackswap/manager/bridge.manager.ts +11 -11
- package/src/stackswap/manager/farm.manager.ts +15 -15
- package/src/stackswap/manager/farm2.manager.ts +18 -18
- package/src/stackswap/manager/farm3.manager.ts +14 -14
- package/src/stackswap/manager/governance.manager.ts +3 -3
- package/src/stackswap/manager/groupfarm.manager.ts +24 -26
- package/src/stackswap/manager/launchpad.manager.ts +6 -6
- package/src/stackswap/manager/lbtc.manager.ts +9 -9
- package/src/stackswap/manager/lbtcstaking.manager.ts +16 -17
- package/src/stackswap/manager/multisig.manager.ts +3 -3
- package/src/stackswap/manager/nft.manager.ts +13 -14
- package/src/stackswap/manager/operator.manager.ts +3 -3
- package/src/stackswap/manager/other.manager.ts +3 -3
- package/src/stackswap/manager/pool.manager.ts +5 -5
- package/src/stackswap/manager/poxl.manager.ts +3 -3
- package/src/stackswap/manager/staking.manager.ts +16 -16
- package/src/stackswap/manager/token.manager.ts +6 -6
- package/src/stackswap/util.ts +51 -74
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
callReadOnlyFunction,
|
|
3
3
|
contractPrincipalCV,
|
|
4
4
|
cvToValue,
|
|
5
5
|
FungibleConditionCode,
|
|
6
|
-
listCV,
|
|
6
|
+
listCV, makeContractNonFungiblePostCondition, makeStandardNonFungiblePostCondition,
|
|
7
7
|
NonFungibleConditionCode,
|
|
8
8
|
standardPrincipalCV,
|
|
9
9
|
uintCV,
|
|
@@ -15,12 +15,10 @@ import {
|
|
|
15
15
|
getReadOptions,
|
|
16
16
|
getWriteOptions,
|
|
17
17
|
parseAddressToCV,
|
|
18
|
-
createNonFungiblePostCondition
|
|
19
18
|
} from "../util";
|
|
20
19
|
import {StackswapAPI} from "../../index";
|
|
21
20
|
import {BaseToken, Token} from "./token.manager";
|
|
22
21
|
import axios from "axios";
|
|
23
|
-
import {AssetString} from "@stacks/transactions/dist/types";
|
|
24
22
|
|
|
25
23
|
export enum Mode {
|
|
26
24
|
WITH_SERVER,
|
|
@@ -37,7 +35,7 @@ export class GroupFarmManager {
|
|
|
37
35
|
async getFarmCounts() {
|
|
38
36
|
const pair_details_options : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_ONE_STEP_GROUP_FARM(), 'get-farm-counts', []);
|
|
39
37
|
try {
|
|
40
|
-
const result = cvToValue(await
|
|
38
|
+
const result = cvToValue(await callReadOnlyFunction(pair_details_options)).value;
|
|
41
39
|
return result;
|
|
42
40
|
} catch (e) {
|
|
43
41
|
return('');
|
|
@@ -51,7 +49,7 @@ export class GroupFarmManager {
|
|
|
51
49
|
}
|
|
52
50
|
const pair_details_options : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_ONE_STEP_GROUP_FARM(), 'get-farms', [listCV(listTemp)]);
|
|
53
51
|
try {
|
|
54
|
-
const result = cvToValue(await
|
|
52
|
+
const result = cvToValue(await callReadOnlyFunction(pair_details_options)).value;
|
|
55
53
|
// console.log('farmLists', result);
|
|
56
54
|
return result;
|
|
57
55
|
} catch (e) {
|
|
@@ -62,7 +60,7 @@ export class GroupFarmManager {
|
|
|
62
60
|
async getAllDatas(farming_contract: string) {
|
|
63
61
|
const function_option = getReadOptions(this.stackswap, farming_contract, 'getAllDatas', [
|
|
64
62
|
]);
|
|
65
|
-
const result_raw = await
|
|
63
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
66
64
|
const result = cvToValue(result_raw);
|
|
67
65
|
// // console.log('getFarmingUserRewardTotal', result);
|
|
68
66
|
return result;
|
|
@@ -70,7 +68,7 @@ export class GroupFarmManager {
|
|
|
70
68
|
async getRewardData(farming_contract: string) {
|
|
71
69
|
const function_option = getReadOptions(this.stackswap, farming_contract, 'getAllRewardData', [
|
|
72
70
|
]);
|
|
73
|
-
const result_raw = await
|
|
71
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
74
72
|
const result = cvToValue(result_raw);
|
|
75
73
|
// // console.log('getFarmingUserRewardTotal', result);
|
|
76
74
|
return result;
|
|
@@ -81,7 +79,7 @@ export class GroupFarmManager {
|
|
|
81
79
|
const function_option = getReadOptions(this.stackswap, farming_contract, 'getRewardRound', [
|
|
82
80
|
uintCV(bh)
|
|
83
81
|
]);
|
|
84
|
-
const result_raw = await
|
|
82
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
85
83
|
const result = cvToValue(result_raw);
|
|
86
84
|
// // console.log('farming round', result);
|
|
87
85
|
return result.value;
|
|
@@ -91,8 +89,8 @@ export class GroupFarmManager {
|
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
async getCurrentFarmingRound2(farming_contract: string) {
|
|
94
|
-
const bh = await this.stackswap.
|
|
95
|
-
return await this.getFarmingRound(Number(bh), farming_contract);
|
|
92
|
+
const bh = await this.stackswap.getCurrentBlocks();
|
|
93
|
+
return await this.getFarmingRound(Number(bh.tenure_block_height), farming_contract);
|
|
96
94
|
}
|
|
97
95
|
|
|
98
96
|
|
|
@@ -100,7 +98,7 @@ export class GroupFarmManager {
|
|
|
100
98
|
const function_option = getReadOptions(this.stackswap, farming_contract, 'getFirstBlockOfRound', [
|
|
101
99
|
uintCV(cycle)
|
|
102
100
|
]);
|
|
103
|
-
const result_raw = await
|
|
101
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
104
102
|
const result = cvToValue(result_raw);
|
|
105
103
|
// // console.log(result);
|
|
106
104
|
return result;
|
|
@@ -114,7 +112,7 @@ export class GroupFarmManager {
|
|
|
114
112
|
contractPrincipalCV(address[0], address[1]),
|
|
115
113
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
116
114
|
]);
|
|
117
|
-
const result_raw = await
|
|
115
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
118
116
|
const result = cvToValue(result_raw);
|
|
119
117
|
try {
|
|
120
118
|
// console.log('getFarmingStakerStatus', result);
|
|
@@ -142,7 +140,7 @@ export class GroupFarmManager {
|
|
|
142
140
|
const function_option = getReadOptions(this.stackswap, farming_contract, 'getTotalData', [
|
|
143
141
|
contractPrincipalCV(address[0], address[1]),
|
|
144
142
|
]);
|
|
145
|
-
const result_raw = await
|
|
143
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
146
144
|
const result = cvToValue(result_raw);
|
|
147
145
|
// // console.log('lp total data', result);
|
|
148
146
|
try {
|
|
@@ -159,7 +157,7 @@ export class GroupFarmManager {
|
|
|
159
157
|
contractPrincipalCV(address[0], address[1]),
|
|
160
158
|
uintCV(cycle),
|
|
161
159
|
]);
|
|
162
|
-
const result_raw = await
|
|
160
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
163
161
|
const result = cvToValue(result_raw);
|
|
164
162
|
// // console.log('lp round data', result);
|
|
165
163
|
try {
|
|
@@ -176,7 +174,7 @@ export class GroupFarmManager {
|
|
|
176
174
|
contractPrincipalCV(address[0], address[1]),
|
|
177
175
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
178
176
|
]);
|
|
179
|
-
const result_raw = await
|
|
177
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
180
178
|
const result = cvToValue(result_raw);
|
|
181
179
|
// // console.log('get_farming_total',result.value);
|
|
182
180
|
return result.value;
|
|
@@ -190,7 +188,7 @@ export class GroupFarmManager {
|
|
|
190
188
|
const function_option = getReadOptions(this.stackswap, farming_contract, 'getUserNFTData', [
|
|
191
189
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
192
190
|
]);
|
|
193
|
-
const result_raw = await
|
|
191
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
194
192
|
const result = cvToValue(result_raw);
|
|
195
193
|
// // console.log('get_farming_total',result.value);
|
|
196
194
|
return result.value;
|
|
@@ -224,7 +222,7 @@ export class GroupFarmManager {
|
|
|
224
222
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
225
223
|
uintCV(cycle),
|
|
226
224
|
]);
|
|
227
|
-
const result_raw = await
|
|
225
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
228
226
|
const result = cvToValue(result_raw);
|
|
229
227
|
// // console.log('reward', result);
|
|
230
228
|
return result;
|
|
@@ -237,7 +235,7 @@ export class GroupFarmManager {
|
|
|
237
235
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
238
236
|
uintCV(round),
|
|
239
237
|
]);
|
|
240
|
-
const result_raw = await
|
|
238
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
241
239
|
const result = cvToValue(result_raw);
|
|
242
240
|
// // console.log('getFarmingUserRewardTotal', result);
|
|
243
241
|
return result;
|
|
@@ -247,7 +245,7 @@ export class GroupFarmManager {
|
|
|
247
245
|
const function_option = getReadOptions(this.stackswap, farming_contract, 'getNFTFarmingReward', [
|
|
248
246
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
249
247
|
]);
|
|
250
|
-
const result_raw = await
|
|
248
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
251
249
|
const result = cvToValue(result_raw);
|
|
252
250
|
// // console.log('getFarmingUserRewardTotal', result);
|
|
253
251
|
return result;
|
|
@@ -260,7 +258,7 @@ export class GroupFarmManager {
|
|
|
260
258
|
contractPrincipalCV(address[0], address[1]),
|
|
261
259
|
listCV(unclaimed_list),
|
|
262
260
|
]);
|
|
263
|
-
const result_raw = await
|
|
261
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
264
262
|
const result = cvToValue(result_raw);
|
|
265
263
|
// // console.log('getFarmingUserRewardTotal', result);
|
|
266
264
|
return result;
|
|
@@ -271,7 +269,7 @@ export class GroupFarmManager {
|
|
|
271
269
|
const pair_details_options: any = getReadOptions(this.stackswap, token.addr, 'get-balance',
|
|
272
270
|
[contractPrincipalCV(this.stackswap.config.STACKSWAP_ADDRESS(), farming_contract)]);
|
|
273
271
|
try {
|
|
274
|
-
const result = await
|
|
272
|
+
const result = await callReadOnlyFunction(pair_details_options);
|
|
275
273
|
return cvToValue(result).value;
|
|
276
274
|
} catch (e) {
|
|
277
275
|
return 0;
|
|
@@ -344,7 +342,7 @@ export class GroupFarmManager {
|
|
|
344
342
|
await openContractCall(function_option);
|
|
345
343
|
}
|
|
346
344
|
|
|
347
|
-
async getNFTAsset(tokenStr: string)
|
|
345
|
+
async getNFTAsset(tokenStr: string){
|
|
348
346
|
// // console.log(tokenStr);
|
|
349
347
|
const token_addr = tokenStr.split('.');
|
|
350
348
|
const url = this.stackswap.config.STACKS_API_URL() + '/v2/contracts/interface/' + token_addr[0] + '/' + token_addr[1];
|
|
@@ -366,13 +364,13 @@ export class GroupFarmManager {
|
|
|
366
364
|
for (const gold of goldList) {
|
|
367
365
|
gold_list.push(uintCV(gold))
|
|
368
366
|
post_condition.push(
|
|
369
|
-
|
|
367
|
+
makeStandardNonFungiblePostCondition(this.stackswap.getSenderAddress(), NonFungibleConditionCode.Sends, gold_asset_string, uintCV(gold)),
|
|
370
368
|
)
|
|
371
369
|
}
|
|
372
370
|
for (const silver of silverList) {
|
|
373
371
|
silver_list.push(uintCV(silver))
|
|
374
372
|
post_condition.push(
|
|
375
|
-
|
|
373
|
+
makeStandardNonFungiblePostCondition(this.stackswap.getSenderAddress(), NonFungibleConditionCode.Sends, silver_asset_string, uintCV(silver)),
|
|
376
374
|
)
|
|
377
375
|
}
|
|
378
376
|
const function_option = getWriteOptions(this.stackswap, farming_contract, 'stakeNFTs', [
|
|
@@ -389,7 +387,7 @@ export class GroupFarmManager {
|
|
|
389
387
|
for (const gold of rewardList.returnNFTS.value) {
|
|
390
388
|
// console.log(gold);
|
|
391
389
|
post_condition.push(
|
|
392
|
-
|
|
390
|
+
makeContractNonFungiblePostCondition(farming_contract.split('.')[0],farming_contract.split('.')[1], NonFungibleConditionCode.Sends, gold_asset_string, uintCV(gold.value)),
|
|
393
391
|
)
|
|
394
392
|
}
|
|
395
393
|
if(rewardToken1 !== Token.getBaseTokens(this.stackswap, BaseToken.NULL).addr){
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getWriteOptions, parseAddressToCV
|
|
6
6
|
} from "../util";
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
callReadOnlyFunction, contractPrincipalCV,
|
|
9
9
|
cvToValue,
|
|
10
10
|
FungibleConditionCode, listCV,
|
|
11
11
|
stringAsciiCV,
|
|
@@ -33,7 +33,7 @@ export class LaunchpadManager {
|
|
|
33
33
|
async getLiquidityList() {
|
|
34
34
|
const pair_details_options : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_ONE_STEP_MINT(), 'get-liquidity-token-list', []);
|
|
35
35
|
try {
|
|
36
|
-
const result = cvToValue(await
|
|
36
|
+
const result = cvToValue(await callReadOnlyFunction(pair_details_options)).value;
|
|
37
37
|
|
|
38
38
|
return result[this.getRandomIntNum(0, result.length-1)].value;
|
|
39
39
|
|
|
@@ -47,7 +47,7 @@ export class LaunchpadManager {
|
|
|
47
47
|
async getSoftTokenList() {
|
|
48
48
|
const pair_details_options : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_ONE_STEP_MINT(), 'get-soft-token-list', []);
|
|
49
49
|
try {
|
|
50
|
-
const result = cvToValue(await
|
|
50
|
+
const result = cvToValue(await callReadOnlyFunction(pair_details_options)).value;
|
|
51
51
|
return result[this.getRandomIntNum(0, result.length-1)].value;
|
|
52
52
|
} catch (e) {
|
|
53
53
|
return('');
|
|
@@ -58,7 +58,7 @@ export class LaunchpadManager {
|
|
|
58
58
|
async getPOXLTokenList() {
|
|
59
59
|
const pair_details_options : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_ONE_STEP_MINT(), 'get-poxl-token-list', []);
|
|
60
60
|
try {
|
|
61
|
-
const result = cvToValue(await
|
|
61
|
+
const result = cvToValue(await callReadOnlyFunction(pair_details_options)).value;
|
|
62
62
|
|
|
63
63
|
return result[this.getRandomIntNum(0, result.length-1)].value;
|
|
64
64
|
} catch (e) {
|
|
@@ -69,7 +69,7 @@ export class LaunchpadManager {
|
|
|
69
69
|
async getCITYTokenList() {
|
|
70
70
|
const pair_details_options : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_ONE_STEP_MINT_CITY(), 'get-city-token-list', []);
|
|
71
71
|
try {
|
|
72
|
-
const result = cvToValue(await
|
|
72
|
+
const result = cvToValue(await callReadOnlyFunction(pair_details_options)).value;
|
|
73
73
|
|
|
74
74
|
return result[this.getRandomIntNum(0, result.length-1)].value;
|
|
75
75
|
} catch (e) {
|
|
@@ -80,7 +80,7 @@ export class LaunchpadManager {
|
|
|
80
80
|
async getTemplatetFarmList() {
|
|
81
81
|
const pair_details_options : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_ONE_STEP_GROUP_FARM(), 'get-template-farm-list', []);
|
|
82
82
|
try {
|
|
83
|
-
const result = cvToValue(await
|
|
83
|
+
const result = cvToValue(await callReadOnlyFunction(pair_details_options)).value;
|
|
84
84
|
|
|
85
85
|
return result[this.getRandomIntNum(0, result.length-1)].value;
|
|
86
86
|
} catch (e) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {getPostConditionFromAsset, getReadOptions, getWriteOptions} from "../util";
|
|
2
2
|
import BigNumber from "bignumber.js";
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
callReadOnlyFunction,
|
|
5
5
|
contractPrincipalCV, cvToValue, falseCV,
|
|
6
6
|
FungibleConditionCode,
|
|
7
7
|
standardPrincipalCV,
|
|
@@ -26,7 +26,7 @@ export class LbtcManager {
|
|
|
26
26
|
[]
|
|
27
27
|
);
|
|
28
28
|
// @ts-ignore
|
|
29
|
-
const result_raw = await
|
|
29
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
30
30
|
return cvToValue(result_raw);
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -37,7 +37,7 @@ export class LbtcManager {
|
|
|
37
37
|
'get-collateral-type-by-name',
|
|
38
38
|
[stringAsciiCV(coll_type)]
|
|
39
39
|
);
|
|
40
|
-
const result_raw = await
|
|
40
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
41
41
|
return cvToValue(result_raw);
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -48,7 +48,7 @@ export class LbtcManager {
|
|
|
48
48
|
'get-vaults',
|
|
49
49
|
[standardPrincipalCV(this.stackswap.getSenderAddress())]
|
|
50
50
|
);
|
|
51
|
-
const result_raw = await
|
|
51
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
52
52
|
return cvToValue(result_raw);
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -59,7 +59,7 @@ export class LbtcManager {
|
|
|
59
59
|
'get-vault-by-id',
|
|
60
60
|
[uintCV(vault_id)]
|
|
61
61
|
);
|
|
62
|
-
const result_raw = await
|
|
62
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
63
63
|
return cvToValue(result_raw);
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -69,7 +69,7 @@ export class LbtcManager {
|
|
|
69
69
|
'get-vault-entries',
|
|
70
70
|
[standardPrincipalCV(this.stackswap.getSenderAddress())]
|
|
71
71
|
);
|
|
72
|
-
const result_raw = await
|
|
72
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
73
73
|
// // console.log('getVaultIDFromUser2', cvToValue(result_raw))
|
|
74
74
|
return cvToValue(result_raw);
|
|
75
75
|
}
|
|
@@ -528,7 +528,7 @@ export class LbtcManager {
|
|
|
528
528
|
contractPrincipalCV(this.stackswap.config.STACKSWAP_ADDRESS(), this.stackswap.config.CONTRACT_NAME_ORACLE())
|
|
529
529
|
]
|
|
530
530
|
);
|
|
531
|
-
const result_raw = await
|
|
531
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
532
532
|
return cvToValue(result_raw);
|
|
533
533
|
}
|
|
534
534
|
|
|
@@ -543,7 +543,7 @@ export class LbtcManager {
|
|
|
543
543
|
stringAsciiCV(token)
|
|
544
544
|
]
|
|
545
545
|
);
|
|
546
|
-
const result_raw = await
|
|
546
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
547
547
|
// // console.log(cvToValue(result_raw))
|
|
548
548
|
return cvToValue(result_raw);
|
|
549
549
|
}
|
|
@@ -558,7 +558,7 @@ export class LbtcManager {
|
|
|
558
558
|
contractPrincipalCV(this.stackswap.config.STACKSWAP_ADDRESS(), this.stackswap.config.CONTRACT_NAME_COLLATERAL_TYPES()),
|
|
559
559
|
]
|
|
560
560
|
);
|
|
561
|
-
const result_raw = await
|
|
561
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
562
562
|
// // console.log(cvToValue(result_raw))
|
|
563
563
|
return cvToValue(result_raw);
|
|
564
564
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
callReadOnlyFunction,
|
|
4
4
|
cvToValue,
|
|
5
|
-
FungibleConditionCode, listCV, NonFungibleConditionCode,
|
|
5
|
+
FungibleConditionCode, listCV, makeStandardNonFungiblePostCondition, NonFungibleConditionCode,
|
|
6
6
|
standardPrincipalCV,
|
|
7
7
|
uintCV
|
|
8
8
|
} from "@stacks/transactions";
|
|
@@ -10,7 +10,6 @@ import axios from "axios";
|
|
|
10
10
|
import {openContractCall} from "@stacks/connect";
|
|
11
11
|
import BigNumber from "bignumber.js";
|
|
12
12
|
import {
|
|
13
|
-
createNonFungiblePostCondition,
|
|
14
13
|
getPostConditionFromAsset,
|
|
15
14
|
getReadOptions,
|
|
16
15
|
getWriteOptions,
|
|
@@ -33,7 +32,7 @@ export class LBTCStakingManager {
|
|
|
33
32
|
'get-first-stacks-block-in-reward-cycle', [
|
|
34
33
|
uintCV(cycle)
|
|
35
34
|
]);
|
|
36
|
-
const result_raw = await
|
|
35
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
37
36
|
const result = cvToValue(result_raw);
|
|
38
37
|
return result;
|
|
39
38
|
}
|
|
@@ -44,7 +43,7 @@ export class LBTCStakingManager {
|
|
|
44
43
|
const options = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_LBTC_STACKING_LOGIC_V3(), 'get-reward-cycle', [
|
|
45
44
|
uintCV(block),
|
|
46
45
|
]);
|
|
47
|
-
const result = await
|
|
46
|
+
const result = await callReadOnlyFunction(options);
|
|
48
47
|
// // console.log(cvToValue(result));
|
|
49
48
|
return cvToValue(result).value;
|
|
50
49
|
} catch (e) {
|
|
@@ -53,8 +52,8 @@ export class LBTCStakingManager {
|
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
async getCurrentStakingRound() {
|
|
56
|
-
const bh = await this.stackswap.
|
|
57
|
-
return await this.getStakingRound(bh);
|
|
55
|
+
const bh = await this.stackswap.getCurrentBlocks();
|
|
56
|
+
return await this.getStakingRound(bh.tenure_block_height);
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
async getStaker() : Promise<{ unclaimedList: string[], amount: string, stakedList: string[] }> {
|
|
@@ -63,7 +62,7 @@ export class LBTCStakingManager {
|
|
|
63
62
|
const options : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_LBTC_STACKING_DATA_V3(), 'get-staker', [
|
|
64
63
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
65
64
|
]);
|
|
66
|
-
const result = await
|
|
65
|
+
const result = await callReadOnlyFunction(options);
|
|
67
66
|
// // console.log('reward', round, cvToValue(result));
|
|
68
67
|
const res = cvToValue(result).value;
|
|
69
68
|
// // console.log('getStaker', res);
|
|
@@ -88,7 +87,7 @@ export class LBTCStakingManager {
|
|
|
88
87
|
const options : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_LBTC_STACKING_DATA_V3(), 'get-staking-stats-at-cycle', [
|
|
89
88
|
uintCV(round),
|
|
90
89
|
]);
|
|
91
|
-
const result = await
|
|
90
|
+
const result = await callReadOnlyFunction(options);
|
|
92
91
|
// // console.log('reward', round, cvToValue(result));
|
|
93
92
|
const res = cvToValue(result).value;
|
|
94
93
|
// // console.log('getRoundData', res);
|
|
@@ -104,7 +103,7 @@ export class LBTCStakingManager {
|
|
|
104
103
|
const options : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_STACKSWAP_STSW_STACKING_DATA_V2(), 'get-staking-stats-at-cycle-or-default', [
|
|
105
104
|
uintCV(round),
|
|
106
105
|
]);
|
|
107
|
-
const result = await
|
|
106
|
+
const result = await callReadOnlyFunction(options);
|
|
108
107
|
// // console.log('reward', round, cvToValue(result));
|
|
109
108
|
const res = cvToValue(result).value;
|
|
110
109
|
// // console.log('getRoundData', res);
|
|
@@ -138,7 +137,7 @@ export class LBTCStakingManager {
|
|
|
138
137
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
139
138
|
uintCV(round_id)
|
|
140
139
|
]);
|
|
141
|
-
const result_raw = await
|
|
140
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
142
141
|
const result = cvToValue(result_raw);
|
|
143
142
|
// // console.log("reward", round_id, result, result_raw)
|
|
144
143
|
return result;
|
|
@@ -157,7 +156,7 @@ export class LBTCStakingManager {
|
|
|
157
156
|
'get-staking-vault',[
|
|
158
157
|
uintCV(nft)]
|
|
159
158
|
);
|
|
160
|
-
const result_raw = await
|
|
159
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
161
160
|
const result = cvToValue(result_raw);
|
|
162
161
|
res_dict[nft] = result;
|
|
163
162
|
id_list.push(nft);
|
|
@@ -217,8 +216,8 @@ export class LBTCStakingManager {
|
|
|
217
216
|
async txReclaim(index:number, amountSTX:string, callback : any = null){
|
|
218
217
|
// // console.log("Unstaking", amountSTX)
|
|
219
218
|
const post_conditions = [];
|
|
220
|
-
const assetString
|
|
221
|
-
post_conditions.push(
|
|
219
|
+
const assetString = `${this.stackswap.config.STACKSWAP_ADDRESS()}.${this.stackswap.config.CONTRACT_NAME_STACKSWAP_LBTC_STACKING_DATA_V3()}::lBTC-staking-vault`
|
|
220
|
+
post_conditions.push(await makeStandardNonFungiblePostCondition(this.stackswap.getSenderAddress(), NonFungibleConditionCode.Sends, assetString, uintCV(index)))
|
|
222
221
|
post_conditions.push(await getPostConditionFromAsset(this.stackswap, `${this.stackswap.config.STACKSWAP_ADDRESS()}.${this.stackswap.config.CONTRACT_NAME_STACKSWAP_LBTC_STACKING_DATA_V3()}`, this.stackswap.config.BASE_LBTC_DATA().addr, amountSTX, FungibleConditionCode.Equal))
|
|
223
222
|
const function_option : any = getWriteOptions(
|
|
224
223
|
this.stackswap,
|
|
@@ -243,7 +242,7 @@ export class LBTCStakingManager {
|
|
|
243
242
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
244
243
|
listCV(reward_list),
|
|
245
244
|
]);
|
|
246
|
-
const result_raw = await
|
|
245
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
247
246
|
const result = cvToValue(result_raw);
|
|
248
247
|
// // console.log("reward", result.rewardSum.value, result_raw)
|
|
249
248
|
return result.rewardSum.value;
|
|
@@ -298,7 +297,7 @@ export class LBTCStakingManager {
|
|
|
298
297
|
if ( block_height_input != "") {
|
|
299
298
|
bh = block_height_input;
|
|
300
299
|
} else {
|
|
301
|
-
bh = await this.stackswap.
|
|
300
|
+
bh = (await this.stackswap.getCurrentBlocks()).tenure_block_height;
|
|
302
301
|
}
|
|
303
302
|
const block_height = Number(bh);
|
|
304
303
|
|
|
@@ -347,7 +346,7 @@ export class LBTCStakingManager {
|
|
|
347
346
|
uintCV(cycle),
|
|
348
347
|
standardPrincipalCV(user),
|
|
349
348
|
]);
|
|
350
|
-
const result = await
|
|
349
|
+
const result = await callReadOnlyFunction(options);
|
|
351
350
|
// // console.log(cvToValue(result));
|
|
352
351
|
const res = cvToValue(result).value;
|
|
353
352
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {openContractCall} from "@stacks/connect";
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
callReadOnlyFunction,
|
|
4
4
|
cvToValue,
|
|
5
5
|
falseCV,
|
|
6
6
|
FungibleConditionCode,
|
|
@@ -62,7 +62,7 @@ export class MultisigManager {
|
|
|
62
62
|
const pair_details_options : any = getReadOptions(this.stackswap, this.stackswap.config.BASE_STSW_DATA().addr, 'get-balance',
|
|
63
63
|
[parseAddressToCV('SPVRC3RHFD58B2PY1HZD2V71THPW7G445WBRCQYW.octopus_v01')]);
|
|
64
64
|
try {
|
|
65
|
-
const result = await
|
|
65
|
+
const result = await callReadOnlyFunction(pair_details_options);
|
|
66
66
|
// // console.log('get-balance', cvToValue(result));
|
|
67
67
|
return cvToValue(result).value;
|
|
68
68
|
} catch (e) {
|
|
@@ -75,7 +75,7 @@ export class MultisigManager {
|
|
|
75
75
|
async getMultisigResult(functionName: string) {
|
|
76
76
|
const pair_details_options : any = getReadOptions(this.stackswap, 'SPVRC3RHFD58B2PY1HZD2V71THPW7G445WBRCQYW.octopus_v01', functionName,
|
|
77
77
|
[]);
|
|
78
|
-
const result = await
|
|
78
|
+
const result = await callReadOnlyFunction(pair_details_options);
|
|
79
79
|
// // console.log(functionName, cvToValue(result));
|
|
80
80
|
return cvToValue(result);
|
|
81
81
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
import {StackswapAPI} from "../../index";
|
|
3
3
|
import {
|
|
4
|
-
createNonFungiblePostCondition,
|
|
5
4
|
getPostConditionFromAsset,
|
|
6
5
|
getReadOptions,
|
|
7
6
|
getWriteOptions,
|
|
8
7
|
} from "../util";
|
|
9
8
|
import {openContractCall} from "@stacks/connect";
|
|
10
9
|
import {
|
|
11
|
-
|
|
10
|
+
callReadOnlyFunction, contractPrincipalCV,
|
|
12
11
|
cvToValue,
|
|
13
12
|
FungibleConditionCode,
|
|
14
13
|
listCV,
|
|
15
14
|
standardPrincipalCV,
|
|
16
15
|
TupleCV,
|
|
17
|
-
uintCV, NonFungibleConditionCode,
|
|
16
|
+
uintCV, NonFungibleConditionCode, makeStandardNonFungiblePostCondition,
|
|
18
17
|
} from "@stacks/transactions";
|
|
19
18
|
import BigNumber from "bignumber.js";
|
|
20
19
|
import axios from "axios";
|
|
@@ -70,8 +69,8 @@ export class NftManager {
|
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
async getPostConditionFromAssetNFT(account: string, tokenStr: string, condition: NonFungibleConditionCode, id: string) {
|
|
73
|
-
const assetString
|
|
74
|
-
return
|
|
72
|
+
const assetString = await this.getNFTAsset(tokenStr);
|
|
73
|
+
return makeStandardNonFungiblePostCondition(account, condition, assetString, uintCV(id));
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
async mintNFT(price: string | number, addr: string, callback: any = null){
|
|
@@ -184,7 +183,7 @@ export class NftManager {
|
|
|
184
183
|
const function_option:any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_AINFT(), 'get-nft-data', [
|
|
185
184
|
uintCV(id),
|
|
186
185
|
]);
|
|
187
|
-
const result_raw = await
|
|
186
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
188
187
|
const result = cvToValue(result_raw);
|
|
189
188
|
// // console.log(result);
|
|
190
189
|
return result.value;
|
|
@@ -194,7 +193,7 @@ export class NftManager {
|
|
|
194
193
|
const function_option : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_AINFT(), 'get-owner', [
|
|
195
194
|
uintCV(id),
|
|
196
195
|
]);
|
|
197
|
-
const result_raw = await
|
|
196
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
198
197
|
const result = cvToValue(result_raw);
|
|
199
198
|
try{
|
|
200
199
|
return result.value.value;
|
|
@@ -207,7 +206,7 @@ export class NftManager {
|
|
|
207
206
|
const function_option : any = getReadOptions(this.stackswap, contract, 'get-mint-pass-balance', [
|
|
208
207
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
209
208
|
]);
|
|
210
|
-
const result_raw = await
|
|
209
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
211
210
|
const result = cvToValue(result_raw);
|
|
212
211
|
try{
|
|
213
212
|
return result;
|
|
@@ -220,7 +219,7 @@ export class NftManager {
|
|
|
220
219
|
const function_option : any = getReadOptions(this.stackswap, contract, 'get-balance', [
|
|
221
220
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
222
221
|
]);
|
|
223
|
-
const result_raw = await
|
|
222
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
224
223
|
try{
|
|
225
224
|
// // console.log('result_raw', result_raw);
|
|
226
225
|
// const result = cvToValue(result_raw);
|
|
@@ -236,7 +235,7 @@ export class NftManager {
|
|
|
236
235
|
const function_option : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_AINFT(), 'get-reserve-amount', [
|
|
237
236
|
uintCV(id),
|
|
238
237
|
]);
|
|
239
|
-
const result_raw = await
|
|
238
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
240
239
|
const result = cvToValue(result_raw);
|
|
241
240
|
// // console.log(result);
|
|
242
241
|
return result.value;
|
|
@@ -246,7 +245,7 @@ export class NftManager {
|
|
|
246
245
|
const function_option : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_AINFT(), 'get-token-uri', [
|
|
247
246
|
uintCV(id),
|
|
248
247
|
]);
|
|
249
|
-
const result_raw = await
|
|
248
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
250
249
|
const result = cvToValue(result_raw);
|
|
251
250
|
// // console.log(result);
|
|
252
251
|
return result.value;
|
|
@@ -255,7 +254,7 @@ export class NftManager {
|
|
|
255
254
|
async getTotalList(){
|
|
256
255
|
const function_option : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_AINFT(), 'get-total-list', [
|
|
257
256
|
]);
|
|
258
|
-
const result_raw = await
|
|
257
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
259
258
|
try{
|
|
260
259
|
const result = cvToValue(result_raw);
|
|
261
260
|
return result;
|
|
@@ -267,7 +266,7 @@ export class NftManager {
|
|
|
267
266
|
async getMarketList(){
|
|
268
267
|
const function_option : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_AINFT(), 'get-market-list', [
|
|
269
268
|
], );
|
|
270
|
-
const result_raw = await
|
|
269
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
271
270
|
try{
|
|
272
271
|
const result = cvToValue(result_raw);
|
|
273
272
|
return result;
|
|
@@ -280,7 +279,7 @@ export class NftManager {
|
|
|
280
279
|
const function_option : any = getReadOptions(this.stackswap, this.stackswap.config.CONTRACT_NAME_AINFT(), 'get-listing-in-ustx', [
|
|
281
280
|
uintCV(id),
|
|
282
281
|
]);
|
|
283
|
-
const result_raw = await
|
|
282
|
+
const result_raw = await callReadOnlyFunction(function_option);
|
|
284
283
|
const result = cvToValue(result_raw);
|
|
285
284
|
try{
|
|
286
285
|
// // console.log(result.value.price.value);
|
|
@@ -3,7 +3,7 @@ import BigNumber from "bignumber.js";
|
|
|
3
3
|
import {openContractCall} from "@stacks/connect";
|
|
4
4
|
import {getPostConditionFromAsset, getReadOptions, getWriteOptions} from "../util";
|
|
5
5
|
import {
|
|
6
|
-
|
|
6
|
+
callReadOnlyFunction, contractPrincipalCV,
|
|
7
7
|
cvToValue,
|
|
8
8
|
FungibleConditionCode, listCV,
|
|
9
9
|
standardPrincipalCV, stringUtf8CV,
|
|
@@ -81,7 +81,7 @@ export class OperatorManager {
|
|
|
81
81
|
async distributorGetInvestor(){
|
|
82
82
|
const options = getReadOptions(this.stackswap, 'distributor0001', 'get-invester',
|
|
83
83
|
[ standardPrincipalCV(this.stackswap.getSenderAddress())]);
|
|
84
|
-
const result = await
|
|
84
|
+
const result = await callReadOnlyFunction(options);
|
|
85
85
|
// // console.log(cvToValue(result));
|
|
86
86
|
|
|
87
87
|
return cvToValue(result).value;
|
|
@@ -89,7 +89,7 @@ export class OperatorManager {
|
|
|
89
89
|
async distributorGetReclaim(){
|
|
90
90
|
const options : any = getReadOptions(this.stackswap, 'distributor0001', 'get-claimable-amount',
|
|
91
91
|
[ standardPrincipalCV(this.stackswap.getSenderAddress())]);
|
|
92
|
-
const result = await
|
|
92
|
+
const result = await callReadOnlyFunction(options);
|
|
93
93
|
// // console.log(cvToValue(result));
|
|
94
94
|
|
|
95
95
|
return cvToValue(result);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {openContractCall} from "@stacks/connect";
|
|
2
2
|
import {
|
|
3
3
|
// bufferCV,
|
|
4
|
-
|
|
4
|
+
callReadOnlyFunction,
|
|
5
5
|
cvToValue,
|
|
6
6
|
FungibleConditionCode,
|
|
7
7
|
standardPrincipalCV,
|
|
@@ -24,7 +24,7 @@ export class OtherManager {
|
|
|
24
24
|
const options = getReadOptions(this.stackswap, contract_address, 'get-user-rewards', [
|
|
25
25
|
standardPrincipalCV(this.stackswap.getSenderAddress()),
|
|
26
26
|
]);
|
|
27
|
-
const result = await
|
|
27
|
+
const result = await callReadOnlyFunction(options);
|
|
28
28
|
return cvToValue(result).value;
|
|
29
29
|
} catch (e) {
|
|
30
30
|
return 0;
|
|
@@ -47,7 +47,7 @@ export class OtherManager {
|
|
|
47
47
|
async get_pox_info(){
|
|
48
48
|
const options = getReadOptions(this.stackswap, 'SP000000000000000000002Q6VF78.pox', 'get-pox-info',
|
|
49
49
|
[ ]);
|
|
50
|
-
const result = await
|
|
50
|
+
const result = await callReadOnlyFunction(options);
|
|
51
51
|
// // console.log(cvToValue(result).value);
|
|
52
52
|
return cvToValue(result).value;
|
|
53
53
|
}
|