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