@sonarwatch/portfolio-plugins 0.14.31 → 0.14.33
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1720 -1712
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/banx/loansFetcher.js +2 -1
- package/src/plugins/banx/loansFetcher.js.map +1 -1
- package/src/plugins/cetus/clmmsFetcher.js +5 -7
- package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
- package/src/plugins/cetus/constants.d.ts +1 -0
- package/src/plugins/cetus/constants.js +17 -1
- package/src/plugins/cetus/constants.js.map +1 -1
- package/src/plugins/cetus/farmsFetcher.js +3 -7
- package/src/plugins/cetus/farmsFetcher.js.map +1 -1
- package/src/plugins/cetus/getPools.d.ts +3 -0
- package/src/plugins/cetus/getPools.js +50 -0
- package/src/plugins/cetus/getPools.js.map +1 -0
- package/src/plugins/cetus/poolsJob.js +4 -3
- package/src/plugins/cetus/poolsJob.js.map +1 -1
- package/src/plugins/cetus/types.d.ts +32 -31
- package/src/plugins/elixir/positionsFetcher.js +29 -51
- package/src/plugins/elixir/positionsFetcher.js.map +1 -1
- package/src/plugins/kai/constants.d.ts +9 -0
- package/src/plugins/kai/constants.js +37 -2
- package/src/plugins/kai/constants.js.map +1 -1
- package/src/plugins/kai/helpers.d.ts +8 -0
- package/src/plugins/kai/helpers.js +49 -0
- package/src/plugins/kai/helpers.js.map +1 -0
- package/src/plugins/kai/index.js +4 -2
- package/src/plugins/kai/index.js.map +1 -1
- package/src/plugins/kai/lpVaultsFetcher.js +112 -0
- package/src/plugins/kai/lpVaultsFetcher.js.map +1 -0
- package/src/plugins/kai/supplyPoolsJob.d.ts +3 -0
- package/src/plugins/kai/supplyPoolsJob.js +35 -0
- package/src/plugins/kai/supplyPoolsJob.js.map +1 -0
- package/src/plugins/kai/types.d.ts +107 -0
- package/src/plugins/kai/vaultsJob.js +19 -12
- package/src/plugins/kai/vaultsJob.js.map +1 -1
- package/src/plugins/metaplex/index.js +2 -2
- package/src/plugins/metaplex/index.js.map +1 -1
- package/src/plugins/metaplex/resizableNftFetcher.d.ts +3 -0
- package/src/plugins/metaplex/{positionsSolanaFetcher.js → resizableNftFetcher.js} +4 -2
- package/src/plugins/metaplex/resizableNftFetcher.js.map +1 -0
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/tensor/airdropPowerUsersFetcher.js +25 -21
- package/src/plugins/tensor/airdropPowerUsersFetcher.js.map +1 -1
- package/src/plugins/tensor/constants.d.ts +1 -3
- package/src/plugins/tensor/constants.js +2 -4
- package/src/plugins/tensor/constants.js.map +1 -1
- package/src/plugins/tensor/filters.d.ts +1 -1
- package/src/plugins/tensor/filters.js +5 -5
- package/src/plugins/tensor/filters.js.map +1 -1
- package/src/plugins/tensor/helpers.d.ts +1 -1
- package/src/plugins/tensor/helpers.js +4 -7
- package/src/plugins/tensor/helpers.js.map +1 -1
- package/src/plugins/tensor/sharedEscrowFetcher.js +14 -18
- package/src/plugins/tensor/sharedEscrowFetcher.js.map +1 -1
- package/src/plugins/tensor/struct.d.ts +5 -0
- package/src/plugins/tensor/struct.js +5 -1
- package/src/plugins/tensor/struct.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/whalesmarket/depositFetcher.js +1 -0
- package/src/plugins/whalesmarket/depositFetcher.js.map +1 -1
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/elementbuilder/ElementLiquidityBuilder.d.ts +2 -1
- package/src/utils/elementbuilder/ElementLiquidityBuilder.js +2 -2
- package/src/utils/elementbuilder/ElementLiquidityBuilder.js.map +1 -1
- package/src/utils/elementbuilder/LiquidityBuilder.d.ts +3 -1
- package/src/utils/elementbuilder/LiquidityBuilder.js +3 -1
- package/src/utils/elementbuilder/LiquidityBuilder.js.map +1 -1
- package/src/utils/elementbuilder/LiquidityParams.d.ts +3 -0
- package/src/utils/elementbuilder/LiquidityParams.js +3 -0
- package/src/utils/elementbuilder/LiquidityParams.js.map +1 -0
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/plugins/elixir/helpers.d.ts +0 -2
- package/src/plugins/elixir/helpers.js +0 -40
- package/src/plugins/elixir/helpers.js.map +0 -1
- package/src/plugins/metaplex/positionsSolanaFetcher.js.map +0 -1
- /package/src/plugins/{metaplex/positionsSolanaFetcher.d.ts → kai/lpVaultsFetcher.d.ts} +0 -0
@@ -8,33 +8,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
9
|
});
|
10
10
|
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
+
const web3_js_1 = require("@solana/web3.js");
|
16
14
|
const constants_1 = require("./constants");
|
15
|
+
const clients_1 = require("../../utils/clients");
|
16
|
+
const solana_1 = require("../../utils/solana");
|
17
|
+
const struct_1 = require("./struct");
|
18
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
17
19
|
const helpers_1 = require("./helpers");
|
18
|
-
const
|
20
|
+
const filters_1 = require("./filters");
|
19
21
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
-
|
21
|
-
|
22
|
+
if (!(0, helpers_1.ownerHasPowerUserAllocation)(owner))
|
23
|
+
return [];
|
24
|
+
const connection = (0, clients_1.getClientSolana)();
|
25
|
+
const accounts = yield (0, solana_1.getParsedProgramAccounts)(connection, struct_1.vestingAccountStruct, new web3_js_1.PublicKey(constants_1.magmaProgramId), (0, filters_1.vestingFilter)(owner), 1);
|
26
|
+
if (!accounts.length)
|
27
|
+
return [];
|
28
|
+
const tokenAccounts = yield connection.getParsedTokenAccountsByOwner(accounts[0].pubkey, { mint: new web3_js_1.PublicKey(constants_1.tnsrMint) });
|
29
|
+
if (!tokenAccounts.value[0])
|
22
30
|
return [];
|
23
|
-
const
|
24
|
-
const
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
},
|
35
|
-
value: asset.value,
|
36
|
-
},
|
37
|
-
];
|
31
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
32
|
+
const element = elementRegistry.addElementMultiple({
|
33
|
+
label: 'Airdrop',
|
34
|
+
name: 'Power User',
|
35
|
+
});
|
36
|
+
element.addAsset({
|
37
|
+
address: tokenAccounts.value[0].account.data.parsed.info.mint,
|
38
|
+
amount: tokenAccounts.value[0].account.data.parsed.info.tokenAmount.uiAmount,
|
39
|
+
alreadyShifted: true,
|
40
|
+
});
|
41
|
+
return elementRegistry.getElements(cache);
|
38
42
|
});
|
39
43
|
const fetcher = {
|
40
44
|
id: `${constants_1.platformId}-airdrop-power-users`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropPowerUsersFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/airdropPowerUsersFetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"airdropPowerUsersFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/airdropPowerUsersFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAAmE;AACnE,iDAAsD;AACtD,+CAA8D;AAC9D,qCAAgD;AAChD,gFAA6E;AAC7E,uCAAwD;AACxD,uCAA0C;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,IAAI,CAAC,IAAA,qCAA2B,EAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnD,MAAM,UAA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;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -2,8 +2,6 @@ import { PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { Platform } from '@sonarwatch/portfolio-core';
|
3
3
|
export declare const platformId = "tensor";
|
4
4
|
export declare const platform: Platform;
|
5
|
-
export declare const cachePrefix = "tensor";
|
6
5
|
export declare const tensorPid: PublicKey;
|
7
|
-
export declare const locksPid: PublicKey;
|
8
6
|
export declare const tnsrMint = "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6";
|
9
|
-
export declare const
|
7
|
+
export declare const magmaProgramId = "3zK38YBP6u3BpLUpaa6QhRHh4VXdv3J8cmD24fFpuyqy";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.magmaProgramId = exports.tnsrMint = exports.tensorPid = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'tensor';
|
6
6
|
exports.platform = {
|
@@ -10,9 +10,7 @@ exports.platform = {
|
|
10
10
|
twitter: 'https://twitter.com/tensor_hq',
|
11
11
|
website: 'https://www.tensor.trade/',
|
12
12
|
};
|
13
|
-
exports.cachePrefix = 'tensor';
|
14
13
|
exports.tensorPid = new web3_js_1.PublicKey('TSWAPaqyCSx2KABk68Shruf4rp7CxcNi8hAsbdwmHbN');
|
15
|
-
exports.locksPid = new web3_js_1.PublicKey('TLoCKic2wGJm7VhZKumih4Lc35fUhYqVMgA4j389Buk');
|
16
14
|
exports.tnsrMint = 'TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6';
|
17
|
-
exports.
|
15
|
+
exports.magmaProgramId = '3zK38YBP6u3BpLUpaa6QhRHh4VXdv3J8cmD24fFpuyqy';
|
18
16
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,2BAA2B;CACrC,CAAC;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,QAAQ,GAAG,6CAA6C,CAAC;AAEzD,QAAA,cAAc,GAAG,8CAA8C,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { GetProgramAccountsFilter } from '@solana/web3.js';
|
2
2
|
export declare const singleListingFilter: (owner: string) => GetProgramAccountsFilter[];
|
3
3
|
export declare const poolFilter: (owner: string) => GetProgramAccountsFilter[];
|
4
|
-
export declare const
|
4
|
+
export declare const vestingFilter: (owner: string) => GetProgramAccountsFilter[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.vestingFilter = exports.poolFilter = exports.singleListingFilter = void 0;
|
4
4
|
const struct_1 = require("./struct");
|
5
5
|
const singleListingFilter = (owner) => [
|
6
6
|
{ dataSize: struct_1.singleListingStruct.byteSize },
|
@@ -22,14 +22,14 @@ const poolFilter = (owner) => [
|
|
22
22
|
},
|
23
23
|
];
|
24
24
|
exports.poolFilter = poolFilter;
|
25
|
-
const
|
26
|
-
{ dataSize: 472 },
|
25
|
+
const vestingFilter = (owner) => [
|
27
26
|
{
|
28
27
|
memcmp: {
|
28
|
+
offset: 8,
|
29
29
|
bytes: owner,
|
30
|
-
offset: 47,
|
31
30
|
},
|
32
31
|
},
|
32
|
+
{ dataSize: 269 },
|
33
33
|
];
|
34
|
-
exports.
|
34
|
+
exports.vestingFilter = vestingFilter;
|
35
35
|
//# sourceMappingURL=filters.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/filters.ts"],"names":[],"mappings":";;;AACA,qCAA+C;AAExC,MAAM,mBAAmB,GAAG,CACjC,KAAa,EACe,EAAE,CAAC;IAC/B,EAAE,QAAQ,EAAE,4BAAmB,CAAC,QAAQ,EAAE;IAC1C;QACE,MAAM,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,CAAC;SACV;KACF;CACF,CAAC;AAVW,QAAA,mBAAmB,uBAU9B;AAEK,MAAM,UAAU,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACvE,EAAE,QAAQ,EAAE,GAAG,EAAE;IACjB;QACE,MAAM,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,EAAE;SACX;KACF;CACF,CAAC;AARW,QAAA,UAAU,cAQrB;AAEK,MAAM,
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/filters.ts"],"names":[],"mappings":";;;AACA,qCAA+C;AAExC,MAAM,mBAAmB,GAAG,CACjC,KAAa,EACe,EAAE,CAAC;IAC/B,EAAE,QAAQ,EAAE,4BAAmB,CAAC,QAAQ,EAAE;IAC1C;QACE,MAAM,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,CAAC;SACV;KACF;CACF,CAAC;AAVW,QAAA,mBAAmB,uBAU9B;AAEK,MAAM,UAAU,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACvE,EAAE,QAAQ,EAAE,GAAG,EAAE;IACjB;QACE,MAAM,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,EAAE;SACX;KACF;CACF,CAAC;AARW,QAAA,UAAU,cAQrB;AAEK,MAAM,aAAa,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IAC1E;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,aAAa,iBAQxB"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
2
|
-
export declare function
|
2
|
+
export declare function ownerHasPowerUserAllocation(owner: string): boolean;
|
3
3
|
export declare const findMarginPDA: (owner: string) => PublicKey;
|
@@ -3,19 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.findMarginPDA = exports.
|
6
|
+
exports.findMarginPDA = exports.ownerHasPowerUserAllocation = void 0;
|
7
7
|
const bn_js_1 = __importDefault(require("bn.js"));
|
8
8
|
const web3_js_1 = require("@solana/web3.js");
|
9
9
|
const powerUsers_json_1 = __importDefault(require("./powerUsers.json"));
|
10
10
|
const constants_1 = require("./constants");
|
11
|
-
function
|
11
|
+
function ownerHasPowerUserAllocation(owner) {
|
12
12
|
const users = powerUsers_json_1.default;
|
13
|
-
|
14
|
-
if (!amount)
|
15
|
-
return undefined;
|
16
|
-
return amount;
|
13
|
+
return users[owner] !== null;
|
17
14
|
}
|
18
|
-
exports.
|
15
|
+
exports.ownerHasPowerUserAllocation = ownerHasPowerUserAllocation;
|
19
16
|
const findMarginPDA = (owner) => web3_js_1.PublicKey.findProgramAddressSync([
|
20
17
|
Buffer.from('margin'),
|
21
18
|
web3_js_1.PublicKey.findProgramAddressSync([], constants_1.tensorPid)[0].toBytes(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AACvB,6CAA4C;AAC5C,wEAA2C;AAC3C,2CAAwC;AAExC,SAAgB,
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AACvB,6CAA4C;AAC5C,wEAA2C;AAC3C,2CAAwC;AAExC,SAAgB,2BAA2B,CAAC,KAAa;IACvD,MAAM,KAAK,GAA8B,yBAAU,CAAC;IACpD,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAC/B,CAAC;AAHD,kEAGC;AAEM,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,EAAE,CAC7C,mBAAS,CAAC,sBAAsB,CAC9B;IACE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACrB,mBAAS,CAAC,sBAAsB,CAAC,EAAE,EAAE,qBAAS,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE;IAC5D,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE;IAC9B,8DAA8D;IAC9D,IAAI,eAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,UAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;CAClD,EACD,qBAAS,CACV,CAAC,CAAC,CAAC,CAAC;AAVM,QAAA,aAAa,iBAUnB"}
|
@@ -16,8 +16,8 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
|
16
16
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
17
|
const constants_1 = require("./constants");
|
18
18
|
const clients_1 = require("../../utils/clients");
|
19
|
-
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
20
19
|
const helpers_1 = require("./helpers");
|
20
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
21
21
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
22
22
|
const client = (0, clients_1.getClientSolana)();
|
23
23
|
const marginPDA = (0, helpers_1.findMarginPDA)(owner);
|
@@ -25,23 +25,19 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
25
25
|
if (!solRawBalance || solRawBalance === 0)
|
26
26
|
return [];
|
27
27
|
const rent = yield client.getMinimumBalanceForRentExemption(8);
|
28
|
-
const
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
value: asset.value,
|
42
|
-
data: { assets: [asset] },
|
43
|
-
},
|
44
|
-
];
|
28
|
+
const amount = new bignumber_js_1.default(solRawBalance).minus(rent);
|
29
|
+
if (amount.lte(1000000))
|
30
|
+
return [];
|
31
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
32
|
+
const element = elementRegistry.addElementMultiple({
|
33
|
+
label: 'Deposit',
|
34
|
+
name: 'Shared Escrow',
|
35
|
+
});
|
36
|
+
element.addAsset({
|
37
|
+
address: portfolio_core_1.solanaNativeAddress,
|
38
|
+
amount,
|
39
|
+
});
|
40
|
+
return elementRegistry.getElements(cache);
|
45
41
|
});
|
46
42
|
const fetcher = {
|
47
43
|
id: `${constants_1.platformId}-shared-escrow`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sharedEscrowFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/sharedEscrowFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"sharedEscrowFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/sharedEscrowFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA4E;AAC5E,gEAAqC;AAGrC,2CAAyC;AACzC,iDAAsD;AACtD,uCAA0C;AAC1C,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,SAAS,GAAG,IAAA,uBAAa,EAAC,KAAK,CAAC,CAAC;IAEvC,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAEzD,IAAI,CAAC,aAAa,IAAI,aAAa,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC;IAE/D,MAAM,MAAM,GAAG,IAAI,sBAAS,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAExD,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,eAAe;KACtB,CAAC,CAAC;IAEH,OAAO,CAAC,QAAQ,CAAC;QACf,OAAO,EAAE,oCAAmB;QAC5B,MAAM;KACP,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AACF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -89,3 +89,8 @@ export type OrderStateLock = {
|
|
89
89
|
reserved: number[];
|
90
90
|
};
|
91
91
|
export declare const orderStateLockStruct: BeetStruct<OrderStateLock, Partial<OrderStateLock>>;
|
92
|
+
export type VestingAccount = {
|
93
|
+
padding: Buffer;
|
94
|
+
owner: PublicKey;
|
95
|
+
};
|
96
|
+
export declare const vestingAccountStruct: BeetStruct<VestingAccount, Partial<VestingAccount>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.orderStateLockStruct = exports.OrderType = exports.poolStruct = exports.tSwapStruct = exports.tSwapConfigStruct = exports.poolConfigStruct = exports.CurveType = exports.PoolType = exports.singleListingStruct = void 0;
|
3
|
+
exports.vestingAccountStruct = exports.orderStateLockStruct = exports.OrderType = exports.poolStruct = exports.tSwapStruct = exports.tSwapConfigStruct = exports.poolConfigStruct = exports.CurveType = exports.PoolType = exports.singleListingStruct = void 0;
|
4
4
|
const beet_1 = require("@metaplex-foundation/beet");
|
5
5
|
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
6
|
const solana_1 = require("../../utils/solana");
|
@@ -86,4 +86,8 @@ exports.orderStateLockStruct = new beet_1.BeetStruct([
|
|
86
86
|
['takerWithdrawnFunds', solana_1.u64],
|
87
87
|
['reserved', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 128)],
|
88
88
|
], (args) => args);
|
89
|
+
exports.vestingAccountStruct = new beet_1.BeetStruct([
|
90
|
+
['padding', (0, solana_1.blob)(8)],
|
91
|
+
['owner', beet_solana_1.publicKey],
|
92
|
+
], (args) => args);
|
89
93
|
//# sourceMappingURL=struct.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"struct.js","sourceRoot":"","sources":["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,EAAE,uBAAS,CAAC;IACvB,CAAC,QAAQ,EAAE,UAAG,CAAC;IACf,CAAC,aAAa,EAAE,UAAG,CAAC;IACpB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,QAAQ,EAAE,YAAG,CAAC;IACf,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,UAAU,EAAE,UAAG,CAAC;IACjB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,oBAAoB,EAAE,WAAI,CAAC;IAC5B,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,eAAe,EAAE,UAAG,CAAC;IACtB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,oBAAoB,EAAE,UAAG,CAAC;IAC3B,CAAC,qBAAqB,EAAE,YAAG,CAAC;IAC5B,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,GAAG,CAAC,CAAC;CAC7C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC;AAOW,QAAA,oBAAoB,GAAG,IAAI,iBAAU,CAChD;IACE,CAAC,SAAS,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACpB,CAAC,OAAO,EAAE,uBAAS,CAAC;CACrB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC"}
|
@@ -40,28 +40,28 @@ function getPairKey(version) {
|
|
40
40
|
exports.getPairKey = getPairKey;
|
41
41
|
function getPairsV2FromTheGraph(url, length = 300) {
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
43
|
-
const query = (0, graphql_request_1.gql) `
|
44
|
-
{
|
45
|
-
pairs(
|
46
|
-
orderBy: reserveUSD
|
47
|
-
first: ${length}
|
48
|
-
orderDirection: desc
|
49
|
-
where: { trackedReserveETH_not: "0" }
|
50
|
-
) {
|
51
|
-
id
|
52
|
-
reserve0
|
53
|
-
reserve1
|
54
|
-
totalSupply
|
55
|
-
token0 {
|
56
|
-
id
|
57
|
-
decimals
|
58
|
-
}
|
59
|
-
token1 {
|
60
|
-
id
|
61
|
-
decimals
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|
43
|
+
const query = (0, graphql_request_1.gql) `
|
44
|
+
{
|
45
|
+
pairs(
|
46
|
+
orderBy: reserveUSD
|
47
|
+
first: ${length}
|
48
|
+
orderDirection: desc
|
49
|
+
where: { trackedReserveETH_not: "0" }
|
50
|
+
) {
|
51
|
+
id
|
52
|
+
reserve0
|
53
|
+
reserve1
|
54
|
+
totalSupply
|
55
|
+
token0 {
|
56
|
+
id
|
57
|
+
decimals
|
58
|
+
}
|
59
|
+
token1 {
|
60
|
+
id
|
61
|
+
decimals
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
65
|
`;
|
66
66
|
const res = yield (0, graphql_request_1.default)(url, query);
|
67
67
|
const pairs = res.pairs;
|
@@ -131,6 +131,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
131
131
|
const amountToCollatAmount = collateral.dividedBy(offer.totalAmount);
|
132
132
|
const amount = order.amount.times(amountToCollatAmount).toNumber();
|
133
133
|
const side = offer.offerType === structs_1.OfferType.Buy ? 'Sell Order' : 'Buy Order';
|
134
|
+
console.log(offer);
|
134
135
|
const collatAsset = (0, tokenPriceToAssetToken_1.default)(mint, amount, portfolio_core_1.NetworkId.solana, tokenPrice, undefined, {
|
135
136
|
tags: [side],
|
136
137
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/depositF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EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
1
|
+
{"version":3,"file":"depositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/depositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,6CAA4C;AAG5C,2CAAyD;AACzD,iDAAsD;AACtD,+CAG4B;AAC5B,uCAQmB;AACnB,uCAAyE;AACzE,qGAA6E;AAC7E,mCAA0C;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpE,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,eAAG,EAAE,IAAA,qBAAW,EAAC,KAAK,CAAC,CAAC;QACtE,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,eAAG,EAAE,IAAA,wBAAc,EAAC,KAAK,CAAC,CAAC;QACzE,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,eAAG,EAAE,IAAA,yBAAe,EAAC,KAAK,CAAC,CAAC;QAC1E,KAAK,CAAC,OAAO,CAAU,qBAAS,EAAE;YAChC,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;KACH,CAAC,CAAC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I,GAAG,QAAQ,CAAC;QAClB,CAAC;aAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,gBAAQ,CAAC,SAAS,EAAE,CAAC;YAChD,IAAI,GAAG,YAAY,CAAC;QACtB,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,GAAG,IAAI,MAAM,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,GAAG;YACjD,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,EAAE,MAAM,EAAE;YAChB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
|
|
42
42
|
const clients_1 = require("../../utils/clients");
|
43
43
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
44
44
|
const helpers_1 = require("./helpers");
|
45
|
-
const query = (0, graphql_request_1.gql) `
|
46
|
-
query GetAirdropFinalFrontend($authority: String!) {
|
47
|
-
getAirdropFinalFrontend(authority: $authority) {
|
48
|
-
authority
|
49
|
-
community_allocation
|
50
|
-
eligibility
|
51
|
-
main_allocation
|
52
|
-
og_allocation
|
53
|
-
s1_allocation
|
54
|
-
s2_allocation
|
55
|
-
total_allocation
|
56
|
-
__typename
|
57
|
-
}
|
58
|
-
}
|
45
|
+
const query = (0, graphql_request_1.gql) `
|
46
|
+
query GetAirdropFinalFrontend($authority: String!) {
|
47
|
+
getAirdropFinalFrontend(authority: $authority) {
|
48
|
+
authority
|
49
|
+
community_allocation
|
50
|
+
eligibility
|
51
|
+
main_allocation
|
52
|
+
og_allocation
|
53
|
+
s1_allocation
|
54
|
+
s2_allocation
|
55
|
+
total_allocation
|
56
|
+
__typename
|
57
|
+
}
|
58
|
+
}
|
59
59
|
`;
|
60
60
|
const networkId = portfolio_core_1.NetworkId.solana;
|
61
61
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -3,10 +3,11 @@ import { ElementBuilder } from './ElementBuilder';
|
|
3
3
|
import { ElementParams } from './ElementParams';
|
4
4
|
import { TokenPriceMap } from '../../TokenPriceMap';
|
5
5
|
import { LiquidityBuilder } from './LiquidityBuilder';
|
6
|
+
import { LiquidityParams } from './LiquidityParams';
|
6
7
|
export declare class ElementLiquidityBuilder extends ElementBuilder {
|
7
8
|
liquidities: LiquidityBuilder[];
|
8
9
|
constructor(params: ElementParams);
|
9
|
-
addLiquidity(): LiquidityBuilder;
|
10
|
+
addLiquidity(params?: LiquidityParams): LiquidityBuilder;
|
10
11
|
mints(): string[];
|
11
12
|
get(networkId: NetworkIdType, platformId: string, tokenPrices: TokenPriceMap): PortfolioElement | null;
|
12
13
|
}
|
@@ -9,8 +9,8 @@ class ElementLiquidityBuilder extends ElementBuilder_1.ElementBuilder {
|
|
9
9
|
super(params);
|
10
10
|
this.liquidities = [];
|
11
11
|
}
|
12
|
-
addLiquidity() {
|
13
|
-
const liquidityBuilder = new LiquidityBuilder_1.LiquidityBuilder();
|
12
|
+
addLiquidity(params) {
|
13
|
+
const liquidityBuilder = new LiquidityBuilder_1.LiquidityBuilder(params);
|
14
14
|
this.liquidities.push(liquidityBuilder);
|
15
15
|
return liquidityBuilder;
|
16
16
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ElementLiquidityBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementLiquidityBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AACpC,qDAAkD;AAGlD,yDAAsD;
|
1
|
+
{"version":3,"file":"ElementLiquidityBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementLiquidityBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AACpC,qDAAkD;AAGlD,yDAAsD;AAGtD,MAAa,uBAAwB,SAAQ,+BAAc;IAGzD,YAAY,MAAqB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACxB,CAAC;IAED,YAAY,CAAC,MAAwB;QACnC,MAAM,gBAAgB,GAAG,IAAI,mCAAgB,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACxC,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACvE,CAAC;IAEQ,GAAG,CACV,SAAwB,EACxB,UAAkB,EAClB,WAA0B;QAE1B,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW;aACjC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;aACzC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAyB,CAAC;QAErD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAE1C,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS;YACT,UAAU;YACV,IAAI,EAAE;gBACJ,WAAW;aACZ;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC9D,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QAEF,OAAO,OAAoC,CAAC;IAC9C,CAAC;CACF;AA5CD,0DA4CC"}
|
@@ -2,11 +2,13 @@ import { NetworkIdType, PortfolioLiquidity, Yield } from '@sonarwatch/portfolio-
|
|
2
2
|
import { TokenPriceMap } from '../../TokenPriceMap';
|
3
3
|
import { AssetBuilder } from './AssetBuilder';
|
4
4
|
import { PortfolioAssetParams } from './PortfolioAssetParams';
|
5
|
+
import { LiquidityParams } from './LiquidityParams';
|
5
6
|
export declare class LiquidityBuilder {
|
7
|
+
private readonly params?;
|
6
8
|
assets: AssetBuilder[];
|
7
9
|
rewardAssets: AssetBuilder[];
|
8
10
|
yields: Yield[];
|
9
|
-
constructor();
|
11
|
+
constructor(params?: LiquidityParams);
|
10
12
|
addAsset(params: PortfolioAssetParams): void;
|
11
13
|
addRewardAsset(params: PortfolioAssetParams): void;
|
12
14
|
addYield(ayield: Yield): void;
|
@@ -4,10 +4,11 @@ exports.LiquidityBuilder = void 0;
|
|
4
4
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
5
5
|
const AssetBuilder_1 = require("./AssetBuilder");
|
6
6
|
class LiquidityBuilder {
|
7
|
-
constructor() {
|
7
|
+
constructor(params) {
|
8
8
|
this.assets = [];
|
9
9
|
this.rewardAssets = [];
|
10
10
|
this.yields = [];
|
11
|
+
this.params = params;
|
11
12
|
}
|
12
13
|
addAsset(params) {
|
13
14
|
this.assets.push(new AssetBuilder_1.AssetBuilder(params));
|
@@ -45,6 +46,7 @@ class LiquidityBuilder {
|
|
45
46
|
rewardAssetsValue,
|
46
47
|
value,
|
47
48
|
yields: this.yields,
|
49
|
+
name: this.params ? this.params.name : undefined,
|
48
50
|
};
|
49
51
|
}
|
50
52
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LiquidityBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/LiquidityBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AAEpC,iDAA8C;
|
1
|
+
{"version":3,"file":"LiquidityBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/LiquidityBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AAEpC,iDAA8C;AAI9C,MAAa,gBAAgB;IAM3B,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,MAA4B;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,cAAc,CAAC,MAA4B;QACzC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,QAAQ,CAAC,MAAa;QACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK;QACH,OAAO;YACL,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;YACpC,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;SAC3C,CAAC;IACJ,CAAC;IAED,GA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SAC3B,CAAC;IAC1B,CAAC;CACF;AA/DD,4CA+DC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LiquidityParams.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/LiquidityParams.ts"],"names":[],"mappings":""}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
|
4
|
-
exports.infoQueryMsg = JSON.parse(`{
|
5
|
-
"info": {}
|
4
|
+
exports.infoQueryMsg = JSON.parse(`{
|
5
|
+
"info": {}
|
6
6
|
}`);
|
7
|
-
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
-
"token_info": {}
|
7
|
+
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
+
"token_info": {}
|
9
9
|
}`);
|
10
|
-
exports.minterQueryMsg = JSON.parse(`{
|
11
|
-
"minter": {}
|
10
|
+
exports.minterQueryMsg = JSON.parse(`{
|
11
|
+
"minter": {}
|
12
12
|
}`);
|
13
|
-
exports.poolQueryMsg = JSON.parse(`{
|
14
|
-
"pool": {}
|
13
|
+
exports.poolQueryMsg = JSON.parse(`{
|
14
|
+
"pool": {}
|
15
15
|
}`);
|
16
16
|
//# sourceMappingURL=constants.js.map
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
function getQueryBalanceByOwner(owner) {
|
4
|
-
return JSON.parse(`{
|
5
|
-
"balance": {
|
6
|
-
"address": "${owner}"
|
7
|
-
}
|
4
|
+
return JSON.parse(`{
|
5
|
+
"balance": {
|
6
|
+
"address": "${owner}"
|
7
|
+
}
|
8
8
|
}`);
|
9
9
|
}
|
10
10
|
exports.default = getQueryBalanceByOwner;
|
@@ -1,40 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.formatAndCleanBigInt = exports.convertDecimalStringToScaledBigInt = void 0;
|
4
|
-
function convertDecimalStringToScaledBigInt(e, t = 18) {
|
5
|
-
const n = e.split('.');
|
6
|
-
if (n.length === 2) {
|
7
|
-
const [r, i] = n;
|
8
|
-
if (BigInt(r) > BigInt(0))
|
9
|
-
return BigInt(`${r}${i}${'0'.repeat(t - i.length)}`);
|
10
|
-
return i.length < t
|
11
|
-
? BigInt(`${i}${'0'.repeat(t - i.length)}`)
|
12
|
-
: BigInt(`${i}`.substring(0, t));
|
13
|
-
}
|
14
|
-
return BigInt(`${e}${'0'.repeat(t)}`);
|
15
|
-
}
|
16
|
-
exports.convertDecimalStringToScaledBigInt = convertDecimalStringToScaledBigInt;
|
17
|
-
function cleanNumericString(e) {
|
18
|
-
return e
|
19
|
-
.replace(/0+$/, '')
|
20
|
-
.replace(/\.$/, '')
|
21
|
-
.replace(/^0+/, '')
|
22
|
-
.replace(/^\./, '0.')
|
23
|
-
.replace(/^$/, '0');
|
24
|
-
}
|
25
|
-
function formatBigIntWithDecimals(e, t = 0) {
|
26
|
-
const n = e.toString();
|
27
|
-
const r = n.length;
|
28
|
-
if (r <= t)
|
29
|
-
return `0.${'0'.repeat(t - r)}${n}`;
|
30
|
-
{
|
31
|
-
const i = n.slice(0, r - t);
|
32
|
-
const s = n.slice(r - t);
|
33
|
-
return `${i}.${s}`;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
function formatAndCleanBigInt(e, t = 0) {
|
37
|
-
return cleanNumericString(formatBigIntWithDecimals(e, t));
|
38
|
-
}
|
39
|
-
exports.formatAndCleanBigInt = formatAndCleanBigInt;
|
40
|
-
//# sourceMappingURL=helpers.js.map
|