@curvefi/api 1.8.2 → 1.10.0
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/README.md +0 -6
- package/lib/boosting.js +2 -2
- package/lib/constants/abis/abis-ethereum.js +95 -3
- package/lib/constants/abis/json/crveth/swap.json +1258 -0
- package/lib/constants/abis/json/{registry.json → eurt/swap.json} +402 -497
- package/lib/constants/abis/json/eurtusd/deposit.json +257 -0
- package/lib/constants/abis/json/eurtusd/swap.json +1199 -0
- package/lib/constants/abis/json/registry_exchange.json +0 -37
- package/lib/constants/abis/json/tricrypto2/deposit.json +0 -79
- package/lib/constants/coins.js +3 -1
- package/lib/curve.d.ts +1 -0
- package/lib/curve.js +48 -10
- package/lib/interfaces.d.ts +1 -0
- package/lib/pools.d.ts +1 -11
- package/lib/pools.js +426 -405
- package/lib/utils.d.ts +1 -0
- package/lib/utils.js +25 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -580,12 +580,6 @@ await pool.exchangeIsApproved("DAI", "1000")
|
|
|
580
580
|
await pool.exchangeApprove("DAI", "1000")
|
|
581
581
|
|
|
582
582
|
|
|
583
|
-
// --- Exchange Tricrypto ---
|
|
584
|
-
|
|
585
|
-
await pool.exchangeIsApproved(0, "1000")
|
|
586
|
-
await pool.exchangeApprove(0, "1000")
|
|
587
|
-
|
|
588
|
-
|
|
589
583
|
// --- Exchange Wrapped ---
|
|
590
584
|
|
|
591
585
|
await pool.exchangeWrappedIsApproved("0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", "1000")
|
package/lib/boosting.js
CHANGED
|
@@ -199,7 +199,7 @@ var createLockEstimateGas = function (amount, days) { return __awaiter(void 0, v
|
|
|
199
199
|
case 1:
|
|
200
200
|
crvBalance = _a.sent();
|
|
201
201
|
if (Number(crvBalance) < Number(amount)) {
|
|
202
|
-
throw Error("Not enough . Actual: "
|
|
202
|
+
throw Error("Not enough . Actual: ".concat(crvBalance, ", required: ").concat(amount));
|
|
203
203
|
}
|
|
204
204
|
return [4 /*yield*/, (0, utils_1.hasAllowance)([curve_1.ALIASES.crv], [amount], curve_1.curve.signerAddress, curve_1.ALIASES.voting_escrow)];
|
|
205
205
|
case 2:
|
|
@@ -245,7 +245,7 @@ var increaseAmountEstimateGas = function (amount) { return __awaiter(void 0, voi
|
|
|
245
245
|
case 1:
|
|
246
246
|
crvBalance = _a.sent();
|
|
247
247
|
if (Number(crvBalance) < Number(amount)) {
|
|
248
|
-
throw Error("Not enough. Actual: "
|
|
248
|
+
throw Error("Not enough. Actual: ".concat(crvBalance, ", required: ").concat(amount));
|
|
249
249
|
}
|
|
250
250
|
return [4 /*yield*/, (0, utils_1.hasAllowance)([curve_1.ALIASES.crv], [amount], curve_1.curve.signerAddress, curve_1.ALIASES.voting_escrow)];
|
|
251
251
|
case 2:
|
|
@@ -78,6 +78,10 @@ var deposit_json_20 = __importDefault(require("./json/factoryPools/deposit.json"
|
|
|
78
78
|
var rewards_json_1 = __importDefault(require("./json/factoryPools/rewards.json"));
|
|
79
79
|
var swap_json_34 = __importDefault(require("./json/tricrypto2/swap.json"));
|
|
80
80
|
var deposit_json_21 = __importDefault(require("./json/tricrypto2/deposit.json"));
|
|
81
|
+
var swap_json_35 = __importDefault(require("./json/eurt/swap.json"));
|
|
82
|
+
var swap_json_36 = __importDefault(require("./json/eurtusd/swap.json"));
|
|
83
|
+
var deposit_json_22 = __importDefault(require("./json/eurtusd/deposit.json"));
|
|
84
|
+
var swap_json_37 = __importDefault(require("./json/crveth/swap.json"));
|
|
81
85
|
exports.poolsData = {
|
|
82
86
|
compound: {
|
|
83
87
|
N_COINS: 2,
|
|
@@ -1405,7 +1409,7 @@ exports.poolsData = {
|
|
|
1405
1409
|
tricrypto2: {
|
|
1406
1410
|
swap_abi: swap_json_34.default,
|
|
1407
1411
|
N_COINS: 3,
|
|
1408
|
-
|
|
1412
|
+
is_crypto: true,
|
|
1409
1413
|
underlying_decimals: [6, 8, 18],
|
|
1410
1414
|
decimals: [6, 8, 18],
|
|
1411
1415
|
tethered: [false, false, false],
|
|
@@ -1414,12 +1418,12 @@ exports.poolsData = {
|
|
|
1414
1418
|
swap_address: '0xD51a44d3FaE010294C616388b506AcdA1bfAAE46',
|
|
1415
1419
|
token_address: '0xc4AD29ba4B3c580e6D59105FFf484999997675Ff',
|
|
1416
1420
|
gauge_address: '0xDeFd8FdD20e0f34115C7018CCfb655796F6B2168',
|
|
1417
|
-
underlying_coins: ['USDT', 'WBTC', '
|
|
1421
|
+
underlying_coins: ['USDT', 'WBTC', 'ETH'],
|
|
1418
1422
|
coins: ['USDT', 'WBTC', 'WETH'],
|
|
1419
1423
|
underlying_coin_addresses: [
|
|
1420
1424
|
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
1421
1425
|
'0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
|
|
1422
|
-
'
|
|
1426
|
+
'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
|
|
1423
1427
|
],
|
|
1424
1428
|
coin_addresses: [
|
|
1425
1429
|
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
@@ -1429,4 +1433,92 @@ exports.poolsData = {
|
|
|
1429
1433
|
deposit_abi: deposit_json_21.default,
|
|
1430
1434
|
deposit_address: '0x3993d34e7e99Abf6B6f367309975d1360222D446',
|
|
1431
1435
|
},
|
|
1436
|
+
eurt: {
|
|
1437
|
+
swap_abi: swap_json_35.default,
|
|
1438
|
+
N_COINS: 2,
|
|
1439
|
+
underlying_decimals: [6, 18],
|
|
1440
|
+
decimals: [6, 18],
|
|
1441
|
+
tethered: [false, false],
|
|
1442
|
+
use_lending: [false, false],
|
|
1443
|
+
is_plain: [true, true],
|
|
1444
|
+
swap_address: '0xfd5db7463a3ab53fd211b4af195c5bccc1a03890',
|
|
1445
|
+
token_address: '0xfd5db7463a3ab53fd211b4af195c5bccc1a03890',
|
|
1446
|
+
gauge_address: '0xe8060Ad8971450E624d5289A10017dD30F5dA85F',
|
|
1447
|
+
underlying_coins: ['EURT', 'sEUR'],
|
|
1448
|
+
coins: ['EURT', 'sEUR'],
|
|
1449
|
+
underlying_coin_addresses: [
|
|
1450
|
+
'0xC581b735A1688071A1746c968e0798D642EDE491',
|
|
1451
|
+
'0xD71eCFF9342A5Ced620049e616c5035F1dB98620',
|
|
1452
|
+
],
|
|
1453
|
+
coin_addresses: [
|
|
1454
|
+
'0xC581b735A1688071A1746c968e0798D642EDE491',
|
|
1455
|
+
'0xD71eCFF9342A5Ced620049e616c5035F1dB98620',
|
|
1456
|
+
],
|
|
1457
|
+
},
|
|
1458
|
+
eurtusd: {
|
|
1459
|
+
N_COINS: 2,
|
|
1460
|
+
underlying_decimals: [6, 18],
|
|
1461
|
+
decimals: [6, 18],
|
|
1462
|
+
tethered: [false, false],
|
|
1463
|
+
use_lending: [false, false],
|
|
1464
|
+
is_plain: [true, true],
|
|
1465
|
+
swap_address: '0x9838eCcC42659FA8AA7daF2aD134b53984c9427b',
|
|
1466
|
+
token_address: '0x3b6831c0077a1e44ED0a21841C3bC4dC11bCE833',
|
|
1467
|
+
gauge_address: '0x4Fd86Ce7Ecea88F7E0aA78DC12625996Fb3a04bC',
|
|
1468
|
+
is_crypto: true,
|
|
1469
|
+
base_pool: '3pool',
|
|
1470
|
+
underlying_coins: ['EURT', 'DAI', 'USDC', 'USDT'],
|
|
1471
|
+
coins: ['EURT', '3Crv'],
|
|
1472
|
+
underlying_coin_addresses: [
|
|
1473
|
+
'0xC581b735A1688071A1746c968e0798D642EDE491',
|
|
1474
|
+
'0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490',
|
|
1475
|
+
],
|
|
1476
|
+
coin_addresses: [
|
|
1477
|
+
'0xC581b735A1688071A1746c968e0798D642EDE491',
|
|
1478
|
+
'0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490',
|
|
1479
|
+
],
|
|
1480
|
+
swap_abi: swap_json_36.default,
|
|
1481
|
+
deposit_abi: deposit_json_22.default,
|
|
1482
|
+
deposit_address: '0x5D0F47B32fDd343BfA74cE221808e2abE4A53827',
|
|
1483
|
+
is_meta: true,
|
|
1484
|
+
meta_N: 5,
|
|
1485
|
+
meta_decimals: [6, 18, 18, 6, 6],
|
|
1486
|
+
meta_coin_decimals: [6, 18, 6, 6],
|
|
1487
|
+
meta_wrapped_decimals: [6, 18],
|
|
1488
|
+
meta_coin_addresses: [
|
|
1489
|
+
'0x6B175474E89094C44Da98b954EedeAC495271d0F',
|
|
1490
|
+
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
1491
|
+
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
1492
|
+
],
|
|
1493
|
+
all_coin_addresses: [
|
|
1494
|
+
'0xC581b735A1688071A1746c968e0798D642EDE491',
|
|
1495
|
+
'0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490',
|
|
1496
|
+
'0x6B175474E89094C44Da98b954EedeAC495271d0F',
|
|
1497
|
+
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
1498
|
+
'0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
1499
|
+
],
|
|
1500
|
+
},
|
|
1501
|
+
crveth: {
|
|
1502
|
+
swap_abi: swap_json_37.default,
|
|
1503
|
+
N_COINS: 2,
|
|
1504
|
+
is_crypto: true,
|
|
1505
|
+
underlying_decimals: [18, 18],
|
|
1506
|
+
decimals: [18, 18],
|
|
1507
|
+
tethered: [false, false],
|
|
1508
|
+
use_lending: [false, false],
|
|
1509
|
+
is_plain: [true, true],
|
|
1510
|
+
underlying_coins: ['ETH', 'CRV'],
|
|
1511
|
+
coins: ['WETH', 'CRV'],
|
|
1512
|
+
swap_address: '0x8301AE4fc9c624d1D396cbDAa1ed877821D7C511',
|
|
1513
|
+
token_address: '0xEd4064f376cB8d68F770FB1Ff088a3d0F3FF5c4d',
|
|
1514
|
+
gauge_address: '0x936734ea750bb194ddb4892b191b6bd5c43a3985',
|
|
1515
|
+
underlying_coin_addresses: [
|
|
1516
|
+
'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
|
|
1517
|
+
'0xD533a949740bb3306d119CC777fa900bA034cd52',
|
|
1518
|
+
],
|
|
1519
|
+
coin_addresses: [
|
|
1520
|
+
'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
1521
|
+
'0xD533a949740bb3306d119CC777fa900bA034cd52',
|
|
1522
|
+
],
|
|
1523
|
+
},
|
|
1432
1524
|
};
|