@curvefi/api 2.31.0 → 2.31.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.
Files changed (97) hide show
  1. package/lib/boosting.js +137 -402
  2. package/lib/constants/aliases.d.ts +11 -11
  3. package/lib/constants/aliases.js +12 -15
  4. package/lib/constants/coins/arbitrum.js +6 -9
  5. package/lib/constants/coins/aurora.js +6 -9
  6. package/lib/constants/coins/avalanche.js +7 -10
  7. package/lib/constants/coins/celo.js +6 -9
  8. package/lib/constants/coins/ethereum.js +10 -13
  9. package/lib/constants/coins/fantom.js +8 -11
  10. package/lib/constants/coins/kava.js +6 -9
  11. package/lib/constants/coins/moonbeam.js +6 -9
  12. package/lib/constants/coins/optimism.js +6 -9
  13. package/lib/constants/coins/polygon.js +7 -10
  14. package/lib/constants/coins/xdai.js +6 -9
  15. package/lib/constants/pools/arbitrum.d.ts +2 -4
  16. package/lib/constants/pools/arbitrum.js +22 -28
  17. package/lib/constants/pools/aurora.d.ts +2 -4
  18. package/lib/constants/pools/aurora.js +6 -12
  19. package/lib/constants/pools/avalanche.d.ts +2 -4
  20. package/lib/constants/pools/avalanche.js +21 -27
  21. package/lib/constants/pools/celo.d.ts +2 -4
  22. package/lib/constants/pools/celo.js +2 -5
  23. package/lib/constants/pools/ethereum.js +247 -253
  24. package/lib/constants/pools/fantom.d.ts +2 -4
  25. package/lib/constants/pools/fantom.js +28 -34
  26. package/lib/constants/pools/index.d.ts +11 -11
  27. package/lib/constants/pools/index.js +12 -25
  28. package/lib/constants/pools/kava.d.ts +2 -4
  29. package/lib/constants/pools/kava.js +2 -5
  30. package/lib/constants/pools/moonbeam.d.ts +2 -4
  31. package/lib/constants/pools/moonbeam.js +6 -12
  32. package/lib/constants/pools/optimism.d.ts +2 -4
  33. package/lib/constants/pools/optimism.js +9 -15
  34. package/lib/constants/pools/polygon.d.ts +2 -4
  35. package/lib/constants/pools/polygon.js +22 -28
  36. package/lib/constants/pools/xdai.d.ts +2 -4
  37. package/lib/constants/pools/xdai.js +24 -30
  38. package/lib/constants/utils.js +20 -29
  39. package/lib/curve.d.ts +9 -7
  40. package/lib/curve.js +397 -615
  41. package/lib/external-api.d.ts +1 -1
  42. package/lib/external-api.js +47 -140
  43. package/lib/factory/common.js +6 -10
  44. package/lib/factory/constants-crypto.js +48 -54
  45. package/lib/factory/constants.js +274 -280
  46. package/lib/factory/deploy.d.ts +8 -8
  47. package/lib/factory/deploy.js +177 -347
  48. package/lib/factory/factory-api.js +195 -278
  49. package/lib/factory/factory-crypto.js +170 -323
  50. package/lib/factory/factory.js +195 -350
  51. package/lib/index.d.ts +24 -25
  52. package/lib/index.js +87 -143
  53. package/lib/interfaces.d.ts +5 -5
  54. package/lib/interfaces.js +1 -2
  55. package/lib/pools/PoolTemplate.js +1516 -2929
  56. package/lib/pools/index.d.ts +2 -2
  57. package/lib/pools/index.js +3 -7
  58. package/lib/pools/mixins/common.d.ts +3 -4
  59. package/lib/pools/mixins/common.js +23 -112
  60. package/lib/pools/mixins/depositBalancedAmountsMixins.d.ts +1 -1
  61. package/lib/pools/mixins/depositBalancedAmountsMixins.js +50 -139
  62. package/lib/pools/mixins/depositMixins.d.ts +1 -1
  63. package/lib/pools/mixins/depositMixins.js +144 -417
  64. package/lib/pools/mixins/depositWrappedMixins.d.ts +1 -1
  65. package/lib/pools/mixins/depositWrappedMixins.js +72 -227
  66. package/lib/pools/mixins/poolBalancesMixin.d.ts +1 -1
  67. package/lib/pools/mixins/poolBalancesMixin.js +25 -105
  68. package/lib/pools/mixins/swapMixins.d.ts +1 -1
  69. package/lib/pools/mixins/swapMixins.js +127 -353
  70. package/lib/pools/mixins/swapWrappedMixins.d.ts +1 -1
  71. package/lib/pools/mixins/swapWrappedMixins.js +90 -276
  72. package/lib/pools/mixins/withdrawExpectedMixins.d.ts +1 -1
  73. package/lib/pools/mixins/withdrawExpectedMixins.js +26 -110
  74. package/lib/pools/mixins/withdrawImbalanceMixins.d.ts +1 -1
  75. package/lib/pools/mixins/withdrawImbalanceMixins.js +99 -321
  76. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.d.ts +1 -1
  77. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.js +53 -192
  78. package/lib/pools/mixins/withdrawMixins.d.ts +1 -1
  79. package/lib/pools/mixins/withdrawMixins.js +123 -390
  80. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.d.ts +1 -1
  81. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.js +17 -92
  82. package/lib/pools/mixins/withdrawOneCoinMixins.d.ts +1 -1
  83. package/lib/pools/mixins/withdrawOneCoinMixins.js +124 -390
  84. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.d.ts +1 -1
  85. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.js +9 -66
  86. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.d.ts +1 -1
  87. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.js +55 -190
  88. package/lib/pools/mixins/withdrawWrappedMixins.d.ts +1 -1
  89. package/lib/pools/mixins/withdrawWrappedMixins.js +52 -191
  90. package/lib/pools/poolConstructor.d.ts +1 -1
  91. package/lib/pools/poolConstructor.js +77 -101
  92. package/lib/pools/utils.js +298 -500
  93. package/lib/router.d.ts +2 -2
  94. package/lib/router.js +390 -653
  95. package/lib/utils.d.ts +9 -9
  96. package/lib/utils.js +377 -731
  97. package/package.json +8 -8
@@ -1,235 +1,211 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.getPool = void 0;
19
- var curve_1 = require("../curve");
20
- var PoolTemplate_1 = require("./PoolTemplate");
21
- var poolBalancesMixin_1 = require("./mixins/poolBalancesMixin");
22
- var depositBalancedAmountsMixins_1 = require("./mixins/depositBalancedAmountsMixins");
23
- var depositMixins_1 = require("./mixins/depositMixins");
24
- var depositWrappedMixins_1 = require("./mixins/depositWrappedMixins");
25
- var withdrawExpectedMixins_1 = require("./mixins/withdrawExpectedMixins");
26
- var withdrawMixins_1 = require("./mixins/withdrawMixins");
27
- var withdrawWrappedMixins_1 = require("./mixins/withdrawWrappedMixins");
28
- var withdrawImbalanceMixins_1 = require("./mixins/withdrawImbalanceMixins");
29
- var withdrawImbalanceWrappedMixins_1 = require("./mixins/withdrawImbalanceWrappedMixins");
30
- var withdrawOneCoinExpectedMixins_1 = require("./mixins/withdrawOneCoinExpectedMixins");
31
- var withdrawOneCoinMixins_1 = require("./mixins/withdrawOneCoinMixins");
32
- var withdrawOneCoinWrappedExpectedMixins_1 = require("./mixins/withdrawOneCoinWrappedExpectedMixins");
33
- var withdrawOneCoinWrappedMixins_1 = require("./mixins/withdrawOneCoinWrappedMixins");
34
- var swapMixins_1 = require("./mixins/swapMixins");
35
- var swapWrappedMixins_1 = require("./mixins/swapWrappedMixins");
36
- var getPool = function (poolId) {
37
- var poolDummy = new PoolTemplate_1.PoolTemplate(poolId);
38
- var Pool = /** @class */ (function (_super) {
39
- __extends(Pool, _super);
40
- function Pool() {
41
- return _super !== null && _super.apply(this, arguments) || this;
42
- }
43
- return Pool;
44
- }(PoolTemplate_1.PoolTemplate));
1
+ import { curve } from "../curve.js";
2
+ import { PoolTemplate } from "./PoolTemplate.js";
3
+ import { poolBalancesMetaMixin, poolBalancesLendingMixin } from "./mixins/poolBalancesMixin.js";
4
+ import { depositBalancedAmountsMixin, depositBalancedAmountsCryptoMixin, depositWrappedBalancedAmountsMixin, depositWrappedBalancedAmountsCryptoMixin } from "./mixins/depositBalancedAmountsMixins.js";
5
+ import { depositMetaFactoryMixin, depositCryptoMetaFactoryMixin, depositZapMixin, depositLendingOrCryptoMixin, depositPlainMixin } from "./mixins/depositMixins.js";
6
+ import { depositWrapped2argsMixin, depositWrapped3argsMixin } from "./mixins/depositWrappedMixins.js";
7
+ import { withdrawExpectedMixin, withdrawExpectedLendingOrCryptoMixin, withdrawExpectedMetaMixin, withdrawWrappedExpectedMixin } from "./mixins/withdrawExpectedMixins.js";
8
+ import { withdrawMetaFactoryMixin, withdrawCryptoMetaFactoryMixin, withdrawZapMixin, withdrawLendingOrCryptoMixin, withdrawPlainMixin } from "./mixins/withdrawMixins.js";
9
+ import { withdrawWrapped2argsMixin, withdrawWrapped3argsMixin } from "./mixins/withdrawWrappedMixins.js";
10
+ import { withdrawImbalanceMetaFactoryMixin, withdrawImbalanceZapMixin, withdrawImbalanceLendingMixin, withdrawImbalancePlainMixin } from "./mixins/withdrawImbalanceMixins.js";
11
+ import { withdrawImbalanceWrapped2argsMixin, withdrawImbalanceWrapped3argsMixin } from "./mixins/withdrawImbalanceWrappedMixins.js";
12
+ import { withdrawOneCoinExpectedMetaFactoryMixin, withdrawOneCoinExpectedZapMixin, withdrawOneCoinExpected3argsMixin, withdrawOneCoinExpected2argsMixin } from "./mixins/withdrawOneCoinExpectedMixins.js";
13
+ import { withdrawOneCoinMetaFactoryMixin, withdrawOneCoinCryptoMetaFactoryMixin, withdrawOneCoinZapMixin, withdrawOneCoinLendingOrCryptoMixin, withdrawOneCoinPlainMixin } from "./mixins/withdrawOneCoinMixins.js";
14
+ import { withdrawOneCoinWrappedExpected2argsMixin, withdrawOneCoinWrappedExpected3argsMixin } from "./mixins/withdrawOneCoinWrappedExpectedMixins.js";
15
+ import { withdrawOneCoinWrappedLendingOrCryptoMixin, withdrawOneCoinWrappedMixin } from "./mixins/withdrawOneCoinWrappedMixins.js";
16
+ import { swapTricrypto2Mixin, swapMetaFactoryMixin, swapCryptoMetaFactoryMixin, swapMixin } from "./mixins/swapMixins.js";
17
+ import { swapWrappedExpectedAndApproveMixin, swapWrappedTricrypto2Mixin, swapWrappedMixin } from "./mixins/swapWrappedMixins.js";
18
+ export const getPool = (poolId) => {
19
+ const poolDummy = new PoolTemplate(poolId);
20
+ class Pool extends PoolTemplate {
21
+ }
45
22
  // statsBalances
46
23
  if (poolDummy.isMeta) {
47
- Object.assign(Pool.prototype, poolBalancesMixin_1.poolBalancesMetaMixin);
24
+ Object.assign(Pool.prototype, poolBalancesMetaMixin);
48
25
  }
49
- else if (poolDummy.useLending.reduce(function (x, y) { return x || y; })) {
50
- Object.assign(Pool.prototype, poolBalancesMixin_1.poolBalancesLendingMixin);
26
+ else if (poolDummy.useLending.reduce((x, y) => x || y)) {
27
+ Object.assign(Pool.prototype, poolBalancesLendingMixin);
51
28
  }
52
29
  // depositBalancedAmounts
53
30
  if (poolDummy.isCrypto) {
54
- Object.assign(Pool.prototype, depositBalancedAmountsMixins_1.depositBalancedAmountsCryptoMixin);
31
+ Object.assign(Pool.prototype, depositBalancedAmountsCryptoMixin);
55
32
  }
56
33
  else {
57
- Object.assign(Pool.prototype, depositBalancedAmountsMixins_1.depositBalancedAmountsMixin);
34
+ Object.assign(Pool.prototype, depositBalancedAmountsMixin);
58
35
  }
59
36
  // depositWrappedBalancedAmounts
60
37
  if (!poolDummy.isPlain && !poolDummy.isFake) {
61
38
  if (poolDummy.isCrypto) {
62
- Object.assign(Pool.prototype, depositBalancedAmountsMixins_1.depositWrappedBalancedAmountsCryptoMixin);
39
+ Object.assign(Pool.prototype, depositWrappedBalancedAmountsCryptoMixin);
63
40
  }
64
41
  else {
65
- Object.assign(Pool.prototype, depositBalancedAmountsMixins_1.depositWrappedBalancedAmountsMixin);
42
+ Object.assign(Pool.prototype, depositWrappedBalancedAmountsMixin);
66
43
  }
67
44
  }
68
45
  // deposit and depositEstimateGas
69
46
  if (poolDummy.isMetaFactory) {
70
47
  if (poolDummy.isCrypto) {
71
- Object.assign(Pool.prototype, depositMixins_1.depositCryptoMetaFactoryMixin);
48
+ Object.assign(Pool.prototype, depositCryptoMetaFactoryMixin);
72
49
  }
73
50
  else {
74
- Object.assign(Pool.prototype, depositMixins_1.depositMetaFactoryMixin);
51
+ Object.assign(Pool.prototype, depositMetaFactoryMixin);
75
52
  }
76
53
  }
77
54
  else if (poolDummy.zap && poolId !== 'susd') {
78
- Object.assign(Pool.prototype, depositMixins_1.depositZapMixin);
55
+ Object.assign(Pool.prototype, depositZapMixin);
79
56
  }
80
57
  else if (poolDummy.isLending || (poolDummy.isCrypto && !poolDummy.isPlain)) {
81
- Object.assign(Pool.prototype, depositMixins_1.depositLendingOrCryptoMixin);
58
+ Object.assign(Pool.prototype, depositLendingOrCryptoMixin);
82
59
  }
83
60
  else {
84
- Object.assign(Pool.prototype, depositMixins_1.depositPlainMixin);
61
+ Object.assign(Pool.prototype, depositPlainMixin);
85
62
  }
86
63
  // depositWrapped and depositWrappedEstimateGas
87
64
  if (!poolDummy.isPlain && !poolDummy.isFake) {
88
65
  if (((poolDummy.isLending || poolDummy.isCrypto) && !poolDummy.zap) || (poolDummy.isCrypto && poolDummy.isMetaFactory)) {
89
- Object.assign(Pool.prototype, depositWrappedMixins_1.depositWrapped3argsMixin);
66
+ Object.assign(Pool.prototype, depositWrapped3argsMixin);
90
67
  }
91
68
  else {
92
- Object.assign(Pool.prototype, depositWrappedMixins_1.depositWrapped2argsMixin);
69
+ Object.assign(Pool.prototype, depositWrapped2argsMixin);
93
70
  }
94
71
  }
95
72
  // withdrawExpected
96
73
  if (poolDummy.isMeta) {
97
- Object.assign(Pool.prototype, withdrawExpectedMixins_1.withdrawExpectedMetaMixin);
74
+ Object.assign(Pool.prototype, withdrawExpectedMetaMixin);
98
75
  }
99
76
  else if (poolDummy.isLending || (poolDummy.isCrypto && !poolDummy.isPlain)) {
100
- Object.assign(Pool.prototype, withdrawExpectedMixins_1.withdrawExpectedLendingOrCryptoMixin);
77
+ Object.assign(Pool.prototype, withdrawExpectedLendingOrCryptoMixin);
101
78
  }
102
79
  else {
103
- Object.assign(Pool.prototype, withdrawExpectedMixins_1.withdrawExpectedMixin);
80
+ Object.assign(Pool.prototype, withdrawExpectedMixin);
104
81
  }
105
82
  // withdraw and withdrawEstimateGas
106
83
  if (poolDummy.isMetaFactory) {
107
84
  if (poolDummy.isCrypto) {
108
- Object.assign(Pool.prototype, withdrawMixins_1.withdrawCryptoMetaFactoryMixin);
85
+ Object.assign(Pool.prototype, withdrawCryptoMetaFactoryMixin);
109
86
  }
110
87
  else {
111
- Object.assign(Pool.prototype, withdrawMixins_1.withdrawMetaFactoryMixin);
88
+ Object.assign(Pool.prototype, withdrawMetaFactoryMixin);
112
89
  }
113
90
  }
114
91
  else if (poolDummy.zap && poolId !== 'susd') {
115
- Object.assign(Pool.prototype, withdrawMixins_1.withdrawZapMixin);
92
+ Object.assign(Pool.prototype, withdrawZapMixin);
116
93
  }
117
94
  else if (poolDummy.isLending || (poolDummy.isCrypto && !poolDummy.isPlain)) {
118
- Object.assign(Pool.prototype, withdrawMixins_1.withdrawLendingOrCryptoMixin);
95
+ Object.assign(Pool.prototype, withdrawLendingOrCryptoMixin);
119
96
  }
120
97
  else {
121
- Object.assign(Pool.prototype, withdrawMixins_1.withdrawPlainMixin);
98
+ Object.assign(Pool.prototype, withdrawPlainMixin);
122
99
  }
123
100
  // withdrawWrapped and withdrawWrappedEstimateGas
124
101
  if (!poolDummy.isPlain && !poolDummy.isFake) {
125
102
  if (((poolDummy.isLending || poolDummy.isCrypto) && !poolDummy.zap) || (poolDummy.isCrypto && poolDummy.isMetaFactory)) {
126
- Object.assign(Pool.prototype, withdrawWrappedMixins_1.withdrawWrapped3argsMixin);
127
- Object.assign(Pool.prototype, withdrawExpectedMixins_1.withdrawWrappedExpectedMixin);
103
+ Object.assign(Pool.prototype, withdrawWrapped3argsMixin);
104
+ Object.assign(Pool.prototype, withdrawWrappedExpectedMixin);
128
105
  }
129
106
  else {
130
- Object.assign(Pool.prototype, withdrawWrappedMixins_1.withdrawWrapped2argsMixin);
131
- Object.assign(Pool.prototype, withdrawExpectedMixins_1.withdrawWrappedExpectedMixin);
107
+ Object.assign(Pool.prototype, withdrawWrapped2argsMixin);
108
+ Object.assign(Pool.prototype, withdrawWrappedExpectedMixin);
132
109
  }
133
110
  }
134
111
  // withdrawImbalance and withdrawImbalanceEstimateGas
135
112
  if (!poolDummy.isCrypto) {
136
113
  if (poolDummy.isMetaFactory) {
137
- Object.assign(Pool.prototype, withdrawImbalanceMixins_1.withdrawImbalanceMetaFactoryMixin);
114
+ Object.assign(Pool.prototype, withdrawImbalanceMetaFactoryMixin);
138
115
  }
139
116
  else if (poolDummy.zap && poolId !== 'susd') {
140
- Object.assign(Pool.prototype, withdrawImbalanceMixins_1.withdrawImbalanceZapMixin);
117
+ Object.assign(Pool.prototype, withdrawImbalanceZapMixin);
141
118
  }
142
119
  else if (poolDummy.isLending) {
143
- Object.assign(Pool.prototype, withdrawImbalanceMixins_1.withdrawImbalanceLendingMixin);
120
+ Object.assign(Pool.prototype, withdrawImbalanceLendingMixin);
144
121
  }
145
122
  else {
146
- Object.assign(Pool.prototype, withdrawImbalanceMixins_1.withdrawImbalancePlainMixin);
123
+ Object.assign(Pool.prototype, withdrawImbalancePlainMixin);
147
124
  }
148
125
  }
149
126
  // withdrawImbalanceWrapped and withdrawImbalanceWrappedEstimateGas
150
127
  if (!poolDummy.isCrypto) {
151
128
  if (poolDummy.isLending && !poolDummy.zap) {
152
- Object.assign(Pool.prototype, withdrawImbalanceWrappedMixins_1.withdrawImbalanceWrapped3argsMixin);
129
+ Object.assign(Pool.prototype, withdrawImbalanceWrapped3argsMixin);
153
130
  }
154
131
  else if (!poolDummy.isPlain && !poolDummy.isFake) {
155
- Object.assign(Pool.prototype, withdrawImbalanceWrappedMixins_1.withdrawImbalanceWrapped2argsMixin);
132
+ Object.assign(Pool.prototype, withdrawImbalanceWrapped2argsMixin);
156
133
  }
157
134
  }
158
135
  // withdrawOneCoinExpected
159
136
  if (poolDummy.isMetaFactory) {
160
- Object.assign(Pool.prototype, withdrawOneCoinExpectedMixins_1.withdrawOneCoinExpectedMetaFactoryMixin);
137
+ Object.assign(Pool.prototype, withdrawOneCoinExpectedMetaFactoryMixin);
161
138
  }
162
139
  else if ((!poolDummy.isCrypto && poolDummy.zap) || poolDummy.isMeta) { // including susd
163
- Object.assign(Pool.prototype, withdrawOneCoinExpectedMixins_1.withdrawOneCoinExpectedZapMixin);
140
+ Object.assign(Pool.prototype, withdrawOneCoinExpectedZapMixin);
164
141
  }
165
142
  else if (poolId === 'ib') {
166
- Object.assign(Pool.prototype, withdrawOneCoinExpectedMixins_1.withdrawOneCoinExpected3argsMixin);
143
+ Object.assign(Pool.prototype, withdrawOneCoinExpected3argsMixin);
167
144
  }
168
145
  else {
169
- Object.assign(Pool.prototype, withdrawOneCoinExpectedMixins_1.withdrawOneCoinExpected2argsMixin);
146
+ Object.assign(Pool.prototype, withdrawOneCoinExpected2argsMixin);
170
147
  }
171
148
  // withdrawOneCoin and withdrawOneCoinEstimateGas
172
149
  if (poolDummy.isMetaFactory) {
173
150
  if (poolDummy.isCrypto) {
174
- Object.assign(Pool.prototype, withdrawOneCoinMixins_1.withdrawOneCoinCryptoMetaFactoryMixin);
151
+ Object.assign(Pool.prototype, withdrawOneCoinCryptoMetaFactoryMixin);
175
152
  }
176
153
  else {
177
- Object.assign(Pool.prototype, withdrawOneCoinMixins_1.withdrawOneCoinMetaFactoryMixin);
154
+ Object.assign(Pool.prototype, withdrawOneCoinMetaFactoryMixin);
178
155
  }
179
156
  }
180
157
  else if (poolDummy.zap) { // including susd
181
- Object.assign(Pool.prototype, withdrawOneCoinMixins_1.withdrawOneCoinZapMixin);
158
+ Object.assign(Pool.prototype, withdrawOneCoinZapMixin);
182
159
  }
183
160
  else if (poolDummy.isLending || (poolDummy.isCrypto && !poolDummy.isPlain)) {
184
- Object.assign(Pool.prototype, withdrawOneCoinMixins_1.withdrawOneCoinLendingOrCryptoMixin);
161
+ Object.assign(Pool.prototype, withdrawOneCoinLendingOrCryptoMixin);
185
162
  }
186
163
  else {
187
- Object.assign(Pool.prototype, withdrawOneCoinMixins_1.withdrawOneCoinPlainMixin);
164
+ Object.assign(Pool.prototype, withdrawOneCoinPlainMixin);
188
165
  }
189
166
  // withdrawOneCoinWrappedExpected
190
167
  if (!poolDummy.isPlain && !poolDummy.isFake && !(poolDummy.isLending && poolDummy.zap)) {
191
168
  if (poolId === "ib") {
192
- Object.assign(Pool.prototype, withdrawOneCoinWrappedExpectedMixins_1.withdrawOneCoinWrappedExpected3argsMixin);
169
+ Object.assign(Pool.prototype, withdrawOneCoinWrappedExpected3argsMixin);
193
170
  }
194
171
  else {
195
- Object.assign(Pool.prototype, withdrawOneCoinWrappedExpectedMixins_1.withdrawOneCoinWrappedExpected2argsMixin);
172
+ Object.assign(Pool.prototype, withdrawOneCoinWrappedExpected2argsMixin);
196
173
  }
197
174
  }
198
175
  // withdrawOneCoinWrapped and withdrawOneCoinWrappedEstimateGas
199
176
  if (!poolDummy.isPlain && !poolDummy.isFake && !(poolDummy.isLending && poolDummy.zap)) {
200
177
  if (((poolDummy.isLending || poolDummy.isCrypto) && !poolDummy.zap) || (poolDummy.isCrypto && poolDummy.isMetaFactory)) {
201
- Object.assign(Pool.prototype, withdrawOneCoinWrappedMixins_1.withdrawOneCoinWrappedLendingOrCryptoMixin);
178
+ Object.assign(Pool.prototype, withdrawOneCoinWrappedLendingOrCryptoMixin);
202
179
  }
203
180
  else {
204
- Object.assign(Pool.prototype, withdrawOneCoinWrappedMixins_1.withdrawOneCoinWrappedMixin);
181
+ Object.assign(Pool.prototype, withdrawOneCoinWrappedMixin);
205
182
  }
206
183
  }
207
184
  // swap and swapEstimateGas
208
- if ('exchange(uint256,uint256,uint256,uint256,bool)' in curve_1.curve.contracts[poolDummy.address].contract &&
209
- !(curve_1.curve.chainId === 100 && poolDummy.id === "tricrypto")) { // tricrypto2 (eth), tricrypto (arbitrum), avaxcrypto (avalanche); 100 is xDAI
210
- Object.assign(Pool.prototype, swapMixins_1.swapTricrypto2Mixin);
185
+ if ('exchange(uint256,uint256,uint256,uint256,bool)' in curve.contracts[poolDummy.address].contract &&
186
+ !(curve.chainId === 100 && poolDummy.id === "tricrypto")) { // tricrypto2 (eth), tricrypto (arbitrum), avaxcrypto (avalanche); 100 is xDAI
187
+ Object.assign(Pool.prototype, swapTricrypto2Mixin);
211
188
  }
212
- else if (poolDummy.isMetaFactory && ((0, exports.getPool)(poolDummy.basePool).isLending || (0, exports.getPool)(poolDummy.basePool).isFake || poolDummy.isCrypto)) {
189
+ else if (poolDummy.isMetaFactory && (getPool(poolDummy.basePool).isLending || getPool(poolDummy.basePool).isFake || poolDummy.isCrypto)) {
213
190
  if (poolDummy.isCrypto) {
214
- Object.assign(Pool.prototype, swapMixins_1.swapCryptoMetaFactoryMixin);
191
+ Object.assign(Pool.prototype, swapCryptoMetaFactoryMixin);
215
192
  }
216
193
  else {
217
- Object.assign(Pool.prototype, swapMixins_1.swapMetaFactoryMixin);
194
+ Object.assign(Pool.prototype, swapMetaFactoryMixin);
218
195
  }
219
196
  }
220
197
  else {
221
- Object.assign(Pool.prototype, swapMixins_1.swapMixin);
198
+ Object.assign(Pool.prototype, swapMixin);
222
199
  }
223
200
  // swapWrapped and swapWrappedEstimateGas
224
201
  if (!poolDummy.isPlain && !poolDummy.isFake) {
225
- Object.assign(Pool.prototype, swapWrappedMixins_1.swapWrappedExpectedAndApproveMixin);
226
- if ('exchange(uint256,uint256,uint256,uint256,bool)' in curve_1.curve.contracts[poolDummy.address].contract) { // tricrypto2 (eth), tricrypto (arbitrum)
227
- Object.assign(Pool.prototype, swapWrappedMixins_1.swapWrappedTricrypto2Mixin);
202
+ Object.assign(Pool.prototype, swapWrappedExpectedAndApproveMixin);
203
+ if ('exchange(uint256,uint256,uint256,uint256,bool)' in curve.contracts[poolDummy.address].contract) { // tricrypto2 (eth), tricrypto (arbitrum)
204
+ Object.assign(Pool.prototype, swapWrappedTricrypto2Mixin);
228
205
  }
229
206
  else {
230
- Object.assign(Pool.prototype, swapWrappedMixins_1.swapWrappedMixin);
207
+ Object.assign(Pool.prototype, swapWrappedMixin);
231
208
  }
232
209
  }
233
210
  return new Pool(poolId);
234
211
  };
235
- exports.getPool = getPool;