@curvefi/api 1.25.2 → 2.0.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.
Files changed (213) hide show
  1. package/README.md +775 -589
  2. package/docs/v1/README.md +916 -0
  3. package/lib/boosting.d.ts +12 -12
  4. package/lib/boosting.js +23 -23
  5. package/lib/constants/abis/{json/2pool → 2pool}/swap.json +0 -0
  6. package/lib/constants/abis/{json/3pool → 3pool}/swap.json +0 -0
  7. package/lib/constants/abis/{json/4pool → 4pool}/swap.json +0 -0
  8. package/lib/constants/abis/{json/ERC20.json → ERC20.json} +0 -0
  9. package/lib/constants/abis/{json/aave → aave}/rewards.json +0 -0
  10. package/lib/constants/abis/{json/aave → aave}/swap.json +0 -0
  11. package/lib/constants/abis/{json/address_provider.json → address_provider.json} +0 -0
  12. package/lib/constants/abis/{json/ankreth → ankreth}/sCurveRewards.json +0 -0
  13. package/lib/constants/abis/{json/ankreth → ankreth}/swap.json +0 -0
  14. package/lib/constants/abis/{json/atricrypto3 → atricrypto3}/swap.json +0 -0
  15. package/lib/constants/abis/{json/atricrypto3 → atricrypto3}/zap.json +0 -0
  16. package/lib/constants/abis/{json/bbtc → bbtc}/deposit.json +0 -0
  17. package/lib/constants/abis/{json/bbtc → bbtc}/swap.json +0 -0
  18. package/lib/constants/abis/{json/busd → busd}/deposit.json +0 -0
  19. package/lib/constants/abis/{json/busd → busd}/swap.json +0 -0
  20. package/lib/constants/abis/{json/cERC20.json → cERC20.json} +0 -0
  21. package/lib/constants/abis/{json/compound → compound}/deposit.json +0 -0
  22. package/lib/constants/abis/{json/compound → compound}/swap.json +0 -0
  23. package/lib/constants/abis/{json/crveth → crveth}/swap.json +0 -0
  24. package/lib/constants/abis/{json/deposit_and_stake.json → deposit_and_stake.json} +0 -0
  25. package/lib/constants/abis/{json/dusd → dusd}/deposit.json +0 -0
  26. package/lib/constants/abis/{json/dusd → dusd}/sCurveRewards.json +0 -0
  27. package/lib/constants/abis/{json/dusd → dusd}/swap.json +0 -0
  28. package/lib/constants/abis/{json/eurs → eurs}/sCurveRewards.json +0 -0
  29. package/lib/constants/abis/{json/eurs → eurs}/swap.json +0 -0
  30. package/lib/constants/abis/{json/eursusd → eursusd}/swap.json +0 -0
  31. package/lib/constants/abis/{json/eurt → eurt}/swap.json +0 -0
  32. package/lib/constants/abis/{json/eurtusd → eurtusd}/deposit.json +0 -0
  33. package/lib/constants/abis/{json/eurtusd → eurtusd}/swap.json +0 -0
  34. package/lib/constants/abis/{json/factory-crypto → factory-crypto}/factory-crypto-pool-2.json +0 -0
  35. package/lib/constants/abis/{json/factory-crypto.json → factory-crypto.json} +0 -0
  36. package/lib/constants/abis/{json/factory-v2 → factory-v2}/DepositZapMetaBtcPolygon.json +0 -0
  37. package/lib/constants/abis/{json/factory-v2 → factory-v2}/DepositZapMetaUsdPolygon.json +0 -0
  38. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTC.json +0 -0
  39. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTCBalances.json +0 -0
  40. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTCBalancesRen.json +0 -0
  41. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTCRen.json +0 -0
  42. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaUSD.json +0 -0
  43. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaUSDBalances.json +0 -0
  44. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2Balances.json +0 -0
  45. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2Basic.json +0 -0
  46. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2ETH.json +0 -0
  47. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2Optimized.json +0 -0
  48. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3Balances.json +0 -0
  49. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3Basic.json +0 -0
  50. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3ETH.json +0 -0
  51. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3Optimized.json +0 -0
  52. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4Balances.json +0 -0
  53. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4Basic.json +0 -0
  54. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4ETH.json +0 -0
  55. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4Optimized.json +0 -0
  56. package/lib/constants/abis/{json/factory.json → factory.json} +0 -0
  57. package/lib/constants/abis/{json/factoryPools → factoryPools}/deposit.json +0 -0
  58. package/lib/constants/abis/{json/factoryPools → factoryPools}/rewards.json +0 -0
  59. package/lib/constants/abis/{json/factoryPools → factoryPools}/swap.json +0 -0
  60. package/lib/constants/abis/{json/gauge.json → gauge.json} +0 -0
  61. package/lib/constants/abis/{json/gauge_factory.json → gauge_factory.json} +0 -0
  62. package/lib/constants/abis/{json/gauge_rewards_only.json → gauge_rewards_only.json} +0 -0
  63. package/lib/constants/abis/{json/gauge_synthetix.json → gauge_synthetix.json} +0 -0
  64. package/lib/constants/abis/{json/gauge_v2.json → gauge_v2.json} +0 -0
  65. package/lib/constants/abis/{json/gauge_v3.json → gauge_v3.json} +0 -0
  66. package/lib/constants/abis/{json/gauge_v4.json → gauge_v4.json} +0 -0
  67. package/lib/constants/abis/{json/gauge_v5.json → gauge_v5.json} +0 -0
  68. package/lib/constants/abis/{json/gaugecontroller.json → gaugecontroller.json} +0 -0
  69. package/lib/constants/abis/{json/gusd → gusd}/deposit.json +0 -0
  70. package/lib/constants/abis/{json/gusd → gusd}/swap.json +0 -0
  71. package/lib/constants/abis/{json/hbtc → hbtc}/swap.json +0 -0
  72. package/lib/constants/abis/{json/husd → husd}/deposit.json +0 -0
  73. package/lib/constants/abis/{json/husd → husd}/swap.json +0 -0
  74. package/lib/constants/abis/{json/ib → ib}/swap.json +0 -0
  75. package/lib/constants/abis/{json/iearn → iearn}/deposit.json +0 -0
  76. package/lib/constants/abis/{json/iearn → iearn}/sCurveRewards.json +0 -0
  77. package/lib/constants/abis/{json/iearn → iearn}/swap.json +0 -0
  78. package/lib/constants/abis/{json/link → link}/swap.json +0 -0
  79. package/lib/constants/abis/{json/minter.json → minter.json} +0 -0
  80. package/lib/constants/abis/{json/musd → musd}/deposit.json +0 -0
  81. package/lib/constants/abis/{json/musd → musd}/sCurveRewards.json +0 -0
  82. package/lib/constants/abis/{json/musd → musd}/swap.json +0 -0
  83. package/lib/constants/abis/{json/obtc → obtc}/deposit.json +0 -0
  84. package/lib/constants/abis/{json/obtc → obtc}/sCurveRewards.json +0 -0
  85. package/lib/constants/abis/{json/obtc → obtc}/swap.json +0 -0
  86. package/lib/constants/abis/{json/paave → paave}/rewards.json +0 -0
  87. package/lib/constants/abis/{json/pax → pax}/deposit.json +0 -0
  88. package/lib/constants/abis/{json/pax → pax}/swap.json +0 -0
  89. package/lib/constants/abis/{json/pbtc → pbtc}/deposit.json +0 -0
  90. package/lib/constants/abis/{json/pbtc → pbtc}/sCurveRewards.json +0 -0
  91. package/lib/constants/abis/{json/pbtc → pbtc}/swap.json +0 -0
  92. package/lib/constants/abis/{json/rai → rai}/deposit.json +0 -0
  93. package/lib/constants/abis/{json/rai → rai}/swap.json +0 -0
  94. package/lib/constants/abis/{json/registry_exchange.json → registry_exchange.json} +0 -0
  95. package/lib/constants/abis/{json/ren → ren}/swap.json +0 -0
  96. package/lib/constants/abis/{json/ren-polygon → ren-polygon}/swap.json +0 -0
  97. package/lib/constants/abis/{json/reth → reth}/swap.json +0 -0
  98. package/lib/constants/abis/{json/router.json → router.json} +0 -0
  99. package/lib/constants/abis/{json/rsv → rsv}/deposit.json +0 -0
  100. package/lib/constants/abis/{json/rsv → rsv}/sCurveRewards.json +0 -0
  101. package/lib/constants/abis/{json/rsv → rsv}/swap.json +0 -0
  102. package/lib/constants/abis/{json/saave → saave}/swap.json +0 -0
  103. package/lib/constants/abis/{json/sbtc → sbtc}/sCurveRewards.json +0 -0
  104. package/lib/constants/abis/{json/sbtc → sbtc}/swap.json +0 -0
  105. package/lib/constants/abis/{json/seth → seth}/swap.json +0 -0
  106. package/lib/constants/abis/{json/steth → steth}/sCurveRewards.json +0 -0
  107. package/lib/constants/abis/{json/steth → steth}/swap.json +0 -0
  108. package/lib/constants/abis/{json/streamer.json → streamer.json} +0 -0
  109. package/lib/constants/abis/{json/susdv2 → susdv2}/deposit.json +0 -0
  110. package/lib/constants/abis/{json/susdv2 → susdv2}/sCurveRewards.json +0 -0
  111. package/lib/constants/abis/{json/susdv2 → susdv2}/swap.json +0 -0
  112. package/lib/constants/abis/{json/tbtc → tbtc}/deposit.json +0 -0
  113. package/lib/constants/abis/{json/tbtc → tbtc}/sCurveRewards.json +0 -0
  114. package/lib/constants/abis/{json/tbtc → tbtc}/swap.json +0 -0
  115. package/lib/constants/abis/{json/tricrypto2 → tricrypto2}/deposit.json +0 -0
  116. package/lib/constants/abis/{json/tricrypto2 → tricrypto2}/swap.json +0 -0
  117. package/lib/constants/abis/{json/usdk → usdk}/deposit.json +0 -0
  118. package/lib/constants/abis/{json/usdk → usdk}/swap.json +0 -0
  119. package/lib/constants/abis/{json/usdn → usdn}/deposit.json +0 -0
  120. package/lib/constants/abis/{json/usdn → usdn}/swap.json +0 -0
  121. package/lib/constants/abis/{json/usdp → usdp}/deposit.json +0 -0
  122. package/lib/constants/abis/{json/usdp → usdp}/swap.json +0 -0
  123. package/lib/constants/abis/{json/usdt → usdt}/deposit.json +0 -0
  124. package/lib/constants/abis/{json/usdt → usdt}/swap.json +0 -0
  125. package/lib/constants/abis/{json/ust → ust}/deposit.json +0 -0
  126. package/lib/constants/abis/{json/ust → ust}/swap.json +0 -0
  127. package/lib/constants/abis/{json/votingescrow.json → votingescrow.json} +0 -0
  128. package/lib/constants/abis/{json/yERC20.json → yERC20.json} +0 -0
  129. package/lib/constants/aliases.d.ts +2 -24
  130. package/lib/constants/aliases.js +5 -4
  131. package/lib/constants/{coins-ethereum.d.ts → coins/ethereum.d.ts} +0 -9
  132. package/lib/constants/{coins-ethereum.js → coins/ethereum.js} +12 -23
  133. package/lib/constants/{coins-polygon.d.ts → coins/polygon.d.ts} +0 -12
  134. package/lib/constants/{coins-polygon.js → coins/polygon.js} +8 -20
  135. package/lib/constants/pools/ethereum.d.ts +2 -0
  136. package/lib/constants/{abis/abis-ethereum.js → pools/ethereum.js} +517 -1012
  137. package/lib/constants/pools/index.d.ts +3 -0
  138. package/lib/constants/pools/index.js +7 -0
  139. package/lib/constants/pools/polygon.d.ts +4 -0
  140. package/lib/constants/{abis/abis-polygon.js → pools/polygon.js} +52 -80
  141. package/lib/constants/utils.d.ts +5 -0
  142. package/lib/constants/utils.js +69 -0
  143. package/lib/curve.d.ts +10 -32
  144. package/lib/curve.js +188 -232
  145. package/lib/external-api.d.ts +3 -2
  146. package/lib/external-api.js +18 -1
  147. package/lib/factory/constants.d.ts +15 -15
  148. package/lib/factory/constants.js +19 -19
  149. package/lib/factory/factory-api.d.ts +2 -2
  150. package/lib/factory/factory-api.js +34 -49
  151. package/lib/factory/factory-crypto.d.ts +2 -2
  152. package/lib/factory/factory-crypto.js +23 -31
  153. package/lib/factory/factory.d.ts +2 -2
  154. package/lib/factory/factory.js +53 -66
  155. package/lib/index.d.ts +36 -53
  156. package/lib/index.js +27 -35
  157. package/lib/interfaces.d.ts +25 -67
  158. package/lib/pools/PoolTemplate.d.ts +210 -0
  159. package/lib/pools/PoolTemplate.js +2292 -0
  160. package/lib/pools/index.d.ts +3 -0
  161. package/lib/pools/index.js +7 -0
  162. package/lib/pools/mixins/common.d.ts +3 -0
  163. package/lib/pools/mixins/common.js +77 -0
  164. package/lib/pools/mixins/depositBalancedAmountsMixins.d.ts +5 -0
  165. package/lib/pools/mixins/depositBalancedAmountsMixins.js +145 -0
  166. package/lib/pools/mixins/depositBonusMixins.d.ts +5 -0
  167. package/lib/pools/mixins/depositBonusMixins.js +164 -0
  168. package/lib/pools/mixins/depositMixins.d.ts +5 -0
  169. package/lib/pools/mixins/depositMixins.js +373 -0
  170. package/lib/pools/mixins/depositWrappedMixins.d.ts +3 -0
  171. package/lib/pools/mixins/depositWrappedMixins.js +243 -0
  172. package/lib/pools/mixins/poolBalancesMixin.d.ts +4 -0
  173. package/lib/pools/mixins/poolBalancesMixin.js +129 -0
  174. package/lib/pools/mixins/swapMixins.d.ts +4 -0
  175. package/lib/pools/mixins/swapMixins.js +313 -0
  176. package/lib/pools/mixins/swapWrappedMixins.d.ts +4 -0
  177. package/lib/pools/mixins/swapWrappedMixins.js +297 -0
  178. package/lib/pools/mixins/withdrawExpectedMixins.d.ts +6 -0
  179. package/lib/pools/mixins/withdrawExpectedMixins.js +164 -0
  180. package/lib/pools/mixins/withdrawImbalanceMixins.d.ts +5 -0
  181. package/lib/pools/mixins/withdrawImbalanceMixins.js +348 -0
  182. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.d.ts +3 -0
  183. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.js +207 -0
  184. package/lib/pools/mixins/withdrawMixins.d.ts +5 -0
  185. package/lib/pools/mixins/withdrawMixins.js +347 -0
  186. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.d.ts +5 -0
  187. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.js +104 -0
  188. package/lib/pools/mixins/withdrawOneCoinMixins.d.ts +5 -0
  189. package/lib/pools/mixins/withdrawOneCoinMixins.js +347 -0
  190. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.d.ts +3 -0
  191. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.js +72 -0
  192. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.d.ts +3 -0
  193. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.js +205 -0
  194. package/lib/pools/mixins/withdrawWrappedMixins.d.ts +3 -0
  195. package/lib/pools/mixins/withdrawWrappedMixins.js +206 -0
  196. package/lib/pools/poolConstructor.d.ts +2 -0
  197. package/lib/pools/poolConstructor.js +228 -0
  198. package/lib/pools/utils.d.ts +4 -0
  199. package/lib/pools/utils.js +85 -0
  200. package/lib/router.d.ts +12 -0
  201. package/lib/router.js +624 -0
  202. package/lib/utils.d.ts +10 -16
  203. package/lib/utils.js +33 -126
  204. package/package.json +1 -1
  205. package/lib/constants/abis/abis-ethereum.d.ts +0 -4
  206. package/lib/constants/abis/abis-polygon.d.ts +0 -4
  207. package/lib/constants/abis/json/aRewards.json +0 -1
  208. package/lib/constants/abis/json/compound/migration.json +0 -57
  209. package/lib/constants/abis/json/compound/oldSwap.json +0 -688
  210. package/lib/constants/abis/json/ren/adapter.json +0 -1
  211. package/lib/constants/abis/json/sbtc/adapter.json +0 -1
  212. package/lib/pools.d.ts +0 -267
  213. package/lib/pools.js +0 -4752
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports._getMainPoolsGaugeRewards = exports._getPoolsFromApi = void 0;
42
+ exports._getMainPoolsGaugeRewards = exports._getSubgraphData = exports._getPoolsFromApi = void 0;
43
43
  var axios_1 = __importDefault(require("axios"));
44
44
  var memoizee_1 = __importDefault(require("memoizee"));
45
45
  exports._getPoolsFromApi = (0, memoizee_1.default)(function (network, poolType) { return __awaiter(void 0, void 0, void 0, function () {
@@ -59,6 +59,23 @@ exports._getPoolsFromApi = (0, memoizee_1.default)(function (network, poolType)
59
59
  promise: true,
60
60
  maxAge: 5 * 60 * 1000, // 5m
61
61
  });
62
+ exports._getSubgraphData = (0, memoizee_1.default)(function (network) { return __awaiter(void 0, void 0, void 0, function () {
63
+ var url, response;
64
+ var _a;
65
+ return __generator(this, function (_b) {
66
+ switch (_b.label) {
67
+ case 0:
68
+ url = "https://api.curve.fi/api/getSubgraphData/".concat(network);
69
+ return [4 /*yield*/, axios_1.default.get(url, { validateStatus: function () { return true; } })];
70
+ case 1:
71
+ response = _b.sent();
72
+ return [2 /*return*/, (_a = response.data.data.poolList) !== null && _a !== void 0 ? _a : []];
73
+ }
74
+ });
75
+ }); }, {
76
+ promise: true,
77
+ maxAge: 5 * 60 * 1000, // 5m
78
+ });
62
79
  exports._getMainPoolsGaugeRewards = (0, memoizee_1.default)(function () { return __awaiter(void 0, void 0, void 0, function () {
63
80
  var url, response;
64
81
  return __generator(this, function (_a) {
@@ -1,18 +1,18 @@
1
- import { DictInterface } from "../interfaces";
2
- export declare const implementationABIDictEthereum: DictInterface<any>;
3
- export declare const implementationABIDictPolygon: DictInterface<any>;
4
- export declare const implementationBasePoolAddressDictEthereum: DictInterface<any>;
5
- export declare const implementationBasePoolAddressDictPolygon: DictInterface<any>;
6
- export declare const basePoolAddressNameDictEthereum: DictInterface<string>;
7
- export declare const basePoolAddressNameDictPolygon: DictInterface<string>;
8
- export declare const basePoolAddressCoinsDictEthereum: DictInterface<string[]>;
9
- export declare const basePoolAddressCoinsDictPolygon: DictInterface<string[]>;
10
- export declare const basePoolAddressCoinAddressesDictEthereum: DictInterface<string[]>;
11
- export declare const basePoolAddressCoinAddressesDictPolygon: DictInterface<string[]>;
12
- export declare const basePoolAddressDecimalsDictEthereum: DictInterface<number[]>;
13
- export declare const basePoolAddressDecimalsDictPolygon: DictInterface<number[]>;
14
- export declare const basePoolAddressZapDictEthereum: DictInterface<string>;
15
- export declare const basePoolAddressZapDictPolygon: DictInterface<string>;
1
+ import { IDict } from "../interfaces";
2
+ export declare const implementationABIDictEthereum: IDict<any>;
3
+ export declare const implementationABIDictPolygon: IDict<any>;
4
+ export declare const implementationBasePoolAddressDictEthereum: IDict<any>;
5
+ export declare const implementationBasePoolAddressDictPolygon: IDict<any>;
6
+ export declare const basePoolAddressNameDictEthereum: IDict<string>;
7
+ export declare const basePoolAddressNameDictPolygon: IDict<string>;
8
+ export declare const basePoolAddressCoinsDictEthereum: IDict<string[]>;
9
+ export declare const basePoolAddressCoinsDictPolygon: IDict<string[]>;
10
+ export declare const basePoolAddressCoinAddressesDictEthereum: IDict<string[]>;
11
+ export declare const basePoolAddressCoinAddressesDictPolygon: IDict<string[]>;
12
+ export declare const basePoolAddressDecimalsDictEthereum: IDict<number[]>;
13
+ export declare const basePoolAddressDecimalsDictPolygon: IDict<number[]>;
14
+ export declare const basePoolAddressZapDictEthereum: IDict<string>;
15
+ export declare const basePoolAddressZapDictPolygon: IDict<string>;
16
16
  export declare const blackListPolygon: string[];
17
17
  export declare const WETH_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
18
18
  export declare const ETH_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
@@ -4,25 +4,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ETH_ADDRESS = exports.WETH_ADDRESS = exports.blackListPolygon = exports.basePoolAddressZapDictPolygon = exports.basePoolAddressZapDictEthereum = exports.basePoolAddressDecimalsDictPolygon = exports.basePoolAddressDecimalsDictEthereum = exports.basePoolAddressCoinAddressesDictPolygon = exports.basePoolAddressCoinAddressesDictEthereum = exports.basePoolAddressCoinsDictPolygon = exports.basePoolAddressCoinsDictEthereum = exports.basePoolAddressNameDictPolygon = exports.basePoolAddressNameDictEthereum = exports.implementationBasePoolAddressDictPolygon = exports.implementationBasePoolAddressDictEthereum = exports.implementationABIDictPolygon = exports.implementationABIDictEthereum = void 0;
7
- var swap_json_1 = __importDefault(require("../constants/abis/json/factoryPools/swap.json"));
8
- var MetaUSD_json_1 = __importDefault(require("../constants/abis/json/factory-v2/MetaUSD.json"));
9
- var MetaUSDBalances_json_1 = __importDefault(require("../constants/abis/json/factory-v2/MetaUSDBalances.json"));
10
- var MetaBTC_json_1 = __importDefault(require("../constants/abis/json/factory-v2/MetaBTC.json"));
11
- var MetaBTCBalances_json_1 = __importDefault(require("../constants/abis/json/factory-v2/MetaBTCBalances.json"));
12
- var MetaBTCRen_json_1 = __importDefault(require("../constants/abis/json/factory-v2/MetaBTCRen.json"));
13
- var MetaBTCBalancesRen_json_1 = __importDefault(require("../constants/abis/json/factory-v2/MetaBTCBalancesRen.json"));
14
- var Plain2Basic_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain2Basic.json"));
15
- var Plain2Balances_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain2Balances.json"));
16
- var Plain2ETH_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain2ETH.json"));
17
- var Plain2Optimized_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain2Optimized.json"));
18
- var Plain3Basic_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain3Basic.json"));
19
- var Plain3Balances_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain3Balances.json"));
20
- var Plain3ETH_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain3ETH.json"));
21
- var Plain3Optimized_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain3Optimized.json"));
22
- var Plain4Basic_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain4Basic.json"));
23
- var Plain4Balances_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain4Balances.json"));
24
- var Plain4ETH_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain4ETH.json"));
25
- var Plain4Optimized_json_1 = __importDefault(require("../constants/abis/json/factory-v2/Plain4Optimized.json"));
7
+ var swap_json_1 = __importDefault(require("../constants/abis/factoryPools/swap.json"));
8
+ var MetaUSD_json_1 = __importDefault(require("../constants/abis/factory-v2/MetaUSD.json"));
9
+ var MetaUSDBalances_json_1 = __importDefault(require("../constants/abis/factory-v2/MetaUSDBalances.json"));
10
+ var MetaBTC_json_1 = __importDefault(require("../constants/abis/factory-v2/MetaBTC.json"));
11
+ var MetaBTCBalances_json_1 = __importDefault(require("../constants/abis/factory-v2/MetaBTCBalances.json"));
12
+ var MetaBTCRen_json_1 = __importDefault(require("../constants/abis/factory-v2/MetaBTCRen.json"));
13
+ var MetaBTCBalancesRen_json_1 = __importDefault(require("../constants/abis/factory-v2/MetaBTCBalancesRen.json"));
14
+ var Plain2Basic_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain2Basic.json"));
15
+ var Plain2Balances_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain2Balances.json"));
16
+ var Plain2ETH_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain2ETH.json"));
17
+ var Plain2Optimized_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain2Optimized.json"));
18
+ var Plain3Basic_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain3Basic.json"));
19
+ var Plain3Balances_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain3Balances.json"));
20
+ var Plain3ETH_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain3ETH.json"));
21
+ var Plain3Optimized_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain3Optimized.json"));
22
+ var Plain4Basic_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain4Basic.json"));
23
+ var Plain4Balances_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain4Balances.json"));
24
+ var Plain4ETH_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain4ETH.json"));
25
+ var Plain4Optimized_json_1 = __importDefault(require("../constants/abis/factory-v2/Plain4Optimized.json"));
26
26
  exports.implementationABIDictEthereum = {
27
27
  "0x5F890841f657d90E081bAbdB532A05996Af79Fe6": swap_json_1.default,
28
28
  "0x213be373FDff327658139C7df330817DAD2d5bBE": MetaUSD_json_1.default,
@@ -1,2 +1,2 @@
1
- import { DictInterface, PoolDataInterface, ICurve } from "../interfaces";
2
- export declare function getFactoryPoolsDataFromApi(this: ICurve, isCrypto: boolean): Promise<DictInterface<PoolDataInterface>>;
1
+ import { IDict, IPoolData, ICurve } from "../interfaces";
2
+ export declare function getFactoryPoolsDataFromApi(this: ICurve, isCrypto: boolean): Promise<IDict<IPoolData>>;
@@ -52,12 +52,12 @@ exports.getFactoryPoolsDataFromApi = void 0;
52
52
  var axios_1 = __importDefault(require("axios"));
53
53
  var ethers_1 = require("ethers");
54
54
  var ethcall_1 = require("ethcall");
55
- var gauge_factory_json_1 = __importDefault(require("../constants/abis/json/gauge_factory.json"));
56
- var deposit_json_1 = __importDefault(require("../constants/abis/json/factoryPools/deposit.json"));
57
- var ERC20_json_1 = __importDefault(require("../constants/abis/json/ERC20.json"));
58
- var DepositZapMetaUsdPolygon_json_1 = __importDefault(require("../constants/abis/json/factory-v2/DepositZapMetaUsdPolygon.json"));
59
- var DepositZapMetaBtcPolygon_json_1 = __importDefault(require("../constants/abis/json/factory-v2/DepositZapMetaBtcPolygon.json"));
60
- var factory_crypto_pool_2_json_1 = __importDefault(require("../constants/abis/json/factory-crypto/factory-crypto-pool-2.json"));
55
+ var gauge_factory_json_1 = __importDefault(require("../constants/abis/gauge_factory.json"));
56
+ var deposit_json_1 = __importDefault(require("../constants/abis/factoryPools/deposit.json"));
57
+ var ERC20_json_1 = __importDefault(require("../constants/abis/ERC20.json"));
58
+ var DepositZapMetaUsdPolygon_json_1 = __importDefault(require("../constants/abis/factory-v2/DepositZapMetaUsdPolygon.json"));
59
+ var DepositZapMetaBtcPolygon_json_1 = __importDefault(require("../constants/abis/factory-v2/DepositZapMetaBtcPolygon.json"));
60
+ var factory_crypto_pool_2_json_1 = __importDefault(require("../constants/abis/factory-crypto/factory-crypto-pool-2.json"));
61
61
  var constants_1 = require("./constants");
62
62
  function setFactorySwapContracts(rawPoolList, isCrypto) {
63
63
  var _this = this;
@@ -78,7 +78,6 @@ function setFactorySwapContracts(rawPoolList, isCrypto) {
78
78
  contract: new ethers_1.Contract(addr, implementationABIDict_1[pool.implementationAddress], _this.signer || _this.provider),
79
79
  multicallContract: new ethcall_1.Contract(addr, implementationABIDict_1[pool.implementationAddress]),
80
80
  };
81
- _this.constants.LP_TOKENS.push(addr);
82
81
  });
83
82
  }
84
83
  }
@@ -90,7 +89,6 @@ function setCryptoFactoryTokenContracts(rawPoolList) {
90
89
  contract: new ethers_1.Contract(addr, ERC20_json_1.default, _this.signer || _this.provider),
91
90
  multicallContract: new ethcall_1.Contract(addr, ERC20_json_1.default),
92
91
  };
93
- _this.constants.LP_TOKENS.push(addr);
94
92
  });
95
93
  }
96
94
  function setFactoryGaugeContracts(rawPoolList) {
@@ -102,7 +100,6 @@ function setFactoryGaugeContracts(rawPoolList) {
102
100
  contract: new ethers_1.Contract(addr, gauge_factory_json_1.default, _this.signer || _this.provider),
103
101
  multicallContract: new ethcall_1.Contract(addr, gauge_factory_json_1.default),
104
102
  };
105
- _this.constants.GAUGES.push(addr);
106
103
  }
107
104
  });
108
105
  }
@@ -118,7 +115,6 @@ function setFactoryCoinsContracts(rawPoolList) {
118
115
  contract: new ethers_1.Contract(addr, ERC20_json_1.default, this.signer || this.provider),
119
116
  multicallContract: new ethcall_1.Contract(addr, ERC20_json_1.default),
120
117
  };
121
- this.constants.DECIMALS_LOWER_CASE[addr] = Number(coin.decimals);
122
118
  }
123
119
  }
124
120
  }
@@ -135,7 +131,6 @@ function setFactoryRewardCoinsContracts(rawPoolList) {
135
131
  contract: new ethers_1.Contract(addr, ERC20_json_1.default, this.signer || this.provider),
136
132
  multicallContract: new ethcall_1.Contract(addr, ERC20_json_1.default),
137
133
  };
138
- this.constants.DECIMALS_LOWER_CASE[addr] = Number(rewardCoin.decimals);
139
134
  }
140
135
  }
141
136
  }
@@ -186,7 +181,7 @@ function getFactoryPoolsDataFromApi(isCrypto) {
186
181
  setFactoryZapContracts.call(this);
187
182
  FACTORY_POOLS_DATA = {};
188
183
  rawPoolList.forEach(function (pool) {
189
- var _a, _b, _c;
184
+ var _a, _b, _c, _d, _e, _f;
190
185
  var coinAddresses = pool.coins.map(function (c) { return c.address.toLowerCase(); });
191
186
  var coinNames = pool.coins.map(function (c) { return c.symbol; });
192
187
  var coinDecimals = pool.coins.map(function (c) { return Number(c.decimals); });
@@ -199,24 +194,21 @@ function getFactoryPoolsDataFromApi(isCrypto) {
199
194
  full_name: pool.name,
200
195
  symbol: pool.symbol,
201
196
  reference_asset: "CRYPTO",
202
- N_COINS: coinAddresses.length,
203
- is_crypto: true,
204
- underlying_decimals: coinDecimals,
205
- decimals: coinDecimals,
206
- use_lending: coinAddresses.map(function () { return false; }),
207
- is_plain: coinAddresses.map(function () { return true; }),
208
- underlying_coins: underlyingCoinNames,
209
- coins: cryptoCoinNames,
210
197
  swap_address: pool.address.toLowerCase(),
211
198
  token_address: pool.lpTokenAddress.toLowerCase(),
212
199
  gauge_address: pool.gaugeAddress ? pool.gaugeAddress.toLowerCase() : ethers_1.ethers.constants.AddressZero,
200
+ is_crypto: true,
201
+ is_factory: true,
202
+ underlying_coins: underlyingCoinNames,
203
+ wrapped_coins: cryptoCoinNames,
213
204
  underlying_coin_addresses: underlyingCoinAddresses,
214
- coin_addresses: coinAddresses,
205
+ wrapped_coin_addresses: coinAddresses,
206
+ underlying_decimals: coinDecimals,
207
+ wrapped_decimals: coinDecimals,
215
208
  reward_tokens: ((_a = pool.gaugeRewards) !== null && _a !== void 0 ? _a : []).map(function (r) { return r.tokenAddress; }),
209
+ reward_decimals: ((_b = pool.gaugeRewards) !== null && _b !== void 0 ? _b : []).map(function (r) { return r.decimals; }),
216
210
  swap_abi: factory_crypto_pool_2_json_1.default,
217
211
  gauge_abi: gauge_factory_json_1.default,
218
- is_factory: true,
219
- is_crypto_factory: true,
220
212
  };
221
213
  }
222
214
  else if (pool.implementation.startsWith("meta")) {
@@ -237,28 +229,23 @@ function getFactoryPoolsDataFromApi(isCrypto) {
237
229
  full_name: pool.name,
238
230
  symbol: pool.symbol,
239
231
  reference_asset: pool.assetTypeName.toUpperCase(),
240
- N_COINS: coinAddresses.length,
241
- underlying_decimals: coinDecimals,
242
- decimals: coinDecimals,
243
- use_lending: coinAddresses.map(function () { return false; }),
244
- is_plain: coinAddresses.map(function () { return true; }),
245
232
  swap_address: pool.address.toLowerCase(),
246
233
  token_address: pool.address.toLowerCase(),
247
234
  gauge_address: pool.gaugeAddress ? pool.gaugeAddress.toLowerCase() : ethers_1.ethers.constants.AddressZero,
235
+ deposit_address: basePoolZap,
236
+ is_meta: true,
237
+ is_factory: true,
238
+ base_pool: basePoolAddressNameDict[basePoolAddress],
248
239
  underlying_coins: __spreadArray([coinNames[0]], basePoolCoinNames, true),
249
- coins: coinNames,
250
- underlying_coin_addresses: coinAddresses,
251
- coin_addresses: coinAddresses,
252
- reward_tokens: ((_b = pool.gaugeRewards) !== null && _b !== void 0 ? _b : []).map(function (r) { return r.tokenAddress; }),
240
+ wrapped_coins: coinNames,
241
+ underlying_coin_addresses: __spreadArray([coinAddresses[0]], basePoolCoinAddresses, true),
242
+ wrapped_coin_addresses: coinAddresses,
243
+ underlying_decimals: __spreadArray([coinDecimals[0]], basePoolDecimals, true),
244
+ wrapped_decimals: coinDecimals,
245
+ reward_tokens: ((_c = pool.gaugeRewards) !== null && _c !== void 0 ? _c : []).map(function (r) { return r.tokenAddress; }),
246
+ reward_decimals: ((_d = pool.gaugeRewards) !== null && _d !== void 0 ? _d : []).map(function (r) { return r.decimals; }),
253
247
  swap_abi: implementationABIDict[pool.implementationAddress],
254
248
  gauge_abi: gauge_factory_json_1.default,
255
- is_factory: true,
256
- is_meta_factory: true,
257
- is_meta: true,
258
- base_pool: basePoolAddressNameDict[basePoolAddress],
259
- meta_coin_addresses: basePoolCoinAddresses,
260
- meta_coin_decimals: __spreadArray([coinDecimals[0]], basePoolDecimals, true),
261
- deposit_address: basePoolZap,
262
249
  deposit_abi: deposit_json_1.default,
263
250
  };
264
251
  }
@@ -269,23 +256,21 @@ function getFactoryPoolsDataFromApi(isCrypto) {
269
256
  full_name: pool.name,
270
257
  symbol: pool.symbol,
271
258
  reference_asset: pool.assetTypeName.toUpperCase(),
272
- N_COINS: coinAddresses.length,
273
- underlying_decimals: coinDecimals,
274
- decimals: coinDecimals,
275
- use_lending: coinAddresses.map(function () { return false; }),
276
- is_plain: coinAddresses.map(function () { return true; }),
277
259
  swap_address: pool.address.toLowerCase(),
278
260
  token_address: pool.address.toLowerCase(),
279
261
  gauge_address: pool.gaugeAddress ? pool.gaugeAddress.toLowerCase() : ethers_1.ethers.constants.AddressZero,
262
+ is_plain: true,
263
+ is_factory: true,
280
264
  underlying_coins: coinNames,
281
- coins: coinNames,
265
+ wrapped_coins: coinNames,
282
266
  underlying_coin_addresses: coinAddresses,
283
- coin_addresses: coinAddresses,
284
- reward_tokens: ((_c = pool.gaugeRewards) !== null && _c !== void 0 ? _c : []).map(function (r) { return r.tokenAddress; }),
267
+ wrapped_coin_addresses: coinAddresses,
268
+ underlying_decimals: coinDecimals,
269
+ wrapped_decimals: coinDecimals,
270
+ reward_tokens: ((_e = pool.gaugeRewards) !== null && _e !== void 0 ? _e : []).map(function (r) { return r.tokenAddress; }),
271
+ reward_decimals: ((_f = pool.gaugeRewards) !== null && _f !== void 0 ? _f : []).map(function (r) { return r.decimals; }),
285
272
  swap_abi: implementationABIDict[pool.implementationAddress],
286
273
  gauge_abi: gauge_factory_json_1.default,
287
- is_factory: true,
288
- is_plain_factory: true,
289
274
  };
290
275
  }
291
276
  });
@@ -1,2 +1,2 @@
1
- import { DictInterface, PoolDataInterface, ICurve } from "../interfaces";
2
- export declare function getCryptoFactoryPoolData(this: ICurve): Promise<DictInterface<PoolDataInterface>>;
1
+ import { IDict, IPoolData, ICurve } from "../interfaces";
2
+ export declare function getCryptoFactoryPoolData(this: ICurve): Promise<IDict<IPoolData>>;
@@ -42,9 +42,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
42
42
  exports.getCryptoFactoryPoolData = void 0;
43
43
  var ethers_1 = require("ethers");
44
44
  var ethcall_1 = require("ethcall");
45
- var ERC20_json_1 = __importDefault(require("../constants/abis/json/ERC20.json"));
46
- var factory_crypto_pool_2_json_1 = __importDefault(require("../constants/abis/json/factory-crypto/factory-crypto-pool-2.json"));
47
- var gauge_factory_json_1 = __importDefault(require("../constants/abis/json/gauge_factory.json"));
45
+ var ERC20_json_1 = __importDefault(require("../constants/abis/ERC20.json"));
46
+ var factory_crypto_pool_2_json_1 = __importDefault(require("../constants/abis/factory-crypto/factory-crypto-pool-2.json"));
47
+ var gauge_factory_json_1 = __importDefault(require("../constants/abis/gauge_factory.json"));
48
48
  var WETH_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
49
49
  var deepFlatten = function (arr) { return [].concat.apply([], arr.map(function (v) { return (Array.isArray(v) ? deepFlatten(v) : v); })); };
50
50
  function getCryptoFactoryIdsAndSwapAddresses() {
@@ -205,9 +205,9 @@ function getCryptoFactoryUnderlyingCoinAddresses(coinAddresses) {
205
205
  function getExistingCoinAddressNameDict() {
206
206
  var dict = {};
207
207
  var _loop_1 = function (poolData) {
208
- poolData.coin_addresses.forEach(function (addr, i) {
208
+ poolData.wrapped_coin_addresses.forEach(function (addr, i) {
209
209
  if (!(addr.toLowerCase() in dict)) {
210
- dict[addr.toLowerCase()] = poolData.coins[i];
210
+ dict[addr.toLowerCase()] = poolData.wrapped_coins[i];
211
211
  }
212
212
  });
213
213
  poolData.underlying_coin_addresses.forEach(function (addr, i) {
@@ -287,7 +287,6 @@ function getCoinAddressDecimalsDict(coinAddresses, existingCoinAddressDecimalsDi
287
287
  decimals = (_a.sent()).map(function (_d) { return Number(ethers_1.ethers.utils.formatUnits(_d, 0)); });
288
288
  newCoinAddresses.forEach(function (addr, i) {
289
289
  coinAddrNamesDict[addr] = decimals[i];
290
- existingCoinAddressDecimalsDict[addr] = decimals[i]; // Add to DECIMALS_LOWER_CASE TODO move to another place
291
290
  });
292
291
  return [2 /*return*/, coinAddrNamesDict];
293
292
  }
@@ -297,41 +296,38 @@ function getCoinAddressDecimalsDict(coinAddresses, existingCoinAddressDecimalsDi
297
296
  function getCryptoFactoryPoolData() {
298
297
  return __awaiter(this, void 0, void 0, function () {
299
298
  var _a, poolIds, swapAddresses, tokenAddresses, gaugeAddresses, _b, poolSymbols, poolNames, coinAddresses, underlyingCoinAddresses, existingCoinAddressNameDict, coinAddressNameDict, coinAddressDecimalsDict, CRYPTO_FACTORY_POOLS_DATA, i;
300
- var _c, _e;
301
- return __generator(this, function (_f) {
302
- switch (_f.label) {
299
+ return __generator(this, function (_c) {
300
+ switch (_c.label) {
303
301
  case 0: return [4 /*yield*/, getCryptoFactoryIdsAndSwapAddresses.call(this)];
304
302
  case 1:
305
- _a = _f.sent(), poolIds = _a[0], swapAddresses = _a[1];
303
+ _a = _c.sent(), poolIds = _a[0], swapAddresses = _a[1];
306
304
  setCryptoFactorySwapContracts.call(this, swapAddresses);
307
305
  return [4 /*yield*/, getCryptoFactoryTokenAddresses.call(this, swapAddresses)];
308
306
  case 2:
309
- tokenAddresses = _f.sent();
307
+ tokenAddresses = _c.sent();
310
308
  setCryptoFactoryTokenContracts.call(this, tokenAddresses);
311
- (_c = this.constants.LP_TOKENS).push.apply(_c, tokenAddresses); // TODO move to another place
312
309
  return [4 /*yield*/, getCryptoFactoryGaugeAddresses.call(this, swapAddresses)];
313
310
  case 3:
314
- gaugeAddresses = _f.sent();
311
+ gaugeAddresses = _c.sent();
315
312
  setCryptoFactoryGaugeContracts.call(this, gaugeAddresses);
316
- (_e = this.constants.GAUGES).push.apply(_e, gaugeAddresses.filter(function (addr) { return addr !== ethers_1.ethers.constants.AddressZero; })); // TODO move to another place
317
313
  return [4 /*yield*/, getCryptoFactorySymbolsAndNames.call(this, tokenAddresses)];
318
314
  case 4:
319
- _b = _f.sent(), poolSymbols = _b[0], poolNames = _b[1];
315
+ _b = _c.sent(), poolSymbols = _b[0], poolNames = _b[1];
320
316
  return [4 /*yield*/, getCryptoFactoryCoinAddresses.call(this, swapAddresses)];
321
317
  case 5:
322
- coinAddresses = _f.sent();
318
+ coinAddresses = _c.sent();
323
319
  setCryptoFactoryCoinsContracts.call(this, coinAddresses);
324
320
  return [4 /*yield*/, getCryptoFactoryUnderlyingCoinAddresses.call(this, coinAddresses)];
325
321
  case 6:
326
- underlyingCoinAddresses = _f.sent();
322
+ underlyingCoinAddresses = _c.sent();
327
323
  existingCoinAddressNameDict = getExistingCoinAddressNameDict.call(this);
328
324
  return [4 /*yield*/, getCoinAddressNameDict.call(this, coinAddresses, existingCoinAddressNameDict)];
329
325
  case 7:
330
- coinAddressNameDict = _f.sent();
326
+ coinAddressNameDict = _c.sent();
331
327
  coinAddressNameDict['0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'] = 'ETH';
332
- return [4 /*yield*/, getCoinAddressDecimalsDict.call(this, coinAddresses, this.constants.DECIMALS_LOWER_CASE)];
328
+ return [4 /*yield*/, getCoinAddressDecimalsDict.call(this, coinAddresses, this.constants.DECIMALS)];
333
329
  case 8:
334
- coinAddressDecimalsDict = _f.sent();
330
+ coinAddressDecimalsDict = _c.sent();
335
331
  coinAddressDecimalsDict['0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'] = 18;
336
332
  CRYPTO_FACTORY_POOLS_DATA = {};
337
333
  for (i = 0; i < poolIds.length; i++) {
@@ -340,23 +336,19 @@ function getCryptoFactoryPoolData() {
340
336
  full_name: poolNames[i],
341
337
  symbol: poolSymbols[i],
342
338
  reference_asset: "CRYPTO",
343
- N_COINS: coinAddresses[i].length,
344
- is_crypto: true,
345
- underlying_decimals: underlyingCoinAddresses[i].map(function (addr) { return coinAddressDecimalsDict[addr]; }),
346
- decimals: coinAddresses[i].map(function (addr) { return coinAddressDecimalsDict[addr]; }),
347
- use_lending: coinAddresses[i].map(function () { return false; }),
348
- is_plain: coinAddresses[i].map(function () { return true; }),
349
- underlying_coins: underlyingCoinAddresses[i].map(function (addr) { return coinAddressNameDict[addr]; }),
350
- coins: coinAddresses[i].map(function (addr) { return coinAddressNameDict[addr]; }),
351
339
  swap_address: swapAddresses[i],
352
340
  token_address: tokenAddresses[i],
353
341
  gauge_address: gaugeAddresses[i],
342
+ is_crypto: true,
343
+ is_factory: true,
344
+ underlying_coins: underlyingCoinAddresses[i].map(function (addr) { return coinAddressNameDict[addr]; }),
345
+ wrapped_coins: coinAddresses[i].map(function (addr) { return coinAddressNameDict[addr]; }),
354
346
  underlying_coin_addresses: underlyingCoinAddresses[i],
355
- coin_addresses: coinAddresses[i],
347
+ wrapped_coin_addresses: coinAddresses[i],
348
+ underlying_decimals: underlyingCoinAddresses[i].map(function (addr) { return coinAddressDecimalsDict[addr]; }),
349
+ wrapped_decimals: coinAddresses[i].map(function (addr) { return coinAddressDecimalsDict[addr]; }),
356
350
  swap_abi: factory_crypto_pool_2_json_1.default,
357
351
  gauge_abi: gauge_factory_json_1.default,
358
- is_factory: true,
359
- is_crypto_factory: true,
360
352
  };
361
353
  }
362
354
  return [2 /*return*/, CRYPTO_FACTORY_POOLS_DATA];
@@ -1,2 +1,2 @@
1
- import { DictInterface, PoolDataInterface, ICurve } from "../interfaces";
2
- export declare function getFactoryPoolData(this: ICurve): Promise<DictInterface<PoolDataInterface>>;
1
+ import { IDict, IPoolData, ICurve } from "../interfaces";
2
+ export declare function getFactoryPoolData(this: ICurve): Promise<IDict<IPoolData>>;