@underscore-finance/sdk 1.2.6 → 1.2.8

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.
Files changed (33) hide show
  1. package/dist/contracts/DefaultsBase.d.ts +41 -15
  2. package/dist/contracts/DefaultsBase.d.ts.map +1 -1
  3. package/dist/contracts/DefaultsBase.js +44 -15
  4. package/dist/contracts/EarnVaultAgent.js +1 -1
  5. package/dist/contracts/ExtraFi.d.ts +2596 -0
  6. package/dist/contracts/ExtraFi.d.ts.map +1 -0
  7. package/dist/contracts/ExtraFi.js +3297 -0
  8. package/dist/contracts/LevgVaultHelper.d.ts +125 -0
  9. package/dist/contracts/LevgVaultHelper.d.ts.map +1 -1
  10. package/dist/contracts/LevgVaultHelper.js +170 -1
  11. package/dist/contracts/LootDistributor.d.ts +0 -56
  12. package/dist/contracts/LootDistributor.d.ts.map +1 -1
  13. package/dist/contracts/LootDistributor.js +1 -72
  14. package/dist/contracts/MissionControl.d.ts +150 -9
  15. package/dist/contracts/MissionControl.d.ts.map +1 -1
  16. package/dist/contracts/MissionControl.js +186 -10
  17. package/dist/contracts/SwitchboardAlpha.d.ts +502 -22
  18. package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -1
  19. package/dist/contracts/SwitchboardAlpha.js +777 -124
  20. package/dist/contracts/SwitchboardCharlie.js +1 -1
  21. package/dist/contracts/UndyVirtual.d.ts +1705 -0
  22. package/dist/contracts/UndyVirtual.d.ts.map +1 -0
  23. package/dist/contracts/UndyVirtual.js +2237 -0
  24. package/dist/contracts/index.d.ts +2 -0
  25. package/dist/contracts/index.d.ts.map +1 -1
  26. package/dist/contracts/index.js +2 -0
  27. package/dist/contracts/sdk.d.ts +4 -0
  28. package/dist/contracts/sdk.d.ts.map +1 -1
  29. package/dist/contracts/sdk.js +4 -0
  30. package/dist/index.d.ts +4 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +2 -0
  33. package/package.json +3 -2
@@ -509,6 +509,50 @@ export const abi = [
509
509
  },
510
510
  ],
511
511
  },
512
+ {
513
+ stateMutability: 'nonpayable',
514
+ type: 'function',
515
+ name: 'setRipeRewardsConfig',
516
+ inputs: [
517
+ {
518
+ name: '_config',
519
+ type: 'tuple',
520
+ components: [
521
+ {
522
+ name: 'stakeRatio',
523
+ type: 'uint256',
524
+ },
525
+ {
526
+ name: 'lockDuration',
527
+ type: 'uint256',
528
+ },
529
+ ],
530
+ },
531
+ ],
532
+ outputs: [],
533
+ },
534
+ {
535
+ stateMutability: 'view',
536
+ type: 'function',
537
+ name: 'getRipeRewardsConfig',
538
+ inputs: [],
539
+ outputs: [
540
+ {
541
+ name: '',
542
+ type: 'tuple',
543
+ components: [
544
+ {
545
+ name: 'stakeRatio',
546
+ type: 'uint256',
547
+ },
548
+ {
549
+ name: 'lockDuration',
550
+ type: 'uint256',
551
+ },
552
+ ],
553
+ },
554
+ ],
555
+ },
512
556
  {
513
557
  stateMutability: 'nonpayable',
514
558
  type: 'function',
@@ -848,6 +892,23 @@ export const abi = [
848
892
  ],
849
893
  outputs: [],
850
894
  },
895
+ {
896
+ stateMutability: 'view',
897
+ type: 'function',
898
+ name: 'canPerformSecurityAction',
899
+ inputs: [
900
+ {
901
+ name: '_signer',
902
+ type: 'address',
903
+ },
904
+ ],
905
+ outputs: [
906
+ {
907
+ name: '',
908
+ type: 'bool',
909
+ },
910
+ ],
911
+ },
851
912
  {
852
913
  stateMutability: 'nonpayable',
853
914
  type: 'function',
@@ -864,6 +925,23 @@ export const abi = [
864
925
  ],
865
926
  outputs: [],
866
927
  },
928
+ {
929
+ stateMutability: 'view',
930
+ type: 'function',
931
+ name: 'creatorWhitelist',
932
+ inputs: [
933
+ {
934
+ name: '_creator',
935
+ type: 'address',
936
+ },
937
+ ],
938
+ outputs: [
939
+ {
940
+ name: '',
941
+ type: 'bool',
942
+ },
943
+ ],
944
+ },
867
945
  {
868
946
  stateMutability: 'nonpayable',
869
947
  type: 'function',
@@ -1104,6 +1182,28 @@ export const abi = [
1104
1182
  },
1105
1183
  ],
1106
1184
  },
1185
+ {
1186
+ stateMutability: 'view',
1187
+ type: 'function',
1188
+ name: 'ripeRewardsConfig',
1189
+ inputs: [],
1190
+ outputs: [
1191
+ {
1192
+ name: '',
1193
+ type: 'tuple',
1194
+ components: [
1195
+ {
1196
+ name: 'stakeRatio',
1197
+ type: 'uint256',
1198
+ },
1199
+ {
1200
+ name: 'lockDuration',
1201
+ type: 'uint256',
1202
+ },
1203
+ ],
1204
+ },
1205
+ ],
1206
+ },
1107
1207
  {
1108
1208
  stateMutability: 'view',
1109
1209
  type: 'function',
@@ -1209,7 +1309,7 @@ export const abi = [
1209
1309
  {
1210
1310
  stateMutability: 'view',
1211
1311
  type: 'function',
1212
- name: 'creatorWhitelist',
1312
+ name: 'isLockedSigner',
1213
1313
  inputs: [
1214
1314
  {
1215
1315
  name: 'arg0',
@@ -1226,7 +1326,24 @@ export const abi = [
1226
1326
  {
1227
1327
  stateMutability: 'view',
1228
1328
  type: 'function',
1229
- name: 'canPerformSecurityAction',
1329
+ name: 'securitySigners',
1330
+ inputs: [
1331
+ {
1332
+ name: 'arg0',
1333
+ type: 'uint256',
1334
+ },
1335
+ ],
1336
+ outputs: [
1337
+ {
1338
+ name: '',
1339
+ type: 'address',
1340
+ },
1341
+ ],
1342
+ },
1343
+ {
1344
+ stateMutability: 'view',
1345
+ type: 'function',
1346
+ name: 'indexOfSecuritySigner',
1230
1347
  inputs: [
1231
1348
  {
1232
1349
  name: 'arg0',
@@ -1236,14 +1353,43 @@ export const abi = [
1236
1353
  outputs: [
1237
1354
  {
1238
1355
  name: '',
1239
- type: 'bool',
1356
+ type: 'uint256',
1240
1357
  },
1241
1358
  ],
1242
1359
  },
1243
1360
  {
1244
1361
  stateMutability: 'view',
1245
1362
  type: 'function',
1246
- name: 'isLockedSigner',
1363
+ name: 'numSecuritySigners',
1364
+ inputs: [],
1365
+ outputs: [
1366
+ {
1367
+ name: '',
1368
+ type: 'uint256',
1369
+ },
1370
+ ],
1371
+ },
1372
+ {
1373
+ stateMutability: 'view',
1374
+ type: 'function',
1375
+ name: 'whitelistedCreators',
1376
+ inputs: [
1377
+ {
1378
+ name: 'arg0',
1379
+ type: 'uint256',
1380
+ },
1381
+ ],
1382
+ outputs: [
1383
+ {
1384
+ name: '',
1385
+ type: 'address',
1386
+ },
1387
+ ],
1388
+ },
1389
+ {
1390
+ stateMutability: 'view',
1391
+ type: 'function',
1392
+ name: 'indexOfWhitelistedCreator',
1247
1393
  inputs: [
1248
1394
  {
1249
1395
  name: 'arg0',
@@ -1253,7 +1399,19 @@ export const abi = [
1253
1399
  outputs: [
1254
1400
  {
1255
1401
  name: '',
1256
- type: 'bool',
1402
+ type: 'uint256',
1403
+ },
1404
+ ],
1405
+ },
1406
+ {
1407
+ stateMutability: 'view',
1408
+ type: 'function',
1409
+ name: 'numWhitelistedCreators',
1410
+ inputs: [],
1411
+ outputs: [
1412
+ {
1413
+ name: '',
1414
+ type: 'uint256',
1257
1415
  },
1258
1416
  ],
1259
1417
  },
@@ -1273,7 +1431,7 @@ export const abi = [
1273
1431
  outputs: [],
1274
1432
  },
1275
1433
  ];
1276
- export const deployAddress = '0x89c8A842CD9428024294cB6a52c28D5EB23e2cBE';
1434
+ export const deployAddress = '0x489205626b29e2Aa8e0d6f52C01C7786513CddB6';
1277
1435
  function getRequest(method, args, contractAddressOrOptions) {
1278
1436
  const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1279
1437
  const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
@@ -1309,21 +1467,29 @@ export const call = {
1309
1467
  getUserWalletCreationConfig: (...args) => getRequest('getUserWalletCreationConfig', args),
1310
1468
  getDepositRewardsAsset: (...args) => getRequest('getDepositRewardsAsset', args),
1311
1469
  getLootClaimCoolOffPeriod: (...args) => getRequest('getLootClaimCoolOffPeriod', args),
1470
+ getRipeRewardsConfig: (...args) => getRequest('getRipeRewardsConfig', args),
1312
1471
  getSwapFee: (...args) => getRequest('getSwapFee', args),
1313
1472
  getRewardsFee: (...args) => getRequest('getRewardsFee', args),
1314
1473
  getProfitCalcConfig: (...args) => getRequest('getProfitCalcConfig', args),
1315
1474
  getAssetUsdValueConfig: (...args) => getRequest('getAssetUsdValueConfig', args),
1316
1475
  getLootDistroConfig: (...args) => getRequest('getLootDistroConfig', args),
1476
+ canPerformSecurityAction: (...args) => getRequest('canPerformSecurityAction', args),
1477
+ creatorWhitelist: (...args) => getRequest('creatorWhitelist', args),
1317
1478
  userWalletConfig: (...args) => getRequest('userWalletConfig', args),
1318
1479
  agentConfig: (...args) => getRequest('agentConfig', args),
1319
1480
  managerConfig: (...args) => getRequest('managerConfig', args),
1320
1481
  payeeConfig: (...args) => getRequest('payeeConfig', args),
1321
1482
  chequeConfig: (...args) => getRequest('chequeConfig', args),
1483
+ ripeRewardsConfig: (...args) => getRequest('ripeRewardsConfig', args),
1322
1484
  assetConfig: (...args) => getRequest('assetConfig', args),
1323
1485
  isStablecoin: (...args) => getRequest('isStablecoin', args),
1324
- creatorWhitelist: (...args) => getRequest('creatorWhitelist', args),
1325
- canPerformSecurityAction: (...args) => getRequest('canPerformSecurityAction', args),
1326
1486
  isLockedSigner: (...args) => getRequest('isLockedSigner', args),
1487
+ securitySigners: (...args) => getRequest('securitySigners', args),
1488
+ indexOfSecuritySigner: (...args) => getRequest('indexOfSecuritySigner', args),
1489
+ numSecuritySigners: (...args) => getRequest('numSecuritySigners', args),
1490
+ whitelistedCreators: (...args) => getRequest('whitelistedCreators', args),
1491
+ indexOfWhitelistedCreator: (...args) => getRequest('indexOfWhitelistedCreator', args),
1492
+ numWhitelistedCreators: (...args) => getRequest('numWhitelistedCreators', args),
1327
1493
  };
1328
1494
  function getMutation(functionName) {
1329
1495
  return {
@@ -1342,6 +1508,7 @@ export const mutation = {
1342
1508
  setManagerConfig: getMutation('setManagerConfig'),
1343
1509
  setPayeeConfig: getMutation('setPayeeConfig'),
1344
1510
  setChequeConfig: getMutation('setChequeConfig'),
1511
+ setRipeRewardsConfig: getMutation('setRipeRewardsConfig'),
1345
1512
  setAgentConfig: getMutation('setAgentConfig'),
1346
1513
  setStarterAgent: getMutation('setStarterAgent'),
1347
1514
  setAssetConfig: getMutation('setAssetConfig'),
@@ -1362,21 +1529,29 @@ export function toSdk(publicClient, walletClient) {
1362
1529
  getUserWalletCreationConfig: (...args) => singleQuery(publicClient, call.getUserWalletCreationConfig(...args)),
1363
1530
  getDepositRewardsAsset: (...args) => singleQuery(publicClient, call.getDepositRewardsAsset(...args)),
1364
1531
  getLootClaimCoolOffPeriod: (...args) => singleQuery(publicClient, call.getLootClaimCoolOffPeriod(...args)),
1532
+ getRipeRewardsConfig: (...args) => singleQuery(publicClient, call.getRipeRewardsConfig(...args)),
1365
1533
  getSwapFee: (...args) => singleQuery(publicClient, call.getSwapFee(...args)),
1366
1534
  getRewardsFee: (...args) => singleQuery(publicClient, call.getRewardsFee(...args)),
1367
1535
  getProfitCalcConfig: (...args) => singleQuery(publicClient, call.getProfitCalcConfig(...args)),
1368
1536
  getAssetUsdValueConfig: (...args) => singleQuery(publicClient, call.getAssetUsdValueConfig(...args)),
1369
1537
  getLootDistroConfig: (...args) => singleQuery(publicClient, call.getLootDistroConfig(...args)),
1538
+ canPerformSecurityAction: (...args) => singleQuery(publicClient, call.canPerformSecurityAction(...args)),
1539
+ creatorWhitelist: (...args) => singleQuery(publicClient, call.creatorWhitelist(...args)),
1370
1540
  userWalletConfig: (...args) => singleQuery(publicClient, call.userWalletConfig(...args)),
1371
1541
  agentConfig: (...args) => singleQuery(publicClient, call.agentConfig(...args)),
1372
1542
  managerConfig: (...args) => singleQuery(publicClient, call.managerConfig(...args)),
1373
1543
  payeeConfig: (...args) => singleQuery(publicClient, call.payeeConfig(...args)),
1374
1544
  chequeConfig: (...args) => singleQuery(publicClient, call.chequeConfig(...args)),
1545
+ ripeRewardsConfig: (...args) => singleQuery(publicClient, call.ripeRewardsConfig(...args)),
1375
1546
  assetConfig: (...args) => singleQuery(publicClient, call.assetConfig(...args)),
1376
1547
  isStablecoin: (...args) => singleQuery(publicClient, call.isStablecoin(...args)),
1377
- creatorWhitelist: (...args) => singleQuery(publicClient, call.creatorWhitelist(...args)),
1378
- canPerformSecurityAction: (...args) => singleQuery(publicClient, call.canPerformSecurityAction(...args)),
1379
1548
  isLockedSigner: (...args) => singleQuery(publicClient, call.isLockedSigner(...args)),
1549
+ securitySigners: (...args) => singleQuery(publicClient, call.securitySigners(...args)),
1550
+ indexOfSecuritySigner: (...args) => singleQuery(publicClient, call.indexOfSecuritySigner(...args)),
1551
+ numSecuritySigners: (...args) => singleQuery(publicClient, call.numSecuritySigners(...args)),
1552
+ whitelistedCreators: (...args) => singleQuery(publicClient, call.whitelistedCreators(...args)),
1553
+ indexOfWhitelistedCreator: (...args) => singleQuery(publicClient, call.indexOfWhitelistedCreator(...args)),
1554
+ numWhitelistedCreators: (...args) => singleQuery(publicClient, call.numWhitelistedCreators(...args)),
1380
1555
  // Mutations
1381
1556
  pause: (...args) => mutate(walletClient, mutation.pause)(...args),
1382
1557
  recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds)(...args),
@@ -1385,6 +1560,7 @@ export function toSdk(publicClient, walletClient) {
1385
1560
  setManagerConfig: (...args) => mutate(walletClient, mutation.setManagerConfig)(...args),
1386
1561
  setPayeeConfig: (...args) => mutate(walletClient, mutation.setPayeeConfig)(...args),
1387
1562
  setChequeConfig: (...args) => mutate(walletClient, mutation.setChequeConfig)(...args),
1563
+ setRipeRewardsConfig: (...args) => mutate(walletClient, mutation.setRipeRewardsConfig)(...args),
1388
1564
  setAgentConfig: (...args) => mutate(walletClient, mutation.setAgentConfig)(...args),
1389
1565
  setStarterAgent: (...args) => mutate(walletClient, mutation.setStarterAgent)(...args),
1390
1566
  setAssetConfig: (...args) => mutate(walletClient, mutation.setAssetConfig)(...args),