@underscore-finance/sdk 0.0.8 → 0.2.1

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 (79) hide show
  1. package/dist/contracts/AddyRegistry.d.ts +659 -82
  2. package/dist/contracts/AddyRegistry.d.ts.map +1 -1
  3. package/dist/contracts/AddyRegistry.js +903 -184
  4. package/dist/contracts/Agent.d.ts +223 -145
  5. package/dist/contracts/Agent.d.ts.map +1 -1
  6. package/dist/contracts/Agent.js +248 -162
  7. package/dist/contracts/AgentFactory.d.ts +335 -42
  8. package/dist/contracts/AgentFactory.d.ts.map +1 -1
  9. package/dist/contracts/AgentFactory.js +403 -42
  10. package/dist/contracts/ChainlinkFeeds.d.ts +160 -23
  11. package/dist/contracts/ChainlinkFeeds.d.ts.map +1 -1
  12. package/dist/contracts/ChainlinkFeeds.js +186 -23
  13. package/dist/contracts/LegoAaveV3.d.ts +160 -23
  14. package/dist/contracts/LegoAaveV3.d.ts.map +1 -1
  15. package/dist/contracts/LegoAaveV3.js +186 -23
  16. package/dist/contracts/LegoAeroClassic.d.ts +160 -23
  17. package/dist/contracts/LegoAeroClassic.d.ts.map +1 -1
  18. package/dist/contracts/LegoAeroClassic.js +186 -23
  19. package/dist/contracts/LegoAeroSlipstream.d.ts +160 -23
  20. package/dist/contracts/LegoAeroSlipstream.d.ts.map +1 -1
  21. package/dist/contracts/LegoAeroSlipstream.js +186 -23
  22. package/dist/contracts/LegoCompoundV3.d.ts +160 -23
  23. package/dist/contracts/LegoCompoundV3.d.ts.map +1 -1
  24. package/dist/contracts/LegoCompoundV3.js +186 -23
  25. package/dist/contracts/LegoCurve.d.ts +160 -23
  26. package/dist/contracts/LegoCurve.d.ts.map +1 -1
  27. package/dist/contracts/LegoCurve.js +186 -23
  28. package/dist/contracts/LegoEuler.d.ts +160 -23
  29. package/dist/contracts/LegoEuler.d.ts.map +1 -1
  30. package/dist/contracts/LegoEuler.js +186 -23
  31. package/dist/contracts/LegoFluid.d.ts +171 -23
  32. package/dist/contracts/LegoFluid.d.ts.map +1 -1
  33. package/dist/contracts/LegoFluid.js +200 -23
  34. package/dist/contracts/LegoHelper.js +1 -1
  35. package/dist/contracts/LegoMoonwell.d.ts +160 -23
  36. package/dist/contracts/LegoMoonwell.d.ts.map +1 -1
  37. package/dist/contracts/LegoMoonwell.js +186 -23
  38. package/dist/contracts/LegoMorpho.d.ts +160 -23
  39. package/dist/contracts/LegoMorpho.d.ts.map +1 -1
  40. package/dist/contracts/LegoMorpho.js +186 -23
  41. package/dist/contracts/LegoRegistry.d.ts +501 -96
  42. package/dist/contracts/LegoRegistry.d.ts.map +1 -1
  43. package/dist/contracts/LegoRegistry.js +686 -174
  44. package/dist/contracts/LegoSky.d.ts +160 -23
  45. package/dist/contracts/LegoSky.d.ts.map +1 -1
  46. package/dist/contracts/LegoSky.js +186 -23
  47. package/dist/contracts/LegoUniswapV2.d.ts +160 -23
  48. package/dist/contracts/LegoUniswapV2.d.ts.map +1 -1
  49. package/dist/contracts/LegoUniswapV2.js +186 -23
  50. package/dist/contracts/LegoUniswapV3.d.ts +160 -23
  51. package/dist/contracts/LegoUniswapV3.d.ts.map +1 -1
  52. package/dist/contracts/LegoUniswapV3.js +186 -23
  53. package/dist/contracts/OracleRegistry.d.ts +506 -109
  54. package/dist/contracts/OracleRegistry.d.ts.map +1 -1
  55. package/dist/contracts/OracleRegistry.js +628 -131
  56. package/dist/contracts/PriceSheets.d.ts +160 -23
  57. package/dist/contracts/PriceSheets.d.ts.map +1 -1
  58. package/dist/contracts/PriceSheets.js +186 -23
  59. package/dist/contracts/PythFeeds.d.ts +160 -23
  60. package/dist/contracts/PythFeeds.d.ts.map +1 -1
  61. package/dist/contracts/PythFeeds.js +186 -23
  62. package/dist/contracts/StorkFeeds.d.ts +160 -23
  63. package/dist/contracts/StorkFeeds.d.ts.map +1 -1
  64. package/dist/contracts/StorkFeeds.js +186 -23
  65. package/dist/contracts/UserWallet.d.ts +1956 -0
  66. package/dist/contracts/UserWallet.d.ts.map +1 -0
  67. package/dist/contracts/UserWallet.js +2551 -0
  68. package/dist/contracts/UserWalletConfig.d.ts +1466 -0
  69. package/dist/contracts/UserWalletConfig.d.ts.map +1 -0
  70. package/dist/contracts/UserWalletConfig.js +1762 -0
  71. package/dist/contracts/index.d.ts +2 -2
  72. package/dist/contracts/index.d.ts.map +1 -1
  73. package/dist/contracts/index.js +2 -2
  74. package/dist/contracts/sdk.d.ts +4 -4
  75. package/dist/contracts/sdk.d.ts.map +1 -1
  76. package/dist/contracts/sdk.js +4 -4
  77. package/dist/index.d.ts +2 -2
  78. package/dist/index.js +2 -2
  79. package/package.json +1 -1
@@ -151,11 +151,82 @@ export const abi = [
151
151
  inputs: [
152
152
  {
153
153
  indexed: true,
154
- name: 'addr',
154
+ name: 'prevGov',
155
+ type: 'address',
156
+ },
157
+ {
158
+ indexed: true,
159
+ name: 'newGov',
160
+ type: 'address',
161
+ },
162
+ {
163
+ indexed: false,
164
+ name: 'confirmBlock',
165
+ type: 'uint256',
166
+ },
167
+ ],
168
+ name: 'GovChangeInitiated',
169
+ type: 'event',
170
+ },
171
+ {
172
+ anonymous: false,
173
+ inputs: [
174
+ {
175
+ indexed: true,
176
+ name: 'prevGov',
177
+ type: 'address',
178
+ },
179
+ {
180
+ indexed: true,
181
+ name: 'newGov',
182
+ type: 'address',
183
+ },
184
+ {
185
+ indexed: false,
186
+ name: 'initiatedBlock',
187
+ type: 'uint256',
188
+ },
189
+ {
190
+ indexed: false,
191
+ name: 'confirmBlock',
192
+ type: 'uint256',
193
+ },
194
+ ],
195
+ name: 'GovChangeConfirmed',
196
+ type: 'event',
197
+ },
198
+ {
199
+ anonymous: false,
200
+ inputs: [
201
+ {
202
+ indexed: true,
203
+ name: 'cancelledGov',
155
204
  type: 'address',
156
205
  },
206
+ {
207
+ indexed: false,
208
+ name: 'initiatedBlock',
209
+ type: 'uint256',
210
+ },
211
+ {
212
+ indexed: false,
213
+ name: 'confirmBlock',
214
+ type: 'uint256',
215
+ },
216
+ ],
217
+ name: 'GovChangeCancelled',
218
+ type: 'event',
219
+ },
220
+ {
221
+ anonymous: false,
222
+ inputs: [
223
+ {
224
+ indexed: false,
225
+ name: 'delayBlocks',
226
+ type: 'uint256',
227
+ },
157
228
  ],
158
- name: 'LocalGovernorSet',
229
+ name: 'GovChangeDelaySet',
159
230
  type: 'event',
160
231
  },
161
232
  {
@@ -350,7 +421,19 @@ export const abi = [
350
421
  type: 'address',
351
422
  },
352
423
  ],
353
- name: 'isGovernor',
424
+ name: 'canGovern',
425
+ outputs: [
426
+ {
427
+ name: '',
428
+ type: 'bool',
429
+ },
430
+ ],
431
+ stateMutability: 'view',
432
+ type: 'function',
433
+ },
434
+ {
435
+ inputs: [],
436
+ name: 'hasPendingGovChange',
354
437
  outputs: [
355
438
  {
356
439
  name: '',
@@ -363,44 +446,110 @@ export const abi = [
363
446
  {
364
447
  inputs: [
365
448
  {
366
- name: '_newGovernor',
449
+ name: '_newGov',
367
450
  type: 'address',
368
451
  },
369
452
  ],
370
- name: 'isValidLocalGovernor',
453
+ name: 'changeGovernance',
454
+ outputs: [],
455
+ stateMutability: 'nonpayable',
456
+ type: 'function',
457
+ },
458
+ {
459
+ inputs: [],
460
+ name: 'confirmGovernanceChange',
461
+ outputs: [],
462
+ stateMutability: 'nonpayable',
463
+ type: 'function',
464
+ },
465
+ {
466
+ inputs: [],
467
+ name: 'cancelGovernanceChange',
468
+ outputs: [],
469
+ stateMutability: 'nonpayable',
470
+ type: 'function',
471
+ },
472
+ {
473
+ inputs: [
474
+ {
475
+ name: '_numBlocks',
476
+ type: 'uint256',
477
+ },
478
+ ],
479
+ name: 'setGovernanceChangeDelay',
480
+ outputs: [],
481
+ stateMutability: 'nonpayable',
482
+ type: 'function',
483
+ },
484
+ {
485
+ inputs: [],
486
+ name: 'governance',
371
487
  outputs: [
372
488
  {
373
489
  name: '',
374
- type: 'bool',
490
+ type: 'address',
375
491
  },
376
492
  ],
377
493
  stateMutability: 'view',
378
494
  type: 'function',
379
495
  },
380
496
  {
381
- inputs: [
497
+ inputs: [],
498
+ name: 'pendingGov',
499
+ outputs: [
382
500
  {
383
- name: '_newGovernor',
384
- type: 'address',
501
+ components: [
502
+ {
503
+ name: 'newGov',
504
+ type: 'address',
505
+ },
506
+ {
507
+ name: 'initiatedBlock',
508
+ type: 'uint256',
509
+ },
510
+ {
511
+ name: 'confirmBlock',
512
+ type: 'uint256',
513
+ },
514
+ ],
515
+ name: '',
516
+ type: 'tuple',
385
517
  },
386
518
  ],
387
- name: 'setLocalGovernor',
519
+ stateMutability: 'view',
520
+ type: 'function',
521
+ },
522
+ {
523
+ inputs: [],
524
+ name: 'govChangeDelay',
388
525
  outputs: [
389
526
  {
390
527
  name: '',
391
- type: 'bool',
528
+ type: 'uint256',
392
529
  },
393
530
  ],
394
- stateMutability: 'nonpayable',
531
+ stateMutability: 'view',
395
532
  type: 'function',
396
533
  },
397
534
  {
398
535
  inputs: [],
399
- name: 'localGovernor',
536
+ name: 'MIN_GOV_CHANGE_DELAY',
400
537
  outputs: [
401
538
  {
402
539
  name: '',
403
- type: 'address',
540
+ type: 'uint256',
541
+ },
542
+ ],
543
+ stateMutability: 'view',
544
+ type: 'function',
545
+ },
546
+ {
547
+ inputs: [],
548
+ name: 'MAX_GOV_CHANGE_DELAY',
549
+ outputs: [
550
+ {
551
+ name: '',
552
+ type: 'uint256',
404
553
  },
405
554
  ],
406
555
  stateMutability: 'view',
@@ -1091,7 +1240,7 @@ export const abi = [
1091
1240
  type: 'constructor',
1092
1241
  },
1093
1242
  ];
1094
- export const deployAddress = '0x055104Bc79447c94655aABA432D60e0f2ab44cb3';
1243
+ export const deployAddress = '0xF7B09b7E6528037e125Ac8d3Ed047A39d10A32AF';
1095
1244
  function getRequest(method, args, contractAddressOrOptions) {
1096
1245
  const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1097
1246
  const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
@@ -1129,9 +1278,13 @@ export const call = {
1129
1278
  assets: (...args) => getRequest('assets', args),
1130
1279
  indexOfAsset: (...args) => getRequest('indexOfAsset', args),
1131
1280
  numAssets: (...args) => getRequest('numAssets', args),
1132
- isGovernor: (...args) => getRequest('isGovernor', args),
1133
- isValidLocalGovernor: (...args) => getRequest('isValidLocalGovernor', args),
1134
- localGovernor: (...args) => getRequest('localGovernor', args),
1281
+ canGovern: (...args) => getRequest('canGovern', args),
1282
+ hasPendingGovChange: (...args) => getRequest('hasPendingGovChange', args),
1283
+ governance: (...args) => getRequest('governance', args),
1284
+ pendingGov: (...args) => getRequest('pendingGov', args),
1285
+ govChangeDelay: (...args) => getRequest('govChangeDelay', args),
1286
+ MIN_GOV_CHANGE_DELAY: (...args) => getRequest('MIN_GOV_CHANGE_DELAY', args),
1287
+ MAX_GOV_CHANGE_DELAY: (...args) => getRequest('MAX_GOV_CHANGE_DELAY', args),
1135
1288
  getRegistries: (...args) => getRequest('getRegistries', args),
1136
1289
  getAccessForLego: (...args) => getRequest('getAccessForLego', args),
1137
1290
  isVaultToken: (...args) => getRequest('isVaultToken', args),
@@ -1160,7 +1313,10 @@ function getMutation(functionName) {
1160
1313
  };
1161
1314
  }
1162
1315
  export const mutation = {
1163
- setLocalGovernor: getMutation('setLocalGovernor'),
1316
+ changeGovernance: getMutation('changeGovernance'),
1317
+ confirmGovernanceChange: getMutation('confirmGovernanceChange'),
1318
+ cancelGovernanceChange: getMutation('cancelGovernanceChange'),
1319
+ setGovernanceChangeDelay: getMutation('setGovernanceChangeDelay'),
1164
1320
  depositTokens: getMutation('depositTokens'),
1165
1321
  withdrawTokens: getMutation('withdrawTokens'),
1166
1322
  claimRewards: getMutation('claimRewards'),
@@ -1183,9 +1339,13 @@ export function toSdk(publicClient, walletClient) {
1183
1339
  assets: (...args) => singleQuery(publicClient, call.assets(...args)),
1184
1340
  indexOfAsset: (...args) => singleQuery(publicClient, call.indexOfAsset(...args)),
1185
1341
  numAssets: (...args) => singleQuery(publicClient, call.numAssets(...args)),
1186
- isGovernor: (...args) => singleQuery(publicClient, call.isGovernor(...args)),
1187
- isValidLocalGovernor: (...args) => singleQuery(publicClient, call.isValidLocalGovernor(...args)),
1188
- localGovernor: (...args) => singleQuery(publicClient, call.localGovernor(...args)),
1342
+ canGovern: (...args) => singleQuery(publicClient, call.canGovern(...args)),
1343
+ hasPendingGovChange: (...args) => singleQuery(publicClient, call.hasPendingGovChange(...args)),
1344
+ governance: (...args) => singleQuery(publicClient, call.governance(...args)),
1345
+ pendingGov: (...args) => singleQuery(publicClient, call.pendingGov(...args)),
1346
+ govChangeDelay: (...args) => singleQuery(publicClient, call.govChangeDelay(...args)),
1347
+ MIN_GOV_CHANGE_DELAY: (...args) => singleQuery(publicClient, call.MIN_GOV_CHANGE_DELAY(...args)),
1348
+ MAX_GOV_CHANGE_DELAY: (...args) => singleQuery(publicClient, call.MAX_GOV_CHANGE_DELAY(...args)),
1189
1349
  getRegistries: (...args) => singleQuery(publicClient, call.getRegistries(...args)),
1190
1350
  getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args)),
1191
1351
  isVaultToken: (...args) => singleQuery(publicClient, call.isVaultToken(...args)),
@@ -1204,7 +1364,10 @@ export function toSdk(publicClient, walletClient) {
1204
1364
  isActivated: (...args) => singleQuery(publicClient, call.isActivated(...args)),
1205
1365
  ADDY_REGISTRY: (...args) => singleQuery(publicClient, call.ADDY_REGISTRY(...args)),
1206
1366
  // Mutations
1207
- setLocalGovernor: (...args) => mutate(walletClient, mutation.setLocalGovernor)(...args),
1367
+ changeGovernance: (...args) => mutate(walletClient, mutation.changeGovernance)(...args),
1368
+ confirmGovernanceChange: (...args) => mutate(walletClient, mutation.confirmGovernanceChange)(...args),
1369
+ cancelGovernanceChange: (...args) => mutate(walletClient, mutation.cancelGovernanceChange)(...args),
1370
+ setGovernanceChangeDelay: (...args) => mutate(walletClient, mutation.setGovernanceChangeDelay)(...args),
1208
1371
  depositTokens: (...args) => mutate(walletClient, mutation.depositTokens)(...args),
1209
1372
  withdrawTokens: (...args) => mutate(walletClient, mutation.withdrawTokens)(...args),
1210
1373
  claimRewards: (...args) => mutate(walletClient, mutation.claimRewards)(...args),