@underscore-finance/sdk 1.2.20-next.0 → 1.2.20-next.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/.claude/settings.local.json +31 -0
- package/.eslintrc.json +27 -0
- package/.prettierrc +9 -0
- package/.tool-versions +1 -0
- package/LICENSE +41 -0
- package/LICENSE_DATE.md +34 -0
- package/LICENSE_GRANTS.md +33 -0
- package/LICENSE_INFO.md +90 -0
- package/README.md +116 -17
- package/dapp.config.js +154 -0
- package/package.json +17 -44
- package/src/getSwapInstructions.ts +55 -0
- package/src/index.ts +192 -0
- package/tsconfig.json +18 -0
- package/AGENTS.md +0 -162
- package/abis.json +0 -181875
- package/addresses.json +0 -76
- package/dist/contracts/AaveV3.d.ts +0 -2594
- package/dist/contracts/AaveV3.d.ts.map +0 -1
- package/dist/contracts/AaveV3.js +0 -3272
- package/dist/contracts/AeroClassic.d.ts +0 -2118
- package/dist/contracts/AeroClassic.d.ts.map +0 -1
- package/dist/contracts/AeroClassic.js +0 -2679
- package/dist/contracts/AeroSlipstream.d.ts +0 -2256
- package/dist/contracts/AeroSlipstream.d.ts.map +0 -1
- package/dist/contracts/AeroSlipstream.js +0 -2848
- package/dist/contracts/AgentSenderGeneric.d.ts +0 -4129
- package/dist/contracts/AgentSenderGeneric.d.ts.map +0 -1
- package/dist/contracts/AgentSenderGeneric.js +0 -5397
- package/dist/contracts/AgentSenderSpecial.d.ts +0 -1997
- package/dist/contracts/AgentSenderSpecial.d.ts.map +0 -1
- package/dist/contracts/AgentSenderSpecial.js +0 -2532
- package/dist/contracts/AgentSenderSpecialSigHelper.d.ts +0 -2245
- package/dist/contracts/AgentSenderSpecialSigHelper.d.ts.map +0 -1
- package/dist/contracts/AgentSenderSpecialSigHelper.js +0 -2971
- package/dist/contracts/AgentWrapper.d.ts +0 -2520
- package/dist/contracts/AgentWrapper.d.ts.map +0 -1
- package/dist/contracts/AgentWrapper.js +0 -3389
- package/dist/contracts/AgentWrapperV1.d.ts +0 -3789
- package/dist/contracts/AgentWrapperV1.d.ts.map +0 -1
- package/dist/contracts/AgentWrapperV1.js +0 -4945
- package/dist/contracts/AgentWrapperV2.d.ts +0 -2494
- package/dist/contracts/AgentWrapperV2.d.ts.map +0 -1
- package/dist/contracts/AgentWrapperV2.js +0 -3354
- package/dist/contracts/Appraiser.d.ts +0 -577
- package/dist/contracts/Appraiser.d.ts.map +0 -1
- package/dist/contracts/Appraiser.js +0 -735
- package/dist/contracts/Avantis.d.ts +0 -2606
- package/dist/contracts/Avantis.d.ts.map +0 -1
- package/dist/contracts/Avantis.js +0 -3282
- package/dist/contracts/Billing.d.ts +0 -381
- package/dist/contracts/Billing.d.ts.map +0 -1
- package/dist/contracts/Billing.js +0 -451
- package/dist/contracts/ChequeBook.d.ts +0 -1704
- package/dist/contracts/ChequeBook.d.ts.map +0 -1
- package/dist/contracts/ChequeBook.js +0 -1922
- package/dist/contracts/CompoundV3.d.ts +0 -2622
- package/dist/contracts/CompoundV3.d.ts.map +0 -1
- package/dist/contracts/CompoundV3.js +0 -3304
- package/dist/contracts/ConvertVaultToken.d.ts +0 -64
- package/dist/contracts/ConvertVaultToken.d.ts.map +0 -1
- package/dist/contracts/ConvertVaultToken.js +0 -75
- package/dist/contracts/Curve.d.ts +0 -1107
- package/dist/contracts/Curve.d.ts.map +0 -1
- package/dist/contracts/Curve.js +0 -1379
- package/dist/contracts/DefaultsBase.d.ts +0 -306
- package/dist/contracts/DefaultsBase.d.ts.map +0 -1
- package/dist/contracts/DefaultsBase.js +0 -331
- package/dist/contracts/ERC20.d.ts +0 -288
- package/dist/contracts/ERC20.d.ts.map +0 -1
- package/dist/contracts/ERC20.js +0 -359
- package/dist/contracts/EarnVault.d.ts +0 -1733
- package/dist/contracts/EarnVault.d.ts.map +0 -1
- package/dist/contracts/EarnVault.js +0 -2235
- package/dist/contracts/EarnVaultAgent.d.ts +0 -1033
- package/dist/contracts/EarnVaultAgent.d.ts.map +0 -1
- package/dist/contracts/EarnVaultAgent.js +0 -1296
- package/dist/contracts/EarnVaultAgentSigHelper.d.ts +0 -905
- package/dist/contracts/EarnVaultAgentSigHelper.d.ts.map +0 -1
- package/dist/contracts/EarnVaultAgentSigHelper.js +0 -1198
- package/dist/contracts/Euler.d.ts +0 -2662
- package/dist/contracts/Euler.d.ts.map +0 -1
- package/dist/contracts/Euler.js +0 -3350
- package/dist/contracts/ExtraFi.d.ts +0 -2637
- package/dist/contracts/ExtraFi.d.ts.map +0 -1
- package/dist/contracts/ExtraFi.js +0 -3323
- package/dist/contracts/Fluid.d.ts +0 -2634
- package/dist/contracts/Fluid.d.ts.map +0 -1
- package/dist/contracts/Fluid.js +0 -3318
- package/dist/contracts/FortyAcres.d.ts +0 -2620
- package/dist/contracts/FortyAcres.d.ts.map +0 -1
- package/dist/contracts/FortyAcres.js +0 -3300
- package/dist/contracts/Hatchery.d.ts +0 -392
- package/dist/contracts/Hatchery.d.ts.map +0 -1
- package/dist/contracts/Hatchery.js +0 -472
- package/dist/contracts/Helpers.d.ts +0 -1463
- package/dist/contracts/Helpers.d.ts.map +0 -1
- package/dist/contracts/Helpers.js +0 -1763
- package/dist/contracts/HighCommand.d.ts +0 -2129
- package/dist/contracts/HighCommand.d.ts.map +0 -1
- package/dist/contracts/HighCommand.js +0 -2429
- package/dist/contracts/Kernel.d.ts +0 -387
- package/dist/contracts/Kernel.d.ts.map +0 -1
- package/dist/contracts/Kernel.js +0 -442
- package/dist/contracts/Ledger.d.ts +0 -708
- package/dist/contracts/Ledger.d.ts.map +0 -1
- package/dist/contracts/Ledger.js +0 -854
- package/dist/contracts/LegoBook.d.ts +0 -1463
- package/dist/contracts/LegoBook.d.ts.map +0 -1
- package/dist/contracts/LegoBook.js +0 -1763
- package/dist/contracts/LegoTools.d.ts +0 -1913
- package/dist/contracts/LegoTools.d.ts.map +0 -1
- package/dist/contracts/LegoTools.js +0 -2402
- package/dist/contracts/LevgVault.d.ts +0 -2115
- package/dist/contracts/LevgVault.d.ts.map +0 -1
- package/dist/contracts/LevgVault.js +0 -2733
- package/dist/contracts/LevgVaultAgent.d.ts +0 -1955
- package/dist/contracts/LevgVaultAgent.d.ts.map +0 -1
- package/dist/contracts/LevgVaultAgent.js +0 -2508
- package/dist/contracts/LevgVaultAgentSigHelper.d.ts +0 -2221
- package/dist/contracts/LevgVaultAgentSigHelper.d.ts.map +0 -1
- package/dist/contracts/LevgVaultAgentSigHelper.js +0 -2963
- package/dist/contracts/LevgVaultHelper.d.ts +0 -977
- package/dist/contracts/LevgVaultHelper.d.ts.map +0 -1
- package/dist/contracts/LevgVaultHelper.js +0 -1289
- package/dist/contracts/LevgVaultTools.d.ts +0 -2629
- package/dist/contracts/LevgVaultTools.d.ts.map +0 -1
- package/dist/contracts/LevgVaultTools.js +0 -3560
- package/dist/contracts/LootDistributor.d.ts +0 -1053
- package/dist/contracts/LootDistributor.d.ts.map +0 -1
- package/dist/contracts/LootDistributor.js +0 -1291
- package/dist/contracts/Migrator.d.ts +0 -289
- package/dist/contracts/Migrator.d.ts.map +0 -1
- package/dist/contracts/Migrator.js +0 -348
- package/dist/contracts/MissionControl.d.ts +0 -1405
- package/dist/contracts/MissionControl.d.ts.map +0 -1
- package/dist/contracts/MissionControl.js +0 -1592
- package/dist/contracts/Moonwell.d.ts +0 -2623
- package/dist/contracts/Moonwell.d.ts.map +0 -1
- package/dist/contracts/Moonwell.js +0 -3304
- package/dist/contracts/Morpho.d.ts +0 -2662
- package/dist/contracts/Morpho.d.ts.map +0 -1
- package/dist/contracts/Morpho.js +0 -3350
- package/dist/contracts/Paymaster.d.ts +0 -1714
- package/dist/contracts/Paymaster.d.ts.map +0 -1
- package/dist/contracts/Paymaster.js +0 -2098
- package/dist/contracts/RipeLego.d.ts +0 -2913
- package/dist/contracts/RipeLego.d.ts.map +0 -1
- package/dist/contracts/RipeLego.js +0 -3643
- package/dist/contracts/Sentinel.d.ts +0 -2064
- package/dist/contracts/Sentinel.d.ts.map +0 -1
- package/dist/contracts/Sentinel.js +0 -2476
- package/dist/contracts/SignatureHelper.d.ts +0 -4250
- package/dist/contracts/SignatureHelper.d.ts.map +0 -1
- package/dist/contracts/SignatureHelper.js +0 -5714
- package/dist/contracts/SignatureHelperV1.d.ts +0 -4250
- package/dist/contracts/SignatureHelperV1.d.ts.map +0 -1
- package/dist/contracts/SignatureHelperV1.js +0 -5714
- package/dist/contracts/SkyPsm.d.ts +0 -2667
- package/dist/contracts/SkyPsm.d.ts.map +0 -1
- package/dist/contracts/SkyPsm.js +0 -3356
- package/dist/contracts/Switchboard.d.ts +0 -1483
- package/dist/contracts/Switchboard.d.ts.map +0 -1
- package/dist/contracts/Switchboard.js +0 -1790
- package/dist/contracts/SwitchboardAlpha.d.ts +0 -3161
- package/dist/contracts/SwitchboardAlpha.d.ts.map +0 -1
- package/dist/contracts/SwitchboardAlpha.js +0 -3771
- package/dist/contracts/SwitchboardBravo.d.ts +0 -1591
- package/dist/contracts/SwitchboardBravo.d.ts.map +0 -1
- package/dist/contracts/SwitchboardBravo.js +0 -1872
- package/dist/contracts/SwitchboardCharlie.d.ts +0 -3172
- package/dist/contracts/SwitchboardCharlie.d.ts.map +0 -1
- package/dist/contracts/SwitchboardCharlie.js +0 -3713
- package/dist/contracts/UnderscoreLego.d.ts +0 -2592
- package/dist/contracts/UnderscoreLego.d.ts.map +0 -1
- package/dist/contracts/UnderscoreLego.js +0 -3264
- package/dist/contracts/UndyAero.d.ts +0 -1733
- package/dist/contracts/UndyAero.d.ts.map +0 -1
- package/dist/contracts/UndyAero.js +0 -2235
- package/dist/contracts/UndyBtc.d.ts +0 -1733
- package/dist/contracts/UndyBtc.d.ts.map +0 -1
- package/dist/contracts/UndyBtc.js +0 -2235
- package/dist/contracts/UndyCbeth.d.ts +0 -1733
- package/dist/contracts/UndyCbeth.d.ts.map +0 -1
- package/dist/contracts/UndyCbeth.js +0 -2235
- package/dist/contracts/UndyEth.d.ts +0 -1733
- package/dist/contracts/UndyEth.d.ts.map +0 -1
- package/dist/contracts/UndyEth.js +0 -2235
- package/dist/contracts/UndyEurc.d.ts +0 -1733
- package/dist/contracts/UndyEurc.d.ts.map +0 -1
- package/dist/contracts/UndyEurc.js +0 -2235
- package/dist/contracts/UndyGho.d.ts +0 -1733
- package/dist/contracts/UndyGho.d.ts.map +0 -1
- package/dist/contracts/UndyGho.js +0 -2235
- package/dist/contracts/UndyHq.d.ts +0 -1677
- package/dist/contracts/UndyHq.d.ts.map +0 -1
- package/dist/contracts/UndyHq.js +0 -2026
- package/dist/contracts/UndyRewardsLego.d.ts +0 -1572
- package/dist/contracts/UndyRewardsLego.d.ts.map +0 -1
- package/dist/contracts/UndyRewardsLego.js +0 -1994
- package/dist/contracts/UndyUsd.d.ts +0 -1733
- package/dist/contracts/UndyUsd.d.ts.map +0 -1
- package/dist/contracts/UndyUsd.js +0 -2235
- package/dist/contracts/UndyUsdV2.d.ts +0 -1762
- package/dist/contracts/UndyUsdV2.d.ts.map +0 -1
- package/dist/contracts/UndyUsdV2.js +0 -2267
- package/dist/contracts/UndyUsds.d.ts +0 -1733
- package/dist/contracts/UndyUsds.d.ts.map +0 -1
- package/dist/contracts/UndyUsds.js +0 -2235
- package/dist/contracts/UndyVirtual.d.ts +0 -1762
- package/dist/contracts/UndyVirtual.d.ts.map +0 -1
- package/dist/contracts/UndyVirtual.js +0 -2267
- package/dist/contracts/UniswapV2.d.ts +0 -2118
- package/dist/contracts/UniswapV2.d.ts.map +0 -1
- package/dist/contracts/UniswapV2.js +0 -2679
- package/dist/contracts/UniswapV3.d.ts +0 -2256
- package/dist/contracts/UniswapV3.d.ts.map +0 -1
- package/dist/contracts/UniswapV3.js +0 -2848
- package/dist/contracts/UserWallet.d.ts +0 -2650
- package/dist/contracts/UserWallet.d.ts.map +0 -1
- package/dist/contracts/UserWallet.js +0 -3520
- package/dist/contracts/UserWalletConfig.d.ts +0 -3901
- package/dist/contracts/UserWalletConfig.d.ts.map +0 -1
- package/dist/contracts/UserWalletConfig.js +0 -4507
- package/dist/contracts/UserWalletConfigV1.d.ts +0 -3692
- package/dist/contracts/UserWalletConfigV1.d.ts.map +0 -1
- package/dist/contracts/UserWalletConfigV1.js +0 -4276
- package/dist/contracts/UserWalletSignatureHelper.d.ts +0 -4552
- package/dist/contracts/UserWalletSignatureHelper.d.ts.map +0 -1
- package/dist/contracts/UserWalletSignatureHelper.js +0 -6123
- package/dist/contracts/UserWalletV1.d.ts +0 -2650
- package/dist/contracts/UserWalletV1.d.ts.map +0 -1
- package/dist/contracts/UserWalletV1.js +0 -3520
- package/dist/contracts/VaultRegistry.d.ts +0 -3162
- package/dist/contracts/VaultRegistry.d.ts.map +0 -1
- package/dist/contracts/VaultRegistry.js +0 -3893
- package/dist/contracts/WalletBackpack.d.ts +0 -1248
- package/dist/contracts/WalletBackpack.d.ts.map +0 -1
- package/dist/contracts/WalletBackpack.js +0 -1519
- package/dist/contracts/Wasabi.d.ts +0 -2620
- package/dist/contracts/Wasabi.d.ts.map +0 -1
- package/dist/contracts/Wasabi.js +0 -3300
- package/dist/contracts/index.d.ts +0 -76
- package/dist/contracts/index.d.ts.map +0 -1
- package/dist/contracts/index.js +0 -79
- package/dist/contracts/sdk.d.ts +0 -156
- package/dist/contracts/sdk.d.ts.map +0 -1
- package/dist/contracts/sdk.js +0 -158
- package/dist/getSwapInstructions.d.ts +0 -34
- package/dist/getSwapInstructions.d.ts.map +0 -1
- package/dist/getSwapInstructions.js +0 -21
- package/dist/index.d.ts +0 -135
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -137
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import { AddressResolverFunction } from '@dappql/async';
|
|
2
|
-
import { ParseEventLogsReturnType, Log, RpcLog, PublicClient, WalletClient } from 'viem';
|
|
3
|
-
type ExtractArgs<T> = T extends (...args: infer P) => any ? P : never;
|
|
4
|
-
type Address = `0x${string}`;
|
|
5
|
-
export declare const abi: readonly [{
|
|
6
|
-
readonly name: "FundsMigrated";
|
|
7
|
-
readonly inputs: readonly [{
|
|
8
|
-
readonly name: "fromWallet";
|
|
9
|
-
readonly type: "address";
|
|
10
|
-
readonly indexed: true;
|
|
11
|
-
}, {
|
|
12
|
-
readonly name: "toWallet";
|
|
13
|
-
readonly type: "address";
|
|
14
|
-
readonly indexed: true;
|
|
15
|
-
}, {
|
|
16
|
-
readonly name: "numAssetsMigrated";
|
|
17
|
-
readonly type: "uint256";
|
|
18
|
-
readonly indexed: false;
|
|
19
|
-
}, {
|
|
20
|
-
readonly name: "totalUsdValue";
|
|
21
|
-
readonly type: "uint256";
|
|
22
|
-
readonly indexed: false;
|
|
23
|
-
}];
|
|
24
|
-
readonly anonymous: false;
|
|
25
|
-
readonly type: "event";
|
|
26
|
-
}, {
|
|
27
|
-
readonly name: "ConfigCloned";
|
|
28
|
-
readonly inputs: readonly [{
|
|
29
|
-
readonly name: "fromWallet";
|
|
30
|
-
readonly type: "address";
|
|
31
|
-
readonly indexed: true;
|
|
32
|
-
}, {
|
|
33
|
-
readonly name: "toWallet";
|
|
34
|
-
readonly type: "address";
|
|
35
|
-
readonly indexed: true;
|
|
36
|
-
}, {
|
|
37
|
-
readonly name: "numManagersCopied";
|
|
38
|
-
readonly type: "uint256";
|
|
39
|
-
readonly indexed: false;
|
|
40
|
-
}, {
|
|
41
|
-
readonly name: "numPayeesCopied";
|
|
42
|
-
readonly type: "uint256";
|
|
43
|
-
readonly indexed: false;
|
|
44
|
-
}, {
|
|
45
|
-
readonly name: "numWhitelistCopied";
|
|
46
|
-
readonly type: "uint256";
|
|
47
|
-
readonly indexed: false;
|
|
48
|
-
}];
|
|
49
|
-
readonly anonymous: false;
|
|
50
|
-
readonly type: "event";
|
|
51
|
-
}, {
|
|
52
|
-
readonly stateMutability: "nonpayable";
|
|
53
|
-
readonly type: "function";
|
|
54
|
-
readonly name: "migrateAll";
|
|
55
|
-
readonly inputs: readonly [{
|
|
56
|
-
readonly name: "_fromWallet";
|
|
57
|
-
readonly type: "address";
|
|
58
|
-
}, {
|
|
59
|
-
readonly name: "_toWallet";
|
|
60
|
-
readonly type: "address";
|
|
61
|
-
}];
|
|
62
|
-
readonly outputs: readonly [{
|
|
63
|
-
readonly name: "";
|
|
64
|
-
readonly type: "uint256";
|
|
65
|
-
}, {
|
|
66
|
-
readonly name: "";
|
|
67
|
-
readonly type: "bool";
|
|
68
|
-
}];
|
|
69
|
-
}, {
|
|
70
|
-
readonly stateMutability: "nonpayable";
|
|
71
|
-
readonly type: "function";
|
|
72
|
-
readonly name: "migrateFunds";
|
|
73
|
-
readonly inputs: readonly [{
|
|
74
|
-
readonly name: "_fromWallet";
|
|
75
|
-
readonly type: "address";
|
|
76
|
-
}, {
|
|
77
|
-
readonly name: "_toWallet";
|
|
78
|
-
readonly type: "address";
|
|
79
|
-
}];
|
|
80
|
-
readonly outputs: readonly [{
|
|
81
|
-
readonly name: "";
|
|
82
|
-
readonly type: "uint256";
|
|
83
|
-
}];
|
|
84
|
-
}, {
|
|
85
|
-
readonly stateMutability: "view";
|
|
86
|
-
readonly type: "function";
|
|
87
|
-
readonly name: "canMigrateFundsToNewWallet";
|
|
88
|
-
readonly inputs: readonly [{
|
|
89
|
-
readonly name: "_fromWallet";
|
|
90
|
-
readonly type: "address";
|
|
91
|
-
}, {
|
|
92
|
-
readonly name: "_toWallet";
|
|
93
|
-
readonly type: "address";
|
|
94
|
-
}, {
|
|
95
|
-
readonly name: "_caller";
|
|
96
|
-
readonly type: "address";
|
|
97
|
-
}];
|
|
98
|
-
readonly outputs: readonly [{
|
|
99
|
-
readonly name: "";
|
|
100
|
-
readonly type: "bool";
|
|
101
|
-
}];
|
|
102
|
-
}, {
|
|
103
|
-
readonly stateMutability: "nonpayable";
|
|
104
|
-
readonly type: "function";
|
|
105
|
-
readonly name: "cloneConfig";
|
|
106
|
-
readonly inputs: readonly [{
|
|
107
|
-
readonly name: "_fromWallet";
|
|
108
|
-
readonly type: "address";
|
|
109
|
-
}, {
|
|
110
|
-
readonly name: "_toWallet";
|
|
111
|
-
readonly type: "address";
|
|
112
|
-
}];
|
|
113
|
-
readonly outputs: readonly [{
|
|
114
|
-
readonly name: "";
|
|
115
|
-
readonly type: "bool";
|
|
116
|
-
}];
|
|
117
|
-
}, {
|
|
118
|
-
readonly stateMutability: "view";
|
|
119
|
-
readonly type: "function";
|
|
120
|
-
readonly name: "canCopyWalletConfig";
|
|
121
|
-
readonly inputs: readonly [{
|
|
122
|
-
readonly name: "_fromWallet";
|
|
123
|
-
readonly type: "address";
|
|
124
|
-
}, {
|
|
125
|
-
readonly name: "_toWallet";
|
|
126
|
-
readonly type: "address";
|
|
127
|
-
}, {
|
|
128
|
-
readonly name: "_caller";
|
|
129
|
-
readonly type: "address";
|
|
130
|
-
}];
|
|
131
|
-
readonly outputs: readonly [{
|
|
132
|
-
readonly name: "";
|
|
133
|
-
readonly type: "bool";
|
|
134
|
-
}];
|
|
135
|
-
}, {
|
|
136
|
-
readonly stateMutability: "view";
|
|
137
|
-
readonly type: "function";
|
|
138
|
-
readonly name: "getMigrationConfigBundle";
|
|
139
|
-
readonly inputs: readonly [{
|
|
140
|
-
readonly name: "_userWallet";
|
|
141
|
-
readonly type: "address";
|
|
142
|
-
}];
|
|
143
|
-
readonly outputs: readonly [{
|
|
144
|
-
readonly name: "";
|
|
145
|
-
readonly type: "tuple";
|
|
146
|
-
readonly components: readonly [{
|
|
147
|
-
readonly name: "owner";
|
|
148
|
-
readonly type: "address";
|
|
149
|
-
}, {
|
|
150
|
-
readonly name: "isFrozen";
|
|
151
|
-
readonly type: "bool";
|
|
152
|
-
}, {
|
|
153
|
-
readonly name: "numPayees";
|
|
154
|
-
readonly type: "uint256";
|
|
155
|
-
}, {
|
|
156
|
-
readonly name: "numWhitelisted";
|
|
157
|
-
readonly type: "uint256";
|
|
158
|
-
}, {
|
|
159
|
-
readonly name: "numManagers";
|
|
160
|
-
readonly type: "uint256";
|
|
161
|
-
}, {
|
|
162
|
-
readonly name: "startingAgent";
|
|
163
|
-
readonly type: "address";
|
|
164
|
-
}, {
|
|
165
|
-
readonly name: "startingAgentIndex";
|
|
166
|
-
readonly type: "uint256";
|
|
167
|
-
}, {
|
|
168
|
-
readonly name: "hasPendingOwnerChange";
|
|
169
|
-
readonly type: "bool";
|
|
170
|
-
}, {
|
|
171
|
-
readonly name: "groupId";
|
|
172
|
-
readonly type: "uint256";
|
|
173
|
-
}, {
|
|
174
|
-
readonly name: "numActiveCheques";
|
|
175
|
-
readonly type: "uint256";
|
|
176
|
-
}];
|
|
177
|
-
}];
|
|
178
|
-
}, {
|
|
179
|
-
readonly stateMutability: "view";
|
|
180
|
-
readonly type: "function";
|
|
181
|
-
readonly name: "UNDY_HQ";
|
|
182
|
-
readonly inputs: readonly [];
|
|
183
|
-
readonly outputs: readonly [{
|
|
184
|
-
readonly name: "";
|
|
185
|
-
readonly type: "address";
|
|
186
|
-
}];
|
|
187
|
-
}, {
|
|
188
|
-
readonly stateMutability: "nonpayable";
|
|
189
|
-
readonly type: "constructor";
|
|
190
|
-
readonly inputs: readonly [{
|
|
191
|
-
readonly name: "_undyHq";
|
|
192
|
-
readonly type: "address";
|
|
193
|
-
}];
|
|
194
|
-
readonly outputs: readonly [];
|
|
195
|
-
}];
|
|
196
|
-
export declare const deployAddress: Address | undefined;
|
|
197
|
-
export type Contract = {
|
|
198
|
-
calls: {
|
|
199
|
-
canMigrateFundsToNewWallet: (fromWallet: `0x${string}`, toWallet: `0x${string}`, caller: `0x${string}`) => Promise<boolean>;
|
|
200
|
-
canCopyWalletConfig: (fromWallet: `0x${string}`, toWallet: `0x${string}`, caller: `0x${string}`) => Promise<boolean>;
|
|
201
|
-
getMigrationConfigBundle: (userWallet: `0x${string}`) => Promise<{
|
|
202
|
-
owner: `0x${string}`;
|
|
203
|
-
isFrozen: boolean;
|
|
204
|
-
numPayees: bigint;
|
|
205
|
-
numWhitelisted: bigint;
|
|
206
|
-
numManagers: bigint;
|
|
207
|
-
startingAgent: `0x${string}`;
|
|
208
|
-
startingAgentIndex: bigint;
|
|
209
|
-
hasPendingOwnerChange: boolean;
|
|
210
|
-
groupId: bigint;
|
|
211
|
-
numActiveCheques: bigint;
|
|
212
|
-
}>;
|
|
213
|
-
UNDY_HQ: () => Promise<`0x${string}`>;
|
|
214
|
-
};
|
|
215
|
-
mutations: {
|
|
216
|
-
migrateAll: (fromWallet: `0x${string}`, toWallet: `0x${string}`) => Promise<[bigint, boolean]>;
|
|
217
|
-
migrateFunds: (fromWallet: `0x${string}`, toWallet: `0x${string}`) => Promise<bigint>;
|
|
218
|
-
cloneConfig: (fromWallet: `0x${string}`, toWallet: `0x${string}`) => Promise<boolean>;
|
|
219
|
-
};
|
|
220
|
-
events: {
|
|
221
|
-
FundsMigrated: (fromWallet: `0x${string}`, toWallet: `0x${string}`, numAssetsMigrated: bigint, totalUsdValue: bigint) => Promise<void>;
|
|
222
|
-
ConfigCloned: (fromWallet: `0x${string}`, toWallet: `0x${string}`, numManagersCopied: bigint, numPayeesCopied: bigint, numWhitelistCopied: bigint) => Promise<void>;
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
export type Calls = keyof Contract['calls'];
|
|
226
|
-
export type Request<M extends Calls> = {
|
|
227
|
-
contractName: 'Migrator';
|
|
228
|
-
method: M;
|
|
229
|
-
args: ExtractArgs<Contract['calls'][M]>;
|
|
230
|
-
address: Address | undefined;
|
|
231
|
-
deployAddress: Address | undefined;
|
|
232
|
-
defaultValue: Awaited<ReturnType<Contract['calls'][M]>> | undefined;
|
|
233
|
-
getAbi: () => typeof abi;
|
|
234
|
-
with: (options: {
|
|
235
|
-
contractAddress?: Address;
|
|
236
|
-
defaultValue?: Awaited<ReturnType<Contract['calls'][M]>>;
|
|
237
|
-
}) => Request<M>;
|
|
238
|
-
defaultTo: (defaultValue: Awaited<ReturnType<Contract['calls'][M]>>) => Request<M>;
|
|
239
|
-
at: (address: Address) => Request<M>;
|
|
240
|
-
};
|
|
241
|
-
export type CallReturn<M extends Calls> = NonNullable<Request<M>['defaultValue']>;
|
|
242
|
-
declare function getRequest<M extends Calls>(method: M, args: ExtractArgs<Contract['calls'][M]>, contractAddressOrOptions?: Address | {
|
|
243
|
-
contractAddress?: Address;
|
|
244
|
-
defaultValue?: Awaited<ReturnType<Contract['calls'][M]>>;
|
|
245
|
-
}): Request<M>;
|
|
246
|
-
type CallType = {
|
|
247
|
-
[K in Calls]: (...args: ExtractArgs<Contract['calls'][K]>) => ReturnType<typeof getRequest<K>>;
|
|
248
|
-
};
|
|
249
|
-
export declare const call: CallType;
|
|
250
|
-
export type Mutations = keyof Contract['mutations'];
|
|
251
|
-
export declare const mutation: {
|
|
252
|
-
[K in Mutations]: {
|
|
253
|
-
contractName: 'Migrator';
|
|
254
|
-
deployAddress: Address | undefined;
|
|
255
|
-
getAbi: () => typeof abi;
|
|
256
|
-
functionName: K;
|
|
257
|
-
argsType: ExtractArgs<Contract['mutations'][K]> | undefined;
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
export type ParsedEvent<T extends keyof Contract['events']> = {
|
|
261
|
-
event: RpcLog | Log;
|
|
262
|
-
parsed: ParseEventLogsReturnType<typeof abi, T>;
|
|
263
|
-
};
|
|
264
|
-
export declare function parseEvents<T extends keyof Contract['events']>(eventName: T, events: (RpcLog | Log)[]): ParsedEvent<T>[];
|
|
265
|
-
export declare function getEventTopic<T extends keyof Contract['events']>(eventName: T): Address;
|
|
266
|
-
export type SDK = {
|
|
267
|
-
deployAddress: Address | undefined;
|
|
268
|
-
abi: typeof abi;
|
|
269
|
-
events: {
|
|
270
|
-
FundsMigrated: {
|
|
271
|
-
topic: Address;
|
|
272
|
-
parse: (events: (RpcLog | Log)[]) => ParsedEvent<'FundsMigrated'>[];
|
|
273
|
-
};
|
|
274
|
-
ConfigCloned: {
|
|
275
|
-
topic: Address;
|
|
276
|
-
parse: (events: (RpcLog | Log)[]) => ParsedEvent<'ConfigCloned'>[];
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
canMigrateFundsToNewWallet: (...args: ExtractArgs<Contract['calls']['canMigrateFundsToNewWallet']>) => Promise<CallReturn<'canMigrateFundsToNewWallet'>>;
|
|
280
|
-
canCopyWalletConfig: (...args: ExtractArgs<Contract['calls']['canCopyWalletConfig']>) => Promise<CallReturn<'canCopyWalletConfig'>>;
|
|
281
|
-
getMigrationConfigBundle: (...args: ExtractArgs<Contract['calls']['getMigrationConfigBundle']>) => Promise<CallReturn<'getMigrationConfigBundle'>>;
|
|
282
|
-
UNDY_HQ: (...args: ExtractArgs<Contract['calls']['UNDY_HQ']>) => Promise<CallReturn<'UNDY_HQ'>>;
|
|
283
|
-
migrateAll: (...args: ExtractArgs<Contract['mutations']['migrateAll']>) => Promise<Address>;
|
|
284
|
-
migrateFunds: (...args: ExtractArgs<Contract['mutations']['migrateFunds']>) => Promise<Address>;
|
|
285
|
-
cloneConfig: (...args: ExtractArgs<Contract['mutations']['cloneConfig']>) => Promise<Address>;
|
|
286
|
-
};
|
|
287
|
-
export declare function toSdk(publicClient?: PublicClient, walletClient?: WalletClient, addressResolver?: AddressResolverFunction): SDK;
|
|
288
|
-
export {};
|
|
289
|
-
//# sourceMappingURL=Migrator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Migrator.d.ts","sourceRoot":"","sources":["../../src/contracts/Migrator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuB,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAC5E,OAAO,EAAqC,wBAAwB,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAE3H,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAA;AACrE,KAAK,OAAO,GAAG,KAAK,MAAM,EAAE,CAAA;AAG5B,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,YAAY,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,YAAY,EAAE,eAAe,CAAC,EAAE,uBAAuB,GAAG,GAAG,CAoB9H"}
|
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
/* Autogenerated file. Do not edit manually. */
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/* @ts-nocheck */
|
|
5
|
-
import { singleQuery, mutate } from '@dappql/async';
|
|
6
|
-
import { encodeEventTopics, parseEventLogs } from 'viem';
|
|
7
|
-
export const abi = [
|
|
8
|
-
{
|
|
9
|
-
"name": "FundsMigrated",
|
|
10
|
-
"inputs": [
|
|
11
|
-
{
|
|
12
|
-
"name": "fromWallet",
|
|
13
|
-
"type": "address",
|
|
14
|
-
"indexed": true
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"name": "toWallet",
|
|
18
|
-
"type": "address",
|
|
19
|
-
"indexed": true
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "numAssetsMigrated",
|
|
23
|
-
"type": "uint256",
|
|
24
|
-
"indexed": false
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "totalUsdValue",
|
|
28
|
-
"type": "uint256",
|
|
29
|
-
"indexed": false
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"anonymous": false,
|
|
33
|
-
"type": "event"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "ConfigCloned",
|
|
37
|
-
"inputs": [
|
|
38
|
-
{
|
|
39
|
-
"name": "fromWallet",
|
|
40
|
-
"type": "address",
|
|
41
|
-
"indexed": true
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"name": "toWallet",
|
|
45
|
-
"type": "address",
|
|
46
|
-
"indexed": true
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"name": "numManagersCopied",
|
|
50
|
-
"type": "uint256",
|
|
51
|
-
"indexed": false
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"name": "numPayeesCopied",
|
|
55
|
-
"type": "uint256",
|
|
56
|
-
"indexed": false
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"name": "numWhitelistCopied",
|
|
60
|
-
"type": "uint256",
|
|
61
|
-
"indexed": false
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"anonymous": false,
|
|
65
|
-
"type": "event"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"stateMutability": "nonpayable",
|
|
69
|
-
"type": "function",
|
|
70
|
-
"name": "migrateAll",
|
|
71
|
-
"inputs": [
|
|
72
|
-
{
|
|
73
|
-
"name": "_fromWallet",
|
|
74
|
-
"type": "address"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"name": "_toWallet",
|
|
78
|
-
"type": "address"
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"outputs": [
|
|
82
|
-
{
|
|
83
|
-
"name": "",
|
|
84
|
-
"type": "uint256"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"name": "",
|
|
88
|
-
"type": "bool"
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"stateMutability": "nonpayable",
|
|
94
|
-
"type": "function",
|
|
95
|
-
"name": "migrateFunds",
|
|
96
|
-
"inputs": [
|
|
97
|
-
{
|
|
98
|
-
"name": "_fromWallet",
|
|
99
|
-
"type": "address"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"name": "_toWallet",
|
|
103
|
-
"type": "address"
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
"outputs": [
|
|
107
|
-
{
|
|
108
|
-
"name": "",
|
|
109
|
-
"type": "uint256"
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"stateMutability": "view",
|
|
115
|
-
"type": "function",
|
|
116
|
-
"name": "canMigrateFundsToNewWallet",
|
|
117
|
-
"inputs": [
|
|
118
|
-
{
|
|
119
|
-
"name": "_fromWallet",
|
|
120
|
-
"type": "address"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"name": "_toWallet",
|
|
124
|
-
"type": "address"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"name": "_caller",
|
|
128
|
-
"type": "address"
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
"outputs": [
|
|
132
|
-
{
|
|
133
|
-
"name": "",
|
|
134
|
-
"type": "bool"
|
|
135
|
-
}
|
|
136
|
-
]
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"stateMutability": "nonpayable",
|
|
140
|
-
"type": "function",
|
|
141
|
-
"name": "cloneConfig",
|
|
142
|
-
"inputs": [
|
|
143
|
-
{
|
|
144
|
-
"name": "_fromWallet",
|
|
145
|
-
"type": "address"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"name": "_toWallet",
|
|
149
|
-
"type": "address"
|
|
150
|
-
}
|
|
151
|
-
],
|
|
152
|
-
"outputs": [
|
|
153
|
-
{
|
|
154
|
-
"name": "",
|
|
155
|
-
"type": "bool"
|
|
156
|
-
}
|
|
157
|
-
]
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"stateMutability": "view",
|
|
161
|
-
"type": "function",
|
|
162
|
-
"name": "canCopyWalletConfig",
|
|
163
|
-
"inputs": [
|
|
164
|
-
{
|
|
165
|
-
"name": "_fromWallet",
|
|
166
|
-
"type": "address"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"name": "_toWallet",
|
|
170
|
-
"type": "address"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
"name": "_caller",
|
|
174
|
-
"type": "address"
|
|
175
|
-
}
|
|
176
|
-
],
|
|
177
|
-
"outputs": [
|
|
178
|
-
{
|
|
179
|
-
"name": "",
|
|
180
|
-
"type": "bool"
|
|
181
|
-
}
|
|
182
|
-
]
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"stateMutability": "view",
|
|
186
|
-
"type": "function",
|
|
187
|
-
"name": "getMigrationConfigBundle",
|
|
188
|
-
"inputs": [
|
|
189
|
-
{
|
|
190
|
-
"name": "_userWallet",
|
|
191
|
-
"type": "address"
|
|
192
|
-
}
|
|
193
|
-
],
|
|
194
|
-
"outputs": [
|
|
195
|
-
{
|
|
196
|
-
"name": "",
|
|
197
|
-
"type": "tuple",
|
|
198
|
-
"components": [
|
|
199
|
-
{
|
|
200
|
-
"name": "owner",
|
|
201
|
-
"type": "address"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"name": "isFrozen",
|
|
205
|
-
"type": "bool"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"name": "numPayees",
|
|
209
|
-
"type": "uint256"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"name": "numWhitelisted",
|
|
213
|
-
"type": "uint256"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"name": "numManagers",
|
|
217
|
-
"type": "uint256"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"name": "startingAgent",
|
|
221
|
-
"type": "address"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"name": "startingAgentIndex",
|
|
225
|
-
"type": "uint256"
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"name": "hasPendingOwnerChange",
|
|
229
|
-
"type": "bool"
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"name": "groupId",
|
|
233
|
-
"type": "uint256"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"name": "numActiveCheques",
|
|
237
|
-
"type": "uint256"
|
|
238
|
-
}
|
|
239
|
-
]
|
|
240
|
-
}
|
|
241
|
-
]
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
"stateMutability": "view",
|
|
245
|
-
"type": "function",
|
|
246
|
-
"name": "UNDY_HQ",
|
|
247
|
-
"inputs": [],
|
|
248
|
-
"outputs": [
|
|
249
|
-
{
|
|
250
|
-
"name": "",
|
|
251
|
-
"type": "address"
|
|
252
|
-
}
|
|
253
|
-
]
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"stateMutability": "nonpayable",
|
|
257
|
-
"type": "constructor",
|
|
258
|
-
"inputs": [
|
|
259
|
-
{
|
|
260
|
-
"name": "_undyHq",
|
|
261
|
-
"type": "address"
|
|
262
|
-
}
|
|
263
|
-
],
|
|
264
|
-
"outputs": []
|
|
265
|
-
}
|
|
266
|
-
];
|
|
267
|
-
export const deployAddress = '0xd0827E276C7e01837a77A3908fbA4f60E311db28';
|
|
268
|
-
function getRequest(method, args, contractAddressOrOptions) {
|
|
269
|
-
const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
|
|
270
|
-
const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
|
|
271
|
-
const call = {
|
|
272
|
-
contractName: 'Migrator',
|
|
273
|
-
method,
|
|
274
|
-
args,
|
|
275
|
-
address,
|
|
276
|
-
deployAddress,
|
|
277
|
-
defaultValue,
|
|
278
|
-
getAbi: () => abi,
|
|
279
|
-
with: (options) => {
|
|
280
|
-
call.address = options.contractAddress;
|
|
281
|
-
call.defaultValue = options.defaultValue;
|
|
282
|
-
return call;
|
|
283
|
-
},
|
|
284
|
-
defaultTo: (defaultValue) => {
|
|
285
|
-
call.defaultValue = defaultValue;
|
|
286
|
-
return call;
|
|
287
|
-
},
|
|
288
|
-
at: (address) => {
|
|
289
|
-
call.address = address;
|
|
290
|
-
return call;
|
|
291
|
-
},
|
|
292
|
-
};
|
|
293
|
-
return call;
|
|
294
|
-
}
|
|
295
|
-
export const call = {
|
|
296
|
-
canMigrateFundsToNewWallet: (...args) => getRequest('canMigrateFundsToNewWallet', args),
|
|
297
|
-
canCopyWalletConfig: (...args) => getRequest('canCopyWalletConfig', args),
|
|
298
|
-
getMigrationConfigBundle: (...args) => getRequest('getMigrationConfigBundle', args),
|
|
299
|
-
UNDY_HQ: (...args) => getRequest('UNDY_HQ', args),
|
|
300
|
-
};
|
|
301
|
-
function getMutation(functionName) {
|
|
302
|
-
return {
|
|
303
|
-
contractName: 'Migrator',
|
|
304
|
-
functionName,
|
|
305
|
-
deployAddress,
|
|
306
|
-
argsType: undefined,
|
|
307
|
-
getAbi: () => abi,
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
export const mutation = {
|
|
311
|
-
migrateAll: getMutation('migrateAll'),
|
|
312
|
-
migrateFunds: getMutation('migrateFunds'),
|
|
313
|
-
cloneConfig: getMutation('cloneConfig'),
|
|
314
|
-
};
|
|
315
|
-
export function parseEvents(eventName, events) {
|
|
316
|
-
return events.map((event) => {
|
|
317
|
-
return {
|
|
318
|
-
event,
|
|
319
|
-
parsed: parseEventLogs({
|
|
320
|
-
abi,
|
|
321
|
-
eventName,
|
|
322
|
-
logs: [event],
|
|
323
|
-
}),
|
|
324
|
-
};
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
export function getEventTopic(eventName) {
|
|
328
|
-
return encodeEventTopics({ abi, eventName })[0];
|
|
329
|
-
}
|
|
330
|
-
export function toSdk(publicClient, walletClient, addressResolver) {
|
|
331
|
-
return {
|
|
332
|
-
deployAddress,
|
|
333
|
-
abi,
|
|
334
|
-
events: {
|
|
335
|
-
FundsMigrated: { topic: getEventTopic('FundsMigrated'), parse: (events) => parseEvents('FundsMigrated', events) },
|
|
336
|
-
ConfigCloned: { topic: getEventTopic('ConfigCloned'), parse: (events) => parseEvents('ConfigCloned', events) },
|
|
337
|
-
},
|
|
338
|
-
// Queries
|
|
339
|
-
canMigrateFundsToNewWallet: (...args) => singleQuery(publicClient, call.canMigrateFundsToNewWallet(...args), {}, addressResolver),
|
|
340
|
-
canCopyWalletConfig: (...args) => singleQuery(publicClient, call.canCopyWalletConfig(...args), {}, addressResolver),
|
|
341
|
-
getMigrationConfigBundle: (...args) => singleQuery(publicClient, call.getMigrationConfigBundle(...args), {}, addressResolver),
|
|
342
|
-
UNDY_HQ: (...args) => singleQuery(publicClient, call.UNDY_HQ(...args), {}, addressResolver),
|
|
343
|
-
// Mutations
|
|
344
|
-
migrateAll: (...args) => mutate(walletClient, mutation.migrateAll, { addressResolver })(...args),
|
|
345
|
-
migrateFunds: (...args) => mutate(walletClient, mutation.migrateFunds, { addressResolver })(...args),
|
|
346
|
-
cloneConfig: (...args) => mutate(walletClient, mutation.cloneConfig, { addressResolver })(...args),
|
|
347
|
-
};
|
|
348
|
-
}
|