@curvefi/api 2.68.40 → 2.68.42
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.
- package/lib/pools/PoolTemplate.js +22 -22
- package/lib/pools/mixins/depositMixins.d.ts +5 -5
- package/lib/pools/mixins/depositMixins.js +15 -15
- package/lib/pools/mixins/depositWrappedMixins.d.ts +2 -2
- package/lib/pools/mixins/depositWrappedMixins.js +6 -6
- package/lib/pools/mixins/withdrawImbalanceMixins.d.ts +4 -4
- package/lib/pools/mixins/withdrawImbalanceMixins.js +12 -12
- package/lib/pools/mixins/withdrawImbalanceWrappedMixins.d.ts +2 -2
- package/lib/pools/mixins/withdrawImbalanceWrappedMixins.js +6 -6
- package/lib/pools/mixins/withdrawMixins.d.ts +5 -5
- package/lib/pools/mixins/withdrawMixins.js +15 -15
- package/lib/pools/mixins/withdrawOneCoinMixins.d.ts +5 -5
- package/lib/pools/mixins/withdrawOneCoinMixins.js +15 -15
- package/lib/pools/mixins/withdrawOneCoinWrappedMixins.d.ts +2 -2
- package/lib/pools/mixins/withdrawOneCoinWrappedMixins.js +6 -6
- package/lib/pools/mixins/withdrawWrappedMixins.d.ts +2 -2
- package/lib/pools/mixins/withdrawWrappedMixins.js +6 -6
- package/package.json +2 -2
|
@@ -787,8 +787,8 @@ export class PoolTemplate extends CorePool {
|
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
789
|
// OVERRIDE
|
|
790
|
-
depositEstimateGas(
|
|
791
|
-
return __awaiter(this,
|
|
790
|
+
depositEstimateGas(amounts_1) {
|
|
791
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
792
792
|
throw Error(`depositEstimateGas method doesn't exist for pool ${this.name} (id: ${this.name})`);
|
|
793
793
|
});
|
|
794
794
|
}
|
|
@@ -861,8 +861,8 @@ export class PoolTemplate extends CorePool {
|
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
863
|
// OVERRIDE
|
|
864
|
-
depositWrappedEstimateGas(
|
|
865
|
-
return __awaiter(this,
|
|
864
|
+
depositWrappedEstimateGas(amounts_1) {
|
|
865
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
866
866
|
throw Error(`depositWrapped method doesn't exist for pool ${this.name} (id: ${this.name})`);
|
|
867
867
|
});
|
|
868
868
|
}
|
|
@@ -1144,12 +1144,12 @@ export class PoolTemplate extends CorePool {
|
|
|
1144
1144
|
return approveCoinsTx;
|
|
1145
1145
|
});
|
|
1146
1146
|
}
|
|
1147
|
-
depositAndStakeEstimateGas(
|
|
1148
|
-
return __awaiter(this,
|
|
1147
|
+
depositAndStakeEstimateGas(amounts_1) {
|
|
1148
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 1) {
|
|
1149
1149
|
if (this.gauge.address === this.curve.constants.ZERO_ADDRESS) {
|
|
1150
1150
|
throw Error(`depositAndStake method doesn't exist for pool ${this.name} (id: ${this.name}). There is no gauge`);
|
|
1151
1151
|
}
|
|
1152
|
-
return yield this._depositAndStake(amounts,
|
|
1152
|
+
return yield this._depositAndStake(amounts, slippage, true, true);
|
|
1153
1153
|
});
|
|
1154
1154
|
}
|
|
1155
1155
|
depositAndStake(amounts_1) {
|
|
@@ -1241,14 +1241,14 @@ export class PoolTemplate extends CorePool {
|
|
|
1241
1241
|
return approveCoinsTx;
|
|
1242
1242
|
});
|
|
1243
1243
|
}
|
|
1244
|
-
depositAndStakeWrappedEstimateGas(
|
|
1245
|
-
return __awaiter(this,
|
|
1244
|
+
depositAndStakeWrappedEstimateGas(amounts_1) {
|
|
1245
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 1) {
|
|
1246
1246
|
if (this.gauge.address === this.curve.constants.ZERO_ADDRESS) {
|
|
1247
1247
|
throw Error(`depositAndStakeWrapped method doesn't exist for pool ${this.name} (id: ${this.name}). There is no gauge`);
|
|
1248
1248
|
}
|
|
1249
1249
|
if (this.isPlain || this.isFake)
|
|
1250
1250
|
throw Error(`depositAndStakeWrapped method doesn't exist for pool ${this.name} (id: ${this.name})`);
|
|
1251
|
-
return yield this._depositAndStake(amounts,
|
|
1251
|
+
return yield this._depositAndStake(amounts, slippage, false, true);
|
|
1252
1252
|
});
|
|
1253
1253
|
}
|
|
1254
1254
|
depositAndStakeWrapped(amounts_1) {
|
|
@@ -1349,8 +1349,8 @@ export class PoolTemplate extends CorePool {
|
|
|
1349
1349
|
});
|
|
1350
1350
|
}
|
|
1351
1351
|
// OVERRIDE
|
|
1352
|
-
withdrawEstimateGas(
|
|
1353
|
-
return __awaiter(this,
|
|
1352
|
+
withdrawEstimateGas(lpTokenAmount_1) {
|
|
1353
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, slippage = 0.1) {
|
|
1354
1354
|
throw Error(`withdraw method doesn't exist for pool ${this.name} (id: ${this.name})`);
|
|
1355
1355
|
});
|
|
1356
1356
|
}
|
|
@@ -1374,8 +1374,8 @@ export class PoolTemplate extends CorePool {
|
|
|
1374
1374
|
});
|
|
1375
1375
|
}
|
|
1376
1376
|
// OVERRIDE
|
|
1377
|
-
withdrawWrappedEstimateGas(
|
|
1378
|
-
return __awaiter(this,
|
|
1377
|
+
withdrawWrappedEstimateGas(lpTokenAmount_1) {
|
|
1378
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, slippage = 0.1) {
|
|
1379
1379
|
throw Error(`withdrawWrapped method doesn't exist for pool ${this.name} (id: ${this.name})`);
|
|
1380
1380
|
});
|
|
1381
1381
|
}
|
|
@@ -1464,8 +1464,8 @@ export class PoolTemplate extends CorePool {
|
|
|
1464
1464
|
});
|
|
1465
1465
|
}
|
|
1466
1466
|
// OVERRIDE
|
|
1467
|
-
withdrawImbalanceEstimateGas(
|
|
1468
|
-
return __awaiter(this,
|
|
1467
|
+
withdrawImbalanceEstimateGas(amounts_1) {
|
|
1468
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
1469
1469
|
throw Error(`withdrawImbalance method doesn't exist for pool ${this.name} (id: ${this.name})`);
|
|
1470
1470
|
});
|
|
1471
1471
|
}
|
|
@@ -1494,8 +1494,8 @@ export class PoolTemplate extends CorePool {
|
|
|
1494
1494
|
});
|
|
1495
1495
|
}
|
|
1496
1496
|
// OVERRIDE
|
|
1497
|
-
withdrawImbalanceWrappedEstimateGas(
|
|
1498
|
-
return __awaiter(this,
|
|
1497
|
+
withdrawImbalanceWrappedEstimateGas(amounts_1) {
|
|
1498
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
1499
1499
|
throw Error(`withdrawImbalanceWrapped method doesn't exist for pool ${this.name} (id: ${this.name})`);
|
|
1500
1500
|
});
|
|
1501
1501
|
}
|
|
@@ -1583,8 +1583,8 @@ export class PoolTemplate extends CorePool {
|
|
|
1583
1583
|
});
|
|
1584
1584
|
}
|
|
1585
1585
|
// OVERRIDE
|
|
1586
|
-
withdrawOneCoinEstimateGas(
|
|
1587
|
-
return __awaiter(this,
|
|
1586
|
+
withdrawOneCoinEstimateGas(lpTokenAmount_1, coin_1) {
|
|
1587
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, coin, slippage = 0.1) {
|
|
1588
1588
|
throw Error(`withdrawOneCoin method doesn't exist for pool ${this.name} (id: ${this.name})`);
|
|
1589
1589
|
});
|
|
1590
1590
|
}
|
|
@@ -1632,8 +1632,8 @@ export class PoolTemplate extends CorePool {
|
|
|
1632
1632
|
});
|
|
1633
1633
|
}
|
|
1634
1634
|
// OVERRIDE
|
|
1635
|
-
withdrawOneCoinWrappedEstimateGas(
|
|
1636
|
-
return __awaiter(this,
|
|
1635
|
+
withdrawOneCoinWrappedEstimateGas(lpTokenAmount_1, coin_1) {
|
|
1636
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, coin, slippage = 0.1) {
|
|
1637
1637
|
throw Error(`withdrawOneCoinWrapped method doesn't exist for pool ${this.name} (id: ${this.name})`);
|
|
1638
1638
|
});
|
|
1639
1639
|
}
|
|
@@ -2,31 +2,31 @@ import { PoolTemplate } from "../PoolTemplate.js";
|
|
|
2
2
|
import { IMethodInfo } from "../../interfaces.js";
|
|
3
3
|
export declare const depositMetaFactoryMixin: {
|
|
4
4
|
_deposit(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
5
|
-
depositEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number>;
|
|
5
|
+
depositEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number>;
|
|
6
6
|
deposit(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
7
7
|
getDepositInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
8
8
|
};
|
|
9
9
|
export declare const depositCryptoMetaFactoryMixin: {
|
|
10
10
|
_deposit(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
11
|
-
depositEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number | number[]>;
|
|
11
|
+
depositEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number | number[]>;
|
|
12
12
|
deposit(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
13
13
|
getDepositInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
14
14
|
};
|
|
15
15
|
export declare const depositZapMixin: {
|
|
16
16
|
_deposit(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
17
|
-
depositEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number | number[]>;
|
|
17
|
+
depositEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number | number[]>;
|
|
18
18
|
deposit(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
19
19
|
getDepositInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
20
20
|
};
|
|
21
21
|
export declare const depositLendingOrCryptoMixin: {
|
|
22
22
|
_deposit(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
23
|
-
depositEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number | number[]>;
|
|
23
|
+
depositEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number | number[]>;
|
|
24
24
|
deposit(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
25
25
|
getDepositInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
26
26
|
};
|
|
27
27
|
export declare const depositPlainMixin: {
|
|
28
28
|
_deposit(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
29
|
-
depositEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number | number[]>;
|
|
29
|
+
depositEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number | number[]>;
|
|
30
30
|
deposit(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
31
31
|
getDepositInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
32
32
|
};
|
|
@@ -53,10 +53,10 @@ export const depositMetaFactoryMixin = {
|
|
|
53
53
|
return (yield contract.add_liquidity(this.address, _amounts, _minMintAmount, Object.assign(Object.assign({}, this.curve.options), { gasLimit, value }))).hash;
|
|
54
54
|
});
|
|
55
55
|
},
|
|
56
|
-
depositEstimateGas(
|
|
57
|
-
return __awaiter(this,
|
|
56
|
+
depositEstimateGas(amounts_1) {
|
|
57
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
58
58
|
const _amounts = yield _depositCheck.call(this, amounts, true);
|
|
59
|
-
return yield depositMetaFactoryMixin._deposit.call(this, _amounts,
|
|
59
|
+
return yield depositMetaFactoryMixin._deposit.call(this, _amounts, slippage, true);
|
|
60
60
|
});
|
|
61
61
|
},
|
|
62
62
|
deposit(amounts, slippage) {
|
|
@@ -90,10 +90,10 @@ export const depositCryptoMetaFactoryMixin = {
|
|
|
90
90
|
return (yield contract.add_liquidity(this.address, _amounts, _minMintAmount, true, Object.assign(Object.assign({}, this.curve.options), { gasLimit, value }))).hash;
|
|
91
91
|
});
|
|
92
92
|
},
|
|
93
|
-
depositEstimateGas(
|
|
94
|
-
return __awaiter(this,
|
|
93
|
+
depositEstimateGas(amounts_1) {
|
|
94
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
95
95
|
const _amounts = yield _depositCheck.call(this, amounts, true);
|
|
96
|
-
return yield depositCryptoMetaFactoryMixin._deposit.call(this, _amounts,
|
|
96
|
+
return yield depositCryptoMetaFactoryMixin._deposit.call(this, _amounts, slippage, true);
|
|
97
97
|
});
|
|
98
98
|
},
|
|
99
99
|
deposit(amounts, slippage) {
|
|
@@ -130,10 +130,10 @@ export const depositZapMixin = {
|
|
|
130
130
|
return (yield contract.add_liquidity(...args, Object.assign(Object.assign({}, this.curve.options), { gasLimit, value }))).hash;
|
|
131
131
|
});
|
|
132
132
|
},
|
|
133
|
-
depositEstimateGas(
|
|
134
|
-
return __awaiter(this,
|
|
133
|
+
depositEstimateGas(amounts_1) {
|
|
134
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
135
135
|
const _amounts = yield _depositCheck.call(this, amounts, true);
|
|
136
|
-
return yield depositZapMixin._deposit.call(this, _amounts,
|
|
136
|
+
return yield depositZapMixin._deposit.call(this, _amounts, slippage, true);
|
|
137
137
|
});
|
|
138
138
|
},
|
|
139
139
|
deposit(amounts, slippage) {
|
|
@@ -167,10 +167,10 @@ export const depositLendingOrCryptoMixin = {
|
|
|
167
167
|
return (yield contract.add_liquidity(_amounts, _minMintAmount, true, Object.assign(Object.assign({}, this.curve.options), { gasLimit, value }))).hash;
|
|
168
168
|
});
|
|
169
169
|
},
|
|
170
|
-
depositEstimateGas(
|
|
171
|
-
return __awaiter(this,
|
|
170
|
+
depositEstimateGas(amounts_1) {
|
|
171
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
172
172
|
const _amounts = yield _depositCheck.call(this, amounts, true);
|
|
173
|
-
return yield depositLendingOrCryptoMixin._deposit.call(this, _amounts,
|
|
173
|
+
return yield depositLendingOrCryptoMixin._deposit.call(this, _amounts, slippage, true);
|
|
174
174
|
});
|
|
175
175
|
},
|
|
176
176
|
deposit(amounts, slippage) {
|
|
@@ -204,10 +204,10 @@ export const depositPlainMixin = {
|
|
|
204
204
|
return (yield contract.add_liquidity(_amounts, _minMintAmount, Object.assign(Object.assign({}, this.curve.options), { gasLimit, value }))).hash;
|
|
205
205
|
});
|
|
206
206
|
},
|
|
207
|
-
depositEstimateGas(
|
|
208
|
-
return __awaiter(this,
|
|
207
|
+
depositEstimateGas(amounts_1) {
|
|
208
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
209
209
|
const _amounts = yield _depositCheck.call(this, amounts, true);
|
|
210
|
-
return yield depositPlainMixin._deposit.call(this, _amounts,
|
|
210
|
+
return yield depositPlainMixin._deposit.call(this, _amounts, slippage, true);
|
|
211
211
|
});
|
|
212
212
|
},
|
|
213
213
|
deposit(amounts, slippage) {
|
|
@@ -2,13 +2,13 @@ import { PoolTemplate } from "../PoolTemplate.js";
|
|
|
2
2
|
import { IMethodInfo } from "../../interfaces.js";
|
|
3
3
|
export declare const depositWrapped2argsMixin: {
|
|
4
4
|
_depositWrapped(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
5
|
-
depositWrappedEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number>;
|
|
5
|
+
depositWrappedEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number>;
|
|
6
6
|
depositWrapped(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
7
7
|
getDepositWrappedInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
8
8
|
};
|
|
9
9
|
export declare const depositWrapped3argsMixin: {
|
|
10
10
|
_depositWrapped(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
11
|
-
depositWrappedEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number>;
|
|
11
|
+
depositWrappedEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number>;
|
|
12
12
|
depositWrapped(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
13
13
|
getDepositWrappedInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
14
14
|
};
|
|
@@ -56,10 +56,10 @@ export const depositWrapped2argsMixin = {
|
|
|
56
56
|
return (yield contract.add_liquidity(_amounts, _minMintAmount, Object.assign(Object.assign({}, this.curve.options), { gasLimit, value }))).hash;
|
|
57
57
|
});
|
|
58
58
|
},
|
|
59
|
-
depositWrappedEstimateGas(
|
|
60
|
-
return __awaiter(this,
|
|
59
|
+
depositWrappedEstimateGas(amounts_1) {
|
|
60
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
61
61
|
const _amounts = yield _depositWrappedCheck.call(this, amounts, true);
|
|
62
|
-
return yield depositWrapped2argsMixin._depositWrapped.call(this, _amounts,
|
|
62
|
+
return yield depositWrapped2argsMixin._depositWrapped.call(this, _amounts, slippage, true);
|
|
63
63
|
});
|
|
64
64
|
},
|
|
65
65
|
depositWrapped(amounts, slippage) {
|
|
@@ -93,10 +93,10 @@ export const depositWrapped3argsMixin = {
|
|
|
93
93
|
return (yield contract.add_liquidity(_amounts, _minMintAmount, false, Object.assign(Object.assign({}, this.curve.options), { gasLimit, value }))).hash;
|
|
94
94
|
});
|
|
95
95
|
},
|
|
96
|
-
depositWrappedEstimateGas(
|
|
97
|
-
return __awaiter(this,
|
|
96
|
+
depositWrappedEstimateGas(amounts_1) {
|
|
97
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
98
98
|
const _amounts = yield _depositWrappedCheck.call(this, amounts, true);
|
|
99
|
-
return yield depositWrapped3argsMixin._depositWrapped.call(this, _amounts,
|
|
99
|
+
return yield depositWrapped3argsMixin._depositWrapped.call(this, _amounts, slippage, true);
|
|
100
100
|
});
|
|
101
101
|
},
|
|
102
102
|
depositWrapped(amounts, slippage) {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { PoolTemplate } from "../PoolTemplate.js";
|
|
2
2
|
export declare const withdrawImbalanceMetaFactoryMixin: {
|
|
3
3
|
_withdrawImbalance(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
4
|
-
withdrawImbalanceEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number>;
|
|
4
|
+
withdrawImbalanceEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number>;
|
|
5
5
|
withdrawImbalance(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
6
6
|
};
|
|
7
7
|
export declare const withdrawImbalanceZapMixin: {
|
|
8
8
|
_withdrawImbalance(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
9
|
-
withdrawImbalanceEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number>;
|
|
9
|
+
withdrawImbalanceEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number>;
|
|
10
10
|
withdrawImbalance(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
11
11
|
};
|
|
12
12
|
export declare const withdrawImbalanceLendingMixin: {
|
|
13
13
|
_withdrawImbalance(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
14
|
-
withdrawImbalanceEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number>;
|
|
14
|
+
withdrawImbalanceEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number>;
|
|
15
15
|
withdrawImbalance(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
16
16
|
};
|
|
17
17
|
export declare const withdrawImbalancePlainMixin: {
|
|
18
18
|
_withdrawImbalance(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
19
|
-
withdrawImbalanceEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number>;
|
|
19
|
+
withdrawImbalanceEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number>;
|
|
20
20
|
withdrawImbalance(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
21
21
|
};
|
|
@@ -44,10 +44,10 @@ export const withdrawImbalanceMetaFactoryMixin = {
|
|
|
44
44
|
return (yield contract.remove_liquidity_imbalance(this.address, _amounts, _maxBurnAmount, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
45
45
|
});
|
|
46
46
|
},
|
|
47
|
-
withdrawImbalanceEstimateGas(
|
|
48
|
-
return __awaiter(this,
|
|
47
|
+
withdrawImbalanceEstimateGas(amounts_1) {
|
|
48
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
49
49
|
const _amounts = yield _withdrawImbalanceCheck.call(this, amounts, true);
|
|
50
|
-
return yield withdrawImbalanceMetaFactoryMixin._withdrawImbalance.call(this, _amounts,
|
|
50
|
+
return yield withdrawImbalanceMetaFactoryMixin._withdrawImbalance.call(this, _amounts, slippage, true);
|
|
51
51
|
});
|
|
52
52
|
},
|
|
53
53
|
withdrawImbalance(amounts, slippage) {
|
|
@@ -71,10 +71,10 @@ export const withdrawImbalanceZapMixin = {
|
|
|
71
71
|
return (yield contract.remove_liquidity_imbalance(_amounts, _maxBurnAmount, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
72
72
|
});
|
|
73
73
|
},
|
|
74
|
-
withdrawImbalanceEstimateGas(
|
|
75
|
-
return __awaiter(this,
|
|
74
|
+
withdrawImbalanceEstimateGas(amounts_1) {
|
|
75
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
76
76
|
const _amounts = yield _withdrawImbalanceCheck.call(this, amounts, true);
|
|
77
|
-
return yield withdrawImbalanceZapMixin._withdrawImbalance.call(this, _amounts,
|
|
77
|
+
return yield withdrawImbalanceZapMixin._withdrawImbalance.call(this, _amounts, slippage, true);
|
|
78
78
|
});
|
|
79
79
|
},
|
|
80
80
|
withdrawImbalance(amounts, slippage) {
|
|
@@ -96,10 +96,10 @@ export const withdrawImbalanceLendingMixin = {
|
|
|
96
96
|
return (yield contract.remove_liquidity_imbalance(_amounts, _maxBurnAmount, true, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
97
97
|
});
|
|
98
98
|
},
|
|
99
|
-
withdrawImbalanceEstimateGas(
|
|
100
|
-
return __awaiter(this,
|
|
99
|
+
withdrawImbalanceEstimateGas(amounts_1) {
|
|
100
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
101
101
|
const _amounts = yield _withdrawImbalanceCheck.call(this, amounts, true);
|
|
102
|
-
return yield withdrawImbalanceLendingMixin._withdrawImbalance.call(this, _amounts,
|
|
102
|
+
return yield withdrawImbalanceLendingMixin._withdrawImbalance.call(this, _amounts, slippage, true);
|
|
103
103
|
});
|
|
104
104
|
},
|
|
105
105
|
withdrawImbalance(amounts, slippage) {
|
|
@@ -121,10 +121,10 @@ export const withdrawImbalancePlainMixin = {
|
|
|
121
121
|
return (yield contract.remove_liquidity_imbalance(_amounts, _maxBurnAmount, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
122
122
|
});
|
|
123
123
|
},
|
|
124
|
-
withdrawImbalanceEstimateGas(
|
|
125
|
-
return __awaiter(this,
|
|
124
|
+
withdrawImbalanceEstimateGas(amounts_1) {
|
|
125
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
126
126
|
const _amounts = yield _withdrawImbalanceCheck.call(this, amounts, true);
|
|
127
|
-
return yield withdrawImbalancePlainMixin._withdrawImbalance.call(this, _amounts,
|
|
127
|
+
return yield withdrawImbalancePlainMixin._withdrawImbalance.call(this, _amounts, slippage, true);
|
|
128
128
|
});
|
|
129
129
|
},
|
|
130
130
|
withdrawImbalance(amounts, slippage) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PoolTemplate } from "../PoolTemplate.js";
|
|
2
2
|
export declare const withdrawImbalanceWrapped2argsMixin: {
|
|
3
3
|
_withdrawImbalanceWrapped(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
4
|
-
withdrawImbalanceWrappedEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number>;
|
|
4
|
+
withdrawImbalanceWrappedEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number>;
|
|
5
5
|
withdrawImbalanceWrapped(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
6
6
|
};
|
|
7
7
|
export declare const withdrawImbalanceWrapped3argsMixin: {
|
|
8
8
|
_withdrawImbalanceWrapped(this: PoolTemplate, _amounts: bigint[], slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
9
|
-
withdrawImbalanceWrappedEstimateGas(this: PoolTemplate, amounts: (number | string)[]): Promise<number>;
|
|
9
|
+
withdrawImbalanceWrappedEstimateGas(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<number>;
|
|
10
10
|
withdrawImbalanceWrapped(this: PoolTemplate, amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
11
11
|
};
|
|
@@ -38,10 +38,10 @@ export const withdrawImbalanceWrapped2argsMixin = {
|
|
|
38
38
|
return (yield contract.remove_liquidity_imbalance(_amounts, _maxBurnAmount, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
|
-
withdrawImbalanceWrappedEstimateGas(
|
|
42
|
-
return __awaiter(this,
|
|
41
|
+
withdrawImbalanceWrappedEstimateGas(amounts_1) {
|
|
42
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
43
43
|
const _amounts = yield _withdrawImbalanceWrappedCheck.call(this, amounts);
|
|
44
|
-
return yield withdrawImbalanceWrapped2argsMixin._withdrawImbalanceWrapped.call(this, _amounts,
|
|
44
|
+
return yield withdrawImbalanceWrapped2argsMixin._withdrawImbalanceWrapped.call(this, _amounts, slippage, true);
|
|
45
45
|
});
|
|
46
46
|
},
|
|
47
47
|
withdrawImbalanceWrapped(amounts, slippage) {
|
|
@@ -63,10 +63,10 @@ export const withdrawImbalanceWrapped3argsMixin = {
|
|
|
63
63
|
return (yield contract.remove_liquidity_imbalance(_amounts, _maxBurnAmount, false, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
64
64
|
});
|
|
65
65
|
},
|
|
66
|
-
withdrawImbalanceWrappedEstimateGas(
|
|
67
|
-
return __awaiter(this,
|
|
66
|
+
withdrawImbalanceWrappedEstimateGas(amounts_1) {
|
|
67
|
+
return __awaiter(this, arguments, void 0, function* (amounts, slippage = 0.1) {
|
|
68
68
|
const _amounts = yield _withdrawImbalanceWrappedCheck.call(this, amounts);
|
|
69
|
-
return yield withdrawImbalanceWrapped3argsMixin._withdrawImbalanceWrapped.call(this, _amounts,
|
|
69
|
+
return yield withdrawImbalanceWrapped3argsMixin._withdrawImbalanceWrapped.call(this, _amounts, slippage, true);
|
|
70
70
|
});
|
|
71
71
|
},
|
|
72
72
|
withdrawImbalanceWrapped(amounts, slippage) {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { PoolTemplate } from "../PoolTemplate.js";
|
|
2
2
|
export declare const withdrawMetaFactoryMixin: {
|
|
3
3
|
_withdraw(this: PoolTemplate, _lpTokenAmount: bigint, slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
4
|
-
withdrawEstimateGas(this: PoolTemplate, lpTokenAmount: number | string): Promise<number | number[]>;
|
|
4
|
+
withdrawEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<number | number[]>;
|
|
5
5
|
withdraw(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<string>;
|
|
6
6
|
};
|
|
7
7
|
export declare const withdrawCryptoMetaFactoryMixin: {
|
|
8
8
|
_withdraw(this: PoolTemplate, _lpTokenAmount: bigint, slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
9
|
-
withdrawEstimateGas(this: PoolTemplate, lpTokenAmount: number | string): Promise<number | number[]>;
|
|
9
|
+
withdrawEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<number | number[]>;
|
|
10
10
|
withdraw(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<string>;
|
|
11
11
|
};
|
|
12
12
|
export declare const withdrawZapMixin: {
|
|
13
13
|
_withdraw(this: PoolTemplate, _lpTokenAmount: bigint, slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
14
|
-
withdrawEstimateGas(this: PoolTemplate, lpTokenAmount: number | string): Promise<number | number[]>;
|
|
14
|
+
withdrawEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<number | number[]>;
|
|
15
15
|
withdraw(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<string>;
|
|
16
16
|
};
|
|
17
17
|
export declare const withdrawLendingOrCryptoMixin: {
|
|
18
18
|
_withdraw(this: PoolTemplate, _lpTokenAmount: bigint, slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
19
|
-
withdrawEstimateGas(this: PoolTemplate, lpTokenAmount: number | string): Promise<number | number[]>;
|
|
19
|
+
withdrawEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<number | number[]>;
|
|
20
20
|
withdraw(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<string>;
|
|
21
21
|
};
|
|
22
22
|
export declare const withdrawPlainMixin: {
|
|
23
23
|
_withdraw(this: PoolTemplate, _lpTokenAmount: bigint, slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
24
|
-
withdrawEstimateGas(this: PoolTemplate, lpTokenAmount: number | string): Promise<number | number[]>;
|
|
24
|
+
withdrawEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<number | number[]>;
|
|
25
25
|
withdraw(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<string>;
|
|
26
26
|
};
|
|
@@ -44,10 +44,10 @@ export const withdrawMetaFactoryMixin = {
|
|
|
44
44
|
return (yield contract.remove_liquidity(this.address, _lpTokenAmount, _minAmounts, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
45
45
|
});
|
|
46
46
|
},
|
|
47
|
-
withdrawEstimateGas(
|
|
48
|
-
return __awaiter(this,
|
|
47
|
+
withdrawEstimateGas(lpTokenAmount_1) {
|
|
48
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, slippage = 0.1) {
|
|
49
49
|
const _lpTokenAmount = yield _withdrawCheck.call(this, lpTokenAmount, true);
|
|
50
|
-
return yield withdrawMetaFactoryMixin._withdraw.call(this, _lpTokenAmount,
|
|
50
|
+
return yield withdrawMetaFactoryMixin._withdraw.call(this, _lpTokenAmount, slippage, true);
|
|
51
51
|
});
|
|
52
52
|
},
|
|
53
53
|
withdraw(lpTokenAmount, slippage) {
|
|
@@ -71,10 +71,10 @@ export const withdrawCryptoMetaFactoryMixin = {
|
|
|
71
71
|
return (yield contract.remove_liquidity(this.address, _lpTokenAmount, _minAmounts, true, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
72
72
|
});
|
|
73
73
|
},
|
|
74
|
-
withdrawEstimateGas(
|
|
75
|
-
return __awaiter(this,
|
|
74
|
+
withdrawEstimateGas(lpTokenAmount_1) {
|
|
75
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, slippage = 0.1) {
|
|
76
76
|
const _lpTokenAmount = yield _withdrawCheck.call(this, lpTokenAmount, true);
|
|
77
|
-
return yield withdrawCryptoMetaFactoryMixin._withdraw.call(this, _lpTokenAmount,
|
|
77
|
+
return yield withdrawCryptoMetaFactoryMixin._withdraw.call(this, _lpTokenAmount, slippage, true);
|
|
78
78
|
});
|
|
79
79
|
},
|
|
80
80
|
withdraw(lpTokenAmount, slippage) {
|
|
@@ -101,10 +101,10 @@ export const withdrawZapMixin = {
|
|
|
101
101
|
return (yield contract.remove_liquidity(...args, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
102
102
|
});
|
|
103
103
|
},
|
|
104
|
-
withdrawEstimateGas(
|
|
105
|
-
return __awaiter(this,
|
|
104
|
+
withdrawEstimateGas(lpTokenAmount_1) {
|
|
105
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, slippage = 0.1) {
|
|
106
106
|
const _lpTokenAmount = yield _withdrawCheck.call(this, lpTokenAmount, true);
|
|
107
|
-
return yield withdrawZapMixin._withdraw.call(this, _lpTokenAmount,
|
|
107
|
+
return yield withdrawZapMixin._withdraw.call(this, _lpTokenAmount, slippage, true);
|
|
108
108
|
});
|
|
109
109
|
},
|
|
110
110
|
withdraw(lpTokenAmount, slippage) {
|
|
@@ -126,10 +126,10 @@ export const withdrawLendingOrCryptoMixin = {
|
|
|
126
126
|
return (yield contract.remove_liquidity(_lpTokenAmount, _minAmounts, true, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
127
127
|
});
|
|
128
128
|
},
|
|
129
|
-
withdrawEstimateGas(
|
|
130
|
-
return __awaiter(this,
|
|
129
|
+
withdrawEstimateGas(lpTokenAmount_1) {
|
|
130
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, slippage = 0.1) {
|
|
131
131
|
const _lpTokenAmount = yield _withdrawCheck.call(this, lpTokenAmount, true);
|
|
132
|
-
return yield withdrawLendingOrCryptoMixin._withdraw.call(this, _lpTokenAmount,
|
|
132
|
+
return yield withdrawLendingOrCryptoMixin._withdraw.call(this, _lpTokenAmount, slippage, true);
|
|
133
133
|
});
|
|
134
134
|
},
|
|
135
135
|
withdraw(lpTokenAmount, slippage) {
|
|
@@ -151,10 +151,10 @@ export const withdrawPlainMixin = {
|
|
|
151
151
|
return (yield contract.remove_liquidity(_lpTokenAmount, _minAmounts, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
152
152
|
});
|
|
153
153
|
},
|
|
154
|
-
withdrawEstimateGas(
|
|
155
|
-
return __awaiter(this,
|
|
154
|
+
withdrawEstimateGas(lpTokenAmount_1) {
|
|
155
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, slippage = 0.1) {
|
|
156
156
|
const _lpTokenAmount = yield _withdrawCheck.call(this, lpTokenAmount, true);
|
|
157
|
-
return yield withdrawPlainMixin._withdraw.call(this, _lpTokenAmount,
|
|
157
|
+
return yield withdrawPlainMixin._withdraw.call(this, _lpTokenAmount, slippage, true);
|
|
158
158
|
});
|
|
159
159
|
},
|
|
160
160
|
withdraw(lpTokenAmount, slippage) {
|
|
@@ -2,31 +2,31 @@ import { PoolTemplate } from "../PoolTemplate.js";
|
|
|
2
2
|
import { IMethodInfo } from "../../interfaces.js";
|
|
3
3
|
export declare const withdrawOneCoinMetaFactoryMixin: {
|
|
4
4
|
_withdrawOneCoin(this: PoolTemplate, _lpTokenAmount: bigint, i: number, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
5
|
-
withdrawOneCoinEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number): Promise<number | number[]>;
|
|
5
|
+
withdrawOneCoinEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<number | number[]>;
|
|
6
6
|
withdrawOneCoin(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<string>;
|
|
7
7
|
getWithdrawOneCoinInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
8
8
|
};
|
|
9
9
|
export declare const withdrawOneCoinCryptoMetaFactoryMixin: {
|
|
10
10
|
_withdrawOneCoin(this: PoolTemplate, _lpTokenAmount: bigint, i: number, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
11
|
-
withdrawOneCoinEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number): Promise<number | number[]>;
|
|
11
|
+
withdrawOneCoinEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<number | number[]>;
|
|
12
12
|
withdrawOneCoin(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<string>;
|
|
13
13
|
getWithdrawOneCoinInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
14
14
|
};
|
|
15
15
|
export declare const withdrawOneCoinZapMixin: {
|
|
16
16
|
_withdrawOneCoin(this: PoolTemplate, _lpTokenAmount: bigint, i: number, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
17
|
-
withdrawOneCoinEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number): Promise<number | number[]>;
|
|
17
|
+
withdrawOneCoinEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<number | number[]>;
|
|
18
18
|
withdrawOneCoin(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<string>;
|
|
19
19
|
getWithdrawOneCoinInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
20
20
|
};
|
|
21
21
|
export declare const withdrawOneCoinLendingOrCryptoMixin: {
|
|
22
22
|
_withdrawOneCoin(this: PoolTemplate, _lpTokenAmount: bigint, i: number, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
23
|
-
withdrawOneCoinEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number): Promise<number | number[]>;
|
|
23
|
+
withdrawOneCoinEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<number | number[]>;
|
|
24
24
|
withdrawOneCoin(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<string>;
|
|
25
25
|
getWithdrawOneCoinInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
26
26
|
};
|
|
27
27
|
export declare const withdrawOneCoinPlainMixin: {
|
|
28
28
|
_withdrawOneCoin(this: PoolTemplate, _lpTokenAmount: bigint, i: number, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
29
|
-
withdrawOneCoinEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number): Promise<number | number[]>;
|
|
29
|
+
withdrawOneCoinEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<number | number[]>;
|
|
30
30
|
withdrawOneCoin(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<string>;
|
|
31
31
|
getWithdrawOneCoinInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
32
32
|
};
|
|
@@ -48,10 +48,10 @@ export const withdrawOneCoinMetaFactoryMixin = {
|
|
|
48
48
|
return (yield contract.remove_liquidity_one_coin(this.address, _lpTokenAmount, i, _minAmount, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
49
49
|
});
|
|
50
50
|
},
|
|
51
|
-
withdrawOneCoinEstimateGas(
|
|
52
|
-
return __awaiter(this,
|
|
51
|
+
withdrawOneCoinEstimateGas(lpTokenAmount_1, coin_1) {
|
|
52
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, coin, slippage = 0.1) {
|
|
53
53
|
const [_lpTokenAmount, i] = yield _withdrawOneCoinCheck.call(this, lpTokenAmount, coin, true);
|
|
54
|
-
return yield withdrawOneCoinMetaFactoryMixin._withdrawOneCoin.call(this, _lpTokenAmount, i,
|
|
54
|
+
return yield withdrawOneCoinMetaFactoryMixin._withdrawOneCoin.call(this, _lpTokenAmount, i, slippage, true);
|
|
55
55
|
});
|
|
56
56
|
},
|
|
57
57
|
withdrawOneCoin(lpTokenAmount, coin, slippage) {
|
|
@@ -83,10 +83,10 @@ export const withdrawOneCoinCryptoMetaFactoryMixin = {
|
|
|
83
83
|
return (yield contract.remove_liquidity_one_coin(this.address, _lpTokenAmount, i, _minAmount, true, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
84
84
|
});
|
|
85
85
|
},
|
|
86
|
-
withdrawOneCoinEstimateGas(
|
|
87
|
-
return __awaiter(this,
|
|
86
|
+
withdrawOneCoinEstimateGas(lpTokenAmount_1, coin_1) {
|
|
87
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, coin, slippage = 0.1) {
|
|
88
88
|
const [_lpTokenAmount, i] = yield _withdrawOneCoinCheck.call(this, lpTokenAmount, coin, true);
|
|
89
|
-
return yield withdrawOneCoinCryptoMetaFactoryMixin._withdrawOneCoin.call(this, _lpTokenAmount, i,
|
|
89
|
+
return yield withdrawOneCoinCryptoMetaFactoryMixin._withdrawOneCoin.call(this, _lpTokenAmount, i, slippage, true);
|
|
90
90
|
});
|
|
91
91
|
},
|
|
92
92
|
withdrawOneCoin(lpTokenAmount, coin, slippage) {
|
|
@@ -121,10 +121,10 @@ export const withdrawOneCoinZapMixin = {
|
|
|
121
121
|
return (yield contract.remove_liquidity_one_coin(...args, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
122
122
|
});
|
|
123
123
|
},
|
|
124
|
-
withdrawOneCoinEstimateGas(
|
|
125
|
-
return __awaiter(this,
|
|
124
|
+
withdrawOneCoinEstimateGas(lpTokenAmount_1, coin_1) {
|
|
125
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, coin, slippage = 0.1) {
|
|
126
126
|
const [_lpTokenAmount, i] = yield _withdrawOneCoinCheck.call(this, lpTokenAmount, coin, true);
|
|
127
|
-
return yield withdrawOneCoinZapMixin._withdrawOneCoin.call(this, _lpTokenAmount, i,
|
|
127
|
+
return yield withdrawOneCoinZapMixin._withdrawOneCoin.call(this, _lpTokenAmount, i, slippage, true);
|
|
128
128
|
});
|
|
129
129
|
},
|
|
130
130
|
withdrawOneCoin(lpTokenAmount, coin, slippage) {
|
|
@@ -154,10 +154,10 @@ export const withdrawOneCoinLendingOrCryptoMixin = {
|
|
|
154
154
|
return (yield contract.remove_liquidity_one_coin(_lpTokenAmount, i, _minAmount, true, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
155
155
|
});
|
|
156
156
|
},
|
|
157
|
-
withdrawOneCoinEstimateGas(
|
|
158
|
-
return __awaiter(this,
|
|
157
|
+
withdrawOneCoinEstimateGas(lpTokenAmount_1, coin_1) {
|
|
158
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, coin, slippage = 0.1) {
|
|
159
159
|
const [_lpTokenAmount, i] = yield _withdrawOneCoinCheck.call(this, lpTokenAmount, coin, true);
|
|
160
|
-
return yield withdrawOneCoinLendingOrCryptoMixin._withdrawOneCoin.call(this, _lpTokenAmount, i,
|
|
160
|
+
return yield withdrawOneCoinLendingOrCryptoMixin._withdrawOneCoin.call(this, _lpTokenAmount, i, slippage, true);
|
|
161
161
|
});
|
|
162
162
|
},
|
|
163
163
|
withdrawOneCoin(lpTokenAmount, coin, slippage) {
|
|
@@ -187,10 +187,10 @@ export const withdrawOneCoinPlainMixin = {
|
|
|
187
187
|
return (yield contract.remove_liquidity_one_coin(_lpTokenAmount, i, _minAmount, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
188
188
|
});
|
|
189
189
|
},
|
|
190
|
-
withdrawOneCoinEstimateGas(
|
|
191
|
-
return __awaiter(this,
|
|
190
|
+
withdrawOneCoinEstimateGas(lpTokenAmount_1, coin_1) {
|
|
191
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, coin, slippage = 0.1) {
|
|
192
192
|
const [_lpTokenAmount, i] = yield _withdrawOneCoinCheck.call(this, lpTokenAmount, coin, true);
|
|
193
|
-
return yield withdrawOneCoinPlainMixin._withdrawOneCoin.call(this, _lpTokenAmount, i,
|
|
193
|
+
return yield withdrawOneCoinPlainMixin._withdrawOneCoin.call(this, _lpTokenAmount, i, slippage, true);
|
|
194
194
|
});
|
|
195
195
|
},
|
|
196
196
|
withdrawOneCoin(lpTokenAmount, coin, slippage) {
|
|
@@ -2,13 +2,13 @@ import { PoolTemplate } from "../PoolTemplate.js";
|
|
|
2
2
|
import { IMethodInfo } from "../../interfaces.js";
|
|
3
3
|
export declare const withdrawOneCoinWrappedLendingOrCryptoMixin: {
|
|
4
4
|
_withdrawOneCoinWrapped(this: PoolTemplate, _lpTokenAmount: bigint, i: number, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
5
|
-
withdrawOneCoinWrappedEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number): Promise<number>;
|
|
5
|
+
withdrawOneCoinWrappedEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<number>;
|
|
6
6
|
withdrawOneCoinWrapped(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<string>;
|
|
7
7
|
getWithdrawOneCoinWrappedInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
8
8
|
};
|
|
9
9
|
export declare const withdrawOneCoinWrappedMixin: {
|
|
10
10
|
_withdrawOneCoinWrapped(this: PoolTemplate, _lpTokenAmount: bigint, i: number, slippage?: number, estimateGas?: boolean, getInfo?: boolean): Promise<string | number | number[] | IMethodInfo>;
|
|
11
|
-
withdrawOneCoinWrappedEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number): Promise<number>;
|
|
11
|
+
withdrawOneCoinWrappedEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<number>;
|
|
12
12
|
withdrawOneCoinWrapped(this: PoolTemplate, lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<string>;
|
|
13
13
|
getWithdrawOneCoinWrappedInfo(this: PoolTemplate): Promise<IMethodInfo>;
|
|
14
14
|
};
|
|
@@ -42,10 +42,10 @@ export const withdrawOneCoinWrappedLendingOrCryptoMixin = {
|
|
|
42
42
|
return (yield contract.remove_liquidity_one_coin(_lpTokenAmount, i, _minAmount, false, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
43
43
|
});
|
|
44
44
|
},
|
|
45
|
-
withdrawOneCoinWrappedEstimateGas(
|
|
46
|
-
return __awaiter(this,
|
|
45
|
+
withdrawOneCoinWrappedEstimateGas(lpTokenAmount_1, coin_1) {
|
|
46
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, coin, slippage = 0.1) {
|
|
47
47
|
const [_lpTokenAmount, i] = yield _withdrawOneCoinWrappedCheck.call(this, lpTokenAmount, coin);
|
|
48
|
-
return yield withdrawOneCoinWrappedLendingOrCryptoMixin._withdrawOneCoinWrapped.call(this, _lpTokenAmount, i,
|
|
48
|
+
return yield withdrawOneCoinWrappedLendingOrCryptoMixin._withdrawOneCoinWrapped.call(this, _lpTokenAmount, i, slippage, true);
|
|
49
49
|
});
|
|
50
50
|
},
|
|
51
51
|
withdrawOneCoinWrapped(lpTokenAmount, coin, slippage) {
|
|
@@ -75,10 +75,10 @@ export const withdrawOneCoinWrappedMixin = {
|
|
|
75
75
|
return (yield contract.remove_liquidity_one_coin(_lpTokenAmount, i, _minAmount, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
76
76
|
});
|
|
77
77
|
},
|
|
78
|
-
withdrawOneCoinWrappedEstimateGas(
|
|
79
|
-
return __awaiter(this,
|
|
78
|
+
withdrawOneCoinWrappedEstimateGas(lpTokenAmount_1, coin_1) {
|
|
79
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, coin, slippage = 0.1) {
|
|
80
80
|
const [_lpTokenAmount, i] = yield _withdrawOneCoinWrappedCheck.call(this, lpTokenAmount, coin);
|
|
81
|
-
return yield withdrawOneCoinWrappedMixin._withdrawOneCoinWrapped.call(this, _lpTokenAmount, i,
|
|
81
|
+
return yield withdrawOneCoinWrappedMixin._withdrawOneCoinWrapped.call(this, _lpTokenAmount, i, slippage, true);
|
|
82
82
|
});
|
|
83
83
|
},
|
|
84
84
|
withdrawOneCoinWrapped(lpTokenAmount, coin, slippage) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PoolTemplate } from "../PoolTemplate.js";
|
|
2
2
|
export declare const withdrawWrapped2argsMixin: {
|
|
3
3
|
_withdrawWrapped(this: PoolTemplate, _lpTokenAmount: bigint, slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
4
|
-
withdrawWrappedEstimateGas(this: PoolTemplate, lpTokenAmount: number | string): Promise<number>;
|
|
4
|
+
withdrawWrappedEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<number>;
|
|
5
5
|
withdrawWrapped(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<string>;
|
|
6
6
|
};
|
|
7
7
|
export declare const withdrawWrapped3argsMixin: {
|
|
8
8
|
_withdrawWrapped(this: PoolTemplate, _lpTokenAmount: bigint, slippage?: number, estimateGas?: boolean): Promise<string | number | number[]>;
|
|
9
|
-
withdrawWrappedEstimateGas(this: PoolTemplate, lpTokenAmount: number | string): Promise<number>;
|
|
9
|
+
withdrawWrappedEstimateGas(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<number>;
|
|
10
10
|
withdrawWrapped(this: PoolTemplate, lpTokenAmount: number | string, slippage?: number): Promise<string>;
|
|
11
11
|
};
|
|
@@ -38,10 +38,10 @@ export const withdrawWrapped2argsMixin = {
|
|
|
38
38
|
return (yield contract.remove_liquidity(_lpTokenAmount, _minAmounts, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
|
-
withdrawWrappedEstimateGas(
|
|
42
|
-
return __awaiter(this,
|
|
41
|
+
withdrawWrappedEstimateGas(lpTokenAmount_1) {
|
|
42
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, slippage = 0.1) {
|
|
43
43
|
const _lpTokenAmount = yield _withdrawWrappedCheck.call(this, lpTokenAmount);
|
|
44
|
-
return yield withdrawWrapped2argsMixin._withdrawWrapped.call(this, _lpTokenAmount,
|
|
44
|
+
return yield withdrawWrapped2argsMixin._withdrawWrapped.call(this, _lpTokenAmount, slippage, true);
|
|
45
45
|
});
|
|
46
46
|
},
|
|
47
47
|
withdrawWrapped(lpTokenAmount, slippage) {
|
|
@@ -63,10 +63,10 @@ export const withdrawWrapped3argsMixin = {
|
|
|
63
63
|
return (yield contract.remove_liquidity(_lpTokenAmount, _minAmounts, false, Object.assign(Object.assign({}, this.curve.options), { gasLimit }))).hash;
|
|
64
64
|
});
|
|
65
65
|
},
|
|
66
|
-
withdrawWrappedEstimateGas(
|
|
67
|
-
return __awaiter(this,
|
|
66
|
+
withdrawWrappedEstimateGas(lpTokenAmount_1) {
|
|
67
|
+
return __awaiter(this, arguments, void 0, function* (lpTokenAmount, slippage = 0.1) {
|
|
68
68
|
const _lpTokenAmount = yield _withdrawWrappedCheck.call(this, lpTokenAmount);
|
|
69
|
-
return yield withdrawWrapped3argsMixin._withdrawWrapped.call(this, _lpTokenAmount,
|
|
69
|
+
return yield withdrawWrapped3argsMixin._withdrawWrapped.call(this, _lpTokenAmount, slippage, true);
|
|
70
70
|
});
|
|
71
71
|
},
|
|
72
72
|
withdrawWrapped(lpTokenAmount, slippage) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curvefi/api",
|
|
3
|
-
"version": "2.68.
|
|
3
|
+
"version": "2.68.42",
|
|
4
4
|
"description": "JavaScript library for curve.finance",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Macket",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"vue-eslint-parser": "^10.4.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@curvefi/ethcall": "
|
|
45
|
+
"@curvefi/ethcall": "6.0.20",
|
|
46
46
|
"bignumber.js": "^10.0.2",
|
|
47
47
|
"ethers": "^6.16.0",
|
|
48
48
|
"memoizee": "^0.4.17"
|