@curvefi/api 2.2.1 → 2.3.0

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.
@@ -238,8 +238,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
238
238
  ],
239
239
  underlying_decimals: [18, 6, 6, 18],
240
240
  wrapped_decimals: [18, 6, 6, 18],
241
- reward_tokens: ["0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F"],
242
- reward_decimals: [18],
243
241
  swap_abi: swap_json_5.default,
244
242
  gauge_abi: gauge_synthetix_json_1.default,
245
243
  deposit_abi: deposit_json_5.default,
@@ -520,8 +518,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
520
518
  ],
521
519
  underlying_decimals: [18, 18, 6, 6],
522
520
  wrapped_decimals: [18, 18],
523
- reward_tokens: ["0xa3BeD4E1c75D00fa6f4E5E6922DB7261B5E9AcD2"],
524
- reward_decimals: [18],
525
521
  swap_abi: swap_json_15.default,
526
522
  gauge_abi: gauge_synthetix_json_1.default,
527
523
  deposit_abi: deposit_json_11.default,
@@ -553,8 +549,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
553
549
  ],
554
550
  underlying_decimals: [18, 18, 6, 6],
555
551
  wrapped_decimals: [18, 18],
556
- reward_tokens: ["0x8762db106B2c2A0bccB3A80d1Ed41273552616E8"],
557
- reward_decimals: [18],
558
552
  swap_abi: swap_json_16.default,
559
553
  gauge_abi: gauge_synthetix_json_1.default,
560
554
  deposit_abi: deposit_json_12.default,
@@ -617,8 +611,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
617
611
  ],
618
612
  underlying_decimals: [18, 18, 6, 6],
619
613
  wrapped_decimals: [18, 18],
620
- reward_tokens: ["0x20c36f062a31865bED8a5B1e512D9a1A20AA333A"],
621
- reward_decimals: [18],
622
614
  swap_abi: swap_json_18.default,
623
615
  gauge_abi: gauge_synthetix_json_1.default,
624
616
  deposit_abi: deposit_json_14.default,
@@ -650,8 +642,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
650
642
  ],
651
643
  underlying_decimals: [18, 8, 8, 18],
652
644
  wrapped_decimals: [18, 18],
653
- reward_tokens: ["0x89Ab32156e46F46D02ade3FEcbe5Fc4243B9AAeD"],
654
- reward_decimals: [18],
655
645
  swap_abi: swap_json_19.default,
656
646
  gauge_abi: gauge_v2_json_1.default,
657
647
  deposit_abi: deposit_json_15.default,
@@ -712,8 +702,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
712
702
  ],
713
703
  underlying_decimals: [18, 8, 8, 18],
714
704
  wrapped_decimals: [18, 18],
715
- reward_tokens: ["0x3c9d6c1C73b31c837832c72E04D3152f051fc1A9"],
716
- reward_decimals: [18],
717
705
  swap_abi: swap_json_21.default,
718
706
  gauge_abi: gauge_v2_json_1.default,
719
707
  deposit_abi: deposit_json_17.default,
@@ -765,8 +753,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
765
753
  ],
766
754
  underlying_decimals: [2, 18],
767
755
  wrapped_decimals: [2, 18],
768
- reward_tokens: ["0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f"],
769
- reward_decimals: [18],
770
756
  swap_abi: swap_json_23.default,
771
757
  gauge_abi: gauge_v2_json_1.default,
772
758
  sCurveRewards_abi: sCurveRewards_json_10.default,
@@ -825,8 +811,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
825
811
  underlying_decimals: [18, 6, 6],
826
812
  wrapped_decimals: [18, 6, 6],
827
813
  use_lending: [true, true, true],
828
- reward_tokens: ["0x4da27a545c0c5b758a6ba100e3a049001de870f5"],
829
- reward_decimals: [18],
830
814
  swap_abi: swap_json_25.default,
831
815
  gauge_abi: gauge_v2_json_1.default,
832
816
  sCurveRewards_abi: rewards_json_1.default,
@@ -853,8 +837,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
853
837
  ],
854
838
  underlying_decimals: [18, 18],
855
839
  wrapped_decimals: [18, 18],
856
- reward_tokens: ["0x5a98fcbea516cf06857215779fd812ca3bef1b32"],
857
- reward_decimals: [18],
858
840
  swap_abi: swap_json_26.default,
859
841
  gauge_abi: gauge_v2_json_1.default,
860
842
  sCurveRewards_abi: sCurveRewards_json_11.default,
@@ -882,8 +864,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
882
864
  underlying_decimals: [18, 18],
883
865
  wrapped_decimals: [18, 18],
884
866
  use_lending: [true, true],
885
- reward_tokens: ["0x4da27a545c0c5b758a6ba100e3a049001de870f5"],
886
- reward_decimals: [18],
887
867
  swap_abi: swap_json_27.default,
888
868
  gauge_abi: gauge_v2_json_1.default,
889
869
  sCurveRewards_abi: rewards_json_1.default,
@@ -910,8 +890,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
910
890
  ],
911
891
  underlying_decimals: [18, 18],
912
892
  wrapped_decimals: [18, 18],
913
- reward_tokens: ["0xe0ad1806fd3e7edf6ff52fdb822432e847411033", "0x8290333cef9e6d528dd5618fb97a76f268f3edd4"],
914
- reward_decimals: [18, 18],
915
893
  swap_abi: swap_json_28.default,
916
894
  gauge_abi: gauge_v2_json_1.default,
917
895
  sCurveRewards_abi: sCurveRewards_json_12.default,
@@ -1051,8 +1029,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
1051
1029
  ],
1052
1030
  underlying_decimals: [18, 18, 6, 6],
1053
1031
  wrapped_decimals: [18, 18],
1054
- reward_tokens: ['0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0'],
1055
- reward_decimals: [18],
1056
1032
  swap_abi: swap_json_33.default,
1057
1033
  deposit_abi: deposit_json_20.default,
1058
1034
  gauge_abi: gauge_v2_json_1.default,
@@ -1084,8 +1060,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
1084
1060
  ],
1085
1061
  underlying_decimals: [18, 18, 6, 6],
1086
1062
  wrapped_decimals: [18, 18],
1087
- reward_tokens: ['0x6dea81c8171d0ba574754ef6f8b412f2ed88c54d'],
1088
- reward_decimals: [18],
1089
1063
  swap_abi: swap_json_33.default,
1090
1064
  gauge_abi: gauge_v2_json_1.default,
1091
1065
  deposit_abi: deposit_json_20.default,
@@ -1142,8 +1116,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
1142
1116
  ],
1143
1117
  underlying_decimals: [18, 18],
1144
1118
  wrapped_decimals: [18, 18],
1145
- reward_tokens: ['0xef3a930e1ffffacd2fc13434ac81bd278b0ecc8d'],
1146
- reward_decimals: [18],
1147
1119
  swap_abi: swap_json_32.default,
1148
1120
  gauge_abi: gauge_v3_json_1.default,
1149
1121
  sCurveRewards_abi: rewards_json_2.default,
@@ -1174,8 +1146,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
1174
1146
  ],
1175
1147
  underlying_decimals: [18, 18, 6, 6],
1176
1148
  wrapped_decimals: [18, 18],
1177
- reward_tokens: ['0xdbdb4d16eda451d0503b854cf79d55697f90c8df'],
1178
- reward_decimals: [18],
1179
1149
  swap_abi: swap_json_33.default,
1180
1150
  gauge_abi: gauge_v3_json_1.default,
1181
1151
  deposit_abi: deposit_json_20.default,
@@ -1206,8 +1176,6 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
1206
1176
  ],
1207
1177
  underlying_decimals: [18, 18, 6, 6],
1208
1178
  wrapped_decimals: [18, 18],
1209
- reward_tokens: ['0x090185f2135308BaD17527004364eBcC2D37e5F6'],
1210
- reward_decimals: [18],
1211
1179
  swap_abi: swap_json_33.default,
1212
1180
  gauge_abi: gauge_factory_json_1.default,
1213
1181
  deposit_abi: deposit_json_20.default,
@@ -5,13 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.POOLS_DATA_POLYGON = void 0;
7
7
  var swap_json_1 = __importDefault(require("../abis/aave/swap.json"));
8
- var rewards_json_1 = __importDefault(require("../abis/paave/rewards.json"));
9
8
  var swap_json_2 = __importDefault(require("../abis/ren-polygon/swap.json"));
10
9
  var swap_json_3 = __importDefault(require("../abis/atricrypto3/swap.json"));
11
10
  var zap_json_1 = __importDefault(require("../abis/atricrypto3/zap.json"));
12
11
  var swap_json_4 = __importDefault(require("../abis/eurtusd/swap.json"));
13
12
  var deposit_json_1 = __importDefault(require("../abis/eurtusd/deposit.json"));
14
- var gauge_rewards_only_json_1 = __importDefault(require("../abis/gauge_rewards_only.json"));
13
+ var gauge_child_json_1 = __importDefault(require("../abis/gauge_child.json"));
15
14
  var utils_1 = require("../utils");
16
15
  exports.POOLS_DATA_POLYGON = (0, utils_1.lowerCasePoolDataAddresses)({
17
16
  aave: {
@@ -21,9 +20,10 @@ exports.POOLS_DATA_POLYGON = (0, utils_1.lowerCasePoolDataAddresses)({
21
20
  reference_asset: 'USD',
22
21
  swap_address: '0x445FE580eF8d70FF569aB36e80c647af338db351',
23
22
  token_address: '0xE7a24EF0C5e95Ffb0f6684b813A78F2a3AD7D171',
24
- gauge_address: '0x19793B454D3AfC7b454F206Ffe95aDE26cA6912c',
25
- sCurveRewards_address: '0xBdFF0C27dd073C119ebcb1299a68A6A92aE607F0',
26
- reward_contract: "0xC48f4653dd6a9509De44c92beb0604BEA3AEe714",
23
+ gauge_address: '0x20759F567BB3EcDB55c817c9a1d13076aB215EdC',
24
+ // gauge_address: '0x19793B454D3AfC7b454F206Ffe95aDE26cA6912c',
25
+ // sCurveRewards_address: '0xBdFF0C27dd073C119ebcb1299a68A6A92aE607F0',
26
+ // reward_contract: "0xC48f4653dd6a9509De44c92beb0604BEA3AEe714",
27
27
  is_lending: true,
28
28
  underlying_coins: ['DAI', 'USDC', 'USDT'],
29
29
  wrapped_coins: ['amDAI', 'amUSDC', 'amUSDT'],
@@ -40,11 +40,9 @@ exports.POOLS_DATA_POLYGON = (0, utils_1.lowerCasePoolDataAddresses)({
40
40
  underlying_decimals: [18, 6, 6],
41
41
  wrapped_decimals: [18, 6, 6],
42
42
  use_lending: [true, true, true],
43
- reward_tokens: ["0x172370d5cd63279efa6d502dab29171933a610af"],
44
- reward_decimals: [18],
45
43
  swap_abi: swap_json_1.default,
46
- gauge_abi: gauge_rewards_only_json_1.default,
47
- sCurveRewards_abi: rewards_json_1.default,
44
+ gauge_abi: gauge_child_json_1.default,
45
+ // sCurveRewards_abi: paaveRewardsabi,
48
46
  },
49
47
  ren: {
50
48
  name: "ren",
@@ -53,8 +51,9 @@ exports.POOLS_DATA_POLYGON = (0, utils_1.lowerCasePoolDataAddresses)({
53
51
  reference_asset: 'BTC',
54
52
  swap_address: '0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67',
55
53
  token_address: '0xf8a57c1d3b9629b77b6726a042ca48990A84Fb49',
56
- gauge_address: '0xffbACcE0CC7C19d46132f1258FC16CF6871D153c',
57
- reward_contract: "0x488E6ef919C2bB9de535C634a80afb0114DA8F62",
54
+ gauge_address: '0x8D9649e50A0d1da8E939f800fB926cdE8f18B47D',
55
+ // gauge_address: '0xffbACcE0CC7C19d46132f1258FC16CF6871D153c',
56
+ // reward_contract: "0x488E6ef919C2bB9de535C634a80afb0114DA8F62",
58
57
  is_lending: true,
59
58
  underlying_coins: ['WBTC', 'renBTC'],
60
59
  wrapped_coins: ['amWBTC', 'renBTC'],
@@ -69,10 +68,8 @@ exports.POOLS_DATA_POLYGON = (0, utils_1.lowerCasePoolDataAddresses)({
69
68
  underlying_decimals: [8, 8],
70
69
  wrapped_decimals: [8, 8],
71
70
  use_lending: [true, false],
72
- reward_tokens: ["0x172370d5cd63279efa6d502dab29171933a610af"],
73
- reward_decimals: [18],
74
71
  swap_abi: swap_json_2.default,
75
- gauge_abi: gauge_rewards_only_json_1.default,
72
+ gauge_abi: gauge_child_json_1.default,
76
73
  },
77
74
  atricrypto3: {
78
75
  name: "atricrypto3",
@@ -81,9 +78,10 @@ exports.POOLS_DATA_POLYGON = (0, utils_1.lowerCasePoolDataAddresses)({
81
78
  reference_asset: 'CRYPTO',
82
79
  swap_address: '0x92215849c439E1f8612b6646060B4E3E5ef822cC',
83
80
  token_address: '0xdAD97F7713Ae9437fa9249920eC8507e5FbB23d3',
84
- gauge_address: '0x3B6B158A76fd8ccc297538F454ce7B4787778c7C',
81
+ gauge_address: '0xBb1B19495B8FE7C402427479B9aC14886cbbaaeE',
85
82
  deposit_address: '0x1d8b86e3D88cDb2d34688e87E72F388Cb541B7C8',
86
- reward_contract: "0x060e386eCfBacf42Aa72171Af9EFe17b3993fC4F",
83
+ // gauge_address: '0x3B6B158A76fd8ccc297538F454ce7B4787778c7C',
84
+ // reward_contract: "0x060e386eCfBacf42Aa72171Af9EFe17b3993fC4F",
87
85
  is_meta: true,
88
86
  is_crypto: true,
89
87
  is_fake: true,
@@ -104,10 +102,8 @@ exports.POOLS_DATA_POLYGON = (0, utils_1.lowerCasePoolDataAddresses)({
104
102
  ],
105
103
  underlying_decimals: [18, 6, 6, 8, 18],
106
104
  wrapped_decimals: [18, 8, 18],
107
- reward_tokens: ["0x172370d5cd63279efa6d502dab29171933a610af"],
108
- reward_decimals: [18],
109
105
  swap_abi: swap_json_3.default,
110
- gauge_abi: gauge_rewards_only_json_1.default,
106
+ gauge_abi: gauge_child_json_1.default,
111
107
  deposit_abi: zap_json_1.default,
112
108
  },
113
109
  eurtusd: {
@@ -117,9 +113,10 @@ exports.POOLS_DATA_POLYGON = (0, utils_1.lowerCasePoolDataAddresses)({
117
113
  reference_asset: 'CRYPTO',
118
114
  swap_address: '0xB446BF7b8D6D4276d0c75eC0e3ee8dD7Fe15783A',
119
115
  token_address: '0x600743B1d8A96438bD46836fD34977a00293f6Aa',
120
- gauge_address: '0x40c0e9376468b4f257d15F8c47E5D0C646C28880',
116
+ gauge_address: '0x8b397084699Cc64E429F610F81Fac13bf061ef55',
121
117
  deposit_address: '0x225FB4176f0E20CDb66b4a3DF70CA3063281E855',
122
- reward_contract: "0xAF78381216a8eCC7Ad5957f3cD12a431500E0B0D",
118
+ // gauge_address: '0x40c0e9376468b4f257d15F8c47E5D0C646C28880',
119
+ // reward_contract: "0xAF78381216a8eCC7Ad5957f3cD12a431500E0B0D",
123
120
  is_meta: true,
124
121
  is_crypto: true,
125
122
  base_pool: 'aave',
@@ -137,10 +134,8 @@ exports.POOLS_DATA_POLYGON = (0, utils_1.lowerCasePoolDataAddresses)({
137
134
  ],
138
135
  underlying_decimals: [6, 18, 6, 6],
139
136
  wrapped_decimals: [6, 18],
140
- reward_tokens: ["0x172370d5cd63279efa6d502dab29171933a610af"],
141
- reward_decimals: [18],
142
137
  swap_abi: swap_json_4.default,
143
- gauge_abi: gauge_rewards_only_json_1.default,
138
+ gauge_abi: gauge_child_json_1.default,
144
139
  deposit_abi: deposit_json_1.default,
145
140
  },
146
141
  });
@@ -18,14 +18,11 @@ var lowerCasePoolDataAddresses = function (poolsData) {
18
18
  poolData.reward_contract = poolData.reward_contract.toLowerCase();
19
19
  poolData.underlying_coin_addresses = poolData.underlying_coin_addresses.map(function (a) { return a.toLowerCase(); });
20
20
  poolData.wrapped_coin_addresses = poolData.wrapped_coin_addresses.map(function (a) { return a.toLowerCase(); });
21
- if (poolData.reward_tokens)
22
- poolData.reward_tokens = poolData.reward_tokens.map(function (a) { return a.toLowerCase(); });
23
21
  }
24
22
  return poolsData;
25
23
  };
26
24
  exports.lowerCasePoolDataAddresses = lowerCasePoolDataAddresses;
27
25
  var extractDecimals = function (poolsData) {
28
- var _a, _b;
29
26
  var DECIMALS = {};
30
27
  for (var poolId in poolsData) {
31
28
  if (!Object.prototype.hasOwnProperty.call(poolsData, poolId))
@@ -41,12 +38,6 @@ var extractDecimals = function (poolsData) {
41
38
  for (var i = 0; i < poolData.wrapped_coin_addresses.length; i++) {
42
39
  DECIMALS[poolData.wrapped_coin_addresses[i]] = poolData.wrapped_decimals[i];
43
40
  }
44
- // Wrapped coins
45
- var rewardTokens = (_a = poolData.reward_tokens) !== null && _a !== void 0 ? _a : [];
46
- var rewardDecimals = (_b = poolData.reward_decimals) !== null && _b !== void 0 ? _b : [];
47
- for (var i = 0; i < rewardTokens.length; i++) {
48
- DECIMALS[rewardTokens[i]] = rewardDecimals[i];
49
- }
50
41
  }
51
42
  return DECIMALS;
52
43
  };
package/lib/curve.js CHANGED
@@ -69,6 +69,7 @@ var ERC20_json_1 = __importDefault(require("./constants/abis/ERC20.json"));
69
69
  var cERC20_json_1 = __importDefault(require("./constants/abis/cERC20.json"));
70
70
  var yERC20_json_1 = __importDefault(require("./constants/abis/yERC20.json"));
71
71
  var minter_json_1 = __importDefault(require("./constants/abis/minter.json"));
72
+ var minter_child_json_1 = __importDefault(require("./constants/abis/minter_child.json"));
72
73
  var votingescrow_json_1 = __importDefault(require("./constants/abis/votingescrow.json"));
73
74
  var address_provider_json_1 = __importDefault(require("./constants/abis/address_provider.json"));
74
75
  var gaugecontroller_json_1 = __importDefault(require("./constants/abis/gaugecontroller.json"));
@@ -145,9 +146,9 @@ var Curve = /** @class */ (function () {
145
146
  ) {
146
147
  if (options === void 0) { options = {}; }
147
148
  return __awaiter(this, void 0, void 0, function () {
148
- var network, _a, _b, cTokens, yTokens, ycTokens, aTokens, customAbiTokens, _c, _i, _d, pool, _e, _f, coinAddr, _g, _h, coinAddr, _j, _k, coinAddr, _l, _m, rewardTokenAddr, addressProviderContract, _o;
149
- return __generator(this, function (_p) {
150
- switch (_p.label) {
149
+ var network, _a, _b, cTokens, yTokens, ycTokens, aTokens, customAbiTokens, _c, _i, _d, pool, _e, _f, coinAddr, _g, _h, coinAddr, _j, _k, coinAddr, _minterABI, addressProviderContract, _l;
150
+ return __generator(this, function (_m) {
151
+ switch (_m.label) {
151
152
  case 0:
152
153
  // @ts-ignore
153
154
  this.provider = null;
@@ -212,8 +213,8 @@ var Curve = /** @class */ (function () {
212
213
  if (_a) return [3 /*break*/, 2];
213
214
  return [4 /*yield*/, this.provider._networkPromise];
214
215
  case 1:
215
- _a = (_p.sent());
216
- _p.label = 2;
216
+ _a = (_m.sent());
217
+ _m.label = 2;
217
218
  case 2:
218
219
  network = _a;
219
220
  console.log("CURVE-JS IS CONNECTED TO NETWORK:", network);
@@ -234,21 +235,21 @@ var Curve = /** @class */ (function () {
234
235
  this.multicallProvider = new ethcall_1.Provider();
235
236
  return [4 /*yield*/, this.multicallProvider.init(this.provider)];
236
237
  case 3:
237
- _p.sent();
238
+ _m.sent();
238
239
  if (!this.signer) return [3 /*break*/, 5];
239
240
  _c = this;
240
241
  return [4 /*yield*/, this.signer.getAddress()];
241
242
  case 4:
242
- _c.signerAddress = _p.sent();
243
+ _c.signerAddress = _m.sent();
243
244
  return [3 /*break*/, 6];
244
245
  case 5:
245
246
  this.signerAddress = '';
246
- _p.label = 6;
247
+ _m.label = 6;
247
248
  case 6:
248
249
  this.feeData = { gasPrice: options.gasPrice, maxFeePerGas: options.maxFeePerGas, maxPriorityFeePerGas: options.maxPriorityFeePerGas };
249
250
  return [4 /*yield*/, this.updateFeeData()];
250
251
  case 7:
251
- _p.sent();
252
+ _m.sent();
252
253
  for (_i = 0, _d = Object.values(this.constants.POOLS_DATA); _i < _d.length; _i++) {
253
254
  pool = _d[_i];
254
255
  this.contracts[pool.swap_address] = {
@@ -315,11 +316,10 @@ var Curve = /** @class */ (function () {
315
316
  multicallContract: new ethcall_1.Contract(pool.reward_contract, streamer_json_1.default),
316
317
  };
317
318
  }
318
- for (_l = 0, _m = pool.reward_tokens || []; _l < _m.length; _l++) {
319
- rewardTokenAddr = _m[_l];
320
- this.contracts[rewardTokenAddr] = {
321
- contract: new ethers_1.Contract(rewardTokenAddr, ERC20_json_1.default, this.signer || this.provider),
322
- multicallContract: new ethcall_1.Contract(rewardTokenAddr, ERC20_json_1.default),
319
+ if (pool.sCurveRewards_address) {
320
+ this.contracts[pool.sCurveRewards_address] = {
321
+ contract: new ethers_1.Contract(pool.sCurveRewards_address, pool.sCurveRewards_abi, this.signer || this.provider),
322
+ multicallContract: new ethcall_1.Contract(pool.sCurveRewards_address, pool.sCurveRewards_abi),
323
323
  };
324
324
  }
325
325
  }
@@ -331,13 +331,15 @@ var Curve = /** @class */ (function () {
331
331
  contract: new ethers_1.Contract(this.constants.ALIASES.crv, ERC20_json_1.default, this.signer || this.provider),
332
332
  multicallContract: new ethcall_1.Contract(this.constants.ALIASES.crv, ERC20_json_1.default),
333
333
  };
334
+ this.constants.DECIMALS[this.constants.ALIASES.crv] = 18;
335
+ _minterABI = this.chainId === 1 ? minter_json_1.default : minter_child_json_1.default;
334
336
  this.contracts[this.constants.ALIASES.minter] = {
335
- contract: new ethers_1.Contract(this.constants.ALIASES.minter, minter_json_1.default, this.signer || this.provider),
336
- multicallContract: new ethcall_1.Contract(this.constants.ALIASES.minter, minter_json_1.default),
337
+ contract: new ethers_1.Contract(this.constants.ALIASES.minter, _minterABI, this.signer || this.provider),
338
+ multicallContract: new ethcall_1.Contract(this.constants.ALIASES.minter, _minterABI),
337
339
  };
338
340
  this.contracts[this.constants.ALIASES.minter.toLowerCase()] = {
339
- contract: new ethers_1.Contract(this.constants.ALIASES.minter, minter_json_1.default, this.signer || this.provider),
340
- multicallContract: new ethcall_1.Contract(this.constants.ALIASES.minter, minter_json_1.default),
341
+ contract: new ethers_1.Contract(this.constants.ALIASES.minter, _minterABI, this.signer || this.provider),
342
+ multicallContract: new ethcall_1.Contract(this.constants.ALIASES.minter, _minterABI),
341
343
  };
342
344
  this.contracts[this.constants.ALIASES.voting_escrow] = {
343
345
  contract: new ethers_1.Contract(this.constants.ALIASES.voting_escrow, votingescrow_json_1.default, this.signer || this.provider),
@@ -356,10 +358,10 @@ var Curve = /** @class */ (function () {
356
358
  multicallContract: new ethcall_1.Contract(this.constants.ALIASES.address_provider, address_provider_json_1.default),
357
359
  };
358
360
  addressProviderContract = this.contracts[this.constants.ALIASES.address_provider].contract;
359
- _o = this.constants.ALIASES;
361
+ _l = this.constants.ALIASES;
360
362
  return [4 /*yield*/, addressProviderContract.get_address(2, this.constantOptions)];
361
363
  case 8:
362
- _o.registry_exchange = _p.sent();
364
+ _l.registry_exchange = _m.sent();
363
365
  this.contracts[this.constants.ALIASES.registry_exchange] = {
364
366
  contract: new ethers_1.Contract(this.constants.ALIASES.registry_exchange, registry_exchange_json_1.default, this.signer || this.provider),
365
367
  multicallContract: new ethcall_1.Contract(this.constants.ALIASES.registry_exchange, registry_exchange_json_1.default),
@@ -159,7 +159,6 @@ function getFactoryPoolsDataFromApi(isCrypto) {
159
159
  common_1.setFactoryZapContracts.call(this);
160
160
  FACTORY_POOLS_DATA = {};
161
161
  rawPoolList.forEach(function (pool) {
162
- var _a, _b, _c, _d, _e, _f;
163
162
  var coinAddresses = pool.coins.map(function (c) { return c.address.toLowerCase(); });
164
163
  var coinNames = pool.coins.map(function (c) { return c.symbol; });
165
164
  var coinDecimals = pool.coins.map(function (c) { return Number(c.decimals); });
@@ -183,8 +182,6 @@ function getFactoryPoolsDataFromApi(isCrypto) {
183
182
  wrapped_coin_addresses: coinAddresses,
184
183
  underlying_decimals: coinDecimals,
185
184
  wrapped_decimals: coinDecimals,
186
- reward_tokens: ((_a = pool.gaugeRewards) !== null && _a !== void 0 ? _a : []).map(function (r) { return r.tokenAddress; }),
187
- reward_decimals: ((_b = pool.gaugeRewards) !== null && _b !== void 0 ? _b : []).map(function (r) { return r.decimals; }),
188
185
  swap_abi: factory_crypto_pool_2_json_1.default,
189
186
  gauge_abi: gauge_factory_json_1.default,
190
187
  };
@@ -223,8 +220,6 @@ function getFactoryPoolsDataFromApi(isCrypto) {
223
220
  wrapped_coin_addresses: coinAddresses,
224
221
  underlying_decimals: __spreadArray([coinDecimals[0]], basePoolDecimals, true),
225
222
  wrapped_decimals: coinDecimals,
226
- reward_tokens: ((_c = pool.gaugeRewards) !== null && _c !== void 0 ? _c : []).map(function (r) { return r.tokenAddress; }),
227
- reward_decimals: ((_d = pool.gaugeRewards) !== null && _d !== void 0 ? _d : []).map(function (r) { return r.decimals; }),
228
223
  swap_abi: implementationABIDict[pool.implementationAddress],
229
224
  gauge_abi: gauge_factory_json_1.default,
230
225
  deposit_abi: deposit_json_1.default,
@@ -248,8 +243,6 @@ function getFactoryPoolsDataFromApi(isCrypto) {
248
243
  wrapped_coin_addresses: coinAddresses,
249
244
  underlying_decimals: coinDecimals,
250
245
  wrapped_decimals: coinDecimals,
251
- reward_tokens: ((_e = pool.gaugeRewards) !== null && _e !== void 0 ? _e : []).map(function (r) { return r.tokenAddress; }),
252
- reward_decimals: ((_f = pool.gaugeRewards) !== null && _f !== void 0 ? _f : []).map(function (r) { return r.decimals; }),
253
246
  swap_abi: implementationABIDict[pool.implementationAddress],
254
247
  gauge_abi: gauge_factory_json_1.default,
255
248
  };
@@ -30,8 +30,6 @@ export interface IPoolData {
30
30
  underlying_decimals: number[];
31
31
  wrapped_decimals: number[];
32
32
  use_lending?: boolean[];
33
- reward_tokens?: string[];
34
- reward_decimals?: number[];
35
33
  swap_abi: any;
36
34
  gauge_abi: any;
37
35
  deposit_abi?: any;
@@ -1,3 +1,4 @@
1
+ import memoize from "memoizee";
1
2
  import { IDict, IReward } from '../interfaces';
2
3
  export declare class PoolTemplate {
3
4
  id: string;
@@ -26,7 +27,6 @@ export declare class PoolTemplate {
26
27
  underlyingDecimals: number[];
27
28
  wrappedDecimals: number[];
28
29
  useLending: boolean[];
29
- rewardTokens: string[];
30
30
  estimateGas: {
31
31
  depositApprove: (amounts: (number | string)[]) => Promise<number>;
32
32
  deposit: (amounts: (number | string)[]) => Promise<number>;
@@ -123,6 +123,15 @@ export declare class PoolTemplate {
123
123
  claimableCrv(address?: string): Promise<string>;
124
124
  claimCrvEstimateGas(): Promise<number>;
125
125
  claimCrv(): Promise<string>;
126
+ rewardTokens: (() => Promise<{
127
+ token: string;
128
+ symbol: string;
129
+ decimals: number;
130
+ }[]>) & memoize.Memoized<() => Promise<{
131
+ token: string;
132
+ symbol: string;
133
+ decimals: number;
134
+ }[]>>;
126
135
  claimableRewards(address?: string): Promise<{
127
136
  token: string;
128
137
  symbol: string;