@underscore-finance/sdk 0.2.2 → 0.3.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 +59 -0
- package/dist/contracts/AddyRegistry.d.ts.map +1 -1
- package/dist/contracts/AddyRegistry.js +80 -1
- package/dist/contracts/Agent.js +1 -1
- package/dist/contracts/AgentFactory.d.ts +673 -269
- package/dist/contracts/AgentFactory.d.ts.map +1 -1
- package/dist/contracts/AgentFactory.js +742 -254
- package/dist/contracts/AgentFactory_v2.d.ts +1259 -0
- package/dist/contracts/AgentFactory_v2.d.ts.map +1 -0
- package/dist/contracts/AgentFactory_v2.js +1588 -0
- package/dist/contracts/ChainlinkFeeds.js +1 -1
- package/dist/contracts/LegoAaveV3.js +1 -1
- package/dist/contracts/LegoAeroClassic.js +1 -1
- package/dist/contracts/LegoAeroSlipstream.js +1 -1
- package/dist/contracts/LegoCompoundV3.js +1 -1
- package/dist/contracts/LegoCurve.js +1 -1
- package/dist/contracts/LegoEuler.js +1 -1
- package/dist/contracts/LegoFluid.js +1 -1
- package/dist/contracts/LegoHelper.js +1 -1
- package/dist/contracts/LegoMoonwell.js +1 -1
- package/dist/contracts/LegoMorpho.js +1 -1
- package/dist/contracts/LegoRegistry.d.ts +83 -0
- package/dist/contracts/LegoRegistry.d.ts.map +1 -1
- package/dist/contracts/LegoRegistry.js +109 -1
- package/dist/contracts/LegoSky.js +1 -1
- package/dist/contracts/LegoUniswapV2.js +1 -1
- package/dist/contracts/LegoUniswapV3.js +1 -1
- package/dist/contracts/OracleRegistry.d.ts +11 -0
- package/dist/contracts/OracleRegistry.d.ts.map +1 -1
- package/dist/contracts/OracleRegistry.js +15 -1
- package/dist/contracts/PriceSheets.d.ts +65 -133
- package/dist/contracts/PriceSheets.d.ts.map +1 -1
- package/dist/contracts/PriceSheets.js +74 -152
- package/dist/contracts/PythFeeds.js +1 -1
- package/dist/contracts/StorkFeeds.js +1 -1
- package/dist/contracts/UserWallet.d.ts +41 -24
- package/dist/contracts/UserWallet.d.ts.map +1 -1
- package/dist/contracts/UserWallet.js +48 -24
- package/dist/contracts/UserWalletConfig.d.ts +384 -0
- package/dist/contracts/UserWalletConfig.d.ts.map +1 -1
- package/dist/contracts/UserWalletConfig.js +500 -1
- package/dist/contracts/index.d.ts +1 -0
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +1 -0
- package/dist/contracts/sdk.d.ts +2 -0
- package/dist/contracts/sdk.d.ts.map +1 -1
- package/dist/contracts/sdk.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/package.json +1 -1
|
@@ -608,17 +608,27 @@ export const abi = [
|
|
|
608
608
|
inputs: [
|
|
609
609
|
{
|
|
610
610
|
indexed: true,
|
|
611
|
-
name: '
|
|
611
|
+
name: 'asset',
|
|
612
612
|
type: 'address',
|
|
613
613
|
},
|
|
614
614
|
{
|
|
615
615
|
indexed: true,
|
|
616
|
-
name: '
|
|
616
|
+
name: 'protocolRecipient',
|
|
617
617
|
type: 'address',
|
|
618
618
|
},
|
|
619
619
|
{
|
|
620
620
|
indexed: false,
|
|
621
|
-
name: '
|
|
621
|
+
name: 'protocolAmount',
|
|
622
|
+
type: 'uint256',
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
indexed: true,
|
|
626
|
+
name: 'ambassadorRecipient',
|
|
627
|
+
type: 'address',
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
indexed: false,
|
|
631
|
+
name: 'ambassadorAmount',
|
|
622
632
|
type: 'uint256',
|
|
623
633
|
},
|
|
624
634
|
{
|
|
@@ -724,6 +734,18 @@ export const abi = [
|
|
|
724
734
|
stateMutability: 'pure',
|
|
725
735
|
type: 'function',
|
|
726
736
|
},
|
|
737
|
+
{
|
|
738
|
+
inputs: [],
|
|
739
|
+
name: 'canBeAmbassador',
|
|
740
|
+
outputs: [
|
|
741
|
+
{
|
|
742
|
+
name: '',
|
|
743
|
+
type: 'bool',
|
|
744
|
+
},
|
|
745
|
+
],
|
|
746
|
+
stateMutability: 'view',
|
|
747
|
+
type: 'function',
|
|
748
|
+
},
|
|
727
749
|
{
|
|
728
750
|
inputs: [
|
|
729
751
|
{
|
|
@@ -2314,7 +2336,7 @@ export const abi = [
|
|
|
2314
2336
|
},
|
|
2315
2337
|
{
|
|
2316
2338
|
inputs: [],
|
|
2317
|
-
name: '
|
|
2339
|
+
name: 'clawBackTrialFunds',
|
|
2318
2340
|
outputs: [
|
|
2319
2341
|
{
|
|
2320
2342
|
name: '',
|
|
@@ -2327,21 +2349,15 @@ export const abi = [
|
|
|
2327
2349
|
{
|
|
2328
2350
|
inputs: [
|
|
2329
2351
|
{
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
name: 'vaultToken',
|
|
2337
|
-
type: 'address',
|
|
2338
|
-
},
|
|
2339
|
-
],
|
|
2340
|
-
name: '_opportunities',
|
|
2341
|
-
type: 'tuple[]',
|
|
2352
|
+
name: '_collection',
|
|
2353
|
+
type: 'address',
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
name: '_nftTokenId',
|
|
2357
|
+
type: 'uint256',
|
|
2342
2358
|
},
|
|
2343
2359
|
],
|
|
2344
|
-
name: '
|
|
2360
|
+
name: 'recoverNft',
|
|
2345
2361
|
outputs: [
|
|
2346
2362
|
{
|
|
2347
2363
|
name: '',
|
|
@@ -2354,15 +2370,19 @@ export const abi = [
|
|
|
2354
2370
|
{
|
|
2355
2371
|
inputs: [
|
|
2356
2372
|
{
|
|
2357
|
-
name: '
|
|
2373
|
+
name: '_newWallet',
|
|
2358
2374
|
type: 'address',
|
|
2359
2375
|
},
|
|
2360
2376
|
{
|
|
2361
|
-
name: '
|
|
2362
|
-
type: '
|
|
2377
|
+
name: '_assetsToMigrate',
|
|
2378
|
+
type: 'address[]',
|
|
2379
|
+
},
|
|
2380
|
+
{
|
|
2381
|
+
name: '_whitelistToMigrate',
|
|
2382
|
+
type: 'address[]',
|
|
2363
2383
|
},
|
|
2364
2384
|
],
|
|
2365
|
-
name: '
|
|
2385
|
+
name: 'migrateWalletOut',
|
|
2366
2386
|
outputs: [
|
|
2367
2387
|
{
|
|
2368
2388
|
name: '',
|
|
@@ -2460,7 +2480,7 @@ export const abi = [
|
|
|
2460
2480
|
type: 'constructor',
|
|
2461
2481
|
},
|
|
2462
2482
|
];
|
|
2463
|
-
export const deployAddress = '
|
|
2483
|
+
export const deployAddress = '0xe43D5bD11a2A6A9348EFC516ad9Ac3D32164A5A0';
|
|
2464
2484
|
function getRequest(method, args, contractAddressOrOptions) {
|
|
2465
2485
|
const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
|
|
2466
2486
|
const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
|
|
@@ -2491,6 +2511,7 @@ function getRequest(method, args, contractAddressOrOptions) {
|
|
|
2491
2511
|
export const call = {
|
|
2492
2512
|
onERC721Received: (...args) => getRequest('onERC721Received', args),
|
|
2493
2513
|
apiVersion: (...args) => getRequest('apiVersion', args),
|
|
2514
|
+
canBeAmbassador: (...args) => getRequest('canBeAmbassador', args),
|
|
2494
2515
|
walletConfig: (...args) => getRequest('walletConfig', args),
|
|
2495
2516
|
trialFundsAsset: (...args) => getRequest('trialFundsAsset', args),
|
|
2496
2517
|
trialFundsInitialAmount: (...args) => getRequest('trialFundsInitialAmount', args),
|
|
@@ -2519,14 +2540,16 @@ export const mutation = {
|
|
|
2519
2540
|
transferFunds: getMutation('transferFunds'),
|
|
2520
2541
|
convertEthToWeth: getMutation('convertEthToWeth'),
|
|
2521
2542
|
convertWethToEth: getMutation('convertWethToEth'),
|
|
2522
|
-
|
|
2543
|
+
clawBackTrialFunds: getMutation('clawBackTrialFunds'),
|
|
2523
2544
|
recoverNft: getMutation('recoverNft'),
|
|
2545
|
+
migrateWalletOut: getMutation('migrateWalletOut'),
|
|
2524
2546
|
};
|
|
2525
2547
|
export function toSdk(address, publicClient, walletClient) {
|
|
2526
2548
|
return {
|
|
2527
2549
|
// Queries
|
|
2528
2550
|
onERC721Received: (...args) => singleQuery(publicClient, call.onERC721Received(...args).at(address)),
|
|
2529
2551
|
apiVersion: (...args) => singleQuery(publicClient, call.apiVersion(...args).at(address)),
|
|
2552
|
+
canBeAmbassador: (...args) => singleQuery(publicClient, call.canBeAmbassador(...args).at(address)),
|
|
2530
2553
|
walletConfig: (...args) => singleQuery(publicClient, call.walletConfig(...args).at(address)),
|
|
2531
2554
|
trialFundsAsset: (...args) => singleQuery(publicClient, call.trialFundsAsset(...args).at(address)),
|
|
2532
2555
|
trialFundsInitialAmount: (...args) => singleQuery(publicClient, call.trialFundsInitialAmount(...args).at(address)),
|
|
@@ -2545,7 +2568,8 @@ export function toSdk(address, publicClient, walletClient) {
|
|
|
2545
2568
|
transferFunds: (...args) => mutate(walletClient, mutation.transferFunds, { address })(...args),
|
|
2546
2569
|
convertEthToWeth: (...args) => mutate(walletClient, mutation.convertEthToWeth, { address })(...args),
|
|
2547
2570
|
convertWethToEth: (...args) => mutate(walletClient, mutation.convertWethToEth, { address })(...args),
|
|
2548
|
-
|
|
2571
|
+
clawBackTrialFunds: (...args) => mutate(walletClient, mutation.clawBackTrialFunds, { address })(...args),
|
|
2549
2572
|
recoverNft: (...args) => mutate(walletClient, mutation.recoverNft, { address })(...args),
|
|
2573
|
+
migrateWalletOut: (...args) => mutate(walletClient, mutation.migrateWalletOut, { address })(...args),
|
|
2550
2574
|
};
|
|
2551
2575
|
}
|
|
@@ -200,6 +200,15 @@ export declare const abi: readonly [{
|
|
|
200
200
|
}];
|
|
201
201
|
readonly name: "WhitelistAddrRemoved";
|
|
202
202
|
readonly type: "event";
|
|
203
|
+
}, {
|
|
204
|
+
readonly anonymous: false;
|
|
205
|
+
readonly inputs: readonly [{
|
|
206
|
+
readonly indexed: true;
|
|
207
|
+
readonly name: "addr";
|
|
208
|
+
readonly type: "address";
|
|
209
|
+
}];
|
|
210
|
+
readonly name: "WhitelistAddrSetViaMigration";
|
|
211
|
+
readonly type: "event";
|
|
203
212
|
}, {
|
|
204
213
|
readonly anonymous: false;
|
|
205
214
|
readonly inputs: readonly [{
|
|
@@ -213,6 +222,24 @@ export declare const abi: readonly [{
|
|
|
213
222
|
}];
|
|
214
223
|
readonly name: "ReserveAssetSet";
|
|
215
224
|
readonly type: "event";
|
|
225
|
+
}, {
|
|
226
|
+
readonly anonymous: false;
|
|
227
|
+
readonly inputs: readonly [{
|
|
228
|
+
readonly indexed: false;
|
|
229
|
+
readonly name: "canWalletBeAmbassador";
|
|
230
|
+
readonly type: "bool";
|
|
231
|
+
}];
|
|
232
|
+
readonly name: "CanWalletBeAmbassadorSet";
|
|
233
|
+
readonly type: "event";
|
|
234
|
+
}, {
|
|
235
|
+
readonly anonymous: false;
|
|
236
|
+
readonly inputs: readonly [{
|
|
237
|
+
readonly indexed: true;
|
|
238
|
+
readonly name: "addr";
|
|
239
|
+
readonly type: "address";
|
|
240
|
+
}];
|
|
241
|
+
readonly name: "AmbassadorForwarderSet";
|
|
242
|
+
readonly type: "event";
|
|
216
243
|
}, {
|
|
217
244
|
readonly anonymous: false;
|
|
218
245
|
readonly inputs: readonly [{
|
|
@@ -230,6 +257,44 @@ export declare const abi: readonly [{
|
|
|
230
257
|
}];
|
|
231
258
|
readonly name: "FundsRecovered";
|
|
232
259
|
readonly type: "event";
|
|
260
|
+
}, {
|
|
261
|
+
readonly anonymous: false;
|
|
262
|
+
readonly inputs: readonly [{
|
|
263
|
+
readonly indexed: true;
|
|
264
|
+
readonly name: "newWallet";
|
|
265
|
+
readonly type: "address";
|
|
266
|
+
}, {
|
|
267
|
+
readonly indexed: false;
|
|
268
|
+
readonly name: "numAssetsToMigrate";
|
|
269
|
+
readonly type: "uint256";
|
|
270
|
+
}, {
|
|
271
|
+
readonly indexed: false;
|
|
272
|
+
readonly name: "numWhitelistToMigrate";
|
|
273
|
+
readonly type: "uint256";
|
|
274
|
+
}];
|
|
275
|
+
readonly name: "UserWalletStartMigration";
|
|
276
|
+
readonly type: "event";
|
|
277
|
+
}, {
|
|
278
|
+
readonly anonymous: false;
|
|
279
|
+
readonly inputs: readonly [{
|
|
280
|
+
readonly indexed: true;
|
|
281
|
+
readonly name: "oldWallet";
|
|
282
|
+
readonly type: "address";
|
|
283
|
+
}, {
|
|
284
|
+
readonly indexed: false;
|
|
285
|
+
readonly name: "numWhitelistMigrated";
|
|
286
|
+
readonly type: "uint256";
|
|
287
|
+
}, {
|
|
288
|
+
readonly indexed: false;
|
|
289
|
+
readonly name: "numVaultTokensMigrated";
|
|
290
|
+
readonly type: "uint256";
|
|
291
|
+
}, {
|
|
292
|
+
readonly indexed: false;
|
|
293
|
+
readonly name: "numAssetsMigrated";
|
|
294
|
+
readonly type: "uint256";
|
|
295
|
+
}];
|
|
296
|
+
readonly name: "UserWalletFinishMigration";
|
|
297
|
+
readonly type: "event";
|
|
233
298
|
}, {
|
|
234
299
|
readonly anonymous: false;
|
|
235
300
|
readonly inputs: readonly [{
|
|
@@ -555,6 +620,9 @@ export declare const abi: readonly [{
|
|
|
555
620
|
}, {
|
|
556
621
|
readonly name: "addyRegistry";
|
|
557
622
|
readonly type: "address";
|
|
623
|
+
}, {
|
|
624
|
+
readonly name: "agentFactory";
|
|
625
|
+
readonly type: "address";
|
|
558
626
|
}, {
|
|
559
627
|
readonly name: "legoRegistry";
|
|
560
628
|
readonly type: "address";
|
|
@@ -663,6 +731,9 @@ export declare const abi: readonly [{
|
|
|
663
731
|
}, {
|
|
664
732
|
readonly name: "addyRegistry";
|
|
665
733
|
readonly type: "address";
|
|
734
|
+
}, {
|
|
735
|
+
readonly name: "agentFactory";
|
|
736
|
+
readonly type: "address";
|
|
666
737
|
}, {
|
|
667
738
|
readonly name: "legoRegistry";
|
|
668
739
|
readonly type: "address";
|
|
@@ -689,6 +760,159 @@ export declare const abi: readonly [{
|
|
|
689
760
|
}];
|
|
690
761
|
readonly stateMutability: "view";
|
|
691
762
|
readonly type: "function";
|
|
763
|
+
}, {
|
|
764
|
+
readonly inputs: readonly [{
|
|
765
|
+
readonly name: "_asset";
|
|
766
|
+
readonly type: "address";
|
|
767
|
+
}, {
|
|
768
|
+
readonly name: "_vaultToken";
|
|
769
|
+
readonly type: "address";
|
|
770
|
+
}, {
|
|
771
|
+
readonly name: "_vaultTokenAmountReceived";
|
|
772
|
+
readonly type: "uint256";
|
|
773
|
+
}, {
|
|
774
|
+
readonly name: "_assetAmountDeposited";
|
|
775
|
+
readonly type: "uint256";
|
|
776
|
+
}, {
|
|
777
|
+
readonly name: "_legoRegistry";
|
|
778
|
+
readonly type: "address";
|
|
779
|
+
}];
|
|
780
|
+
readonly name: "updateYieldTrackingOnDeposit";
|
|
781
|
+
readonly outputs: readonly [];
|
|
782
|
+
readonly stateMutability: "nonpayable";
|
|
783
|
+
readonly type: "function";
|
|
784
|
+
}, {
|
|
785
|
+
readonly inputs: readonly [{
|
|
786
|
+
readonly name: "_vaultToken";
|
|
787
|
+
readonly type: "address";
|
|
788
|
+
}, {
|
|
789
|
+
readonly name: "_vaultTokenAmountBurned";
|
|
790
|
+
readonly type: "uint256";
|
|
791
|
+
}, {
|
|
792
|
+
readonly name: "_asset";
|
|
793
|
+
readonly type: "address";
|
|
794
|
+
}, {
|
|
795
|
+
readonly name: "_assetAmountReceived";
|
|
796
|
+
readonly type: "uint256";
|
|
797
|
+
}, {
|
|
798
|
+
readonly name: "_legoRegistry";
|
|
799
|
+
readonly type: "address";
|
|
800
|
+
}];
|
|
801
|
+
readonly name: "updateYieldTrackingOnWithdrawal";
|
|
802
|
+
readonly outputs: readonly [{
|
|
803
|
+
readonly name: "";
|
|
804
|
+
readonly type: "uint256";
|
|
805
|
+
}];
|
|
806
|
+
readonly stateMutability: "nonpayable";
|
|
807
|
+
readonly type: "function";
|
|
808
|
+
}, {
|
|
809
|
+
readonly inputs: readonly [{
|
|
810
|
+
readonly name: "_tokenIn";
|
|
811
|
+
readonly type: "address";
|
|
812
|
+
}, {
|
|
813
|
+
readonly name: "_tokenOut";
|
|
814
|
+
readonly type: "address";
|
|
815
|
+
}, {
|
|
816
|
+
readonly name: "_tokenOutAmount";
|
|
817
|
+
readonly type: "uint256";
|
|
818
|
+
}, {
|
|
819
|
+
readonly name: "_legoRegistry";
|
|
820
|
+
readonly type: "address";
|
|
821
|
+
}];
|
|
822
|
+
readonly name: "updateYieldTrackingOnSwap";
|
|
823
|
+
readonly outputs: readonly [];
|
|
824
|
+
readonly stateMutability: "nonpayable";
|
|
825
|
+
readonly type: "function";
|
|
826
|
+
}, {
|
|
827
|
+
readonly inputs: readonly [{
|
|
828
|
+
readonly name: "_asset";
|
|
829
|
+
readonly type: "address";
|
|
830
|
+
}, {
|
|
831
|
+
readonly name: "_amount";
|
|
832
|
+
readonly type: "uint256";
|
|
833
|
+
}, {
|
|
834
|
+
readonly name: "_legoRegistry";
|
|
835
|
+
readonly type: "address";
|
|
836
|
+
}];
|
|
837
|
+
readonly name: "updateYieldTrackingOnEntry";
|
|
838
|
+
readonly outputs: readonly [];
|
|
839
|
+
readonly stateMutability: "nonpayable";
|
|
840
|
+
readonly type: "function";
|
|
841
|
+
}, {
|
|
842
|
+
readonly inputs: readonly [{
|
|
843
|
+
readonly name: "_asset";
|
|
844
|
+
readonly type: "address";
|
|
845
|
+
}, {
|
|
846
|
+
readonly name: "_legoRegistry";
|
|
847
|
+
readonly type: "address";
|
|
848
|
+
}];
|
|
849
|
+
readonly name: "updateYieldTrackingOnExit";
|
|
850
|
+
readonly outputs: readonly [];
|
|
851
|
+
readonly stateMutability: "nonpayable";
|
|
852
|
+
readonly type: "function";
|
|
853
|
+
}, {
|
|
854
|
+
readonly inputs: readonly [{
|
|
855
|
+
readonly name: "_newWallet";
|
|
856
|
+
readonly type: "address";
|
|
857
|
+
}];
|
|
858
|
+
readonly name: "startMigrationOut";
|
|
859
|
+
readonly outputs: readonly [{
|
|
860
|
+
readonly name: "";
|
|
861
|
+
readonly type: "bool";
|
|
862
|
+
}];
|
|
863
|
+
readonly stateMutability: "nonpayable";
|
|
864
|
+
readonly type: "function";
|
|
865
|
+
}, {
|
|
866
|
+
readonly inputs: readonly [{
|
|
867
|
+
readonly name: "_newWallet";
|
|
868
|
+
readonly type: "address";
|
|
869
|
+
}, {
|
|
870
|
+
readonly name: "_assetsToMigrate";
|
|
871
|
+
readonly type: "address[]";
|
|
872
|
+
}];
|
|
873
|
+
readonly name: "startMigrationOut";
|
|
874
|
+
readonly outputs: readonly [{
|
|
875
|
+
readonly name: "";
|
|
876
|
+
readonly type: "bool";
|
|
877
|
+
}];
|
|
878
|
+
readonly stateMutability: "nonpayable";
|
|
879
|
+
readonly type: "function";
|
|
880
|
+
}, {
|
|
881
|
+
readonly inputs: readonly [{
|
|
882
|
+
readonly name: "_newWallet";
|
|
883
|
+
readonly type: "address";
|
|
884
|
+
}, {
|
|
885
|
+
readonly name: "_assetsToMigrate";
|
|
886
|
+
readonly type: "address[]";
|
|
887
|
+
}, {
|
|
888
|
+
readonly name: "_whitelistToMigrate";
|
|
889
|
+
readonly type: "address[]";
|
|
890
|
+
}];
|
|
891
|
+
readonly name: "startMigrationOut";
|
|
892
|
+
readonly outputs: readonly [{
|
|
893
|
+
readonly name: "";
|
|
894
|
+
readonly type: "bool";
|
|
895
|
+
}];
|
|
896
|
+
readonly stateMutability: "nonpayable";
|
|
897
|
+
readonly type: "function";
|
|
898
|
+
}, {
|
|
899
|
+
readonly inputs: readonly [{
|
|
900
|
+
readonly name: "_whitelistToMigrate";
|
|
901
|
+
readonly type: "address[]";
|
|
902
|
+
}, {
|
|
903
|
+
readonly name: "_assetsMigrated";
|
|
904
|
+
readonly type: "address[]";
|
|
905
|
+
}, {
|
|
906
|
+
readonly name: "_vaultTokensMigrated";
|
|
907
|
+
readonly type: "address[]";
|
|
908
|
+
}];
|
|
909
|
+
readonly name: "finishMigrationIn";
|
|
910
|
+
readonly outputs: readonly [{
|
|
911
|
+
readonly name: "";
|
|
912
|
+
readonly type: "bool";
|
|
913
|
+
}];
|
|
914
|
+
readonly stateMutability: "nonpayable";
|
|
915
|
+
readonly type: "function";
|
|
692
916
|
}, {
|
|
693
917
|
readonly inputs: readonly [{
|
|
694
918
|
readonly name: "_agent";
|
|
@@ -1004,6 +1228,39 @@ export declare const abi: readonly [{
|
|
|
1004
1228
|
}];
|
|
1005
1229
|
readonly stateMutability: "nonpayable";
|
|
1006
1230
|
readonly type: "function";
|
|
1231
|
+
}, {
|
|
1232
|
+
readonly inputs: readonly [];
|
|
1233
|
+
readonly name: "getProceedsAddr";
|
|
1234
|
+
readonly outputs: readonly [{
|
|
1235
|
+
readonly name: "";
|
|
1236
|
+
readonly type: "address";
|
|
1237
|
+
}];
|
|
1238
|
+
readonly stateMutability: "view";
|
|
1239
|
+
readonly type: "function";
|
|
1240
|
+
}, {
|
|
1241
|
+
readonly inputs: readonly [{
|
|
1242
|
+
readonly name: "_addr";
|
|
1243
|
+
readonly type: "address";
|
|
1244
|
+
}];
|
|
1245
|
+
readonly name: "setAmbassadorForwarder";
|
|
1246
|
+
readonly outputs: readonly [{
|
|
1247
|
+
readonly name: "";
|
|
1248
|
+
readonly type: "bool";
|
|
1249
|
+
}];
|
|
1250
|
+
readonly stateMutability: "nonpayable";
|
|
1251
|
+
readonly type: "function";
|
|
1252
|
+
}, {
|
|
1253
|
+
readonly inputs: readonly [{
|
|
1254
|
+
readonly name: "_canWalletBeAmbassador";
|
|
1255
|
+
readonly type: "bool";
|
|
1256
|
+
}];
|
|
1257
|
+
readonly name: "setCanWalletBeAmbassador";
|
|
1258
|
+
readonly outputs: readonly [{
|
|
1259
|
+
readonly name: "";
|
|
1260
|
+
readonly type: "bool";
|
|
1261
|
+
}];
|
|
1262
|
+
readonly stateMutability: "nonpayable";
|
|
1263
|
+
readonly type: "function";
|
|
1007
1264
|
}, {
|
|
1008
1265
|
readonly inputs: readonly [{
|
|
1009
1266
|
readonly name: "_asset";
|
|
@@ -1170,6 +1427,87 @@ export declare const abi: readonly [{
|
|
|
1170
1427
|
}];
|
|
1171
1428
|
readonly stateMutability: "view";
|
|
1172
1429
|
readonly type: "function";
|
|
1430
|
+
}, {
|
|
1431
|
+
readonly inputs: readonly [];
|
|
1432
|
+
readonly name: "canWalletBeAmbassador";
|
|
1433
|
+
readonly outputs: readonly [{
|
|
1434
|
+
readonly name: "";
|
|
1435
|
+
readonly type: "bool";
|
|
1436
|
+
}];
|
|
1437
|
+
readonly stateMutability: "view";
|
|
1438
|
+
readonly type: "function";
|
|
1439
|
+
}, {
|
|
1440
|
+
readonly inputs: readonly [];
|
|
1441
|
+
readonly name: "ambassadorForwarder";
|
|
1442
|
+
readonly outputs: readonly [{
|
|
1443
|
+
readonly name: "";
|
|
1444
|
+
readonly type: "address";
|
|
1445
|
+
}];
|
|
1446
|
+
readonly stateMutability: "view";
|
|
1447
|
+
readonly type: "function";
|
|
1448
|
+
}, {
|
|
1449
|
+
readonly inputs: readonly [];
|
|
1450
|
+
readonly name: "myAmbassador";
|
|
1451
|
+
readonly outputs: readonly [{
|
|
1452
|
+
readonly name: "";
|
|
1453
|
+
readonly type: "address";
|
|
1454
|
+
}];
|
|
1455
|
+
readonly stateMutability: "view";
|
|
1456
|
+
readonly type: "function";
|
|
1457
|
+
}, {
|
|
1458
|
+
readonly inputs: readonly [];
|
|
1459
|
+
readonly name: "didMigrateIn";
|
|
1460
|
+
readonly outputs: readonly [{
|
|
1461
|
+
readonly name: "";
|
|
1462
|
+
readonly type: "bool";
|
|
1463
|
+
}];
|
|
1464
|
+
readonly stateMutability: "view";
|
|
1465
|
+
readonly type: "function";
|
|
1466
|
+
}, {
|
|
1467
|
+
readonly inputs: readonly [];
|
|
1468
|
+
readonly name: "didMigrateOut";
|
|
1469
|
+
readonly outputs: readonly [{
|
|
1470
|
+
readonly name: "";
|
|
1471
|
+
readonly type: "bool";
|
|
1472
|
+
}];
|
|
1473
|
+
readonly stateMutability: "view";
|
|
1474
|
+
readonly type: "function";
|
|
1475
|
+
}, {
|
|
1476
|
+
readonly inputs: readonly [{
|
|
1477
|
+
readonly name: "arg0";
|
|
1478
|
+
readonly type: "address";
|
|
1479
|
+
}];
|
|
1480
|
+
readonly name: "isVaultToken";
|
|
1481
|
+
readonly outputs: readonly [{
|
|
1482
|
+
readonly name: "";
|
|
1483
|
+
readonly type: "bool";
|
|
1484
|
+
}];
|
|
1485
|
+
readonly stateMutability: "view";
|
|
1486
|
+
readonly type: "function";
|
|
1487
|
+
}, {
|
|
1488
|
+
readonly inputs: readonly [{
|
|
1489
|
+
readonly name: "arg0";
|
|
1490
|
+
readonly type: "address";
|
|
1491
|
+
}];
|
|
1492
|
+
readonly name: "vaultTokenAmounts";
|
|
1493
|
+
readonly outputs: readonly [{
|
|
1494
|
+
readonly name: "";
|
|
1495
|
+
readonly type: "uint256";
|
|
1496
|
+
}];
|
|
1497
|
+
readonly stateMutability: "view";
|
|
1498
|
+
readonly type: "function";
|
|
1499
|
+
}, {
|
|
1500
|
+
readonly inputs: readonly [{
|
|
1501
|
+
readonly name: "arg0";
|
|
1502
|
+
readonly type: "address";
|
|
1503
|
+
}];
|
|
1504
|
+
readonly name: "depositedAmounts";
|
|
1505
|
+
readonly outputs: readonly [{
|
|
1506
|
+
readonly name: "";
|
|
1507
|
+
readonly type: "uint256";
|
|
1508
|
+
}];
|
|
1509
|
+
readonly stateMutability: "view";
|
|
1510
|
+
readonly type: "function";
|
|
1173
1511
|
}, {
|
|
1174
1512
|
readonly inputs: readonly [];
|
|
1175
1513
|
readonly name: "ADDY_REGISTRY";
|
|
@@ -1186,6 +1524,9 @@ export declare const abi: readonly [{
|
|
|
1186
1524
|
}, {
|
|
1187
1525
|
readonly name: "_initialAgent";
|
|
1188
1526
|
readonly type: "address";
|
|
1527
|
+
}, {
|
|
1528
|
+
readonly name: "_ambassador";
|
|
1529
|
+
readonly type: "address";
|
|
1189
1530
|
}, {
|
|
1190
1531
|
readonly name: "_addyRegistry";
|
|
1191
1532
|
readonly type: "address";
|
|
@@ -1239,6 +1580,7 @@ export type Contract = {
|
|
|
1239
1580
|
wallet: `0x${string}`;
|
|
1240
1581
|
walletConfig: `0x${string}`;
|
|
1241
1582
|
addyRegistry: `0x${string}`;
|
|
1583
|
+
agentFactory: `0x${string}`;
|
|
1242
1584
|
legoRegistry: `0x${string}`;
|
|
1243
1585
|
priceSheets: `0x${string}`;
|
|
1244
1586
|
oracleRegistry: `0x${string}`;
|
|
@@ -1247,6 +1589,7 @@ export type Contract = {
|
|
|
1247
1589
|
}) => Promise<bigint>;
|
|
1248
1590
|
canTransferToRecipient: (recipient: `0x${string}`) => Promise<boolean>;
|
|
1249
1591
|
doesWalletHaveSameOwner: (wallet: `0x${string}`) => Promise<boolean>;
|
|
1592
|
+
getProceedsAddr: () => Promise<`0x${string}`>;
|
|
1250
1593
|
wallet: () => Promise<`0x${string}`>;
|
|
1251
1594
|
didSetWallet: () => Promise<boolean>;
|
|
1252
1595
|
protocolSub: () => Promise<{
|
|
@@ -1281,6 +1624,14 @@ export type Contract = {
|
|
|
1281
1624
|
confirmBlock: bigint;
|
|
1282
1625
|
}>;
|
|
1283
1626
|
canTransferToAltOwnerWallets: () => Promise<boolean>;
|
|
1627
|
+
canWalletBeAmbassador: () => Promise<boolean>;
|
|
1628
|
+
ambassadorForwarder: () => Promise<`0x${string}`>;
|
|
1629
|
+
myAmbassador: () => Promise<`0x${string}`>;
|
|
1630
|
+
didMigrateIn: () => Promise<boolean>;
|
|
1631
|
+
didMigrateOut: () => Promise<boolean>;
|
|
1632
|
+
isVaultToken: (arg0: `0x${string}`) => Promise<boolean>;
|
|
1633
|
+
vaultTokenAmounts: (arg0: `0x${string}`) => Promise<bigint>;
|
|
1634
|
+
depositedAmounts: (arg0: `0x${string}`) => Promise<bigint>;
|
|
1284
1635
|
ADDY_REGISTRY: () => Promise<`0x${string}`>;
|
|
1285
1636
|
};
|
|
1286
1637
|
mutations: {
|
|
@@ -1294,6 +1645,7 @@ export type Contract = {
|
|
|
1294
1645
|
wallet: `0x${string}`;
|
|
1295
1646
|
walletConfig: `0x${string}`;
|
|
1296
1647
|
addyRegistry: `0x${string}`;
|
|
1648
|
+
agentFactory: `0x${string}`;
|
|
1297
1649
|
legoRegistry: `0x${string}`;
|
|
1298
1650
|
priceSheets: `0x${string}`;
|
|
1299
1651
|
oracleRegistry: `0x${string}`;
|
|
@@ -1317,6 +1669,13 @@ export type Contract = {
|
|
|
1317
1669
|
didChange: boolean;
|
|
1318
1670
|
}
|
|
1319
1671
|
]>;
|
|
1672
|
+
updateYieldTrackingOnDeposit: (asset: `0x${string}`, vaultToken: `0x${string}`, vaultTokenAmountReceived: bigint, assetAmountDeposited: bigint, legoRegistry: `0x${string}`) => Promise<void>;
|
|
1673
|
+
updateYieldTrackingOnWithdrawal: (vaultToken: `0x${string}`, vaultTokenAmountBurned: bigint, asset: `0x${string}`, assetAmountReceived: bigint, legoRegistry: `0x${string}`) => Promise<bigint>;
|
|
1674
|
+
updateYieldTrackingOnSwap: (tokenIn: `0x${string}`, tokenOut: `0x${string}`, tokenOutAmount: bigint, legoRegistry: `0x${string}`) => Promise<void>;
|
|
1675
|
+
updateYieldTrackingOnEntry: (asset: `0x${string}`, amount: bigint, legoRegistry: `0x${string}`) => Promise<void>;
|
|
1676
|
+
updateYieldTrackingOnExit: (asset: `0x${string}`, legoRegistry: `0x${string}`) => Promise<void>;
|
|
1677
|
+
startMigrationOut: (newWallet: `0x${string}`, assetsToMigrate?: `0x${string}`[], whitelistToMigrate?: `0x${string}`[]) => Promise<boolean>;
|
|
1678
|
+
finishMigrationIn: (whitelistToMigrate: `0x${string}`[], assetsMigrated: `0x${string}`[], vaultTokensMigrated: `0x${string}`[]) => Promise<boolean>;
|
|
1320
1679
|
addOrModifyAgent: (agent: `0x${string}`, allowedAssets?: `0x${string}`[], allowedLegoIds?: bigint[], allowedActions?: {
|
|
1321
1680
|
isSet: boolean;
|
|
1322
1681
|
canDeposit: boolean;
|
|
@@ -1358,6 +1717,8 @@ export type Contract = {
|
|
|
1358
1717
|
asset: `0x${string}`;
|
|
1359
1718
|
amount: bigint;
|
|
1360
1719
|
}[]) => Promise<boolean>;
|
|
1720
|
+
setAmbassadorForwarder: (addr: `0x${string}`) => Promise<boolean>;
|
|
1721
|
+
setCanWalletBeAmbassador: (canWalletBeAmbassador: boolean) => Promise<boolean>;
|
|
1361
1722
|
recoverFunds: (asset: `0x${string}`) => Promise<boolean>;
|
|
1362
1723
|
};
|
|
1363
1724
|
events: {
|
|
@@ -1372,8 +1733,13 @@ export type Contract = {
|
|
|
1372
1733
|
WhitelistAddrConfirmed: (addr: `0x${string}`, initiatedBlock: bigint, confirmBlock: bigint) => Promise<void>;
|
|
1373
1734
|
WhitelistAddrCancelled: (addr: `0x${string}`, initiatedBlock: bigint, confirmBlock: bigint, cancelledBy: `0x${string}`) => Promise<void>;
|
|
1374
1735
|
WhitelistAddrRemoved: (addr: `0x${string}`) => Promise<void>;
|
|
1736
|
+
WhitelistAddrSetViaMigration: (addr: `0x${string}`) => Promise<void>;
|
|
1375
1737
|
ReserveAssetSet: (asset: `0x${string}`, amount: bigint) => Promise<void>;
|
|
1738
|
+
CanWalletBeAmbassadorSet: (canWalletBeAmbassador: boolean) => Promise<void>;
|
|
1739
|
+
AmbassadorForwarderSet: (addr: `0x${string}`) => Promise<void>;
|
|
1376
1740
|
FundsRecovered: (asset: `0x${string}`, recipient: `0x${string}`, balance: bigint) => Promise<void>;
|
|
1741
|
+
UserWalletStartMigration: (newWallet: `0x${string}`, numAssetsToMigrate: bigint, numWhitelistToMigrate: bigint) => Promise<void>;
|
|
1742
|
+
UserWalletFinishMigration: (oldWallet: `0x${string}`, numWhitelistMigrated: bigint, numVaultTokensMigrated: bigint, numAssetsMigrated: bigint) => Promise<void>;
|
|
1377
1743
|
OwnershipChangeInitiated: (prevOwner: `0x${string}`, newOwner: `0x${string}`, confirmBlock: bigint) => Promise<void>;
|
|
1378
1744
|
OwnershipChangeConfirmed: (prevOwner: `0x${string}`, newOwner: `0x${string}`, initiatedBlock: bigint, confirmBlock: bigint) => Promise<void>;
|
|
1379
1745
|
OwnershipChangeCancelled: (cancelledOwner: `0x${string}`, cancelledBy: `0x${string}`, initiatedBlock: bigint, confirmBlock: bigint) => Promise<void>;
|
|
@@ -1432,6 +1798,7 @@ export type SDK = {
|
|
|
1432
1798
|
getAvailableTxAmount: (...args: ExtractArgs<Contract['calls']['getAvailableTxAmount']>) => Promise<CallReturn<'getAvailableTxAmount'>>;
|
|
1433
1799
|
canTransferToRecipient: (...args: ExtractArgs<Contract['calls']['canTransferToRecipient']>) => Promise<CallReturn<'canTransferToRecipient'>>;
|
|
1434
1800
|
doesWalletHaveSameOwner: (...args: ExtractArgs<Contract['calls']['doesWalletHaveSameOwner']>) => Promise<CallReturn<'doesWalletHaveSameOwner'>>;
|
|
1801
|
+
getProceedsAddr: (...args: ExtractArgs<Contract['calls']['getProceedsAddr']>) => Promise<CallReturn<'getProceedsAddr'>>;
|
|
1435
1802
|
wallet: (...args: ExtractArgs<Contract['calls']['wallet']>) => Promise<CallReturn<'wallet'>>;
|
|
1436
1803
|
didSetWallet: (...args: ExtractArgs<Contract['calls']['didSetWallet']>) => Promise<CallReturn<'didSetWallet'>>;
|
|
1437
1804
|
protocolSub: (...args: ExtractArgs<Contract['calls']['protocolSub']>) => Promise<CallReturn<'protocolSub'>>;
|
|
@@ -1440,6 +1807,14 @@ export type SDK = {
|
|
|
1440
1807
|
isRecipientAllowed: (...args: ExtractArgs<Contract['calls']['isRecipientAllowed']>) => Promise<CallReturn<'isRecipientAllowed'>>;
|
|
1441
1808
|
pendingWhitelist: (...args: ExtractArgs<Contract['calls']['pendingWhitelist']>) => Promise<CallReturn<'pendingWhitelist'>>;
|
|
1442
1809
|
canTransferToAltOwnerWallets: (...args: ExtractArgs<Contract['calls']['canTransferToAltOwnerWallets']>) => Promise<CallReturn<'canTransferToAltOwnerWallets'>>;
|
|
1810
|
+
canWalletBeAmbassador: (...args: ExtractArgs<Contract['calls']['canWalletBeAmbassador']>) => Promise<CallReturn<'canWalletBeAmbassador'>>;
|
|
1811
|
+
ambassadorForwarder: (...args: ExtractArgs<Contract['calls']['ambassadorForwarder']>) => Promise<CallReturn<'ambassadorForwarder'>>;
|
|
1812
|
+
myAmbassador: (...args: ExtractArgs<Contract['calls']['myAmbassador']>) => Promise<CallReturn<'myAmbassador'>>;
|
|
1813
|
+
didMigrateIn: (...args: ExtractArgs<Contract['calls']['didMigrateIn']>) => Promise<CallReturn<'didMigrateIn'>>;
|
|
1814
|
+
didMigrateOut: (...args: ExtractArgs<Contract['calls']['didMigrateOut']>) => Promise<CallReturn<'didMigrateOut'>>;
|
|
1815
|
+
isVaultToken: (...args: ExtractArgs<Contract['calls']['isVaultToken']>) => Promise<CallReturn<'isVaultToken'>>;
|
|
1816
|
+
vaultTokenAmounts: (...args: ExtractArgs<Contract['calls']['vaultTokenAmounts']>) => Promise<CallReturn<'vaultTokenAmounts'>>;
|
|
1817
|
+
depositedAmounts: (...args: ExtractArgs<Contract['calls']['depositedAmounts']>) => Promise<CallReturn<'depositedAmounts'>>;
|
|
1443
1818
|
ADDY_REGISTRY: (...args: ExtractArgs<Contract['calls']['ADDY_REGISTRY']>) => Promise<CallReturn<'ADDY_REGISTRY'>>;
|
|
1444
1819
|
changeOwnership: (...args: ExtractArgs<Contract['mutations']['changeOwnership']>) => Promise<Address>;
|
|
1445
1820
|
confirmOwnershipChange: (...args: ExtractArgs<Contract['mutations']['confirmOwnershipChange']>) => Promise<Address>;
|
|
@@ -1447,6 +1822,13 @@ export type SDK = {
|
|
|
1447
1822
|
setOwnershipChangeDelay: (...args: ExtractArgs<Contract['mutations']['setOwnershipChangeDelay']>) => Promise<Address>;
|
|
1448
1823
|
setWallet: (...args: ExtractArgs<Contract['mutations']['setWallet']>) => Promise<Address>;
|
|
1449
1824
|
handleSubscriptionsAndPermissions: (...args: ExtractArgs<Contract['mutations']['handleSubscriptionsAndPermissions']>) => Promise<Address>;
|
|
1825
|
+
updateYieldTrackingOnDeposit: (...args: ExtractArgs<Contract['mutations']['updateYieldTrackingOnDeposit']>) => Promise<Address>;
|
|
1826
|
+
updateYieldTrackingOnWithdrawal: (...args: ExtractArgs<Contract['mutations']['updateYieldTrackingOnWithdrawal']>) => Promise<Address>;
|
|
1827
|
+
updateYieldTrackingOnSwap: (...args: ExtractArgs<Contract['mutations']['updateYieldTrackingOnSwap']>) => Promise<Address>;
|
|
1828
|
+
updateYieldTrackingOnEntry: (...args: ExtractArgs<Contract['mutations']['updateYieldTrackingOnEntry']>) => Promise<Address>;
|
|
1829
|
+
updateYieldTrackingOnExit: (...args: ExtractArgs<Contract['mutations']['updateYieldTrackingOnExit']>) => Promise<Address>;
|
|
1830
|
+
startMigrationOut: (...args: ExtractArgs<Contract['mutations']['startMigrationOut']>) => Promise<Address>;
|
|
1831
|
+
finishMigrationIn: (...args: ExtractArgs<Contract['mutations']['finishMigrationIn']>) => Promise<Address>;
|
|
1450
1832
|
addOrModifyAgent: (...args: ExtractArgs<Contract['mutations']['addOrModifyAgent']>) => Promise<Address>;
|
|
1451
1833
|
disableAgent: (...args: ExtractArgs<Contract['mutations']['disableAgent']>) => Promise<Address>;
|
|
1452
1834
|
addLegoIdForAgent: (...args: ExtractArgs<Contract['mutations']['addLegoIdForAgent']>) => Promise<Address>;
|
|
@@ -1459,6 +1841,8 @@ export type SDK = {
|
|
|
1459
1841
|
removeWhitelistAddr: (...args: ExtractArgs<Contract['mutations']['removeWhitelistAddr']>) => Promise<Address>;
|
|
1460
1842
|
setReserveAsset: (...args: ExtractArgs<Contract['mutations']['setReserveAsset']>) => Promise<Address>;
|
|
1461
1843
|
setManyReserveAssets: (...args: ExtractArgs<Contract['mutations']['setManyReserveAssets']>) => Promise<Address>;
|
|
1844
|
+
setAmbassadorForwarder: (...args: ExtractArgs<Contract['mutations']['setAmbassadorForwarder']>) => Promise<Address>;
|
|
1845
|
+
setCanWalletBeAmbassador: (...args: ExtractArgs<Contract['mutations']['setCanWalletBeAmbassador']>) => Promise<Address>;
|
|
1462
1846
|
recoverFunds: (...args: ExtractArgs<Contract['mutations']['recoverFunds']>) => Promise<Address>;
|
|
1463
1847
|
};
|
|
1464
1848
|
export declare function toSdk(address: Address, publicClient?: PublicClient, walletClient?: WalletClient): SDK;
|