@curvefi/api 2.24.4 → 2.25.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 +11 -2
- package/lib/constants/abis/eure/swap.json +1201 -0
- package/lib/constants/abis/eure/zap.json +268 -0
- package/lib/constants/pools/xdai.js +32 -0
- package/lib/pools/PoolTemplate.d.ts +1 -0
- package/lib/pools/PoolTemplate.js +38 -10
- package/lib/router.js +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1374,15 +1374,24 @@ import curve from "@curvefi/api";
|
|
|
1374
1374
|
const gaugeAddress = await curve.factory.getDeployedGaugeAddress(deployGaugeTx);
|
|
1375
1375
|
// 0x326290a1b0004eee78fa6ed4f1d8f4b2523ab669
|
|
1376
1376
|
|
|
1377
|
-
//
|
|
1377
|
+
// Get created pool
|
|
1378
1378
|
|
|
1379
1379
|
const poolId = await curve.factory.fetchRecentlyDeployedPool(poolAddress);
|
|
1380
1380
|
// factory-v2-222
|
|
1381
1381
|
const pool = curve.getPool(poolId);
|
|
1382
1382
|
|
|
1383
|
-
|
|
1383
|
+
// Deposit & Stake Wrapped
|
|
1384
|
+
|
|
1385
|
+
await pool.depositAndStakeWrapped([10, 10]); // Initial wrapped amounts for stable metapool must be equal
|
|
1384
1386
|
const balances = await pool.stats.wrappedBalances();
|
|
1385
1387
|
// [ '10.0', '10.0' ]
|
|
1388
|
+
|
|
1389
|
+
// Or deposit & Stake Underlying
|
|
1390
|
+
|
|
1391
|
+
// const amounts = pool.metaUnderlyingSeedAmounts(30);
|
|
1392
|
+
// [ '30', '10.000000000000000000', '10.000000', '10.000000' ]
|
|
1393
|
+
// await pool.depositAndStake(amounts);
|
|
1394
|
+
// [ '30.0', '9.272021785560442569', '8.927595', '11.800485' ]
|
|
1386
1395
|
})()
|
|
1387
1396
|
```
|
|
1388
1397
|
|