@curvefi/api 2.65.20 → 2.65.22
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.
|
@@ -163,7 +163,7 @@ const ALIASES_AURORA = lowerCaseValues({
|
|
|
163
163
|
"deposit_and_stake": "0x0000000000000000000000000000000000000000",
|
|
164
164
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
165
165
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
166
|
-
"factory": '
|
|
166
|
+
"factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F',
|
|
167
167
|
"crvusd_factory": '0x4F8846Ae9380B90d2E71D5e3D042dff3E7ebb40d',
|
|
168
168
|
"eywa_factory": '0x37F22A0B028f2152e6CAcef210e0C4d3b875f367',
|
|
169
169
|
"crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
|
|
@@ -1339,8 +1339,26 @@ export class PoolTemplate extends CorePool {
|
|
|
1339
1339
|
withdrawImbalanceBonus(amounts) {
|
|
1340
1340
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1341
1341
|
let pricesBN = [];
|
|
1342
|
+
const multicallContract = curve.contracts[this.address].multicallContract;
|
|
1342
1343
|
if (this.isCrypto || this.id === 'wsteth') {
|
|
1343
|
-
|
|
1344
|
+
if (curve.isLiteChain) {
|
|
1345
|
+
const prices = this.id.includes('twocrypto')
|
|
1346
|
+
? [
|
|
1347
|
+
1,
|
|
1348
|
+
Number(yield curve.contracts[this.address].contract.price_oracle()) / (Math.pow(10, 18)),
|
|
1349
|
+
]
|
|
1350
|
+
: [
|
|
1351
|
+
1,
|
|
1352
|
+
...(yield curve.multicallProvider.all([
|
|
1353
|
+
multicallContract.price_oracle(0),
|
|
1354
|
+
multicallContract.price_oracle(1),
|
|
1355
|
+
])).map((value) => Number(value) / (Math.pow(10, 18))),
|
|
1356
|
+
];
|
|
1357
|
+
pricesBN = prices.map(BN);
|
|
1358
|
+
}
|
|
1359
|
+
else {
|
|
1360
|
+
pricesBN = (yield this._underlyingPrices()).map(BN);
|
|
1361
|
+
}
|
|
1344
1362
|
}
|
|
1345
1363
|
else {
|
|
1346
1364
|
pricesBN = yield this._storedRatesBN(true);
|
|
@@ -1448,8 +1466,26 @@ export class PoolTemplate extends CorePool {
|
|
|
1448
1466
|
withdrawOneCoinBonus(lpTokenAmount, coin) {
|
|
1449
1467
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1450
1468
|
let pricesBN = [];
|
|
1469
|
+
const multicallContract = curve.contracts[this.address].multicallContract;
|
|
1451
1470
|
if (this.isCrypto || this.id === 'wsteth') {
|
|
1452
|
-
|
|
1471
|
+
if (curve.isLiteChain) {
|
|
1472
|
+
const prices = this.id.includes('twocrypto')
|
|
1473
|
+
? [
|
|
1474
|
+
1,
|
|
1475
|
+
Number(yield curve.contracts[this.address].contract.price_oracle()) / (Math.pow(10, 18)),
|
|
1476
|
+
]
|
|
1477
|
+
: [
|
|
1478
|
+
1,
|
|
1479
|
+
...(yield curve.multicallProvider.all([
|
|
1480
|
+
multicallContract.price_oracle(0),
|
|
1481
|
+
multicallContract.price_oracle(1),
|
|
1482
|
+
])).map((value) => Number(value) / (Math.pow(10, 18))),
|
|
1483
|
+
];
|
|
1484
|
+
pricesBN = prices.map(BN);
|
|
1485
|
+
}
|
|
1486
|
+
else {
|
|
1487
|
+
pricesBN = (yield this._underlyingPrices()).map(BN);
|
|
1488
|
+
}
|
|
1453
1489
|
}
|
|
1454
1490
|
else {
|
|
1455
1491
|
pricesBN = yield this._storedRatesBN(true);
|