@sonarwatch/portfolio-plugins 0.12.108 → 0.12.110
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2152 -2144
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/raydium/farmsFetcher.d.ts +3 -0
- package/src/plugins/raydium/farmsFetcher.js +113 -0
- package/src/plugins/raydium/farmsFetcher.js.map +1 -0
- package/src/plugins/raydium/farmsJob.d.ts +11 -0
- package/src/plugins/raydium/farmsJob.js +165 -0
- package/src/plugins/raydium/farmsJob.js.map +1 -0
- package/src/plugins/raydium/filters.d.ts +18 -0
- package/src/plugins/raydium/filters.js +74 -1
- package/src/plugins/raydium/filters.js.map +1 -1
- package/src/plugins/raydium/helpers.d.ts +3 -1
- package/src/plugins/raydium/helpers.js +25 -1
- package/src/plugins/raydium/helpers.js.map +1 -1
- package/src/plugins/raydium/index.js +4 -2
- package/src/plugins/raydium/index.js.map +1 -1
- package/src/plugins/raydium/structs/farms.d.ts +123 -0
- package/src/plugins/raydium/structs/farms.js +111 -0
- package/src/plugins/raydium/structs/farms.js.map +1 -0
- package/src/plugins/raydium/types.d.ts +34 -0
- package/src/plugins/raydium/types.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeta/airdropFetcher.js +2 -2
- package/src/plugins/zeta/airdropFetcher.js.map +1 -1
- package/src/plugins/zeta/helpers.d.ts +2 -0
- package/src/plugins/zeta/helpers.js +13 -1
- package/src/plugins/zeta/helpers.js.map +1 -1
- package/src/utils/clients/index.d.ts +0 -1
- package/src/utils/clients/index.js +1 -3
- package/src/utils/clients/index.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/utils/clients/getEsploraEndpoint.d.ts +0 -2
- package/src/utils/clients/getEsploraEndpoint.js +0 -13
- package/src/utils/clients/getEsploraEndpoint.js.map +0 -1
@@ -0,0 +1,123 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
3
|
+
import BigNumber from 'bignumber.js';
|
4
|
+
import { BeetStruct } from '@metaplex-foundation/beet';
|
5
|
+
export type FarmAccount = {
|
6
|
+
state: BigNumber;
|
7
|
+
nonce: BigNumber;
|
8
|
+
owner: PublicKey;
|
9
|
+
poolLpTokenAccount: PublicKey;
|
10
|
+
lastBlock: BigNumber;
|
11
|
+
poolRewardTokenAccount: PublicKey;
|
12
|
+
totalReward: BigNumber;
|
13
|
+
perBlock: BigNumber;
|
14
|
+
perShare: BigNumber;
|
15
|
+
poolRewardTokenAccountB?: PublicKey;
|
16
|
+
totalRewardB?: BigNumber;
|
17
|
+
perBlockB?: BigNumber;
|
18
|
+
perShareB?: BigNumber;
|
19
|
+
};
|
20
|
+
export type FarmAccountV3 = FarmAccount & {
|
21
|
+
feeOwner: PublicKey;
|
22
|
+
feeY: BigNumber;
|
23
|
+
feeX: BigNumber;
|
24
|
+
};
|
25
|
+
export declare const farmAccountV3Struct: BeetStruct<FarmAccountV3, Partial<FarmAccountV3>>;
|
26
|
+
export type FarmAccountV4 = FarmAccount & {
|
27
|
+
option: number;
|
28
|
+
unknown: Buffer;
|
29
|
+
poolRewardTokenAccountB: PublicKey;
|
30
|
+
totalRewardB: BigNumber;
|
31
|
+
perShareB: BigNumber;
|
32
|
+
perBlockB: BigNumber;
|
33
|
+
};
|
34
|
+
export declare const farmAccountV4Struct: BeetStruct<FarmAccountV4, Partial<FarmAccountV4>>;
|
35
|
+
export type FarmAccountV5 = FarmAccountV4;
|
36
|
+
export declare const farmAccountV5Struct: BeetStruct<FarmAccountV4, Partial<FarmAccountV4>>;
|
37
|
+
export type FarmAccountV6RewardInfo = {
|
38
|
+
rewardState: BigNumber;
|
39
|
+
rewardOpenTime: BigNumber;
|
40
|
+
rewardEndTime: BigNumber;
|
41
|
+
rewardLastUpdateTime: BigNumber;
|
42
|
+
totalReward: BigNumber;
|
43
|
+
totalRewardEmissioned: BigNumber;
|
44
|
+
rewardClaimed: BigNumber;
|
45
|
+
rewardPerSecond: BigNumber;
|
46
|
+
accRewardPerShare: BigNumber;
|
47
|
+
rewardVault: PublicKey;
|
48
|
+
rewardMint: PublicKey;
|
49
|
+
rewardSender: PublicKey;
|
50
|
+
padding: BigNumber[];
|
51
|
+
};
|
52
|
+
export declare const farmAccountV6RewardInfoStruct: BeetStruct<FarmAccountV6RewardInfo, Partial<FarmAccountV6RewardInfo>>;
|
53
|
+
export type FarmAccountV6 = {
|
54
|
+
padding_1: BigNumber;
|
55
|
+
state: BigNumber;
|
56
|
+
nonce: BigNumber;
|
57
|
+
validRewardTokenNum: BigNumber;
|
58
|
+
rewardMultiplier: BigNumber;
|
59
|
+
rewardPeriodMax: BigNumber;
|
60
|
+
rewardPeriodMin: BigNumber;
|
61
|
+
rewardPeriodExtend: BigNumber;
|
62
|
+
lpMint: PublicKey;
|
63
|
+
lpVault: PublicKey;
|
64
|
+
rewardInfos: FarmAccountV6RewardInfo[];
|
65
|
+
creator: PublicKey;
|
66
|
+
padding_2: PublicKey;
|
67
|
+
padding_3: BigNumber[];
|
68
|
+
};
|
69
|
+
export declare const farmAccountV6Struct: BeetStruct<FarmAccountV6, Partial<FarmAccountV6>>;
|
70
|
+
export type UserFarmAccount = {
|
71
|
+
state: BigNumber;
|
72
|
+
poolId: PublicKey;
|
73
|
+
stakerOwner: PublicKey;
|
74
|
+
depositBalance: BigNumber;
|
75
|
+
rewardDebt: BigNumber;
|
76
|
+
rewardDebtB?: BigNumber;
|
77
|
+
};
|
78
|
+
export type UserFarmAccountV3 = {
|
79
|
+
state: BigNumber;
|
80
|
+
poolId: PublicKey;
|
81
|
+
stakerOwner: PublicKey;
|
82
|
+
depositBalance: BigNumber;
|
83
|
+
rewardDebt: BigNumber;
|
84
|
+
};
|
85
|
+
export declare const userFarmAccountV3Struct: BeetStruct<UserFarmAccountV3, Partial<UserFarmAccountV3>>;
|
86
|
+
export type UserFarmAccountV4 = {
|
87
|
+
state: BigNumber;
|
88
|
+
poolId: PublicKey;
|
89
|
+
stakerOwner: PublicKey;
|
90
|
+
depositBalance: BigNumber;
|
91
|
+
rewardDebt: BigNumber;
|
92
|
+
rewardDebtB: BigNumber;
|
93
|
+
};
|
94
|
+
export declare const userFarmAccountV4Struct: BeetStruct<UserFarmAccountV4, Partial<UserFarmAccountV4>>;
|
95
|
+
export type UserFarmAccountV5 = {
|
96
|
+
state: BigNumber;
|
97
|
+
poolId: PublicKey;
|
98
|
+
stakerOwner: PublicKey;
|
99
|
+
depositBalance: BigNumber;
|
100
|
+
rewardDebt: BigNumber;
|
101
|
+
rewardDebtB: BigNumber;
|
102
|
+
padding: BigNumber[];
|
103
|
+
};
|
104
|
+
export declare const userFarmAccountV5Struct: BeetStruct<UserFarmAccountV5, Partial<UserFarmAccountV5>>;
|
105
|
+
export type UserFarmAccountV31 = {
|
106
|
+
state: BigNumber;
|
107
|
+
poolId: PublicKey;
|
108
|
+
stakerOwner: PublicKey;
|
109
|
+
depositBalance: BigNumber;
|
110
|
+
rewardDebt: BigNumber;
|
111
|
+
padding: BigNumber[];
|
112
|
+
};
|
113
|
+
export declare const userFarmAccountV31Struct: BeetStruct<UserFarmAccountV31, Partial<UserFarmAccountV31>>;
|
114
|
+
export type UserFarmAccountV61 = {
|
115
|
+
padding_1: BigNumber;
|
116
|
+
state: BigNumber;
|
117
|
+
id: PublicKey;
|
118
|
+
owner: PublicKey;
|
119
|
+
deposited: BigNumber;
|
120
|
+
rewardDebts: BigNumber[];
|
121
|
+
padding_2: BigNumber[];
|
122
|
+
};
|
123
|
+
export declare const userFarmAccountV61Struct: BeetStruct<UserFarmAccountV61, Partial<UserFarmAccountV61>>;
|
@@ -0,0 +1,111 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.userFarmAccountV61Struct = exports.userFarmAccountV31Struct = exports.userFarmAccountV5Struct = exports.userFarmAccountV4Struct = exports.userFarmAccountV3Struct = exports.farmAccountV6Struct = exports.farmAccountV6RewardInfoStruct = exports.farmAccountV5Struct = exports.farmAccountV4Struct = exports.farmAccountV3Struct = void 0;
|
4
|
+
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
5
|
+
const beet_1 = require("@metaplex-foundation/beet");
|
6
|
+
const solana_1 = require("../../../utils/solana");
|
7
|
+
exports.farmAccountV3Struct = new beet_1.BeetStruct([
|
8
|
+
['state', solana_1.u64],
|
9
|
+
['nonce', solana_1.u64],
|
10
|
+
['poolLpTokenAccount', beet_solana_1.publicKey],
|
11
|
+
['poolRewardTokenAccount', beet_solana_1.publicKey],
|
12
|
+
['owner', beet_solana_1.publicKey],
|
13
|
+
['feeOwner', beet_solana_1.publicKey],
|
14
|
+
['feeY', solana_1.u64],
|
15
|
+
['feeX', solana_1.u64],
|
16
|
+
['totalReward', solana_1.u64],
|
17
|
+
['perShare', solana_1.u128],
|
18
|
+
['lastBlock', solana_1.u64],
|
19
|
+
['perBlock', solana_1.u64],
|
20
|
+
], (args) => args);
|
21
|
+
exports.farmAccountV4Struct = new beet_1.BeetStruct([
|
22
|
+
['state', solana_1.u64],
|
23
|
+
['nonce', solana_1.u64],
|
24
|
+
['poolLpTokenAccount', beet_solana_1.publicKey],
|
25
|
+
['poolRewardTokenAccount', beet_solana_1.publicKey],
|
26
|
+
['totalReward', solana_1.u64],
|
27
|
+
['perShare', solana_1.u128],
|
28
|
+
['perBlock', solana_1.u64],
|
29
|
+
['option', beet_1.u8],
|
30
|
+
['poolRewardTokenAccountB', beet_solana_1.publicKey],
|
31
|
+
['unknown', (0, solana_1.blob)(7)],
|
32
|
+
['totalRewardB', solana_1.u64],
|
33
|
+
['perShareB', solana_1.u128],
|
34
|
+
['perBlockB', solana_1.u64],
|
35
|
+
['lastBlock', solana_1.u64],
|
36
|
+
['owner', beet_solana_1.publicKey],
|
37
|
+
], (args) => args);
|
38
|
+
exports.farmAccountV5Struct = exports.farmAccountV4Struct;
|
39
|
+
exports.farmAccountV6RewardInfoStruct = new beet_1.BeetStruct([
|
40
|
+
['rewardState', solana_1.u64],
|
41
|
+
['rewardOpenTime', solana_1.u64],
|
42
|
+
['rewardEndTime', solana_1.u64],
|
43
|
+
['rewardLastUpdateTime', solana_1.u64],
|
44
|
+
['totalReward', solana_1.u64],
|
45
|
+
['totalRewardEmissioned', solana_1.u64],
|
46
|
+
['rewardClaimed', solana_1.u64],
|
47
|
+
['rewardPerSecond', solana_1.u64],
|
48
|
+
['accRewardPerShare', solana_1.u128],
|
49
|
+
['rewardVault', beet_solana_1.publicKey],
|
50
|
+
['rewardMint', beet_solana_1.publicKey],
|
51
|
+
['rewardSender', beet_solana_1.publicKey],
|
52
|
+
['padding', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 16)],
|
53
|
+
], (args) => args);
|
54
|
+
exports.farmAccountV6Struct = new beet_1.BeetStruct([
|
55
|
+
['padding_1', solana_1.u64],
|
56
|
+
['state', solana_1.u64],
|
57
|
+
['nonce', solana_1.u64],
|
58
|
+
['validRewardTokenNum', solana_1.u64],
|
59
|
+
['rewardMultiplier', solana_1.u128],
|
60
|
+
['rewardPeriodMax', solana_1.u64],
|
61
|
+
['rewardPeriodMin', solana_1.u64],
|
62
|
+
['rewardPeriodExtend', solana_1.u64],
|
63
|
+
['lpMint', beet_solana_1.publicKey],
|
64
|
+
['lpVault', beet_solana_1.publicKey],
|
65
|
+
['rewardInfos', (0, beet_1.uniformFixedSizeArray)(exports.farmAccountV6RewardInfoStruct, 5)],
|
66
|
+
['creator', beet_solana_1.publicKey],
|
67
|
+
['padding_2', beet_solana_1.publicKey],
|
68
|
+
['padding_3', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 32)],
|
69
|
+
], (args) => args);
|
70
|
+
exports.userFarmAccountV3Struct = new beet_1.BeetStruct([
|
71
|
+
['state', solana_1.u64],
|
72
|
+
['poolId', beet_solana_1.publicKey],
|
73
|
+
['stakerOwner', beet_solana_1.publicKey],
|
74
|
+
['depositBalance', solana_1.u64],
|
75
|
+
['rewardDebt', solana_1.u64],
|
76
|
+
], (args) => args);
|
77
|
+
exports.userFarmAccountV4Struct = new beet_1.BeetStruct([
|
78
|
+
['state', solana_1.u64],
|
79
|
+
['poolId', beet_solana_1.publicKey],
|
80
|
+
['stakerOwner', beet_solana_1.publicKey],
|
81
|
+
['depositBalance', solana_1.u64],
|
82
|
+
['rewardDebt', solana_1.u64],
|
83
|
+
['rewardDebtB', solana_1.u64],
|
84
|
+
], (args) => args);
|
85
|
+
exports.userFarmAccountV5Struct = new beet_1.BeetStruct([
|
86
|
+
['state', solana_1.u64],
|
87
|
+
['poolId', beet_solana_1.publicKey],
|
88
|
+
['stakerOwner', beet_solana_1.publicKey],
|
89
|
+
['depositBalance', solana_1.u64],
|
90
|
+
['rewardDebt', solana_1.u128],
|
91
|
+
['rewardDebtB', solana_1.u128],
|
92
|
+
['padding', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 17)],
|
93
|
+
], (args) => args);
|
94
|
+
exports.userFarmAccountV31Struct = new beet_1.BeetStruct([
|
95
|
+
['state', solana_1.u64],
|
96
|
+
['poolId', beet_solana_1.publicKey],
|
97
|
+
['stakerOwner', beet_solana_1.publicKey],
|
98
|
+
['depositBalance', solana_1.u64],
|
99
|
+
['rewardDebt', solana_1.u128],
|
100
|
+
['padding', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 17)],
|
101
|
+
], (args) => args);
|
102
|
+
exports.userFarmAccountV61Struct = new beet_1.BeetStruct([
|
103
|
+
['padding_1', solana_1.u64],
|
104
|
+
['state', solana_1.u64],
|
105
|
+
['id', beet_solana_1.publicKey],
|
106
|
+
['owner', beet_solana_1.publicKey],
|
107
|
+
['deposited', solana_1.u64],
|
108
|
+
['rewardDebts', (0, beet_1.uniformFixedSizeArray)(solana_1.u128, 5)],
|
109
|
+
['padding_2', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 16)],
|
110
|
+
], (args) => args);
|
111
|
+
//# sourceMappingURL=farms.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"farms.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/raydium/structs/farms.ts"],"names":[],"mappings":";;;AAEA,kEAA6D;AAC7D,oDAImC;AACnC,kDAAwD;AAwB3C,QAAA,mBAAmB,GAAG,IAAI,iBAAU,CAC/C;IACE,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,oBAAoB,EAAE,uBAAS,CAAC;IACjC,CAAC,wBAAwB,EAAE,uBAAS,CAAC;IACrC,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,UAAU,EAAE,uBAAS,CAAC;IACvB,CAAC,MAAM,EAAE,YAAG,CAAC;IACb,CAAC,MAAM,EAAE,YAAG,CAAC;IACb,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,UAAU,EAAE,aAAI,CAAC;IAClB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,UAAU,EAAE,YAAG,CAAC;CAClB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAqB,CAChC,CAAC;AAWW,QAAA,mBAAmB,GAAG,IAAI,iBAAU,CAC/C;IACE,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,oBAAoB,EAAE,uBAAS,CAAC;IACjC,CAAC,wBAAwB,EAAE,uBAAS,CAAC;IACrC,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,UAAU,EAAE,aAAI,CAAC;IAClB,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,QAAQ,EAAE,SAAE,CAAC;IACd,CAAC,yBAAyB,EAAE,uBAAS,CAAC;IACtC,CAAC,SAAS,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACpB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,WAAW,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C;IACrB,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,YAAG,EAAE,EAAE,CAAC,CAAC;CAC5C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAyB,CACpC,CAAC;AAWW,QAAA,wBAAwB,GAAG,IAAI,iBAAU,CACpD;IACE,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,YAAY,EAAE,aAAI,CAAC;IACpB,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,YAAG,EAAE,EAAE,CAAC,CAAC;CAC5C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAA0B,CACrC,CAAC;AAYW,QAAA,wBAAwB,GAAG,IAAI,iBAAU,CACpD;IACE,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,IAAI,EAAE,uBAAS,CAAC;IACjB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,aAAa,EAAE,IAAA,4BAAqB,EAAC,aAAI,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC,WAAW,EAAE,IAAA,4BAAqB,EAAC,YAAG,EAAE,EAAE,CAAC,CAAC;CAC9C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAA0B,CACrC,CAAC"}
|
@@ -1,4 +1,10 @@
|
|
1
|
+
import { GetProgramAccountsFilter, PublicKey } from '@solana/web3.js';
|
2
|
+
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
|
+
import { TokenPrice, Yield } from '@sonarwatch/portfolio-core';
|
4
|
+
import BigNumber from 'bignumber.js';
|
1
5
|
import { AmmInfoV4, AmmInfoV5 } from './structs/amms';
|
6
|
+
import { FarmAccount, FarmAccountV6, UserFarmAccountV3, UserFarmAccountV31, UserFarmAccountV4, UserFarmAccountV5 } from './structs/farms';
|
7
|
+
import { ParsedAccount } from '../../utils/solana';
|
2
8
|
export declare enum LiquidityPoolStatus {
|
3
9
|
Uninitialized = 0,
|
4
10
|
Initialized = 1,
|
@@ -19,3 +25,31 @@ export type EnhancedAmmInfoV5 = AmmInfoV5 & {
|
|
19
25
|
};
|
20
26
|
export type AmmInfo = AmmInfoV4 | AmmInfoV5;
|
21
27
|
export type EnhancedAmmInfo = EnhancedAmmInfoV4 | EnhancedAmmInfoV5;
|
28
|
+
export type UserFarmConfig = {
|
29
|
+
programId: PublicKey;
|
30
|
+
version: string;
|
31
|
+
filters: (address: string) => GetProgramAccountsFilter[];
|
32
|
+
struct: BeetStruct<UserFarmAccountV3, Partial<UserFarmAccountV3>> | BeetStruct<UserFarmAccountV4, Partial<UserFarmAccountV4>> | BeetStruct<UserFarmAccountV5, Partial<UserFarmAccountV5>> | BeetStruct<UserFarmAccountV31, Partial<UserFarmAccountV31>>;
|
33
|
+
};
|
34
|
+
export type FarmConfig = {
|
35
|
+
programId: PublicKey;
|
36
|
+
version: string;
|
37
|
+
d: number;
|
38
|
+
filters: GetProgramAccountsFilter[];
|
39
|
+
struct: BeetStruct<FarmAccount, Partial<FarmAccount>>;
|
40
|
+
};
|
41
|
+
export type FarmInfo = {
|
42
|
+
account: ParsedAccount<FarmAccount>;
|
43
|
+
lpToken: TokenPrice;
|
44
|
+
d: number;
|
45
|
+
rewardTokenA?: TokenPrice;
|
46
|
+
rewardTokenB?: TokenPrice;
|
47
|
+
yields?: Yield[];
|
48
|
+
};
|
49
|
+
export type FarmInfoV6 = {
|
50
|
+
account: FarmAccountV6;
|
51
|
+
lpToken: TokenPrice;
|
52
|
+
multiplier: BigNumber;
|
53
|
+
rewardTokens: (TokenPrice | undefined)[];
|
54
|
+
yields?: Yield[];
|
55
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/types.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/types.ts"],"names":[],"mappings":";;;AAeA,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,+EAAa,CAAA;IACb,2EAAW,CAAA;IACX,qEAAQ,CAAA;IACR,2FAAmB,CAAA;IACnB,+EAAa,CAAA;IACb,uEAAS,CAAA;IACT,6DAAI,CAAA;IACJ,mFAAe,CAAA;AACjB,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B"}
|
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
|
|
54
54
|
}
|
55
55
|
function getV3PairsAddresses(url, length = 300) {
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
57
|
-
const query = (0, graphql_request_1.gql) `
|
58
|
-
{
|
59
|
-
pools(
|
60
|
-
orderBy: totalValueLockedUSD
|
61
|
-
first: ${length}
|
62
|
-
orderDirection: desc
|
63
|
-
where: { volumeUSD_not: "0", liquidity_not: "0" }
|
64
|
-
) {
|
65
|
-
id
|
66
|
-
token0Price
|
67
|
-
token1Price
|
68
|
-
liquidity
|
69
|
-
token0 {
|
70
|
-
id
|
71
|
-
totalSupply
|
72
|
-
decimals
|
73
|
-
}
|
74
|
-
token1 {
|
75
|
-
id
|
76
|
-
totalSupply
|
77
|
-
decimals
|
78
|
-
}
|
79
|
-
}
|
80
|
-
}
|
57
|
+
const query = (0, graphql_request_1.gql) `
|
58
|
+
{
|
59
|
+
pools(
|
60
|
+
orderBy: totalValueLockedUSD
|
61
|
+
first: ${length}
|
62
|
+
orderDirection: desc
|
63
|
+
where: { volumeUSD_not: "0", liquidity_not: "0" }
|
64
|
+
) {
|
65
|
+
id
|
66
|
+
token0Price
|
67
|
+
token1Price
|
68
|
+
liquidity
|
69
|
+
token0 {
|
70
|
+
id
|
71
|
+
totalSupply
|
72
|
+
decimals
|
73
|
+
}
|
74
|
+
token1 {
|
75
|
+
id
|
76
|
+
totalSupply
|
77
|
+
decimals
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
81
|
`;
|
82
82
|
const res = yield (0, graphql_request_1.default)(url, query);
|
83
83
|
const pools = res.pools;
|
@@ -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;
|
@@ -41,7 +41,7 @@ const constants_1 = require("./constants");
|
|
41
41
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
42
42
|
const clients_1 = require("../../utils/clients");
|
43
43
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
44
|
-
const
|
44
|
+
const helpers_1 = require("./helpers");
|
45
45
|
const query = (0, graphql_request_1.gql) `
|
46
46
|
query GetAirdropFinalFrontend($authority: String!) {
|
47
47
|
getAirdropFinalFrontend(authority: $authority) {
|
@@ -71,7 +71,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
71
71
|
const amount = res.getAirdropFinalFrontend.total_allocation;
|
72
72
|
if (amount === 0)
|
73
73
|
return [];
|
74
|
-
const claimStatuses = (0,
|
74
|
+
const claimStatuses = (0, helpers_1.deriveZetaClaimStatuses)(owner, constants_1.distributors);
|
75
75
|
const client = (0, clients_1.getClientSolana)();
|
76
76
|
const claimStatusesAccount = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(client, claimStatuses);
|
77
77
|
if (claimStatusesAccount.some((account) => account))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAuE;AACvE,mEAA+C;AAG/C,
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAuE;AACvE,mEAA+C;AAG/C,2CAA4E;AAE5E,qGAA6E;AAC7E,iDAAsD;AACtD,gGAA6F;AAC7F,uCAAoD;AAEpD,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;CAchB,CAAC;AAEF,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;AAEnC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EA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AE,WAAW,EAAE,aAAa,EAAE;SAC3C,CAAC;IAEN,OAAO;QACL;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,SAAS;YAChB,SAAS;YACT,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;YACD,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS;IACT,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -5,3 +5,5 @@ export declare function getCrossMarginAccounts(programId: PublicKey, owner: Publ
|
|
5
5
|
export declare function getStakeAccountAddress(userKey: PublicKey, bit: number): [PublicKey, number];
|
6
6
|
export declare function getStakeAccountsAddresses(userKey: string, start: number, end: number): PublicKey[];
|
7
7
|
export declare function getTimestamp(stakeDuration: number, startEpoch: number): number;
|
8
|
+
export declare function deriveZetaClaimStatus(claimant: string, distributor: string): PublicKey;
|
9
|
+
export declare function deriveZetaClaimStatuses(claimant: string, distributors: string[]): PublicKey[];
|
@@ -3,7 +3,7 @@ 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.getTimestamp = exports.getStakeAccountsAddresses = exports.getStakeAccountAddress = exports.getCrossMarginAccounts = exports.getMarginAccount = exports.getCrossMarginAccount = void 0;
|
6
|
+
exports.deriveZetaClaimStatuses = exports.deriveZetaClaimStatus = exports.getTimestamp = exports.getStakeAccountsAddresses = exports.getStakeAccountAddress = exports.getCrossMarginAccounts = exports.getMarginAccount = exports.getCrossMarginAccount = void 0;
|
7
7
|
const web3_js_1 = require("@solana/web3.js");
|
8
8
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
9
9
|
const constants_1 = require("./constants");
|
@@ -48,4 +48,16 @@ function getTimestamp(stakeDuration, startEpoch) {
|
|
48
48
|
.toNumber();
|
49
49
|
}
|
50
50
|
exports.getTimestamp = getTimestamp;
|
51
|
+
function deriveZetaClaimStatus(claimant, distributor) {
|
52
|
+
return web3_js_1.PublicKey.findProgramAddressSync([
|
53
|
+
Buffer.from('ClaimStatus'),
|
54
|
+
new web3_js_1.PublicKey(distributor).toBytes(),
|
55
|
+
new web3_js_1.PublicKey(claimant).toBytes(),
|
56
|
+
], new web3_js_1.PublicKey(constants_1.distributorPid))[0];
|
57
|
+
}
|
58
|
+
exports.deriveZetaClaimStatus = deriveZetaClaimStatus;
|
59
|
+
function deriveZetaClaimStatuses(claimant, distributors) {
|
60
|
+
return distributors.map((d) => deriveZetaClaimStatus(claimant, d));
|
61
|
+
}
|
62
|
+
exports.deriveZetaClaimStatuses = deriveZetaClaimStatuses;
|
51
63
|
//# sourceMappingURL=helpers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,gEAAqC;AACrC,
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,gEAAqC;AACrC,2CAAyD;AAEzD,SAAgB,qBAAqB,CACnC,SAAoB,EACpB,OAAkB,EAClB,UAAkB;IAElB,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;QACpC,OAAO,CAAC,QAAQ,EAAE;QAClB,UAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC;KAC9B,EACD,SAAS,CACV,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,sDAaC;AAED,SAAgB,gBA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AO,IAAI,CAAC;AACd,CAAC;AAXD,8DAWC;AAED,MAAM,iBAAiB,GAAG,IAAI,sBAAS,CAAC,aAAa,CAAC,CAAC;AACvD,MAAM,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACnC,SAAgB,YAAY,CAAC,aAAqB,EAAE,UAAkB;IACpE,OAAO,iBAAiB;SACrB,IAAI,CAAC,CAAC,UAAU,GAAG,aAAa,CAAC,GAAG,MAAM,CAAC;SAC3C,QAAQ,EAAE,CAAC;AAChB,CAAC;AAJD,oCAIC;AAED,SAAgB,qBAAqB,CACnC,QAAgB,EAChB,WAAmB;IAEnB,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;QAC1B,IAAI,mBAAS,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE;QACpC,IAAI,mBAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;KAClC,EACD,IAAI,mBAAS,CAAC,0BAAc,CAAC,CAC9B,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAZD,sDAYC;AAED,SAAgB,uBAAuB,CACrC,QAAgB,EAChB,YAAsB;IAEtB,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC;AALD,0DAKC"}
|
@@ -10,5 +10,4 @@ export { default as getEvmEthersClient } from './getEvmEthersClient';
|
|
10
10
|
export { default as getEvmWeb3V1Client } from './getEvmWeb3V1Client';
|
11
11
|
export { default as getEvmClients } from './getEvmClients';
|
12
12
|
export { default as urlToRpcEndpoint } from './urlToRpcEndpoint';
|
13
|
-
export { default as getEsploraEndpoint } from './getEsploraEndpoint';
|
14
13
|
export { default as getMempoolEndpoint } from './getMempoolEndpoint';
|
@@ -3,7 +3,7 @@ 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.getMempoolEndpoint = exports.
|
6
|
+
exports.getMempoolEndpoint = exports.urlToRpcEndpoint = exports.getEvmClients = exports.getEvmWeb3V1Client = exports.getEvmEthersClient = exports.getEvmClient = exports.getClientCosmWasm = exports.getClientIbc = exports.getClientCosmos = exports.getClientSei = exports.getClientSui = exports.getClientSolana = exports.getClientAptos = void 0;
|
7
7
|
var getClientAptos_1 = require("./getClientAptos");
|
8
8
|
Object.defineProperty(exports, "getClientAptos", { enumerable: true, get: function () { return __importDefault(getClientAptos_1).default; } });
|
9
9
|
var getClientSolana_1 = require("./getClientSolana");
|
@@ -28,8 +28,6 @@ var getEvmClients_1 = require("./getEvmClients");
|
|
28
28
|
Object.defineProperty(exports, "getEvmClients", { enumerable: true, get: function () { return __importDefault(getEvmClients_1).default; } });
|
29
29
|
var urlToRpcEndpoint_1 = require("./urlToRpcEndpoint");
|
30
30
|
Object.defineProperty(exports, "urlToRpcEndpoint", { enumerable: true, get: function () { return __importDefault(urlToRpcEndpoint_1).default; } });
|
31
|
-
var getEsploraEndpoint_1 = require("./getEsploraEndpoint");
|
32
|
-
Object.defineProperty(exports, "getEsploraEndpoint", { enumerable: true, get: function () { return __importDefault(getEsploraEndpoint_1).default; } });
|
33
31
|
var getMempoolEndpoint_1 = require("./getMempoolEndpoint");
|
34
32
|
Object.defineProperty(exports, "getMempoolEndpoint", { enumerable: true, get: function () { return __importDefault(getMempoolEndpoint_1).default; } });
|
35
33
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAClC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB;AACrC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AACpC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAClC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB;AACrC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AACpC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB"}
|
@@ -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,13 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const urlToRpcEndpoint_1 = __importDefault(require("./urlToRpcEndpoint"));
|
7
|
-
function getEsploraEndpoint() {
|
8
|
-
const endpoint = process.env['PORTFOLIO_ESPLORA_ENDPOINT'] ||
|
9
|
-
'https://blockstream.info/api/';
|
10
|
-
return (0, urlToRpcEndpoint_1.default)(endpoint);
|
11
|
-
}
|
12
|
-
exports.default = getEsploraEndpoint;
|
13
|
-
//# sourceMappingURL=getEsploraEndpoint.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getEsploraEndpoint.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/getEsploraEndpoint.ts"],"names":[],"mappings":";;;;;AACA,0EAAkD;AAElD,SAAwB,kBAAkB;IACxC,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;QACzC,+BAA+B,CAAC;IAClC,OAAO,IAAA,0BAAgB,EAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AALD,qCAKC"}
|