@underscore-finance/sdk 1.2.11 → 1.2.13
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/dist/contracts/Helpers.d.ts +1463 -0
- package/dist/contracts/Helpers.d.ts.map +1 -0
- package/dist/contracts/Helpers.js +1817 -0
- package/dist/contracts/LegoBook.d.ts +0 -53
- package/dist/contracts/LegoBook.d.ts.map +1 -1
- package/dist/contracts/LegoBook.js +1 -69
- package/dist/contracts/LevgVaultHelper.d.ts +0 -125
- package/dist/contracts/LevgVaultHelper.d.ts.map +1 -1
- package/dist/contracts/LevgVaultHelper.js +1 -170
- package/dist/contracts/LevgVaultTools.d.ts +1873 -0
- package/dist/contracts/LevgVaultTools.d.ts.map +1 -0
- package/dist/contracts/LevgVaultTools.js +2525 -0
- package/dist/contracts/index.d.ts +2 -0
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +2 -0
- package/dist/contracts/sdk.d.ts +4 -0
- package/dist/contracts/sdk.d.ts.map +1 -1
- package/dist/contracts/sdk.js +4 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/package.json +1 -1
|
@@ -1276,161 +1276,6 @@ export const abi = [
|
|
|
1276
1276
|
},
|
|
1277
1277
|
],
|
|
1278
1278
|
},
|
|
1279
|
-
{
|
|
1280
|
-
stateMutability: 'view',
|
|
1281
|
-
type: 'function',
|
|
1282
|
-
name: 'getBorrowRate',
|
|
1283
|
-
inputs: [
|
|
1284
|
-
{
|
|
1285
|
-
name: '_levgVault',
|
|
1286
|
-
type: 'address',
|
|
1287
|
-
},
|
|
1288
|
-
],
|
|
1289
|
-
outputs: [
|
|
1290
|
-
{
|
|
1291
|
-
name: '',
|
|
1292
|
-
type: 'uint256',
|
|
1293
|
-
},
|
|
1294
|
-
],
|
|
1295
|
-
},
|
|
1296
|
-
{
|
|
1297
|
-
stateMutability: 'view',
|
|
1298
|
-
type: 'function',
|
|
1299
|
-
name: 'getDebtAmount',
|
|
1300
|
-
inputs: [
|
|
1301
|
-
{
|
|
1302
|
-
name: '_levgVault',
|
|
1303
|
-
type: 'address',
|
|
1304
|
-
},
|
|
1305
|
-
],
|
|
1306
|
-
outputs: [
|
|
1307
|
-
{
|
|
1308
|
-
name: '',
|
|
1309
|
-
type: 'uint256',
|
|
1310
|
-
},
|
|
1311
|
-
],
|
|
1312
|
-
},
|
|
1313
|
-
{
|
|
1314
|
-
stateMutability: 'view',
|
|
1315
|
-
type: 'function',
|
|
1316
|
-
name: 'getVaultTokenAmounts',
|
|
1317
|
-
inputs: [
|
|
1318
|
-
{
|
|
1319
|
-
name: '_levgVault',
|
|
1320
|
-
type: 'address',
|
|
1321
|
-
},
|
|
1322
|
-
{
|
|
1323
|
-
name: '_isCollateralAsset',
|
|
1324
|
-
type: 'bool',
|
|
1325
|
-
},
|
|
1326
|
-
],
|
|
1327
|
-
outputs: [
|
|
1328
|
-
{
|
|
1329
|
-
name: '',
|
|
1330
|
-
type: 'uint256',
|
|
1331
|
-
},
|
|
1332
|
-
{
|
|
1333
|
-
name: '',
|
|
1334
|
-
type: 'uint256',
|
|
1335
|
-
},
|
|
1336
|
-
],
|
|
1337
|
-
},
|
|
1338
|
-
{
|
|
1339
|
-
stateMutability: 'view',
|
|
1340
|
-
type: 'function',
|
|
1341
|
-
name: 'getUnderlyingAmounts',
|
|
1342
|
-
inputs: [
|
|
1343
|
-
{
|
|
1344
|
-
name: '_levgVault',
|
|
1345
|
-
type: 'address',
|
|
1346
|
-
},
|
|
1347
|
-
{
|
|
1348
|
-
name: '_isCollateralAsset',
|
|
1349
|
-
type: 'bool',
|
|
1350
|
-
},
|
|
1351
|
-
],
|
|
1352
|
-
outputs: [
|
|
1353
|
-
{
|
|
1354
|
-
name: '',
|
|
1355
|
-
type: 'uint256',
|
|
1356
|
-
},
|
|
1357
|
-
{
|
|
1358
|
-
name: '',
|
|
1359
|
-
type: 'uint256',
|
|
1360
|
-
},
|
|
1361
|
-
{
|
|
1362
|
-
name: '',
|
|
1363
|
-
type: 'uint256',
|
|
1364
|
-
},
|
|
1365
|
-
{
|
|
1366
|
-
name: '',
|
|
1367
|
-
type: 'uint256',
|
|
1368
|
-
},
|
|
1369
|
-
],
|
|
1370
|
-
},
|
|
1371
|
-
{
|
|
1372
|
-
stateMutability: 'view',
|
|
1373
|
-
type: 'function',
|
|
1374
|
-
name: 'getGreenAmounts',
|
|
1375
|
-
inputs: [
|
|
1376
|
-
{
|
|
1377
|
-
name: '_levgVault',
|
|
1378
|
-
type: 'address',
|
|
1379
|
-
},
|
|
1380
|
-
],
|
|
1381
|
-
outputs: [
|
|
1382
|
-
{
|
|
1383
|
-
name: '',
|
|
1384
|
-
type: 'uint256',
|
|
1385
|
-
},
|
|
1386
|
-
{
|
|
1387
|
-
name: '',
|
|
1388
|
-
type: 'uint256',
|
|
1389
|
-
},
|
|
1390
|
-
{
|
|
1391
|
-
name: '',
|
|
1392
|
-
type: 'uint256',
|
|
1393
|
-
},
|
|
1394
|
-
{
|
|
1395
|
-
name: '',
|
|
1396
|
-
type: 'uint256',
|
|
1397
|
-
},
|
|
1398
|
-
],
|
|
1399
|
-
},
|
|
1400
|
-
{
|
|
1401
|
-
stateMutability: 'view',
|
|
1402
|
-
type: 'function',
|
|
1403
|
-
name: 'getTrueMaxBorrowAmountForVault',
|
|
1404
|
-
inputs: [
|
|
1405
|
-
{
|
|
1406
|
-
name: '_vault',
|
|
1407
|
-
type: 'address',
|
|
1408
|
-
},
|
|
1409
|
-
],
|
|
1410
|
-
outputs: [
|
|
1411
|
-
{
|
|
1412
|
-
name: '',
|
|
1413
|
-
type: 'uint256',
|
|
1414
|
-
},
|
|
1415
|
-
],
|
|
1416
|
-
},
|
|
1417
|
-
{
|
|
1418
|
-
stateMutability: 'view',
|
|
1419
|
-
type: 'function',
|
|
1420
|
-
name: 'getMaxBorrowAmountForVault',
|
|
1421
|
-
inputs: [
|
|
1422
|
-
{
|
|
1423
|
-
name: '_vault',
|
|
1424
|
-
type: 'address',
|
|
1425
|
-
},
|
|
1426
|
-
],
|
|
1427
|
-
outputs: [
|
|
1428
|
-
{
|
|
1429
|
-
name: '',
|
|
1430
|
-
type: 'uint256',
|
|
1431
|
-
},
|
|
1432
|
-
],
|
|
1433
|
-
},
|
|
1434
1279
|
{
|
|
1435
1280
|
stateMutability: 'view',
|
|
1436
1281
|
type: 'function',
|
|
@@ -1499,7 +1344,7 @@ export const abi = [
|
|
|
1499
1344
|
outputs: [],
|
|
1500
1345
|
},
|
|
1501
1346
|
];
|
|
1502
|
-
export const deployAddress = '
|
|
1347
|
+
export const deployAddress = '0x19e0c1d2272545De38C6D2A3dF3476E4b9e48328';
|
|
1503
1348
|
function getRequest(method, args, contractAddressOrOptions) {
|
|
1504
1349
|
const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
|
|
1505
1350
|
const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
|
|
@@ -1539,13 +1384,6 @@ export const call = {
|
|
|
1539
1384
|
isSupportedAssetInVault: (...args) => getRequest('isSupportedAssetInVault', args),
|
|
1540
1385
|
getVaultBookAndDeleverage: (...args) => getRequest('getVaultBookAndDeleverage', args),
|
|
1541
1386
|
isValidVaultToken: (...args) => getRequest('isValidVaultToken', args),
|
|
1542
|
-
getBorrowRate: (...args) => getRequest('getBorrowRate', args),
|
|
1543
|
-
getDebtAmount: (...args) => getRequest('getDebtAmount', args),
|
|
1544
|
-
getVaultTokenAmounts: (...args) => getRequest('getVaultTokenAmounts', args),
|
|
1545
|
-
getUnderlyingAmounts: (...args) => getRequest('getUnderlyingAmounts', args),
|
|
1546
|
-
getGreenAmounts: (...args) => getRequest('getGreenAmounts', args),
|
|
1547
|
-
getTrueMaxBorrowAmountForVault: (...args) => getRequest('getTrueMaxBorrowAmountForVault', args),
|
|
1548
|
-
getMaxBorrowAmountForVault: (...args) => getRequest('getMaxBorrowAmountForVault', args),
|
|
1549
1387
|
RIPE_REGISTRY: (...args) => getRequest('RIPE_REGISTRY', args),
|
|
1550
1388
|
GREEN_TOKEN: (...args) => getRequest('GREEN_TOKEN', args),
|
|
1551
1389
|
SAVINGS_GREEN: (...args) => getRequest('SAVINGS_GREEN', args),
|
|
@@ -1567,13 +1405,6 @@ export function toSdk(deployAddress, publicClient, walletClient, addressResolver
|
|
|
1567
1405
|
isSupportedAssetInVault: (...args) => singleQuery(publicClient, call.isSupportedAssetInVault(...args).at(deployAddress), {}, addressResolver),
|
|
1568
1406
|
getVaultBookAndDeleverage: (...args) => singleQuery(publicClient, call.getVaultBookAndDeleverage(...args).at(deployAddress), {}, addressResolver),
|
|
1569
1407
|
isValidVaultToken: (...args) => singleQuery(publicClient, call.isValidVaultToken(...args).at(deployAddress), {}, addressResolver),
|
|
1570
|
-
getBorrowRate: (...args) => singleQuery(publicClient, call.getBorrowRate(...args).at(deployAddress), {}, addressResolver),
|
|
1571
|
-
getDebtAmount: (...args) => singleQuery(publicClient, call.getDebtAmount(...args).at(deployAddress), {}, addressResolver),
|
|
1572
|
-
getVaultTokenAmounts: (...args) => singleQuery(publicClient, call.getVaultTokenAmounts(...args).at(deployAddress), {}, addressResolver),
|
|
1573
|
-
getUnderlyingAmounts: (...args) => singleQuery(publicClient, call.getUnderlyingAmounts(...args).at(deployAddress), {}, addressResolver),
|
|
1574
|
-
getGreenAmounts: (...args) => singleQuery(publicClient, call.getGreenAmounts(...args).at(deployAddress), {}, addressResolver),
|
|
1575
|
-
getTrueMaxBorrowAmountForVault: (...args) => singleQuery(publicClient, call.getTrueMaxBorrowAmountForVault(...args).at(deployAddress), {}, addressResolver),
|
|
1576
|
-
getMaxBorrowAmountForVault: (...args) => singleQuery(publicClient, call.getMaxBorrowAmountForVault(...args).at(deployAddress), {}, addressResolver),
|
|
1577
1408
|
RIPE_REGISTRY: (...args) => singleQuery(publicClient, call.RIPE_REGISTRY(...args).at(deployAddress), {}, addressResolver),
|
|
1578
1409
|
GREEN_TOKEN: (...args) => singleQuery(publicClient, call.GREEN_TOKEN(...args).at(deployAddress), {}, addressResolver),
|
|
1579
1410
|
SAVINGS_GREEN: (...args) => singleQuery(publicClient, call.SAVINGS_GREEN(...args).at(deployAddress), {}, addressResolver),
|