@sonarwatch/portfolio-plugins 0.14.141 → 0.14.143
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/CHANGELOG.md +2188 -2169
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/AirdropFetcher.js +1 -2
- package/src/AirdropFetcher.js.map +1 -1
- package/src/Fetcher.d.ts +0 -1
- package/src/Fetcher.js +2 -40
- package/src/Fetcher.js.map +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +3 -1
- package/src/index.js.map +1 -1
- package/src/plugins/01/constants.d.ts +1 -4
- package/src/plugins/01/constants.js +1 -18
- package/src/plugins/01/constants.js.map +1 -1
- package/src/plugins/aave/index.d.ts +1 -2
- package/src/plugins/aave/index.js +1 -3
- package/src/plugins/aave/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/jupiter/exchange/dcaFetcher.js +69 -20
- package/src/plugins/jupiter/exchange/dcaFetcher.js.map +1 -1
- package/src/plugins/jupiter/exchange/limitFetcher.js +73 -23
- package/src/plugins/jupiter/exchange/limitFetcher.js.map +1 -1
- package/src/plugins/orca/constants.d.ts +1 -1
- package/src/plugins/orca/constants.js +2 -2
- package/src/plugins/orca/constants.js.map +1 -1
- package/src/plugins/raydium/index.js +0 -1
- package/src/plugins/raydium/index.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/switchboard/onDemandPricingJob.js +2 -2
- package/src/plugins/switchboard/onDemandPricingJob.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeus/constants.d.ts +2 -2
- package/src/plugins/zeus/constants.js +2 -7
- package/src/plugins/zeus/constants.js.map +1 -1
- package/src/plugins/zeus/delegationsFetcher.js +1 -1
- package/src/plugins/zeus/delegationsFetcher.js.map +1 -1
- package/src/plugins/zeus/index.js +1 -1
- package/src/plugins/zeus/index.js.map +1 -1
- package/src/utils/misc/getCachedDecimalsForToken.d.ts +0 -1
- package/src/utils/misc/getCachedDecimalsForToken.js +3 -51
- package/src/utils/misc/getCachedDecimalsForToken.js.map +1 -1
- package/src/utils/misc/getDecimalsForToken.d.ts +4 -0
- package/src/utils/misc/getDecimalsForToken.js +63 -0
- package/src/utils/misc/getDecimalsForToken.js.map +1 -0
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/utils/solana/isActive.d.ts +2 -0
- package/src/utils/solana/isActive.js +39 -0
- package/src/utils/solana/isActive.js.map +1 -0
- package/src/plugins/aave/services.d.ts +0 -30
- package/src/plugins/aave/services.js +0 -181
- package/src/plugins/aave/services.js.map +0 -1
- package/src/utils/misc/promiseTimeout.d.ts +0 -1
- package/src/utils/misc/promiseTimeout.js +0 -13
- package/src/utils/misc/promiseTimeout.js.map +0 -1
@@ -1,181 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.lendingV3 = exports.ethereumV3Config = exports.polygonV3Config = exports.avalancheV3Config = exports.ethereumV3DataProvider = exports.ethereumV3IncentiveProvider = exports.ethereumV3LendProvider = exports.polygonV3DataProvider = exports.polygonV3IncentiveProvider = exports.polygonV3LendProvider = exports.avalancheV3DataProvider = exports.avalancheV3IncentiveProvider = exports.avalancheV3LendProvider = exports.v3LendProviderAddress = exports.lendingV2 = exports.avalancheV2Config = exports.polygonV2Config = exports.ethAMMV2Config = exports.ethMainV2Config = exports.avalancheV2DataProvider = exports.avalancheV2IncentiveProvider = exports.avalancheV2LendProvider = exports.polygonV2DataProvider = exports.polygonV2IncentiveProvider = exports.polygonV2LendProvider = exports.ethV2DataProvider = exports.ethV2IncentiveProvider = exports.ethV2AMMLendProvider = exports.ethV2MainLendProvider = void 0;
|
4
|
-
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
5
|
-
const constants_1 = require("./constants");
|
6
|
-
exports.ethV2MainLendProvider = {
|
7
|
-
address: '0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5',
|
8
|
-
name: 'Aave V2 Main Lenging Pool Provider',
|
9
|
-
network: portfolio_core_1.NetworkId.ethereum,
|
10
|
-
};
|
11
|
-
exports.ethV2AMMLendProvider = {
|
12
|
-
address: '0xAcc030EF66f9dFEAE9CbB0cd1B25654b82cFA8d5',
|
13
|
-
name: 'Aave V2 AMM Lenging Pool Provider',
|
14
|
-
network: portfolio_core_1.NetworkId.ethereum,
|
15
|
-
};
|
16
|
-
exports.ethV2IncentiveProvider = {
|
17
|
-
address: '0xD01ab9a6577E1D84F142e44D49380e23A340387d',
|
18
|
-
name: 'Aave V2 Incentive Provider',
|
19
|
-
network: portfolio_core_1.NetworkId.ethereum,
|
20
|
-
};
|
21
|
-
exports.ethV2DataProvider = {
|
22
|
-
address: '0x00e50FAB64eBB37b87df06Aa46b8B35d5f1A4e1A',
|
23
|
-
name: 'Aave V2 Data Provider',
|
24
|
-
network: portfolio_core_1.NetworkId.ethereum,
|
25
|
-
};
|
26
|
-
exports.polygonV2LendProvider = {
|
27
|
-
address: '0xd05e3E715d945B59290df0ae8eF85c1BdB684744',
|
28
|
-
name: 'Aave V2 Lenging Pool Provider',
|
29
|
-
network: portfolio_core_1.NetworkId.polygon,
|
30
|
-
};
|
31
|
-
exports.polygonV2IncentiveProvider = {
|
32
|
-
address: '0x874313A46e4957D29FAAC43BF5Eb2B144894f557',
|
33
|
-
name: 'Aave V2 Incentive Provider',
|
34
|
-
network: portfolio_core_1.NetworkId.polygon,
|
35
|
-
};
|
36
|
-
exports.polygonV2DataProvider = {
|
37
|
-
address: '0xC69728f11E9E6127733751c8410432913123acf1',
|
38
|
-
name: 'Aave V2 Data Provider',
|
39
|
-
network: portfolio_core_1.NetworkId.polygon,
|
40
|
-
};
|
41
|
-
exports.avalancheV2LendProvider = {
|
42
|
-
address: '0xb6A86025F0FE1862B372cb0ca18CE3EDe02A318f',
|
43
|
-
name: 'Aave V2 Lenging Pool Provider',
|
44
|
-
network: portfolio_core_1.NetworkId.avalanche,
|
45
|
-
};
|
46
|
-
exports.avalancheV2IncentiveProvider = {
|
47
|
-
address: '0x11979886A6dBAE27D7a72c49fCF3F23240D647bF',
|
48
|
-
name: 'Aave V2 Incentive Provider',
|
49
|
-
network: portfolio_core_1.NetworkId.avalanche,
|
50
|
-
};
|
51
|
-
exports.avalancheV2DataProvider = {
|
52
|
-
address: '0x00e50FAB64eBB37b87df06Aa46b8B35d5f1A4e1A',
|
53
|
-
name: 'Aave V2 Data Provider',
|
54
|
-
network: portfolio_core_1.NetworkId.avalanche,
|
55
|
-
};
|
56
|
-
exports.ethMainV2Config = {
|
57
|
-
integratedOn: 1692489600000,
|
58
|
-
networkId: portfolio_core_1.NetworkId.ethereum,
|
59
|
-
contracts: [exports.ethV2MainLendProvider, exports.ethV2IncentiveProvider, exports.ethV2DataProvider],
|
60
|
-
link: 'https://app.aave.com/?marketName=proto_mainnet',
|
61
|
-
};
|
62
|
-
exports.ethAMMV2Config = {
|
63
|
-
integratedOn: 1692489600000,
|
64
|
-
networkId: portfolio_core_1.NetworkId.ethereum,
|
65
|
-
contracts: [exports.ethV2AMMLendProvider, exports.ethV2IncentiveProvider, exports.ethV2DataProvider],
|
66
|
-
link: 'https://app.aave.com/?marketName=amm_mainnet',
|
67
|
-
};
|
68
|
-
exports.polygonV2Config = {
|
69
|
-
integratedOn: 1692489600000,
|
70
|
-
networkId: portfolio_core_1.NetworkId.polygon,
|
71
|
-
contracts: [
|
72
|
-
exports.polygonV2LendProvider,
|
73
|
-
exports.polygonV2IncentiveProvider,
|
74
|
-
exports.polygonV2DataProvider,
|
75
|
-
],
|
76
|
-
link: 'https://app.aave.com/?marketName=proto_polygon',
|
77
|
-
};
|
78
|
-
exports.avalancheV2Config = {
|
79
|
-
integratedOn: 1692489600000,
|
80
|
-
networkId: portfolio_core_1.NetworkId.avalanche,
|
81
|
-
contracts: [
|
82
|
-
exports.avalancheV2LendProvider,
|
83
|
-
exports.avalancheV2IncentiveProvider,
|
84
|
-
exports.avalancheV2DataProvider,
|
85
|
-
],
|
86
|
-
link: 'https://app.aave.com/?marketName=proto_avalanche',
|
87
|
-
};
|
88
|
-
exports.lendingV2 = {
|
89
|
-
id: `${constants_1.platformId}_v2`,
|
90
|
-
platformId: constants_1.platformId,
|
91
|
-
name: 'Aave V2',
|
92
|
-
configs: [
|
93
|
-
exports.ethMainV2Config,
|
94
|
-
exports.ethAMMV2Config,
|
95
|
-
exports.polygonV2Config,
|
96
|
-
exports.avalancheV2Config,
|
97
|
-
],
|
98
|
-
};
|
99
|
-
exports.v3LendProviderAddress = '0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb';
|
100
|
-
exports.avalancheV3LendProvider = {
|
101
|
-
address: exports.v3LendProviderAddress,
|
102
|
-
name: 'Aave V3 Lenging Pool Provider',
|
103
|
-
network: portfolio_core_1.NetworkId.avalanche,
|
104
|
-
};
|
105
|
-
exports.avalancheV3IncentiveProvider = {
|
106
|
-
address: '0x645654D59A5226CBab969b1f5431aA47CBf64ab8',
|
107
|
-
name: 'Aave V3 Incentive Provider',
|
108
|
-
network: portfolio_core_1.NetworkId.avalanche,
|
109
|
-
};
|
110
|
-
exports.avalancheV3DataProvider = {
|
111
|
-
address: '0x204f2Eb81D996729829debC819f7992DCEEfE7b1',
|
112
|
-
name: 'Aave V3 Data Provider',
|
113
|
-
network: portfolio_core_1.NetworkId.avalanche,
|
114
|
-
};
|
115
|
-
exports.polygonV3LendProvider = {
|
116
|
-
address: exports.v3LendProviderAddress,
|
117
|
-
name: 'Aave V3 Lenging Pool Provider',
|
118
|
-
network: portfolio_core_1.NetworkId.polygon,
|
119
|
-
};
|
120
|
-
exports.polygonV3IncentiveProvider = {
|
121
|
-
address: '0x874313A46e4957D29FAAC43BF5Eb2B144894f557',
|
122
|
-
name: 'Aave V3 Incentive Provider',
|
123
|
-
network: portfolio_core_1.NetworkId.polygon,
|
124
|
-
};
|
125
|
-
exports.polygonV3DataProvider = {
|
126
|
-
address: '0xC69728f11E9E6127733751c8410432913123acf1',
|
127
|
-
name: 'Aave V3 Data Provider',
|
128
|
-
network: portfolio_core_1.NetworkId.polygon,
|
129
|
-
};
|
130
|
-
exports.ethereumV3LendProvider = {
|
131
|
-
address: '0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e',
|
132
|
-
name: 'Aave V3 Lenging Pool Provider',
|
133
|
-
network: portfolio_core_1.NetworkId.ethereum,
|
134
|
-
};
|
135
|
-
exports.ethereumV3IncentiveProvider = {
|
136
|
-
address: '0x162A7AC02f547ad796CA549f757e2b8d1D9b10a6',
|
137
|
-
name: 'Aave V3 Incentive Provider',
|
138
|
-
network: portfolio_core_1.NetworkId.ethereum,
|
139
|
-
};
|
140
|
-
exports.ethereumV3DataProvider = {
|
141
|
-
address: '0x91c0eA31b49B69Ea18607702c5d9aC360bf3dE7d',
|
142
|
-
name: 'Aave V3 Data Provider',
|
143
|
-
network: portfolio_core_1.NetworkId.ethereum,
|
144
|
-
};
|
145
|
-
exports.avalancheV3Config = {
|
146
|
-
integratedOn: 1692489600000,
|
147
|
-
networkId: portfolio_core_1.NetworkId.avalanche,
|
148
|
-
contracts: [
|
149
|
-
exports.avalancheV3LendProvider,
|
150
|
-
exports.avalancheV3IncentiveProvider,
|
151
|
-
exports.avalancheV3DataProvider,
|
152
|
-
],
|
153
|
-
link: 'https://app.aave.com/?marketName=proto_avalanche_v3',
|
154
|
-
};
|
155
|
-
exports.polygonV3Config = {
|
156
|
-
integratedOn: 1692489600000,
|
157
|
-
networkId: portfolio_core_1.NetworkId.polygon,
|
158
|
-
contracts: [
|
159
|
-
exports.polygonV3LendProvider,
|
160
|
-
exports.polygonV3IncentiveProvider,
|
161
|
-
exports.polygonV3DataProvider,
|
162
|
-
],
|
163
|
-
link: 'https://app.aave.com/?marketName=proto_polygon_v3',
|
164
|
-
};
|
165
|
-
exports.ethereumV3Config = {
|
166
|
-
integratedOn: 1692489600000,
|
167
|
-
networkId: portfolio_core_1.NetworkId.ethereum,
|
168
|
-
contracts: [
|
169
|
-
exports.ethereumV3LendProvider,
|
170
|
-
exports.ethereumV3IncentiveProvider,
|
171
|
-
exports.ethereumV3DataProvider,
|
172
|
-
],
|
173
|
-
link: 'https://app.aave.com/?marketName=proto_mainnet_v3',
|
174
|
-
};
|
175
|
-
exports.lendingV3 = {
|
176
|
-
id: `${constants_1.platformId}_v3`,
|
177
|
-
platformId: constants_1.platformId,
|
178
|
-
name: 'Aave V3',
|
179
|
-
configs: [exports.ethereumV3Config, exports.polygonV3Config, exports.avalancheV3Config],
|
180
|
-
};
|
181
|
-
//# sourceMappingURL=services.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aave/services.ts"],"names":[],"mappings":";;;AAAA,+DAKoC;AACpC,2CAAyC;AAE5B,QAAA,qBAAqB,GAAa;IAC7C,OAAO,EAAE,4CAA4C;IACrD,IAAI,EAAE,oCAAoC;IAC1C,OAAO,EAAE,0BAAS,CAAC,QAAQ;CAC5B,CAAC;AAEW,QAAA,oBAAoB,GAAa;IAC5C,OAAO,EAAE,4CAA4C;IACrD,IAAI,EAAE,mCAAmC;IACzC,OAAO,EAAE,0BAAS,CAAC,QAAQ;CAC5B,CAAC;AAEW,QAAA,sBAAsB,GAAa;IAC9C,OAAO,EAAE,4CAA4C;IACrD,IAAI,EAAE,4BAA4B;IAClC,OAAO,EAAE,0BAAS,CAAC,QAAQ;CAC5B,CAAC;AAEW,QAAA,iBAAiB,GAAa;IACzC,OAAO,EAAE,4CAA4C;IACrD,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,0BAAS,CAAC,QAAQ;CAC5B,CAAC;AAEW,QAAA,qBAAqB,GAAa;IAC7C,OAAO,EAAE,4CAA4C;IACrD,IAAI,EAAE,+BAA+B;IACrC,OAAO,EAAE,0BAAS,CAAC,OAAO;CAC3B,CAAC;AAEW,QAAA,0BAA0B,GAAa;IAClD,OAAO,EAAE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 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
function promiseTimeout(promise, ms, message) {
|
4
|
-
const timeoutPromise = new Promise((resolve, reject) => {
|
5
|
-
const id = setTimeout(() => {
|
6
|
-
clearTimeout(id);
|
7
|
-
reject(new Error(message || `Promise timed out: ${ms}ms.`));
|
8
|
-
}, ms);
|
9
|
-
});
|
10
|
-
return Promise.race([promise, timeoutPromise]);
|
11
|
-
}
|
12
|
-
exports.default = promiseTimeout;
|
13
|
-
//# sourceMappingURL=promiseTimeout.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"promiseTimeout.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/promiseTimeout.ts"],"names":[],"mappings":";;AAAA,SAAwB,cAAc,CACpC,OAAmB,EACnB,EAAU,EACV,OAAgB;IAEhB,MAAM,cAAc,GAAe,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACjE,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,EAAE;YACzB,YAAY,CAAC,EAAE,CAAC,CAAC;YACjB,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,IAAI,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC;QAC9D,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;AACjD,CAAC;AAZD,iCAYC"}
|