@curvefi/api 2.4.0 → 2.4.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.
|
@@ -1272,6 +1272,7 @@ exports.POOLS_DATA_ETHEREUM = (0, utils_1.lowerCasePoolDataAddresses)({
|
|
|
1272
1272
|
token_address: '0x3D229E1B4faab62F621eF2F6A610961f7BD7b23B',
|
|
1273
1273
|
gauge_address: '0x65CA7Dc5CB661fC58De57B1E1aF404649a27AD35',
|
|
1274
1274
|
is_crypto: true,
|
|
1275
|
+
is_plain: true,
|
|
1275
1276
|
underlying_coins: ['USDC', 'EURS'],
|
|
1276
1277
|
wrapped_coins: ['USDC', 'EURS'],
|
|
1277
1278
|
underlying_coin_addresses: [
|
|
@@ -1900,7 +1900,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
1900
1900
|
case 12:
|
|
1901
1901
|
_amounts = amounts.map(function (amount, i) { return (0, utils_1.parseUnits)(amount, decimals[i]); });
|
|
1902
1902
|
contract = curve_1.curve.contracts[curve_1.curve.constants.ALIASES.deposit_and_stake].contract;
|
|
1903
|
-
useUnderlying = isUnderlying && (this.isLending || this.isCrypto) && !this.zap;
|
|
1903
|
+
useUnderlying = isUnderlying && (this.isLending || (this.isCrypto && !this.isPlain)) && !this.zap;
|
|
1904
1904
|
if (!isUnderlying) return [3 /*break*/, 14];
|
|
1905
1905
|
_k = (_j = ethers_1.ethers.utils).parseUnits;
|
|
1906
1906
|
return [4 /*yield*/, this.depositAndStakeExpected(amounts)];
|
|
@@ -2324,7 +2324,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
2324
2324
|
return __generator(this, function (_c) {
|
|
2325
2325
|
switch (_c.label) {
|
|
2326
2326
|
case 0:
|
|
2327
|
-
if (this.isFake) {
|
|
2327
|
+
if (this.isFake || this.isPlain) {
|
|
2328
2328
|
throw Error("".concat(this.name, " pool doesn't have this method"));
|
|
2329
2329
|
}
|
|
2330
2330
|
_a = Number;
|
|
@@ -72,12 +72,12 @@ var getPool = function (poolId) {
|
|
|
72
72
|
// depositBonus and depositWrappedBonus
|
|
73
73
|
if (poolDummy.isCrypto) {
|
|
74
74
|
Object.assign(Pool.prototype, depositBonusMixins_1.depositBonusCryptoMixin);
|
|
75
|
-
if (!poolDummy.isFake)
|
|
75
|
+
if (!poolDummy.isPlain && !poolDummy.isFake)
|
|
76
76
|
Object.assign(Pool.prototype, depositBonusMixins_1.depositWrappedBonusCryptoMixin);
|
|
77
77
|
}
|
|
78
78
|
else {
|
|
79
79
|
Object.assign(Pool.prototype, depositBonusMixins_1.depositBonusMixin);
|
|
80
|
-
if (!poolDummy.isFake)
|
|
80
|
+
if (!poolDummy.isPlain && !poolDummy.isFake)
|
|
81
81
|
Object.assign(Pool.prototype, depositBonusMixins_1.depositWrappedBonusMixin);
|
|
82
82
|
}
|
|
83
83
|
// deposit and depositEstimateGas
|
|
@@ -87,18 +87,20 @@ var getPool = function (poolId) {
|
|
|
87
87
|
else if (poolDummy.zap && poolId !== 'susd') {
|
|
88
88
|
Object.assign(Pool.prototype, depositMixins_1.depositZapMixin);
|
|
89
89
|
}
|
|
90
|
-
else if (poolDummy.isLending || poolDummy.isCrypto) {
|
|
90
|
+
else if (poolDummy.isLending || (poolDummy.isCrypto && !poolDummy.isPlain)) {
|
|
91
91
|
Object.assign(Pool.prototype, depositMixins_1.depositLendingOrCryptoMixin);
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
94
94
|
Object.assign(Pool.prototype, depositMixins_1.depositPlainMixin);
|
|
95
95
|
}
|
|
96
96
|
// depositWrapped and depositWrappedEstimateGas
|
|
97
|
-
if (
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
if (!poolDummy.isPlain && !poolDummy.isFake) {
|
|
98
|
+
if ((poolDummy.isLending || poolDummy.isCrypto) && !poolDummy.zap) {
|
|
99
|
+
Object.assign(Pool.prototype, depositWrappedMixins_1.depositWrapped3argsMixin);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
Object.assign(Pool.prototype, depositWrappedMixins_1.depositWrapped2argsMixin);
|
|
103
|
+
}
|
|
102
104
|
}
|
|
103
105
|
// withdrawExpected
|
|
104
106
|
if (poolDummy.isFake) {
|
|
@@ -107,7 +109,7 @@ var getPool = function (poolId) {
|
|
|
107
109
|
else if (poolDummy.isMeta) {
|
|
108
110
|
Object.assign(Pool.prototype, withdrawExpectedMixins_1.withdrawExpectedMetaMixin);
|
|
109
111
|
}
|
|
110
|
-
else if (poolDummy.isLending || poolDummy.isCrypto) {
|
|
112
|
+
else if (poolDummy.isLending || (poolDummy.isCrypto && !poolDummy.isPlain)) {
|
|
111
113
|
Object.assign(Pool.prototype, withdrawExpectedMixins_1.withdrawExpectedLendingOrCryptoMixin);
|
|
112
114
|
}
|
|
113
115
|
else {
|
|
@@ -120,20 +122,22 @@ var getPool = function (poolId) {
|
|
|
120
122
|
else if (poolDummy.zap && poolId !== 'susd') {
|
|
121
123
|
Object.assign(Pool.prototype, withdrawMixins_1.withdrawZapMixin);
|
|
122
124
|
}
|
|
123
|
-
else if (poolDummy.isLending || poolDummy.isCrypto) {
|
|
125
|
+
else if (poolDummy.isLending || (poolDummy.isCrypto && !poolDummy.isPlain)) {
|
|
124
126
|
Object.assign(Pool.prototype, withdrawMixins_1.withdrawLendingOrCryptoMixin);
|
|
125
127
|
}
|
|
126
128
|
else {
|
|
127
129
|
Object.assign(Pool.prototype, withdrawMixins_1.withdrawPlainMixin);
|
|
128
130
|
}
|
|
129
131
|
// withdrawWrapped and withdrawWrappedEstimateGas
|
|
130
|
-
if (
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
if (!poolDummy.isPlain && !poolDummy.isFake) {
|
|
133
|
+
if ((poolDummy.isLending || poolDummy.isCrypto) && !poolDummy.zap) {
|
|
134
|
+
Object.assign(Pool.prototype, withdrawWrappedMixins_1.withdrawWrapped3argsMixin);
|
|
135
|
+
Object.assign(Pool.prototype, withdrawExpectedMixins_1.withdrawWrappedExpectedMixin);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
Object.assign(Pool.prototype, withdrawWrappedMixins_1.withdrawWrapped2argsMixin);
|
|
139
|
+
Object.assign(Pool.prototype, withdrawExpectedMixins_1.withdrawWrappedExpectedMixin);
|
|
140
|
+
}
|
|
137
141
|
}
|
|
138
142
|
// withdrawImbalance and withdrawImbalanceEstimateGas
|
|
139
143
|
if (!poolDummy.isCrypto) {
|
|
@@ -179,7 +183,7 @@ var getPool = function (poolId) {
|
|
|
179
183
|
else if (poolDummy.zap) { // including susd
|
|
180
184
|
Object.assign(Pool.prototype, withdrawOneCoinMixins_1.withdrawOneCoinZapMixin);
|
|
181
185
|
}
|
|
182
|
-
else if (poolDummy.isLending || poolDummy.isCrypto) {
|
|
186
|
+
else if (poolDummy.isLending || (poolDummy.isCrypto && !poolDummy.isPlain)) {
|
|
183
187
|
Object.assign(Pool.prototype, withdrawOneCoinMixins_1.withdrawOneCoinLendingOrCryptoMixin);
|
|
184
188
|
}
|
|
185
189
|
else {
|