@underscore-finance/sdk 0.0.7 → 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.
- package/dist/contracts/AddyRegistry.d.ts +659 -82
- package/dist/contracts/AddyRegistry.d.ts.map +1 -1
- package/dist/contracts/AddyRegistry.js +903 -184
- package/dist/contracts/Agent.d.ts +223 -145
- package/dist/contracts/Agent.d.ts.map +1 -1
- package/dist/contracts/Agent.js +248 -162
- package/dist/contracts/AgentFactory.d.ts +335 -42
- package/dist/contracts/AgentFactory.d.ts.map +1 -1
- package/dist/contracts/AgentFactory.js +403 -42
- package/dist/contracts/ChainlinkFeeds.d.ts +160 -23
- package/dist/contracts/ChainlinkFeeds.d.ts.map +1 -1
- package/dist/contracts/ChainlinkFeeds.js +186 -23
- package/dist/contracts/LegoAaveV3.d.ts +160 -23
- package/dist/contracts/LegoAaveV3.d.ts.map +1 -1
- package/dist/contracts/LegoAaveV3.js +186 -23
- package/dist/contracts/LegoAeroClassic.d.ts +160 -23
- package/dist/contracts/LegoAeroClassic.d.ts.map +1 -1
- package/dist/contracts/LegoAeroClassic.js +186 -23
- package/dist/contracts/LegoAeroSlipstream.d.ts +160 -23
- package/dist/contracts/LegoAeroSlipstream.d.ts.map +1 -1
- package/dist/contracts/LegoAeroSlipstream.js +186 -23
- package/dist/contracts/LegoCompoundV3.d.ts +160 -23
- package/dist/contracts/LegoCompoundV3.d.ts.map +1 -1
- package/dist/contracts/LegoCompoundV3.js +186 -23
- package/dist/contracts/LegoCurve.d.ts +160 -23
- package/dist/contracts/LegoCurve.d.ts.map +1 -1
- package/dist/contracts/LegoCurve.js +186 -23
- package/dist/contracts/LegoEuler.d.ts +160 -23
- package/dist/contracts/LegoEuler.d.ts.map +1 -1
- package/dist/contracts/LegoEuler.js +186 -23
- package/dist/contracts/LegoFluid.d.ts +171 -23
- package/dist/contracts/LegoFluid.d.ts.map +1 -1
- package/dist/contracts/LegoFluid.js +200 -23
- package/dist/contracts/LegoHelper.js +1 -1
- package/dist/contracts/LegoMoonwell.d.ts +160 -23
- package/dist/contracts/LegoMoonwell.d.ts.map +1 -1
- package/dist/contracts/LegoMoonwell.js +186 -23
- package/dist/contracts/LegoMorpho.d.ts +160 -23
- package/dist/contracts/LegoMorpho.d.ts.map +1 -1
- package/dist/contracts/LegoMorpho.js +186 -23
- package/dist/contracts/LegoRegistry.d.ts +501 -96
- package/dist/contracts/LegoRegistry.d.ts.map +1 -1
- package/dist/contracts/LegoRegistry.js +686 -174
- package/dist/contracts/LegoSky.d.ts +160 -23
- package/dist/contracts/LegoSky.d.ts.map +1 -1
- package/dist/contracts/LegoSky.js +186 -23
- package/dist/contracts/LegoUniswapV2.d.ts +160 -23
- package/dist/contracts/LegoUniswapV2.d.ts.map +1 -1
- package/dist/contracts/LegoUniswapV2.js +186 -23
- package/dist/contracts/LegoUniswapV3.d.ts +160 -23
- package/dist/contracts/LegoUniswapV3.d.ts.map +1 -1
- package/dist/contracts/LegoUniswapV3.js +186 -23
- package/dist/contracts/OracleRegistry.d.ts +506 -109
- package/dist/contracts/OracleRegistry.d.ts.map +1 -1
- package/dist/contracts/OracleRegistry.js +628 -131
- package/dist/contracts/PriceSheets.d.ts +160 -23
- package/dist/contracts/PriceSheets.d.ts.map +1 -1
- package/dist/contracts/PriceSheets.js +186 -23
- package/dist/contracts/PythFeeds.d.ts +160 -23
- package/dist/contracts/PythFeeds.d.ts.map +1 -1
- package/dist/contracts/PythFeeds.js +186 -23
- package/dist/contracts/StorkFeeds.d.ts +160 -23
- package/dist/contracts/StorkFeeds.d.ts.map +1 -1
- package/dist/contracts/StorkFeeds.js +186 -23
- package/dist/contracts/UserWallet.d.ts +1956 -0
- package/dist/contracts/UserWallet.d.ts.map +1 -0
- package/dist/contracts/UserWallet.js +2551 -0
- package/dist/contracts/UserWalletConfig.d.ts +1466 -0
- package/dist/contracts/UserWalletConfig.d.ts.map +1 -0
- package/dist/contracts/UserWalletConfig.js +1762 -0
- package/dist/contracts/index.d.ts +2 -2
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +2 -2
- package/dist/contracts/sdk.d.ts +4 -4
- package/dist/contracts/sdk.d.ts.map +1 -1
- package/dist/contracts/sdk.js +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +3 -3
|
@@ -151,11 +151,82 @@ export const abi = [
|
|
|
151
151
|
inputs: [
|
|
152
152
|
{
|
|
153
153
|
indexed: true,
|
|
154
|
-
name: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
449
|
+
name: '_newGov',
|
|
367
450
|
type: 'address',
|
|
368
451
|
},
|
|
369
452
|
],
|
|
370
|
-
name: '
|
|
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: '
|
|
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
|
-
|
|
384
|
-
|
|
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
|
-
|
|
519
|
+
stateMutability: 'view',
|
|
520
|
+
type: 'function',
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
inputs: [],
|
|
524
|
+
name: 'govChangeDelay',
|
|
388
525
|
outputs: [
|
|
389
526
|
{
|
|
390
527
|
name: '',
|
|
391
|
-
type: '
|
|
528
|
+
type: 'uint256',
|
|
392
529
|
},
|
|
393
530
|
],
|
|
394
|
-
stateMutability: '
|
|
531
|
+
stateMutability: 'view',
|
|
395
532
|
type: 'function',
|
|
396
533
|
},
|
|
397
534
|
{
|
|
398
535
|
inputs: [],
|
|
399
|
-
name: '
|
|
536
|
+
name: 'MIN_GOV_CHANGE_DELAY',
|
|
400
537
|
outputs: [
|
|
401
538
|
{
|
|
402
539
|
name: '',
|
|
403
|
-
type: '
|
|
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 = '
|
|
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
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
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
|
-
|
|
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),
|