@curvefi/api 2.6.0 → 2.8.1
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/README.md +0 -2
- package/lib/constants/abis/3pool/swap.json +0 -26
- package/lib/constants/abis/3pool-optimism/swap.json +1074 -0
- package/lib/constants/aliases.d.ts +2 -0
- package/lib/constants/aliases.js +25 -1
- package/lib/constants/coins/optimism.d.ts +7 -0
- package/lib/constants/coins/optimism.js +21 -0
- package/lib/constants/coins/xdai.d.ts +7 -0
- package/lib/constants/coins/xdai.js +17 -0
- package/lib/constants/pools/index.d.ts +3 -1
- package/lib/constants/pools/index.js +5 -1
- package/lib/constants/pools/optimism.d.ts +4 -0
- package/lib/constants/pools/optimism.js +37 -0
- package/lib/constants/pools/xdai.d.ts +4 -0
- package/lib/constants/pools/xdai.js +71 -0
- package/lib/curve.js +29 -5
- package/lib/factory/common.js +14 -0
- package/lib/factory/constants.d.ts +6 -0
- package/lib/factory/constants.js +67 -1
- package/lib/factory/factory-crypto.js +4 -0
- package/lib/factory/factory.js +12 -6
- package/lib/pools/PoolTemplate.js +1 -1
- package/lib/pools/utils.js +22 -14
- package/lib/router.js +13 -3
- package/lib/utils.js +7 -1
- package/package.json +1 -1
|
@@ -3,3 +3,5 @@ export declare const ALIASES_POLYGON: import("../interfaces").IDict<string>;
|
|
|
3
3
|
export declare const ALIASES_FANTOM: import("../interfaces").IDict<string>;
|
|
4
4
|
export declare const ALIASES_AVALANCHE: import("../interfaces").IDict<string>;
|
|
5
5
|
export declare const ALIASES_ARBITRUM: import("../interfaces").IDict<string>;
|
|
6
|
+
export declare const ALIASES_OPTIMISM: import("../interfaces").IDict<string>;
|
|
7
|
+
export declare const ALIASES_XDAI: import("../interfaces").IDict<string>;
|
package/lib/constants/aliases.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALIASES_ARBITRUM = exports.ALIASES_AVALANCHE = exports.ALIASES_FANTOM = exports.ALIASES_POLYGON = exports.ALIASES_ETHEREUM = void 0;
|
|
3
|
+
exports.ALIASES_XDAI = exports.ALIASES_OPTIMISM = exports.ALIASES_ARBITRUM = exports.ALIASES_AVALANCHE = exports.ALIASES_FANTOM = exports.ALIASES_POLYGON = exports.ALIASES_ETHEREUM = void 0;
|
|
4
4
|
var utils_1 = require("./utils");
|
|
5
5
|
exports.ALIASES_ETHEREUM = (0, utils_1.lowerCaseValues)({
|
|
6
6
|
"crv": "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
@@ -62,3 +62,27 @@ exports.ALIASES_ARBITRUM = (0, utils_1.lowerCaseValues)({
|
|
|
62
62
|
"crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
|
|
63
63
|
"registry_exchange": "",
|
|
64
64
|
});
|
|
65
|
+
exports.ALIASES_OPTIMISM = (0, utils_1.lowerCaseValues)({
|
|
66
|
+
"crv": "0x0994206dfE8De6Ec6920FF4D779B0d950605Fb53",
|
|
67
|
+
"minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
68
|
+
"voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
|
|
69
|
+
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
70
|
+
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
71
|
+
"router": "0xfA9a30350048B2BF66865ee20363067c66f67e58",
|
|
72
|
+
"deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
|
|
73
|
+
"factory": '0x2db0E83599a91b508Ac268a6197b8B14F5e72840',
|
|
74
|
+
"crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
|
|
75
|
+
"registry_exchange": "",
|
|
76
|
+
});
|
|
77
|
+
exports.ALIASES_XDAI = (0, utils_1.lowerCaseValues)({
|
|
78
|
+
"crv": "0x712b3d230f3c1c19db860d80619288b1f0bdd0bd",
|
|
79
|
+
"minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
80
|
+
"voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
|
|
81
|
+
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
82
|
+
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
83
|
+
"router": "0xfA9a30350048B2BF66865ee20363067c66f67e58",
|
|
84
|
+
"deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
|
|
85
|
+
"factory": '0xD19Baeadc667Cf2015e395f2B08668Ef120f41F5',
|
|
86
|
+
"crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
|
|
87
|
+
"registry_exchange": "",
|
|
88
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aTokensOptimism = exports.ycTokensOptimism = exports.yTokensOptimism = exports.cTokensOptimism = exports.COINS_OPTIMISM = void 0;
|
|
4
|
+
var utils_1 = require("../utils");
|
|
5
|
+
exports.COINS_OPTIMISM = (0, utils_1.lowerCaseValues)({
|
|
6
|
+
'crv': '0x0994206dfE8De6Ec6920FF4D779B0d950605Fb53',
|
|
7
|
+
// --- USD ---
|
|
8
|
+
'dai': '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1',
|
|
9
|
+
'usdc': '0x7f5c764cbc14f9669b88837ca1490cca17c31607',
|
|
10
|
+
'usdt': '0x94b008aa00579c1307b0ef2c499ad98a8ce58e58',
|
|
11
|
+
'susd': '0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9',
|
|
12
|
+
'3crv': '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
|
|
13
|
+
// --- ETH ---
|
|
14
|
+
'eth': '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
|
|
15
|
+
'weth': '0x4200000000000000000000000000000000000006',
|
|
16
|
+
'seth': '0xe405de8f52ba7559f9df3c368500b6e6ae6cee49',
|
|
17
|
+
});
|
|
18
|
+
exports.cTokensOptimism = []; //.map((a) => a.toLowerCase());
|
|
19
|
+
exports.yTokensOptimism = []; //.map((a) => a.toLowerCase());
|
|
20
|
+
exports.ycTokensOptimism = []; //.map((a) => a.toLowerCase());
|
|
21
|
+
exports.aTokensOptimism = []; //.map((a) => a.toLowerCase());
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aTokensXDai = exports.ycTokensXDai = exports.yTokensXDai = exports.cTokensXDai = exports.COINS_XDAI = void 0;
|
|
4
|
+
var utils_1 = require("../utils");
|
|
5
|
+
exports.COINS_XDAI = (0, utils_1.lowerCaseValues)({
|
|
6
|
+
'crv': '0x712b3d230f3c1c19db860d80619288b1f0bdd0bd',
|
|
7
|
+
// --- USD ---
|
|
8
|
+
'wxdai': '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d',
|
|
9
|
+
'usdc': '0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83',
|
|
10
|
+
'usdt': '0x4ECaBa5870353805a9F068101A40E0f32ed605C6',
|
|
11
|
+
'rai': '0xd7a28aa9c470e7e9d8c676bcd5dd2f40c5683afa',
|
|
12
|
+
'x3crv': '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
|
|
13
|
+
});
|
|
14
|
+
exports.cTokensXDai = []; //.map((a) => a.toLowerCase());
|
|
15
|
+
exports.yTokensXDai = []; //.map((a) => a.toLowerCase());
|
|
16
|
+
exports.ycTokensXDai = []; //.map((a) => a.toLowerCase());
|
|
17
|
+
exports.aTokensXDai = []; //.map((a) => a.toLowerCase());
|
|
@@ -3,4 +3,6 @@ import { POOLS_DATA_POLYGON } from "./polygon";
|
|
|
3
3
|
import { POOLS_DATA_FANTOM } from "./fantom";
|
|
4
4
|
import { POOLS_DATA_AVALANCHE } from "./avalanche";
|
|
5
5
|
import { POOLS_DATA_ARBITRUM } from "./arbitrum";
|
|
6
|
-
|
|
6
|
+
import { POOLS_DATA_OPTIMISM } from "./optimism";
|
|
7
|
+
import { POOLS_DATA_XDAI } from "./xdai";
|
|
8
|
+
export { POOLS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_FANTOM, POOLS_DATA_AVALANCHE, POOLS_DATA_ARBITRUM, POOLS_DATA_OPTIMISM, POOLS_DATA_XDAI, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.POOLS_DATA_ARBITRUM = exports.POOLS_DATA_AVALANCHE = exports.POOLS_DATA_FANTOM = exports.POOLS_DATA_POLYGON = exports.POOLS_DATA_ETHEREUM = void 0;
|
|
3
|
+
exports.POOLS_DATA_XDAI = exports.POOLS_DATA_OPTIMISM = exports.POOLS_DATA_ARBITRUM = exports.POOLS_DATA_AVALANCHE = exports.POOLS_DATA_FANTOM = exports.POOLS_DATA_POLYGON = exports.POOLS_DATA_ETHEREUM = void 0;
|
|
4
4
|
var ethereum_1 = require("./ethereum");
|
|
5
5
|
Object.defineProperty(exports, "POOLS_DATA_ETHEREUM", { enumerable: true, get: function () { return ethereum_1.POOLS_DATA_ETHEREUM; } });
|
|
6
6
|
var polygon_1 = require("./polygon");
|
|
@@ -11,3 +11,7 @@ var avalanche_1 = require("./avalanche");
|
|
|
11
11
|
Object.defineProperty(exports, "POOLS_DATA_AVALANCHE", { enumerable: true, get: function () { return avalanche_1.POOLS_DATA_AVALANCHE; } });
|
|
12
12
|
var arbitrum_1 = require("./arbitrum");
|
|
13
13
|
Object.defineProperty(exports, "POOLS_DATA_ARBITRUM", { enumerable: true, get: function () { return arbitrum_1.POOLS_DATA_ARBITRUM; } });
|
|
14
|
+
var optimism_1 = require("./optimism");
|
|
15
|
+
Object.defineProperty(exports, "POOLS_DATA_OPTIMISM", { enumerable: true, get: function () { return optimism_1.POOLS_DATA_OPTIMISM; } });
|
|
16
|
+
var xdai_1 = require("./xdai");
|
|
17
|
+
Object.defineProperty(exports, "POOLS_DATA_XDAI", { enumerable: true, get: function () { return xdai_1.POOLS_DATA_XDAI; } });
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
exports.POOLS_DATA_OPTIMISM = void 0;
|
|
7
|
+
var swap_json_1 = __importDefault(require("../abis/3pool-optimism/swap.json"));
|
|
8
|
+
var gauge_rewards_only_json_1 = __importDefault(require("../abis/gauge_rewards_only.json"));
|
|
9
|
+
var utils_1 = require("../utils");
|
|
10
|
+
exports.POOLS_DATA_OPTIMISM = (0, utils_1.lowerCasePoolDataAddresses)({
|
|
11
|
+
'3pool': {
|
|
12
|
+
name: "3pool",
|
|
13
|
+
full_name: "3pool",
|
|
14
|
+
symbol: "3pool",
|
|
15
|
+
reference_asset: 'USD',
|
|
16
|
+
is_plain: true,
|
|
17
|
+
swap_address: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
|
|
18
|
+
token_address: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
|
|
19
|
+
gauge_address: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
|
|
20
|
+
underlying_coins: ['DAI', 'USDC', 'USDT'],
|
|
21
|
+
wrapped_coins: ['DAI', 'USDC', 'USDT'],
|
|
22
|
+
underlying_coin_addresses: [
|
|
23
|
+
'0xda10009cbd5d07dd0cecc66161fc93d7c9000da1',
|
|
24
|
+
'0x7f5c764cbc14f9669b88837ca1490cca17c31607',
|
|
25
|
+
'0x94b008aa00579c1307b0ef2c499ad98a8ce58e58',
|
|
26
|
+
],
|
|
27
|
+
wrapped_coin_addresses: [
|
|
28
|
+
'0xda10009cbd5d07dd0cecc66161fc93d7c9000da1',
|
|
29
|
+
'0x7f5c764cbc14f9669b88837ca1490cca17c31607',
|
|
30
|
+
'0x94b008aa00579c1307b0ef2c499ad98a8ce58e58',
|
|
31
|
+
],
|
|
32
|
+
underlying_decimals: [18, 6, 6],
|
|
33
|
+
wrapped_decimals: [18, 6, 6],
|
|
34
|
+
swap_abi: swap_json_1.default,
|
|
35
|
+
gauge_abi: gauge_rewards_only_json_1.default,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
exports.POOLS_DATA_XDAI = void 0;
|
|
7
|
+
var swap_json_1 = __importDefault(require("../abis/3pool/swap.json"));
|
|
8
|
+
var swap_json_2 = __importDefault(require("../abis/rai/swap.json"));
|
|
9
|
+
var deposit_json_1 = __importDefault(require("../abis/rai/deposit.json"));
|
|
10
|
+
var gauge_rewards_only_json_1 = __importDefault(require("../abis/gauge_rewards_only.json"));
|
|
11
|
+
var streamer_json_1 = __importDefault(require("../abis/streamer.json"));
|
|
12
|
+
var utils_1 = require("../utils");
|
|
13
|
+
exports.POOLS_DATA_XDAI = (0, utils_1.lowerCasePoolDataAddresses)({
|
|
14
|
+
'3pool': {
|
|
15
|
+
name: "3pool",
|
|
16
|
+
full_name: "3pool",
|
|
17
|
+
symbol: "3pool",
|
|
18
|
+
reference_asset: 'USD',
|
|
19
|
+
swap_address: '0x7f90122BF0700F9E7e1F688fe926940E8839F353',
|
|
20
|
+
token_address: '0x1337BedC9D22ecbe766dF105c9623922A27963EC',
|
|
21
|
+
gauge_address: '0x78CF256256C8089d68Cde634Cf7cDEFb39286470',
|
|
22
|
+
sCurveRewards_address: '0x6C09F6727113543Fd061a721da512B7eFCDD0267',
|
|
23
|
+
is_plain: true,
|
|
24
|
+
underlying_coins: ['WXDAI', 'USDC', 'USDT'],
|
|
25
|
+
wrapped_coins: ['WXDAI', 'USDC', 'USDT'],
|
|
26
|
+
underlying_coin_addresses: [
|
|
27
|
+
'0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d',
|
|
28
|
+
'0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83',
|
|
29
|
+
'0x4ECaBa5870353805a9F068101A40E0f32ed605C6',
|
|
30
|
+
],
|
|
31
|
+
wrapped_coin_addresses: [
|
|
32
|
+
'0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d',
|
|
33
|
+
'0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83',
|
|
34
|
+
'0x4ECaBa5870353805a9F068101A40E0f32ed605C6',
|
|
35
|
+
],
|
|
36
|
+
underlying_decimals: [18, 6, 6],
|
|
37
|
+
wrapped_decimals: [18, 6, 6],
|
|
38
|
+
swap_abi: swap_json_1.default,
|
|
39
|
+
gauge_abi: gauge_rewards_only_json_1.default,
|
|
40
|
+
sCurveRewards_abi: streamer_json_1.default,
|
|
41
|
+
},
|
|
42
|
+
rai: {
|
|
43
|
+
name: "rai",
|
|
44
|
+
full_name: "rai",
|
|
45
|
+
symbol: "rai",
|
|
46
|
+
reference_asset: 'USD',
|
|
47
|
+
swap_address: '0x85bA9Dfb4a3E4541420Fc75Be02E2B42042D7e46',
|
|
48
|
+
token_address: '0x36390a1Ae126f16C5D222CB1F2AB341dD09f2FEC',
|
|
49
|
+
gauge_address: '0x0000000000000000000000000000000000000000',
|
|
50
|
+
deposit_address: '0xdf6eb52c4A9d7d5964b918c50D47a643Fd7D3D4c',
|
|
51
|
+
is_meta: true,
|
|
52
|
+
base_pool: '3pool',
|
|
53
|
+
underlying_coins: ['RAI', 'WXDAI', 'USDC', 'USDT'],
|
|
54
|
+
wrapped_coins: ['RAI', 'x3CRV'],
|
|
55
|
+
underlying_coin_addresses: [
|
|
56
|
+
'0xd7a28aa9c470e7e9d8c676bcd5dd2f40c5683afa',
|
|
57
|
+
'0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d',
|
|
58
|
+
'0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83',
|
|
59
|
+
'0x4ECaBa5870353805a9F068101A40E0f32ed605C6',
|
|
60
|
+
],
|
|
61
|
+
wrapped_coin_addresses: [
|
|
62
|
+
'0xd7a28aa9c470e7e9d8c676bcd5dd2f40c5683afa',
|
|
63
|
+
'0x1337BedC9D22ecbe766dF105c9623922A27963EC',
|
|
64
|
+
],
|
|
65
|
+
underlying_decimals: [18, 18, 6, 6],
|
|
66
|
+
wrapped_decimals: [18, 18],
|
|
67
|
+
swap_abi: swap_json_2.default,
|
|
68
|
+
gauge_abi: gauge_rewards_only_json_1.default,
|
|
69
|
+
deposit_abi: deposit_json_1.default,
|
|
70
|
+
},
|
|
71
|
+
});
|
package/lib/curve.js
CHANGED
|
@@ -80,12 +80,14 @@ var streamer_json_1 = __importDefault(require("./constants/abis/streamer.json"))
|
|
|
80
80
|
var factory_json_1 = __importDefault(require("./constants/abis/factory.json"));
|
|
81
81
|
var factory_crypto_json_1 = __importDefault(require("./constants/abis/factory-crypto.json"));
|
|
82
82
|
var pools_1 = require("./constants/pools");
|
|
83
|
+
var aliases_1 = require("./constants/aliases");
|
|
83
84
|
var ethereum_1 = require("./constants/coins/ethereum");
|
|
85
|
+
var optimism_1 = require("./constants/coins/optimism");
|
|
84
86
|
var polygon_1 = require("./constants/coins/polygon");
|
|
85
87
|
var fantom_1 = require("./constants/coins/fantom");
|
|
86
88
|
var avalanche_1 = require("./constants/coins/avalanche");
|
|
87
89
|
var arbitrum_1 = require("./constants/coins/arbitrum");
|
|
88
|
-
var
|
|
90
|
+
var xdai_1 = require("./constants/coins/xdai");
|
|
89
91
|
var utils_1 = require("./constants/utils");
|
|
90
92
|
exports.NETWORK_CONSTANTS = {
|
|
91
93
|
1: {
|
|
@@ -98,6 +100,26 @@ exports.NETWORK_CONSTANTS = {
|
|
|
98
100
|
ycTokens: ethereum_1.ycTokensEthereum,
|
|
99
101
|
aTokens: ethereum_1.aTokensEthereum,
|
|
100
102
|
},
|
|
103
|
+
10: {
|
|
104
|
+
NAME: 'optimism',
|
|
105
|
+
ALIASES: aliases_1.ALIASES_OPTIMISM,
|
|
106
|
+
POOLS_DATA: pools_1.POOLS_DATA_OPTIMISM,
|
|
107
|
+
COINS: optimism_1.COINS_OPTIMISM,
|
|
108
|
+
cTokens: optimism_1.cTokensOptimism,
|
|
109
|
+
yTokens: optimism_1.yTokensOptimism,
|
|
110
|
+
ycTokens: optimism_1.ycTokensOptimism,
|
|
111
|
+
aTokens: optimism_1.aTokensOptimism,
|
|
112
|
+
},
|
|
113
|
+
100: {
|
|
114
|
+
NAME: 'xdai',
|
|
115
|
+
ALIASES: aliases_1.ALIASES_XDAI,
|
|
116
|
+
POOLS_DATA: pools_1.POOLS_DATA_XDAI,
|
|
117
|
+
COINS: xdai_1.COINS_XDAI,
|
|
118
|
+
cTokens: xdai_1.cTokensXDai,
|
|
119
|
+
yTokens: xdai_1.yTokensXDai,
|
|
120
|
+
ycTokens: xdai_1.ycTokensXDai,
|
|
121
|
+
aTokens: xdai_1.aTokensXDai,
|
|
122
|
+
},
|
|
101
123
|
137: {
|
|
102
124
|
NAME: 'polygon',
|
|
103
125
|
ALIASES: aliases_1.ALIASES_POLYGON,
|
|
@@ -292,10 +314,12 @@ var Curve = /** @class */ (function () {
|
|
|
292
314
|
multicallContract: new ethcall_1.Contract(pool.token_address, ERC20_json_1.default),
|
|
293
315
|
};
|
|
294
316
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
317
|
+
if (pool.gauge_address !== ethers_1.ethers.constants.AddressZero) {
|
|
318
|
+
this.contracts[pool.gauge_address] = {
|
|
319
|
+
contract: new ethers_1.Contract(pool.gauge_address, pool.gauge_abi, this.signer || this.provider),
|
|
320
|
+
multicallContract: new ethcall_1.Contract(pool.gauge_address, pool.gauge_abi),
|
|
321
|
+
};
|
|
322
|
+
}
|
|
299
323
|
if (pool.deposit_address && !this.contracts[pool.deposit_address]) {
|
|
300
324
|
this.contracts[pool.deposit_address] = {
|
|
301
325
|
contract: new ethers_1.Contract(pool.deposit_address, pool.deposit_abi, this.signer || this.provider),
|
package/lib/factory/common.js
CHANGED
|
@@ -25,6 +25,20 @@ function setFactoryZapContracts() {
|
|
|
25
25
|
multicallContract: new ethcall_1.Contract(metaSBtcZapAddress, deposit_json_1.default),
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
+
else if (this.chainId === 10) {
|
|
29
|
+
var metaUsdZapAddress = "0x167e42a1c7ab4be03764a2222aac57f5f6754411".toLowerCase();
|
|
30
|
+
this.contracts[metaUsdZapAddress] = {
|
|
31
|
+
contract: new ethers_1.Contract(metaUsdZapAddress, deposit_json_1.default, this.signer || this.provider),
|
|
32
|
+
multicallContract: new ethcall_1.Contract(metaUsdZapAddress, deposit_json_1.default),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
else if (this.chainId === 100) {
|
|
36
|
+
var metaUsdZapAddress = "0x87C067fAc25f123554a0E76596BF28cFa37fD5E9".toLowerCase();
|
|
37
|
+
this.contracts[metaUsdZapAddress] = {
|
|
38
|
+
contract: new ethers_1.Contract(metaUsdZapAddress, deposit_json_1.default, this.signer || this.provider),
|
|
39
|
+
multicallContract: new ethcall_1.Contract(metaUsdZapAddress, deposit_json_1.default),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
28
42
|
else if (this.chainId === 137) {
|
|
29
43
|
var metaUsdZapAddress = "0x5ab5C56B9db92Ba45a0B46a207286cD83C15C939".toLowerCase();
|
|
30
44
|
this.contracts[metaUsdZapAddress] = {
|
|
@@ -4,16 +4,22 @@ export declare const implementationABIDictPolygon: IDict<any>;
|
|
|
4
4
|
export declare const implementationABIDictFantom: IDict<any>;
|
|
5
5
|
export declare const implementationABIDictAvalanche: IDict<any>;
|
|
6
6
|
export declare const implementationABIDictArbitrum: IDict<any>;
|
|
7
|
+
export declare const implementationABIDictOptimism: IDict<any>;
|
|
8
|
+
export declare const implementationABIDictXDai: IDict<any>;
|
|
7
9
|
export declare const implementationBasePoolIdDictEthereum: IDict<string>;
|
|
8
10
|
export declare const implementationBasePoolIdDictPolygon: IDict<string>;
|
|
9
11
|
export declare const implementationBasePoolIdDictFantom: IDict<string>;
|
|
10
12
|
export declare const implementationBasePoolIdDictAvalanche: IDict<string>;
|
|
11
13
|
export declare const implementationBasePoolIdDictArbitrum: IDict<string>;
|
|
14
|
+
export declare const implementationBasePoolIdDictOptimism: IDict<string>;
|
|
15
|
+
export declare const implementationBasePoolIdDictXDai: IDict<string>;
|
|
12
16
|
export declare const basePoolIdZapDictEthereum: IDict<string>;
|
|
13
17
|
export declare const basePoolIdZapDictPolygon: IDict<string>;
|
|
14
18
|
export declare const basePoolIdZapDictFantom: IDict<string>;
|
|
15
19
|
export declare const basePoolIdZapDictAvalanche: IDict<string>;
|
|
16
20
|
export declare const basePoolIdZapDictArbitrum: IDict<string>;
|
|
21
|
+
export declare const basePoolIdZapDictOptimism: IDict<string>;
|
|
22
|
+
export declare const basePoolIdZapDictXDai: IDict<string>;
|
|
17
23
|
export declare const NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
18
24
|
export declare const NATIVE_TOKENS: {
|
|
19
25
|
[index: number]: {
|
package/lib/factory/constants.js
CHANGED
|
@@ -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.FACTORY_CONSTANTS = exports.NATIVE_TOKENS = exports.NATIVE_TOKEN_ADDRESS = exports.basePoolIdZapDictArbitrum = exports.basePoolIdZapDictAvalanche = exports.basePoolIdZapDictFantom = exports.basePoolIdZapDictPolygon = exports.basePoolIdZapDictEthereum = exports.implementationBasePoolIdDictArbitrum = exports.implementationBasePoolIdDictAvalanche = exports.implementationBasePoolIdDictFantom = exports.implementationBasePoolIdDictPolygon = exports.implementationBasePoolIdDictEthereum = exports.implementationABIDictArbitrum = exports.implementationABIDictAvalanche = exports.implementationABIDictFantom = exports.implementationABIDictPolygon = exports.implementationABIDictEthereum = void 0;
|
|
6
|
+
exports.FACTORY_CONSTANTS = exports.NATIVE_TOKENS = exports.NATIVE_TOKEN_ADDRESS = exports.basePoolIdZapDictXDai = exports.basePoolIdZapDictOptimism = exports.basePoolIdZapDictArbitrum = exports.basePoolIdZapDictAvalanche = exports.basePoolIdZapDictFantom = exports.basePoolIdZapDictPolygon = exports.basePoolIdZapDictEthereum = exports.implementationBasePoolIdDictXDai = exports.implementationBasePoolIdDictOptimism = exports.implementationBasePoolIdDictArbitrum = exports.implementationBasePoolIdDictAvalanche = exports.implementationBasePoolIdDictFantom = exports.implementationBasePoolIdDictPolygon = exports.implementationBasePoolIdDictEthereum = exports.implementationABIDictXDai = exports.implementationABIDictOptimism = exports.implementationABIDictArbitrum = exports.implementationABIDictAvalanche = exports.implementationABIDictFantom = exports.implementationABIDictPolygon = exports.implementationABIDictEthereum = void 0;
|
|
7
7
|
var swap_json_1 = __importDefault(require("../constants/abis/factoryPools/swap.json"));
|
|
8
8
|
var MetaUSD_json_1 = __importDefault(require("../constants/abis/factory-v2/MetaUSD.json"));
|
|
9
9
|
var MetaUSDBalances_json_1 = __importDefault(require("../constants/abis/factory-v2/MetaUSDBalances.json"));
|
|
@@ -123,6 +123,38 @@ exports.implementationABIDictArbitrum = {
|
|
|
123
123
|
"0x89287c32c2CAC1C76227F6d300B2DBbab6b75C08": Plain4ETH_json_1.default,
|
|
124
124
|
"0x06e3C4da96fd076b97b7ca3Ae23527314b6140dF": Plain4Optimized_json_1.default,
|
|
125
125
|
};
|
|
126
|
+
exports.implementationABIDictOptimism = {
|
|
127
|
+
"0x78CF256256C8089d68Cde634Cf7cDEFb39286470": MetaUSD_json_1.default,
|
|
128
|
+
"0xADf698e4d8Df08b3E2c79682891636eF00F6e205": MetaUSDBalances_json_1.default,
|
|
129
|
+
"0xC2b1DF84112619D190193E48148000e3990Bf627": Plain2Basic_json_1.default,
|
|
130
|
+
"0x16a7DA911A4DD1d83F3fF066fE28F3C792C50d90": Plain2Balances_json_1.default,
|
|
131
|
+
"0x4f3E8F405CF5aFC05D68142F3783bDfE13811522": Plain2ETH_json_1.default,
|
|
132
|
+
"0x0f9cb53Ebe405d49A0bbdBD291A65Ff571bC83e1": Plain2Optimized_json_1.default,
|
|
133
|
+
"0x78D0fC2B9D5AE65512DB242e424a9c683F18c243": Plain3Basic_json_1.default,
|
|
134
|
+
"0x35796DAc54f144DFBAD1441Ec7C32313A7c29F39": Plain3Balances_json_1.default,
|
|
135
|
+
"0x6600e98b71dabfD4A8Cac03b302B0189Adb86Afb": Plain3ETH_json_1.default,
|
|
136
|
+
"0x6D65b498cb23deAba52db31c93Da9BFFb340FB8F": Plain3Optimized_json_1.default,
|
|
137
|
+
"0x445FE580eF8d70FF569aB36e80c647af338db351": Plain4Basic_json_1.default,
|
|
138
|
+
"0xF6bDc2619FFDA72c537Cd9605e0A274Dc48cB1C9": Plain4Balances_json_1.default,
|
|
139
|
+
"0x1AEf73d49Dedc4b1778d0706583995958Dc862e6": Plain4ETH_json_1.default,
|
|
140
|
+
"0x8474DdbE98F5aA3179B3B3F5942D724aFcdec9f6": Plain4Optimized_json_1.default,
|
|
141
|
+
};
|
|
142
|
+
exports.implementationABIDictXDai = {
|
|
143
|
+
"0x4A5bF7Ab9A8202692051c19B102d3eDD62aaBAE6": MetaUSD_json_1.default,
|
|
144
|
+
"0x0B4dc7A945695D11FD83e40B2DfC2B896A02395F": MetaUSDBalances_json_1.default,
|
|
145
|
+
"0x04e39EF8332e979Cf8e4f8891E64934FF65F231b": Plain2Basic_json_1.default,
|
|
146
|
+
"0xC9438d8928486bD9621D326002F4672bF684187A": Plain2Balances_json_1.default,
|
|
147
|
+
"0x2b70A5B878665FfDB4A06Ba40a264d6c70f68F4B": Plain2ETH_json_1.default,
|
|
148
|
+
"0x2D036f0Ff6F440dB623e0D9D3B5Daa509e5500C3": Plain2Optimized_json_1.default,
|
|
149
|
+
"0xec9cEBE650E181079576C1b6d0d2e092B1EdfF13": Plain3Basic_json_1.default,
|
|
150
|
+
"0xe8269B33E47761f552E1a3070119560d5fa8bBD6": Plain3Balances_json_1.default,
|
|
151
|
+
"0x114C4042B11a2b16F58Fe1BFe847589a122F678a": Plain3ETH_json_1.default,
|
|
152
|
+
"0x4244eB811D6e0Ef302326675207A95113dB4E1F8": Plain3Optimized_json_1.default,
|
|
153
|
+
"0x66B5792ED50a2a7405Ea75C4B6B1913eF4E46661": Plain4Basic_json_1.default,
|
|
154
|
+
"0xcB4eB43E31C830e22baF764c64F11F32C280496c": Plain4Balances_json_1.default,
|
|
155
|
+
"0xc1C49622b63B961ce1D352ecb7D8261Ab5556695": Plain4ETH_json_1.default,
|
|
156
|
+
"0x0E2615ce69Cd3Dc3Ff6f66a975bEa0655F3bA7b9": Plain4Optimized_json_1.default,
|
|
157
|
+
};
|
|
126
158
|
exports.implementationBasePoolIdDictEthereum = {
|
|
127
159
|
"0x5F890841f657d90E081bAbdB532A05996Af79Fe6": "3pool",
|
|
128
160
|
"0x213be373FDff327658139C7df330817DAD2d5bBE": "3pool",
|
|
@@ -160,6 +192,14 @@ exports.implementationBasePoolIdDictArbitrum = {
|
|
|
160
192
|
"0x094d12e5b541784701FD8d65F11fc0598FBC6332": "ren",
|
|
161
193
|
"0xF1f85a74AD6c64315F85af52d3d46bF715236ADc": "ren",
|
|
162
194
|
};
|
|
195
|
+
exports.implementationBasePoolIdDictOptimism = {
|
|
196
|
+
"0x78CF256256C8089d68Cde634Cf7cDEFb39286470": "3pool",
|
|
197
|
+
"0xADf698e4d8Df08b3E2c79682891636eF00F6e205": "3pool",
|
|
198
|
+
};
|
|
199
|
+
exports.implementationBasePoolIdDictXDai = {
|
|
200
|
+
"0x4A5bF7Ab9A8202692051c19B102d3eDD62aaBAE6": "3pool",
|
|
201
|
+
"0x0B4dc7A945695D11FD83e40B2DfC2B896A02395F": "3pool",
|
|
202
|
+
};
|
|
163
203
|
exports.basePoolIdZapDictEthereum = {
|
|
164
204
|
'3pool': "0xA79828DF1850E8a3A3064576f380D90aECDD3359".toLowerCase(),
|
|
165
205
|
fraxusdc: "0x08780fb7E580e492c1935bEe4fA5920b94AA95Da".toLowerCase(),
|
|
@@ -183,6 +223,12 @@ exports.basePoolIdZapDictArbitrum = {
|
|
|
183
223
|
"2pool": "0x7544Fe3d184b6B55D6B36c3FCA1157eE0Ba30287".toLowerCase(),
|
|
184
224
|
ren: "0x803A2B40c5a9BB2B86DD630B274Fa2A9202874C2".toLowerCase(),
|
|
185
225
|
};
|
|
226
|
+
exports.basePoolIdZapDictOptimism = {
|
|
227
|
+
"3pool": "0x167e42a1c7ab4be03764a2222aac57f5f6754411".toLowerCase(),
|
|
228
|
+
};
|
|
229
|
+
exports.basePoolIdZapDictXDai = {
|
|
230
|
+
"3pool": "0x87C067fAc25f123554a0E76596BF28cFa37fD5E9".toLowerCase(),
|
|
231
|
+
};
|
|
186
232
|
exports.NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
187
233
|
exports.NATIVE_TOKENS = {
|
|
188
234
|
1: {
|
|
@@ -190,6 +236,16 @@ exports.NATIVE_TOKENS = {
|
|
|
190
236
|
wrappedSymbol: 'WETH',
|
|
191
237
|
wrappedAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'.toLowerCase(),
|
|
192
238
|
},
|
|
239
|
+
10: {
|
|
240
|
+
symbol: 'ETH',
|
|
241
|
+
wrappedSymbol: 'WETH',
|
|
242
|
+
wrappedAddress: '0x4200000000000000000000000000000000000006'.toLowerCase(),
|
|
243
|
+
},
|
|
244
|
+
100: {
|
|
245
|
+
symbol: 'XDAi',
|
|
246
|
+
wrappedSymbol: 'WXDAI',
|
|
247
|
+
wrappedAddress: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d'.toLowerCase(),
|
|
248
|
+
},
|
|
193
249
|
137: {
|
|
194
250
|
symbol: 'MATIC',
|
|
195
251
|
wrappedSymbol: 'WMATIC',
|
|
@@ -212,6 +268,16 @@ exports.FACTORY_CONSTANTS = {
|
|
|
212
268
|
implementationBasePoolIdDict: exports.implementationBasePoolIdDictEthereum,
|
|
213
269
|
basePoolIdZapDict: exports.basePoolIdZapDictEthereum,
|
|
214
270
|
},
|
|
271
|
+
10: {
|
|
272
|
+
implementationABIDict: exports.implementationABIDictOptimism,
|
|
273
|
+
implementationBasePoolIdDict: exports.implementationBasePoolIdDictOptimism,
|
|
274
|
+
basePoolIdZapDict: exports.basePoolIdZapDictOptimism,
|
|
275
|
+
},
|
|
276
|
+
100: {
|
|
277
|
+
implementationABIDict: exports.implementationABIDictXDai,
|
|
278
|
+
implementationBasePoolIdDict: exports.implementationBasePoolIdDictXDai,
|
|
279
|
+
basePoolIdZapDict: exports.basePoolIdZapDictXDai,
|
|
280
|
+
},
|
|
215
281
|
137: {
|
|
216
282
|
implementationABIDict: exports.implementationABIDictPolygon,
|
|
217
283
|
implementationBasePoolIdDict: exports.implementationBasePoolIdDictPolygon,
|
|
@@ -223,6 +223,10 @@ function getExistingCoinAddressNameDict() {
|
|
|
223
223
|
}
|
|
224
224
|
if (this.chainId === 1)
|
|
225
225
|
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "ETH";
|
|
226
|
+
if (this.chainId === 10)
|
|
227
|
+
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "ETH";
|
|
228
|
+
if (this.chainId === 100)
|
|
229
|
+
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "XDAI";
|
|
226
230
|
if (this.chainId === 137)
|
|
227
231
|
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "MATIC";
|
|
228
232
|
if (this.chainId === 250)
|
package/lib/factory/factory.js
CHANGED
|
@@ -58,6 +58,8 @@ var common_1 = require("./common");
|
|
|
58
58
|
var constants_1 = require("./constants");
|
|
59
59
|
var BLACK_LIST = {
|
|
60
60
|
1: [],
|
|
61
|
+
10: [],
|
|
62
|
+
100: [],
|
|
61
63
|
137: [
|
|
62
64
|
"0x666dc3b4babfd063faf965bd020024af0dc51b64",
|
|
63
65
|
"0xe4199bc5c5c1f63dba47b56b6db7144c51cf0bf8",
|
|
@@ -254,15 +256,19 @@ function getExistingCoinAddressNameDict() {
|
|
|
254
256
|
_loop_1(poolData);
|
|
255
257
|
}
|
|
256
258
|
if (this.chainId === 1)
|
|
257
|
-
dict[
|
|
259
|
+
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "ETH";
|
|
260
|
+
if (this.chainId === 10)
|
|
261
|
+
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "ETH";
|
|
262
|
+
if (this.chainId === 100)
|
|
263
|
+
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "XDAI";
|
|
258
264
|
if (this.chainId === 137)
|
|
259
|
-
dict[
|
|
265
|
+
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "MATIC";
|
|
260
266
|
if (this.chainId === 250)
|
|
261
|
-
dict[
|
|
267
|
+
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "FTM";
|
|
262
268
|
if (this.chainId === 43114)
|
|
263
|
-
dict[
|
|
269
|
+
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "AVAX";
|
|
264
270
|
if (this.chainId === 42161)
|
|
265
|
-
dict[
|
|
271
|
+
dict[constants_1.NATIVE_TOKEN_ADDRESS] = "ETH";
|
|
266
272
|
return dict;
|
|
267
273
|
}
|
|
268
274
|
function getCoinAddressNameDict(coinAddresses, existingCoinAddrNameDict) {
|
|
@@ -326,7 +332,7 @@ function getCoinAddressDecimalsDict(coinAddresses, existingCoinAddressDecimalsDi
|
|
|
326
332
|
newCoinAddresses.forEach(function (addr, i) {
|
|
327
333
|
coinAddrNamesDict[addr] = decimals[i];
|
|
328
334
|
});
|
|
329
|
-
coinAddrNamesDict[
|
|
335
|
+
coinAddrNamesDict[constants_1.NATIVE_TOKEN_ADDRESS] = 18;
|
|
330
336
|
return [2 /*return*/, coinAddrNamesDict];
|
|
331
337
|
}
|
|
332
338
|
});
|
|
@@ -262,7 +262,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
262
262
|
case 0:
|
|
263
263
|
if (this.gauge === ethers_1.ethers.constants.AddressZero)
|
|
264
264
|
return [2 /*return*/, []];
|
|
265
|
-
if (![137, 250, 43114, 42161].includes(curve_1.curve.chainId)) return [3 /*break*/, 8];
|
|
265
|
+
if (![10, 100, 137, 250, 43114, 42161].includes(curve_1.curve.chainId)) return [3 /*break*/, 8];
|
|
266
266
|
apy = [];
|
|
267
267
|
return [4 /*yield*/, this.rewardTokens()];
|
|
268
268
|
case 1:
|
package/lib/pools/utils.js
CHANGED
|
@@ -46,6 +46,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.getUserPoolList = exports.getCryptoFactoryPoolList = exports.getFactoryPoolList = exports.getPoolList = void 0;
|
|
49
|
+
var ethers_1 = require("ethers");
|
|
49
50
|
var curve_1 = require("../curve");
|
|
50
51
|
var poolConstructor_1 = require("./poolConstructor");
|
|
51
52
|
var getPoolList = function () { return Object.keys(curve_1.curve.constants.POOLS_DATA); };
|
|
@@ -55,27 +56,34 @@ exports.getFactoryPoolList = getFactoryPoolList;
|
|
|
55
56
|
var getCryptoFactoryPoolList = function () { return Object.keys(curve_1.curve.constants.CRYPTO_FACTORY_POOLS_DATA); };
|
|
56
57
|
exports.getCryptoFactoryPoolList = getCryptoFactoryPoolList;
|
|
57
58
|
var getUserPoolList = function (address) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
var
|
|
59
|
-
return __generator(this, function (
|
|
60
|
-
switch (
|
|
59
|
+
var poolIds, calls, _i, poolIds_1, poolId, pool, userPoolList, _rawBalances, _a, poolIds_2, poolId, pool, _balance;
|
|
60
|
+
return __generator(this, function (_b) {
|
|
61
|
+
switch (_b.label) {
|
|
61
62
|
case 0:
|
|
62
63
|
if (!address)
|
|
63
64
|
address = curve_1.curve.signerAddress;
|
|
64
65
|
address = address;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
for (_i = 0,
|
|
68
|
-
|
|
69
|
-
pool = (0, poolConstructor_1.getPool)(
|
|
70
|
-
|
|
66
|
+
poolIds = __spreadArray(__spreadArray(__spreadArray([], (0, exports.getPoolList)(), true), (0, exports.getFactoryPoolList)(), true), (0, exports.getCryptoFactoryPoolList)(), true);
|
|
67
|
+
calls = [];
|
|
68
|
+
for (_i = 0, poolIds_1 = poolIds; _i < poolIds_1.length; _i++) {
|
|
69
|
+
poolId = poolIds_1[_i];
|
|
70
|
+
pool = (0, poolConstructor_1.getPool)(poolId);
|
|
71
|
+
calls.push(curve_1.curve.contracts[pool.lpToken].multicallContract.balanceOf(address));
|
|
72
|
+
if (pool.gauge !== ethers_1.ethers.constants.AddressZero)
|
|
73
|
+
calls.push(curve_1.curve.contracts[pool.gauge].multicallContract.balanceOf(address));
|
|
71
74
|
}
|
|
72
75
|
userPoolList = [];
|
|
73
|
-
return [4 /*yield*/,
|
|
76
|
+
return [4 /*yield*/, curve_1.curve.multicallProvider.all(calls)];
|
|
74
77
|
case 1:
|
|
75
|
-
|
|
76
|
-
for (
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
_rawBalances = _b.sent();
|
|
79
|
+
for (_a = 0, poolIds_2 = poolIds; _a < poolIds_2.length; _a++) {
|
|
80
|
+
poolId = poolIds_2[_a];
|
|
81
|
+
pool = (0, poolConstructor_1.getPool)(poolId);
|
|
82
|
+
_balance = _rawBalances.shift();
|
|
83
|
+
if (pool.gauge !== ethers_1.ethers.constants.AddressZero)
|
|
84
|
+
_balance = _balance.add(_rawBalances.shift());
|
|
85
|
+
if (_balance.gt(0)) {
|
|
86
|
+
userPoolList.push(poolId);
|
|
79
87
|
}
|
|
80
88
|
}
|
|
81
89
|
return [2 /*return*/, userPoolList];
|