@curvefi/api 2.3.2 → 2.3.3

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.
@@ -2,17 +2,18 @@ import { IDict } from "../interfaces";
2
2
  export declare const implementationABIDictEthereum: IDict<any>;
3
3
  export declare const implementationABIDictPolygon: IDict<any>;
4
4
  export declare const implementationABIDictAvalanche: IDict<any>;
5
- export declare const implementationBasePoolAddressDictEthereum: IDict<any>;
6
- export declare const implementationBasePoolAddressDictPolygon: IDict<any>;
7
- export declare const implementationBasePoolAddressDictAvalanche: IDict<any>;
8
- export declare const basePoolAddressIdDictEthereum: IDict<string>;
9
- export declare const basePoolAddressIdDictPolygon: IDict<string>;
10
- export declare const basePoolAddressIdDictAvalanche: IDict<string>;
5
+ export declare const implementationBasePoolIdDictEthereum: IDict<string>;
6
+ export declare const implementationBasePoolIdDictPolygon: IDict<string>;
7
+ export declare const implementationBasePoolIdDictAvalanche: IDict<string>;
11
8
  export declare const basePoolIdZapDictEthereum: IDict<string>;
12
9
  export declare const basePoolIdZapDictPolygon: IDict<string>;
13
10
  export declare const basePoolIdZapDictAvalanche: IDict<string>;
14
11
  export declare const WETH_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
15
12
  export declare const ETH_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
16
13
  export declare const FACTORY_CONSTANTS: {
17
- [index: number]: any;
14
+ [index: number]: {
15
+ implementationABIDict: IDict<any>;
16
+ implementationBasePoolIdDict: IDict<string>;
17
+ basePoolIdZapDict: IDict<string>;
18
+ };
18
19
  };
@@ -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.ETH_ADDRESS = exports.WETH_ADDRESS = exports.basePoolIdZapDictAvalanche = exports.basePoolIdZapDictPolygon = exports.basePoolIdZapDictEthereum = exports.basePoolAddressIdDictAvalanche = exports.basePoolAddressIdDictPolygon = exports.basePoolAddressIdDictEthereum = exports.implementationBasePoolAddressDictAvalanche = exports.implementationBasePoolAddressDictPolygon = exports.implementationBasePoolAddressDictEthereum = exports.implementationABIDictAvalanche = exports.implementationABIDictPolygon = exports.implementationABIDictEthereum = void 0;
6
+ exports.FACTORY_CONSTANTS = exports.ETH_ADDRESS = exports.WETH_ADDRESS = exports.basePoolIdZapDictAvalanche = exports.basePoolIdZapDictPolygon = exports.basePoolIdZapDictEthereum = exports.implementationBasePoolIdDictAvalanche = exports.implementationBasePoolIdDictPolygon = exports.implementationBasePoolIdDictEthereum = exports.implementationABIDictAvalanche = 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"));
@@ -84,42 +84,28 @@ exports.implementationABIDictAvalanche = {
84
84
  "0x0eb0F1FaF5F509Ac53fA224477509EAD167cf410": Plain4ETH_json_1.default,
85
85
  "0xCE94D3E5b0D80565D7B713A687b39a3Dc81780BA": Plain4Optimized_json_1.default,
86
86
  };
87
- exports.implementationBasePoolAddressDictEthereum = {
88
- "0x5F890841f657d90E081bAbdB532A05996Af79Fe6": "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7",
89
- "0x213be373FDff327658139C7df330817DAD2d5bBE": "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7",
90
- "0x55Aa9BF126bCABF0bDC17Fa9E39Ec9239e1ce7A9": "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7",
91
- "0x33bB0e62d5e8C688E645Dd46DFb48Cd613250067": "0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2",
92
- "0x2EB24483Ef551dA247ab87Cf18e1Cc980073032D": "0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2",
93
- "0xC6A8466d128Fbfd34AdA64a9FFFce325D57C9a52": "0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714",
94
- "0xc4C78b08fA0c3d0a312605634461A88184Ecd630": "0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714",
95
- "0xECAaecd9d2193900b424774133B1f51ae0F29d9E": "0x93054188d876f558f4a66B2EF1d97d16eDf0895B",
96
- "0x40fD58D44cFE63E8517c9Bb3ac98676838Ea56A8": "0x93054188d876f558f4a66B2EF1d97d16eDf0895B", // ren
87
+ exports.implementationBasePoolIdDictEthereum = {
88
+ "0x5F890841f657d90E081bAbdB532A05996Af79Fe6": "3pool",
89
+ "0x213be373FDff327658139C7df330817DAD2d5bBE": "3pool",
90
+ "0x55Aa9BF126bCABF0bDC17Fa9E39Ec9239e1ce7A9": "3pool",
91
+ "0x33bB0e62d5e8C688E645Dd46DFb48Cd613250067": "fraxusdc",
92
+ "0x2EB24483Ef551dA247ab87Cf18e1Cc980073032D": "fraxusdc",
93
+ "0xC6A8466d128Fbfd34AdA64a9FFFce325D57C9a52": "sbtc",
94
+ "0xc4C78b08fA0c3d0a312605634461A88184Ecd630": "sbtc",
95
+ "0xECAaecd9d2193900b424774133B1f51ae0F29d9E": "ren",
96
+ "0x40fD58D44cFE63E8517c9Bb3ac98676838Ea56A8": "ren",
97
97
  };
98
- exports.implementationBasePoolAddressDictPolygon = {
99
- "0x4fb93D7d320E8A263F22f62C2059dFC2A8bCbC4c": "0x445FE580eF8d70FF569aB36e80c647af338db351",
100
- "0x39fE1824f98CD828050D7c51dA443E84121c7cf1": "0x445FE580eF8d70FF569aB36e80c647af338db351",
101
- "0xC05EB760A135d3D0c839f1141423002681157a17": "0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67",
102
- "0xD8336532f6ED7b94282fAF724fe41d6145E07Cfc": "0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67", // ren
98
+ exports.implementationBasePoolIdDictPolygon = {
99
+ "0x4fb93D7d320E8A263F22f62C2059dFC2A8bCbC4c": "aave",
100
+ "0x39fE1824f98CD828050D7c51dA443E84121c7cf1": "aave",
101
+ "0xC05EB760A135d3D0c839f1141423002681157a17": "ren",
102
+ "0xD8336532f6ED7b94282fAF724fe41d6145E07Cfc": "ren",
103
103
  };
104
- exports.implementationBasePoolAddressDictAvalanche = {
105
- "0xA237034249290De2B07988Ac64b96f22c0E76fE0": "0x7f90122BF0700F9E7e1F688fe926940E8839F353",
106
- "0xc50C05Ca1f8C2346664bd0d4a1eb6aC1Da38414f": "0x7f90122BF0700F9E7e1F688fe926940E8839F353",
107
- "0xa27f39E9C21b3376F43266E13Ad5A5d6E9BdB320": "0x16a7DA911A4DD1d83F3fF066fE28F3C792C50d90",
108
- "0x505C34ED8dBE96d2D5C7D83158aA844887770970": "0x16a7DA911A4DD1d83F3fF066fE28F3C792C50d90", // ren
109
- };
110
- exports.basePoolAddressIdDictEthereum = {
111
- "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7": "3pool",
112
- "0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2": "fraxusdc",
113
- "0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714": "sbtc",
114
- "0x93054188d876f558f4a66B2EF1d97d16eDf0895B": "ren",
115
- };
116
- exports.basePoolAddressIdDictPolygon = {
117
- "0x445FE580eF8d70FF569aB36e80c647af338db351": "aave",
118
- "0xC2d95EEF97Ec6C17551d45e77B590dc1F9117C67": "ren",
119
- };
120
- exports.basePoolAddressIdDictAvalanche = {
121
- "0x7f90122BF0700F9E7e1F688fe926940E8839F353": "aave",
122
- "0x16a7DA911A4DD1d83F3fF066fE28F3C792C50d90": "ren",
104
+ exports.implementationBasePoolIdDictAvalanche = {
105
+ "0xA237034249290De2B07988Ac64b96f22c0E76fE0": "aave",
106
+ "0xc50C05Ca1f8C2346664bd0d4a1eb6aC1Da38414f": "aave",
107
+ "0xa27f39E9C21b3376F43266E13Ad5A5d6E9BdB320": "ren",
108
+ "0x505C34ED8dBE96d2D5C7D83158aA844887770970": "ren",
123
109
  };
124
110
  exports.basePoolIdZapDictEthereum = {
125
111
  '3pool': "0xA79828DF1850E8a3A3064576f380D90aECDD3359".toLowerCase(),
@@ -140,20 +126,17 @@ exports.ETH_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
140
126
  exports.FACTORY_CONSTANTS = {
141
127
  1: {
142
128
  implementationABIDict: exports.implementationABIDictEthereum,
143
- implementationBasePoolAddressDict: exports.implementationBasePoolAddressDictEthereum,
144
- basePoolAddressIdDict: exports.basePoolAddressIdDictEthereum,
129
+ implementationBasePoolIdDict: exports.implementationBasePoolIdDictEthereum,
145
130
  basePoolIdZapDict: exports.basePoolIdZapDictEthereum,
146
131
  },
147
132
  137: {
148
133
  implementationABIDict: exports.implementationABIDictPolygon,
149
- implementationBasePoolAddressDict: exports.implementationBasePoolAddressDictPolygon,
150
- basePoolAddressIdDict: exports.basePoolAddressIdDictPolygon,
134
+ implementationBasePoolIdDict: exports.implementationBasePoolIdDictPolygon,
151
135
  basePoolIdZapDict: exports.basePoolIdZapDictPolygon,
152
136
  },
153
137
  43114: {
154
138
  implementationABIDict: exports.implementationABIDictAvalanche,
155
- implementationBasePoolAddressDict: exports.implementationBasePoolAddressDictAvalanche,
156
- basePoolAddressIdDict: exports.basePoolAddressIdDictAvalanche,
139
+ implementationBasePoolIdDict: exports.implementationBasePoolIdDictAvalanche,
157
140
  basePoolIdZapDict: exports.basePoolIdZapDictAvalanche,
158
141
  },
159
142
  };
@@ -188,16 +188,16 @@ function getFactoryPoolsDataFromApi(isCrypto) {
188
188
  }
189
189
  else if (pool.implementation.startsWith("meta")) {
190
190
  var implementationABIDict = constants_1.FACTORY_CONSTANTS[_this.chainId].implementationABIDict;
191
- var implementationBasePoolAddressDict = constants_1.FACTORY_CONSTANTS[_this.chainId].implementationBasePoolAddressDict;
192
- var basePoolAddressIdDict = constants_1.FACTORY_CONSTANTS[_this.chainId].basePoolAddressIdDict; // @ts-ignore
193
- var basePoolIdCoinsDict = Object.fromEntries(Object.values(basePoolAddressIdDict).map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_coins]; }));
191
+ var implementationBasePoolIdDict = constants_1.FACTORY_CONSTANTS[_this.chainId].implementationBasePoolIdDict;
192
+ var basePoolIds = Object.values(implementationBasePoolIdDict).filter(function (poolId, i, arr) { return arr.indexOf(poolId) === i; });
194
193
  // @ts-ignore
195
- var basePoolIdCoinAddressesDict = Object.fromEntries(Object.values(basePoolAddressIdDict).map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_coin_addresses]; }));
194
+ var basePoolIdCoinsDict = Object.fromEntries(basePoolIds.map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_coins]; }));
196
195
  // @ts-ignore
197
- var basePoolIdDecimalsDict = Object.fromEntries(Object.values(basePoolAddressIdDict).map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_decimals]; }));
196
+ var basePoolIdCoinAddressesDict = Object.fromEntries(basePoolIds.map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_coin_addresses]; }));
197
+ // @ts-ignore
198
+ var basePoolIdDecimalsDict = Object.fromEntries(basePoolIds.map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_decimals]; }));
198
199
  var basePoolIdZapDict = constants_1.FACTORY_CONSTANTS[_this.chainId].basePoolIdZapDict;
199
- var basePoolAddress = implementationBasePoolAddressDict[pool.implementationAddress];
200
- var basePoolId = basePoolAddressIdDict[basePoolAddress];
200
+ var basePoolId = implementationBasePoolIdDict[pool.implementationAddress];
201
201
  var basePoolCoinNames = basePoolIdCoinsDict[basePoolId];
202
202
  var basePoolCoinAddresses = basePoolIdCoinAddressesDict[basePoolId];
203
203
  var basePoolDecimals = basePoolIdDecimalsDict[basePoolId];
@@ -94,14 +94,12 @@ function getFactoryIdsAndSwapAddresses() {
94
94
  });
95
95
  });
96
96
  }
97
- function getFactorySwapABIs(factorySwapAddresses) {
97
+ function getFactoryImplementations(factorySwapAddresses) {
98
98
  return __awaiter(this, void 0, void 0, function () {
99
- var implementationABIDict, factoryMulticallContract, calls, _i, factorySwapAddresses_1, addr, implementationAddresses;
99
+ var factoryMulticallContract, calls, _i, factorySwapAddresses_1, addr;
100
100
  return __generator(this, function (_a) {
101
101
  switch (_a.label) {
102
- case 0:
103
- implementationABIDict = constants_1.FACTORY_CONSTANTS[this.chainId].implementationABIDict;
104
- return [4 /*yield*/, this.contracts[this.constants.ALIASES.factory].multicallContract];
102
+ case 0: return [4 /*yield*/, this.contracts[this.constants.ALIASES.factory].multicallContract];
105
103
  case 1:
106
104
  factoryMulticallContract = _a.sent();
107
105
  calls = [];
@@ -110,9 +108,7 @@ function getFactorySwapABIs(factorySwapAddresses) {
110
108
  calls.push(factoryMulticallContract.get_implementation_address(addr));
111
109
  }
112
110
  return [4 /*yield*/, this.multicallProvider.all(calls)];
113
- case 2:
114
- implementationAddresses = _a.sent();
115
- return [2 /*return*/, implementationAddresses.map(function (addr) { return implementationABIDict[addr]; })];
111
+ case 2: return [2 /*return*/, _a.sent()];
116
112
  }
117
113
  });
118
114
  });
@@ -349,37 +345,20 @@ function getFactoryIsMeta(factorySwapAddresses) {
349
345
  });
350
346
  });
351
347
  }
352
- function getFactoryBasePoolAddresses(factorySwapAddresses) {
353
- return __awaiter(this, void 0, void 0, function () {
354
- var factoryMulticallContract, calls, _i, factorySwapAddresses_7, addr;
355
- return __generator(this, function (_a) {
356
- switch (_a.label) {
357
- case 0: return [4 /*yield*/, this.contracts[this.constants.ALIASES.factory].multicallContract];
358
- case 1:
359
- factoryMulticallContract = _a.sent();
360
- calls = [];
361
- for (_i = 0, factorySwapAddresses_7 = factorySwapAddresses; _i < factorySwapAddresses_7.length; _i++) {
362
- addr = factorySwapAddresses_7[_i];
363
- calls.push(factoryMulticallContract.get_base_pool(addr));
364
- }
365
- return [4 /*yield*/, this.multicallProvider.all(calls)];
366
- case 2: return [2 /*return*/, _a.sent()];
367
- }
368
- });
369
- });
370
- }
371
348
  function getFactoryPoolData() {
372
349
  return __awaiter(this, void 0, void 0, function () {
373
- var _a, poolIds, swapAddresses, swapABIs, gaugeAddresses, _b, poolSymbols, poolNames, referenceAssets, coinAddresses, existingCoinAddressNameDict, coinAddressNameDict, coinAddressDecimalsDict, isMeta, basePoolAddresses, basePoolAddressIdDict, basePoolIds, basePoolIdCoinsDict, basePoolIdCoinAddressesDict, basePoolIdDecimalsDict, basePoolIdZapDict, FACTORY_POOLS_DATA, i;
350
+ var _a, poolIds, swapAddresses, implementations, implementationABIDict, swapABIs, gaugeAddresses, _b, poolSymbols, poolNames, referenceAssets, coinAddresses, existingCoinAddressNameDict, coinAddressNameDict, coinAddressDecimalsDict, isMeta, implementationBasePoolIdDict, basePoolIds, basePoolIdCoinsDict, basePoolIdCoinAddressesDict, basePoolIdDecimalsDict, basePoolIdZapDict, FACTORY_POOLS_DATA, i;
374
351
  var _this = this;
375
352
  return __generator(this, function (_c) {
376
353
  switch (_c.label) {
377
354
  case 0: return [4 /*yield*/, getFactoryIdsAndSwapAddresses.call(this)];
378
355
  case 1:
379
356
  _a = _c.sent(), poolIds = _a[0], swapAddresses = _a[1];
380
- return [4 /*yield*/, getFactorySwapABIs.call(this, swapAddresses)];
357
+ return [4 /*yield*/, getFactoryImplementations.call(this, swapAddresses)];
381
358
  case 2:
382
- swapABIs = _c.sent();
359
+ implementations = _c.sent();
360
+ implementationABIDict = constants_1.FACTORY_CONSTANTS[this.chainId].implementationABIDict;
361
+ swapABIs = implementations.map(function (addr) { return implementationABIDict[addr]; });
383
362
  setFactorySwapContracts.call(this, swapAddresses, swapABIs);
384
363
  return [4 /*yield*/, getFactoryGaugeAddresses.call(this, swapAddresses)];
385
364
  case 3:
@@ -405,15 +384,12 @@ function getFactoryPoolData() {
405
384
  return [4 /*yield*/, getFactoryIsMeta.call(this, swapAddresses)];
406
385
  case 9:
407
386
  isMeta = _c.sent();
408
- return [4 /*yield*/, getFactoryBasePoolAddresses.call(this, swapAddresses)];
409
- case 10:
410
- basePoolAddresses = _c.sent();
387
+ implementationBasePoolIdDict = constants_1.FACTORY_CONSTANTS[this.chainId].implementationBasePoolIdDict;
388
+ basePoolIds = implementations.map(function (addr) { return implementationBasePoolIdDict[addr]; });
411
389
  common_1.setFactoryZapContracts.call(this);
412
- basePoolAddressIdDict = constants_1.FACTORY_CONSTANTS[this.chainId].basePoolAddressIdDict;
413
- basePoolIds = basePoolAddresses.map(function (addr) { return basePoolAddressIdDict[addr]; });
414
- basePoolIdCoinsDict = Object.fromEntries(Object.values(basePoolAddressIdDict).map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_coins]; }));
415
- basePoolIdCoinAddressesDict = Object.fromEntries(Object.values(basePoolAddressIdDict).map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_coin_addresses]; }));
416
- basePoolIdDecimalsDict = Object.fromEntries(Object.values(basePoolAddressIdDict).map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_decimals]; }));
390
+ basePoolIdCoinsDict = Object.fromEntries(basePoolIds.map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_coins]; }));
391
+ basePoolIdCoinAddressesDict = Object.fromEntries(basePoolIds.map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_coin_addresses]; }));
392
+ basePoolIdDecimalsDict = Object.fromEntries(basePoolIds.map(function (poolId) { return [poolId, _this.constants.POOLS_DATA[poolId].underlying_decimals]; }));
417
393
  basePoolIdZapDict = constants_1.FACTORY_CONSTANTS[this.chainId].basePoolIdZapDict;
418
394
  FACTORY_POOLS_DATA = {};
419
395
  for (i = 0; i < poolIds.length; i++) {
@@ -1225,9 +1225,9 @@ var PoolTemplate = /** @class */ (function () {
1225
1225
  PoolTemplate.prototype.claimableRewards = function (address) {
1226
1226
  if (address === void 0) { address = ""; }
1227
1227
  return __awaiter(this, void 0, void 0, function () {
1228
- var gaugeContract, rewardTokens, rewards, _i, rewardTokens_2, rewardToken, amount, _a, _c, rewardToken, _totalAmount, _claimedAmount;
1229
- return __generator(this, function (_d) {
1230
- switch (_d.label) {
1228
+ var gaugeContract, rewardTokens, rewards, _i, rewardTokens_2, rewardToken, _amount, rewardToken, _totalAmount, _claimedAmount;
1229
+ return __generator(this, function (_a) {
1230
+ switch (_a.label) {
1231
1231
  case 0:
1232
1232
  if (this.gauge === ethers_1.ethers.constants.AddressZero) {
1233
1233
  throw Error("claimableRewards method doesn't exist for pool ".concat(this.name, " (id: ").concat(this.name, "). There is no gauge"));
@@ -1238,24 +1238,23 @@ var PoolTemplate = /** @class */ (function () {
1238
1238
  gaugeContract = curve_1.curve.contracts[this.gauge].contract;
1239
1239
  return [4 /*yield*/, this.rewardTokens()];
1240
1240
  case 1:
1241
- rewardTokens = _d.sent();
1241
+ rewardTokens = _a.sent();
1242
1242
  rewards = [];
1243
1243
  if (!('claimable_reward(address,address)' in gaugeContract)) return [3 /*break*/, 6];
1244
1244
  _i = 0, rewardTokens_2 = rewardTokens;
1245
- _d.label = 2;
1245
+ _a.label = 2;
1246
1246
  case 2:
1247
1247
  if (!(_i < rewardTokens_2.length)) return [3 /*break*/, 5];
1248
1248
  rewardToken = rewardTokens_2[_i];
1249
- _c = (_a = ethers_1.ethers.utils).formatUnits;
1250
- return [4 /*yield*/, gaugeContract.claimable_reward(address, rewardToken, curve_1.curve.constantOptions)];
1249
+ return [4 /*yield*/, gaugeContract.claimable_reward(address, rewardToken.token, curve_1.curve.constantOptions)];
1251
1250
  case 3:
1252
- amount = _c.apply(_a, [_d.sent(), rewardToken.decimals]);
1251
+ _amount = _a.sent();
1253
1252
  rewards.push({
1254
1253
  token: rewardToken.token,
1255
1254
  symbol: rewardToken.symbol,
1256
- amount: amount,
1255
+ amount: ethers_1.ethers.utils.formatUnits(_amount, rewardToken.decimals),
1257
1256
  });
1258
- _d.label = 4;
1257
+ _a.label = 4;
1259
1258
  case 4:
1260
1259
  _i++;
1261
1260
  return [3 /*break*/, 2];
@@ -1265,16 +1264,16 @@ var PoolTemplate = /** @class */ (function () {
1265
1264
  rewardToken = rewardTokens[0];
1266
1265
  return [4 /*yield*/, gaugeContract.claimable_reward(address, curve_1.curve.constantOptions)];
1267
1266
  case 7:
1268
- _totalAmount = _d.sent();
1267
+ _totalAmount = _a.sent();
1269
1268
  return [4 /*yield*/, gaugeContract.claimed_rewards_for(address, curve_1.curve.constantOptions)];
1270
1269
  case 8:
1271
- _claimedAmount = _d.sent();
1270
+ _claimedAmount = _a.sent();
1272
1271
  rewards.push({
1273
1272
  token: rewardToken.token,
1274
1273
  symbol: rewardToken.symbol,
1275
1274
  amount: ethers_1.ethers.utils.formatUnits(_totalAmount.sub(_claimedAmount), rewardToken.decimals),
1276
1275
  });
1277
- _d.label = 9;
1276
+ _a.label = 9;
1278
1277
  case 9: return [2 /*return*/, rewards];
1279
1278
  }
1280
1279
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",