@underscore-finance/sdk 0.3.5 → 1.0.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/AaveV3.d.ts +2120 -0
- package/dist/contracts/AaveV3.d.ts.map +1 -0
- package/dist/contracts/AaveV3.js +2714 -0
- package/dist/contracts/AeroClassic.d.ts +2017 -0
- package/dist/contracts/AeroClassic.d.ts.map +1 -0
- package/dist/contracts/AeroClassic.js +2567 -0
- package/dist/contracts/AeroSlipstream.d.ts +2113 -0
- package/dist/contracts/AeroSlipstream.d.ts.map +1 -0
- package/dist/contracts/AeroSlipstream.js +2692 -0
- package/dist/contracts/Agent.d.ts +2189 -1138
- package/dist/contracts/Agent.d.ts.map +1 -1
- package/dist/contracts/Agent.js +2807 -1343
- package/dist/contracts/AgentWrapper.d.ts +3760 -0
- package/dist/contracts/AgentWrapper.d.ts.map +1 -0
- package/dist/contracts/AgentWrapper.js +4922 -0
- package/dist/contracts/Appraiser.d.ts +997 -0
- package/dist/contracts/Appraiser.d.ts.map +1 -0
- package/dist/contracts/Appraiser.js +1285 -0
- package/dist/contracts/Billing.d.ts +420 -0
- package/dist/contracts/Billing.d.ts.map +1 -0
- package/dist/contracts/Billing.js +506 -0
- package/dist/contracts/ChequeBook.d.ts +1184 -0
- package/dist/contracts/ChequeBook.d.ts.map +1 -0
- package/dist/contracts/ChequeBook.js +1352 -0
- package/dist/contracts/CompoundV3.d.ts +2158 -0
- package/dist/contracts/CompoundV3.d.ts.map +1 -0
- package/dist/contracts/CompoundV3.js +2764 -0
- package/dist/contracts/Curve.d.ts +1077 -0
- package/dist/contracts/Curve.d.ts.map +1 -0
- package/dist/contracts/Curve.js +1357 -0
- package/dist/contracts/DefaultsBase.d.ts +290 -0
- package/dist/contracts/DefaultsBase.d.ts.map +1 -0
- package/dist/contracts/DefaultsBase.js +316 -0
- package/dist/contracts/Euler.d.ts +2172 -0
- package/dist/contracts/Euler.d.ts.map +1 -0
- package/dist/contracts/Euler.js +2782 -0
- package/dist/contracts/Fluid.d.ts +2106 -0
- package/dist/contracts/Fluid.d.ts.map +1 -0
- package/dist/contracts/Fluid.js +2696 -0
- package/dist/contracts/Hatchery.d.ts +541 -0
- package/dist/contracts/Hatchery.d.ts.map +1 -0
- package/dist/contracts/Hatchery.js +671 -0
- package/dist/contracts/HighCommand.d.ts +1868 -0
- package/dist/contracts/HighCommand.d.ts.map +1 -0
- package/dist/contracts/HighCommand.js +2149 -0
- package/dist/contracts/Kernel.d.ts +354 -0
- package/dist/contracts/Kernel.d.ts.map +1 -0
- package/dist/contracts/Kernel.js +412 -0
- package/dist/contracts/Ledger.d.ts +694 -0
- package/dist/contracts/Ledger.d.ts.map +1 -0
- package/dist/contracts/Ledger.js +834 -0
- package/dist/contracts/LegoBook.d.ts +1424 -0
- package/dist/contracts/LegoBook.d.ts.map +1 -0
- package/dist/contracts/LegoBook.js +1783 -0
- package/dist/contracts/LegoTools.d.ts +1898 -0
- package/dist/contracts/LegoTools.d.ts.map +1 -0
- package/dist/contracts/LegoTools.js +2378 -0
- package/dist/contracts/LegoUniswapV0_2.d.ts +1204 -0
- package/dist/contracts/LegoUniswapV0_2.d.ts.map +1 -0
- package/dist/contracts/LegoUniswapV0_2.js +1546 -0
- package/dist/contracts/LootDistributor.d.ts +996 -0
- package/dist/contracts/LootDistributor.d.ts.map +1 -0
- package/dist/contracts/LootDistributor.js +1255 -0
- package/dist/contracts/Migrator.d.ts +268 -0
- package/dist/contracts/Migrator.d.ts.map +1 -0
- package/dist/contracts/Migrator.js +324 -0
- package/dist/contracts/MissionControl.d.ts +1331 -0
- package/dist/contracts/MissionControl.d.ts.map +1 -0
- package/dist/contracts/MissionControl.js +1485 -0
- package/dist/contracts/Moonwell.d.ts +2137 -0
- package/dist/contracts/Moonwell.d.ts.map +1 -0
- package/dist/contracts/Moonwell.js +2737 -0
- package/dist/contracts/Morpho.d.ts +2172 -0
- package/dist/contracts/Morpho.d.ts.map +1 -0
- package/dist/contracts/Morpho.js +2782 -0
- package/dist/contracts/Paymaster.d.ts +1679 -0
- package/dist/contracts/Paymaster.d.ts.map +1 -0
- package/dist/contracts/Paymaster.js +2077 -0
- package/dist/contracts/RipeLego.d.ts +2263 -0
- package/dist/contracts/RipeLego.d.ts.map +1 -0
- package/dist/contracts/RipeLego.js +2891 -0
- package/dist/contracts/Sentinel.d.ts +1804 -0
- package/dist/contracts/Sentinel.d.ts.map +1 -0
- package/dist/contracts/Sentinel.js +2152 -0
- package/dist/contracts/Switchboard.d.ts +1395 -0
- package/dist/contracts/Switchboard.d.ts.map +1 -0
- package/dist/contracts/Switchboard.js +1746 -0
- package/dist/contracts/SwitchboardAlpha.d.ts +2228 -0
- package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -0
- package/dist/contracts/SwitchboardAlpha.js +2743 -0
- package/dist/contracts/SwitchboardBravo.d.ts +1498 -0
- package/dist/contracts/SwitchboardBravo.d.ts.map +1 -0
- package/dist/contracts/SwitchboardBravo.js +1855 -0
- package/dist/contracts/UndyHq.d.ts +1580 -0
- package/dist/contracts/UndyHq.d.ts.map +1 -0
- package/dist/contracts/UndyHq.js +1986 -0
- package/dist/contracts/UniswapV2.d.ts +2017 -0
- package/dist/contracts/UniswapV2.d.ts.map +1 -0
- package/dist/contracts/UniswapV2.js +2567 -0
- package/dist/contracts/UniswapV3.d.ts +2113 -0
- package/dist/contracts/UniswapV3.d.ts.map +1 -0
- package/dist/contracts/UniswapV3.js +2692 -0
- package/dist/contracts/UserWallet.d.ts +1438 -784
- package/dist/contracts/UserWallet.d.ts.map +1 -1
- package/dist/contracts/UserWallet.js +1854 -935
- package/dist/contracts/UserWalletConfig.d.ts +3034 -1231
- package/dist/contracts/UserWalletConfig.d.ts.map +1 -1
- package/dist/contracts/UserWalletConfig.js +3395 -1407
- package/dist/contracts/WalletBackpack.d.ts +1183 -0
- package/dist/contracts/WalletBackpack.d.ts.map +1 -0
- package/dist/contracts/WalletBackpack.js +1484 -0
- package/dist/contracts/index.d.ts +72 -36
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +72 -36
- package/dist/contracts/sdk.d.ts +146 -72
- package/dist/contracts/sdk.d.ts.map +1 -1
- package/dist/contracts/sdk.js +146 -72
- package/dist/contracts/v0_1_AddyRegistry.d.ts +473 -0
- package/dist/contracts/v0_1_AddyRegistry.d.ts.map +1 -0
- package/dist/contracts/v0_1_AddyRegistry.js +594 -0
- package/dist/contracts/v0_1_Agent.d.ts +2631 -0
- package/dist/contracts/v0_1_Agent.d.ts.map +1 -0
- package/dist/contracts/v0_1_Agent.js +3372 -0
- package/dist/contracts/v0_1_AgentFactory.d.ts +1054 -0
- package/dist/contracts/v0_1_AgentFactory.d.ts.map +1 -0
- package/dist/contracts/v0_1_AgentFactory.js +1336 -0
- package/dist/contracts/v0_1_UserWallet.d.ts +1980 -0
- package/dist/contracts/v0_1_UserWallet.d.ts.map +1 -0
- package/dist/contracts/v0_1_UserWallet.js +2581 -0
- package/dist/contracts/v0_1_UserWalletConfig.d.ts +1400 -0
- package/dist/contracts/v0_1_UserWalletConfig.d.ts.map +1 -0
- package/dist/contracts/v0_1_UserWalletConfig.js +1676 -0
- package/dist/contracts/v0_2_AddyRegistry.d.ts +1050 -0
- package/dist/contracts/v0_2_AddyRegistry.d.ts.map +1 -0
- package/dist/contracts/v0_2_AddyRegistry.js +1313 -0
- package/dist/contracts/v0_2_Agent.d.ts +2709 -0
- package/dist/contracts/v0_2_Agent.d.ts.map +1 -0
- package/dist/contracts/v0_2_Agent.js +3458 -0
- package/dist/contracts/v0_2_AgentFactory.d.ts +1275 -0
- package/dist/contracts/v0_2_AgentFactory.d.ts.map +1 -0
- package/dist/contracts/v0_2_AgentFactory.js +1609 -0
- package/dist/contracts/v0_2_UserWallet.d.ts +1958 -0
- package/dist/contracts/v0_2_UserWallet.d.ts.map +1 -0
- package/dist/contracts/v0_2_UserWallet.js +2553 -0
- package/dist/contracts/v0_2_UserWalletConfig.d.ts +1468 -0
- package/dist/contracts/v0_2_UserWalletConfig.d.ts.map +1 -0
- package/dist/contracts/v0_2_UserWalletConfig.js +1764 -0
- package/dist/contracts/v0_3_AddyRegistry.d.ts +1109 -0
- package/dist/contracts/v0_3_AddyRegistry.d.ts.map +1 -0
- package/dist/contracts/v0_3_AddyRegistry.js +1392 -0
- package/dist/contracts/v0_3_Agent.d.ts +2709 -0
- package/dist/contracts/v0_3_Agent.d.ts.map +1 -0
- package/dist/contracts/v0_3_Agent.js +3458 -0
- package/dist/contracts/v0_3_AgentFactory.d.ts +1665 -0
- package/dist/contracts/v0_3_AgentFactory.d.ts.map +1 -0
- package/dist/contracts/v0_3_AgentFactory.js +2078 -0
- package/dist/contracts/v0_3_ChainlinkFeeds.d.ts +706 -0
- package/dist/contracts/v0_3_ChainlinkFeeds.d.ts.map +1 -0
- package/dist/contracts/v0_3_ChainlinkFeeds.js +900 -0
- package/dist/contracts/v0_3_LegoAaveV3.d.ts +1033 -0
- package/dist/contracts/v0_3_LegoAaveV3.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoAaveV3.js +1330 -0
- package/dist/contracts/v0_3_LegoAeroClassic.d.ts +1204 -0
- package/dist/contracts/v0_3_LegoAeroClassic.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoAeroClassic.js +1546 -0
- package/dist/contracts/v0_3_LegoAeroSlipstream.d.ts +1300 -0
- package/dist/contracts/v0_3_LegoAeroSlipstream.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoAeroSlipstream.js +1671 -0
- package/dist/contracts/v0_3_LegoCommon.d.ts +164 -0
- package/dist/contracts/v0_3_LegoCommon.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoCommon.js +202 -0
- package/dist/contracts/v0_3_LegoCompoundV3.d.ts +1060 -0
- package/dist/contracts/v0_3_LegoCompoundV3.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoCompoundV3.js +1365 -0
- package/dist/contracts/v0_3_LegoCredit.d.ts +140 -0
- package/dist/contracts/v0_3_LegoCredit.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoCredit.js +179 -0
- package/dist/contracts/v0_3_LegoCurve.d.ts +1189 -0
- package/dist/contracts/v0_3_LegoCurve.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoCurve.js +1519 -0
- package/dist/contracts/v0_3_LegoDex.d.ts +587 -0
- package/dist/contracts/v0_3_LegoDex.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoDex.js +774 -0
- package/dist/contracts/v0_3_LegoEuler.d.ts +1074 -0
- package/dist/contracts/v0_3_LegoEuler.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoEuler.js +1383 -0
- package/dist/contracts/v0_3_LegoFluid.d.ts +1025 -0
- package/dist/contracts/v0_3_LegoFluid.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoFluid.js +1320 -0
- package/dist/contracts/v0_3_LegoHelper.d.ts +1563 -0
- package/dist/contracts/v0_3_LegoHelper.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoHelper.js +1947 -0
- package/dist/contracts/v0_3_LegoMoonwell.d.ts +1042 -0
- package/dist/contracts/v0_3_LegoMoonwell.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoMoonwell.js +1342 -0
- package/dist/contracts/v0_3_LegoMorpho.d.ts +1074 -0
- package/dist/contracts/v0_3_LegoMorpho.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoMorpho.js +1383 -0
- package/dist/contracts/v0_3_LegoRegistry.d.ts +1079 -0
- package/dist/contracts/v0_3_LegoRegistry.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoRegistry.js +1368 -0
- package/dist/contracts/v0_3_LegoSky.d.ts +923 -0
- package/dist/contracts/v0_3_LegoSky.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoSky.js +1180 -0
- package/dist/contracts/v0_3_LegoUniswapV3.d.ts +1338 -0
- package/dist/contracts/v0_3_LegoUniswapV3.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoUniswapV3.js +1718 -0
- package/dist/contracts/v0_3_LegoYield.d.ts +390 -0
- package/dist/contracts/v0_3_LegoYield.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoYield.js +511 -0
- package/dist/contracts/v0_3_OracleParser.d.ts +207 -0
- package/dist/contracts/v0_3_OracleParser.d.ts.map +1 -0
- package/dist/contracts/v0_3_OracleParser.js +264 -0
- package/dist/contracts/v0_3_OracleRegistry.d.ts +1221 -0
- package/dist/contracts/v0_3_OracleRegistry.d.ts.map +1 -0
- package/dist/contracts/v0_3_OracleRegistry.js +1562 -0
- package/dist/contracts/v0_3_PriceSheets.d.ts +1127 -0
- package/dist/contracts/v0_3_PriceSheets.d.ts.map +1 -0
- package/dist/contracts/v0_3_PriceSheets.js +1383 -0
- package/dist/contracts/v0_3_PythFeeds.d.ts +640 -0
- package/dist/contracts/v0_3_PythFeeds.d.ts.map +1 -0
- package/dist/contracts/v0_3_PythFeeds.js +813 -0
- package/dist/contracts/v0_3_StorkFeeds.d.ts +640 -0
- package/dist/contracts/v0_3_StorkFeeds.d.ts.map +1 -0
- package/dist/contracts/v0_3_StorkFeeds.js +813 -0
- package/dist/contracts/v0_3_UserWallet.d.ts +1975 -0
- package/dist/contracts/v0_3_UserWallet.d.ts.map +1 -0
- package/dist/contracts/v0_3_UserWallet.js +2577 -0
- package/dist/contracts/v0_3_UserWalletConfig.d.ts +1852 -0
- package/dist/contracts/v0_3_UserWalletConfig.d.ts.map +1 -0
- package/dist/contracts/v0_3_UserWalletConfig.js +2263 -0
- package/dist/getContracts.d.ts +77 -0
- package/dist/getContracts.d.ts.map +1 -0
- package/dist/getContracts.js +67 -0
- package/dist/getLegacyContracts.d.ts +69 -0
- package/dist/getLegacyContracts.d.ts.map +1 -0
- package/dist/getLegacyContracts.js +55 -0
- package/dist/getSwapInstructions.d.ts +60 -0
- package/dist/getSwapInstructions.d.ts.map +1 -0
- package/dist/getSwapInstructions.js +41 -0
- package/dist/index.d.ts +3 -475
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -182
- package/package.json +2 -2
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { PublicClient, WalletClient } from 'viem';
|
|
2
|
+
type ExtractArgs<T> = T extends (...args: infer P) => any ? P : never;
|
|
3
|
+
type Address = `0x${string}`;
|
|
4
|
+
export declare const abi: readonly [{
|
|
5
|
+
readonly stateMutability: "view";
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly name: "userWalletConfig";
|
|
8
|
+
readonly inputs: readonly [];
|
|
9
|
+
readonly outputs: readonly [{
|
|
10
|
+
readonly name: "";
|
|
11
|
+
readonly type: "tuple";
|
|
12
|
+
readonly components: readonly [{
|
|
13
|
+
readonly name: "walletTemplate";
|
|
14
|
+
readonly type: "address";
|
|
15
|
+
}, {
|
|
16
|
+
readonly name: "configTemplate";
|
|
17
|
+
readonly type: "address";
|
|
18
|
+
}, {
|
|
19
|
+
readonly name: "trialAsset";
|
|
20
|
+
readonly type: "address";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "trialAmount";
|
|
23
|
+
readonly type: "uint256";
|
|
24
|
+
}, {
|
|
25
|
+
readonly name: "numUserWalletsAllowed";
|
|
26
|
+
readonly type: "uint256";
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "enforceCreatorWhitelist";
|
|
29
|
+
readonly type: "bool";
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "minKeyActionTimeLock";
|
|
32
|
+
readonly type: "uint256";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "maxKeyActionTimeLock";
|
|
35
|
+
readonly type: "uint256";
|
|
36
|
+
}, {
|
|
37
|
+
readonly name: "defaultStaleBlocks";
|
|
38
|
+
readonly type: "uint256";
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "depositRewardsAsset";
|
|
41
|
+
readonly type: "address";
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "txFees";
|
|
44
|
+
readonly type: "tuple";
|
|
45
|
+
readonly components: readonly [{
|
|
46
|
+
readonly name: "swapFee";
|
|
47
|
+
readonly type: "uint256";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "stableSwapFee";
|
|
50
|
+
readonly type: "uint256";
|
|
51
|
+
}, {
|
|
52
|
+
readonly name: "rewardsFee";
|
|
53
|
+
readonly type: "uint256";
|
|
54
|
+
}];
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "ambassadorRevShare";
|
|
57
|
+
readonly type: "tuple";
|
|
58
|
+
readonly components: readonly [{
|
|
59
|
+
readonly name: "swapRatio";
|
|
60
|
+
readonly type: "uint256";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "rewardsRatio";
|
|
63
|
+
readonly type: "uint256";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "yieldRatio";
|
|
66
|
+
readonly type: "uint256";
|
|
67
|
+
}];
|
|
68
|
+
}, {
|
|
69
|
+
readonly name: "defaultYieldMaxIncrease";
|
|
70
|
+
readonly type: "uint256";
|
|
71
|
+
}, {
|
|
72
|
+
readonly name: "defaultYieldPerformanceFee";
|
|
73
|
+
readonly type: "uint256";
|
|
74
|
+
}, {
|
|
75
|
+
readonly name: "defaultYieldAmbassadorBonusRatio";
|
|
76
|
+
readonly type: "uint256";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "defaultYieldBonusRatio";
|
|
79
|
+
readonly type: "uint256";
|
|
80
|
+
}, {
|
|
81
|
+
readonly name: "defaultYieldAltBonusAsset";
|
|
82
|
+
readonly type: "address";
|
|
83
|
+
}, {
|
|
84
|
+
readonly name: "lootClaimCoolOffPeriod";
|
|
85
|
+
readonly type: "uint256";
|
|
86
|
+
}];
|
|
87
|
+
}];
|
|
88
|
+
}, {
|
|
89
|
+
readonly stateMutability: "view";
|
|
90
|
+
readonly type: "function";
|
|
91
|
+
readonly name: "agentConfig";
|
|
92
|
+
readonly inputs: readonly [];
|
|
93
|
+
readonly outputs: readonly [{
|
|
94
|
+
readonly name: "";
|
|
95
|
+
readonly type: "tuple";
|
|
96
|
+
readonly components: readonly [{
|
|
97
|
+
readonly name: "agentTemplate";
|
|
98
|
+
readonly type: "address";
|
|
99
|
+
}, {
|
|
100
|
+
readonly name: "numAgentsAllowed";
|
|
101
|
+
readonly type: "uint256";
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "enforceCreatorWhitelist";
|
|
104
|
+
readonly type: "bool";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "startingAgent";
|
|
107
|
+
readonly type: "address";
|
|
108
|
+
}, {
|
|
109
|
+
readonly name: "startingAgentActivationLength";
|
|
110
|
+
readonly type: "uint256";
|
|
111
|
+
}];
|
|
112
|
+
}];
|
|
113
|
+
}, {
|
|
114
|
+
readonly stateMutability: "view";
|
|
115
|
+
readonly type: "function";
|
|
116
|
+
readonly name: "managerConfig";
|
|
117
|
+
readonly inputs: readonly [];
|
|
118
|
+
readonly outputs: readonly [{
|
|
119
|
+
readonly name: "";
|
|
120
|
+
readonly type: "tuple";
|
|
121
|
+
readonly components: readonly [{
|
|
122
|
+
readonly name: "managerPeriod";
|
|
123
|
+
readonly type: "uint256";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "managerActivationLength";
|
|
126
|
+
readonly type: "uint256";
|
|
127
|
+
}];
|
|
128
|
+
}];
|
|
129
|
+
}, {
|
|
130
|
+
readonly stateMutability: "view";
|
|
131
|
+
readonly type: "function";
|
|
132
|
+
readonly name: "payeeConfig";
|
|
133
|
+
readonly inputs: readonly [];
|
|
134
|
+
readonly outputs: readonly [{
|
|
135
|
+
readonly name: "";
|
|
136
|
+
readonly type: "tuple";
|
|
137
|
+
readonly components: readonly [{
|
|
138
|
+
readonly name: "payeePeriod";
|
|
139
|
+
readonly type: "uint256";
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "payeeActivationLength";
|
|
142
|
+
readonly type: "uint256";
|
|
143
|
+
}];
|
|
144
|
+
}];
|
|
145
|
+
}, {
|
|
146
|
+
readonly stateMutability: "view";
|
|
147
|
+
readonly type: "function";
|
|
148
|
+
readonly name: "chequeConfig";
|
|
149
|
+
readonly inputs: readonly [];
|
|
150
|
+
readonly outputs: readonly [{
|
|
151
|
+
readonly name: "";
|
|
152
|
+
readonly type: "tuple";
|
|
153
|
+
readonly components: readonly [{
|
|
154
|
+
readonly name: "maxNumActiveCheques";
|
|
155
|
+
readonly type: "uint256";
|
|
156
|
+
}, {
|
|
157
|
+
readonly name: "instantUsdThreshold";
|
|
158
|
+
readonly type: "uint256";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "periodLength";
|
|
161
|
+
readonly type: "uint256";
|
|
162
|
+
}, {
|
|
163
|
+
readonly name: "expensiveDelayBlocks";
|
|
164
|
+
readonly type: "uint256";
|
|
165
|
+
}, {
|
|
166
|
+
readonly name: "defaultExpiryBlocks";
|
|
167
|
+
readonly type: "uint256";
|
|
168
|
+
}];
|
|
169
|
+
}];
|
|
170
|
+
}, {
|
|
171
|
+
readonly stateMutability: "nonpayable";
|
|
172
|
+
readonly type: "constructor";
|
|
173
|
+
readonly inputs: readonly [{
|
|
174
|
+
readonly name: "_walletTemplate";
|
|
175
|
+
readonly type: "address";
|
|
176
|
+
}, {
|
|
177
|
+
readonly name: "_configTemplate";
|
|
178
|
+
readonly type: "address";
|
|
179
|
+
}, {
|
|
180
|
+
readonly name: "_agentTemplate";
|
|
181
|
+
readonly type: "address";
|
|
182
|
+
}, {
|
|
183
|
+
readonly name: "_startingAgent";
|
|
184
|
+
readonly type: "address";
|
|
185
|
+
}, {
|
|
186
|
+
readonly name: "_trialAsset";
|
|
187
|
+
readonly type: "address";
|
|
188
|
+
}, {
|
|
189
|
+
readonly name: "_trialAmount";
|
|
190
|
+
readonly type: "uint256";
|
|
191
|
+
}, {
|
|
192
|
+
readonly name: "_rewardsAsset";
|
|
193
|
+
readonly type: "address";
|
|
194
|
+
}];
|
|
195
|
+
readonly outputs: readonly [];
|
|
196
|
+
}];
|
|
197
|
+
export declare const deployAddress: Address | undefined;
|
|
198
|
+
export type Contract = {
|
|
199
|
+
calls: {
|
|
200
|
+
userWalletConfig: () => Promise<{
|
|
201
|
+
walletTemplate: `0x${string}`;
|
|
202
|
+
configTemplate: `0x${string}`;
|
|
203
|
+
trialAsset: `0x${string}`;
|
|
204
|
+
trialAmount: bigint;
|
|
205
|
+
numUserWalletsAllowed: bigint;
|
|
206
|
+
enforceCreatorWhitelist: boolean;
|
|
207
|
+
minKeyActionTimeLock: bigint;
|
|
208
|
+
maxKeyActionTimeLock: bigint;
|
|
209
|
+
defaultStaleBlocks: bigint;
|
|
210
|
+
depositRewardsAsset: `0x${string}`;
|
|
211
|
+
txFees: {
|
|
212
|
+
swapFee: bigint;
|
|
213
|
+
stableSwapFee: bigint;
|
|
214
|
+
rewardsFee: bigint;
|
|
215
|
+
};
|
|
216
|
+
ambassadorRevShare: {
|
|
217
|
+
swapRatio: bigint;
|
|
218
|
+
rewardsRatio: bigint;
|
|
219
|
+
yieldRatio: bigint;
|
|
220
|
+
};
|
|
221
|
+
defaultYieldMaxIncrease: bigint;
|
|
222
|
+
defaultYieldPerformanceFee: bigint;
|
|
223
|
+
defaultYieldAmbassadorBonusRatio: bigint;
|
|
224
|
+
defaultYieldBonusRatio: bigint;
|
|
225
|
+
defaultYieldAltBonusAsset: `0x${string}`;
|
|
226
|
+
lootClaimCoolOffPeriod: bigint;
|
|
227
|
+
}>;
|
|
228
|
+
agentConfig: () => Promise<{
|
|
229
|
+
agentTemplate: `0x${string}`;
|
|
230
|
+
numAgentsAllowed: bigint;
|
|
231
|
+
enforceCreatorWhitelist: boolean;
|
|
232
|
+
startingAgent: `0x${string}`;
|
|
233
|
+
startingAgentActivationLength: bigint;
|
|
234
|
+
}>;
|
|
235
|
+
managerConfig: () => Promise<{
|
|
236
|
+
managerPeriod: bigint;
|
|
237
|
+
managerActivationLength: bigint;
|
|
238
|
+
}>;
|
|
239
|
+
payeeConfig: () => Promise<{
|
|
240
|
+
payeePeriod: bigint;
|
|
241
|
+
payeeActivationLength: bigint;
|
|
242
|
+
}>;
|
|
243
|
+
chequeConfig: () => Promise<{
|
|
244
|
+
maxNumActiveCheques: bigint;
|
|
245
|
+
instantUsdThreshold: bigint;
|
|
246
|
+
periodLength: bigint;
|
|
247
|
+
expensiveDelayBlocks: bigint;
|
|
248
|
+
defaultExpiryBlocks: bigint;
|
|
249
|
+
}>;
|
|
250
|
+
};
|
|
251
|
+
mutations: {};
|
|
252
|
+
events: {};
|
|
253
|
+
};
|
|
254
|
+
export type Calls = keyof Contract['calls'];
|
|
255
|
+
export type Request<M extends Calls> = {
|
|
256
|
+
contractName: 'DefaultsBase';
|
|
257
|
+
method: M;
|
|
258
|
+
args: ExtractArgs<Contract['calls'][M]>;
|
|
259
|
+
address: Address | undefined;
|
|
260
|
+
deployAddress: Address | undefined;
|
|
261
|
+
defaultValue: Awaited<ReturnType<Contract['calls'][M]>> | undefined;
|
|
262
|
+
getAbi: () => typeof abi;
|
|
263
|
+
with: (options: {
|
|
264
|
+
contractAddress?: Address;
|
|
265
|
+
defaultValue?: Awaited<ReturnType<Contract['calls'][M]>>;
|
|
266
|
+
}) => Request<M>;
|
|
267
|
+
defaultTo: (defaultValue: Awaited<ReturnType<Contract['calls'][M]>>) => Request<M>;
|
|
268
|
+
at: (address: Address) => Request<M>;
|
|
269
|
+
};
|
|
270
|
+
export type CallReturn<M extends Calls> = NonNullable<Request<M>['defaultValue']>;
|
|
271
|
+
declare function getRequest<M extends Calls>(method: M, args: ExtractArgs<Contract['calls'][M]>, contractAddressOrOptions?: Address | {
|
|
272
|
+
contractAddress?: Address;
|
|
273
|
+
defaultValue?: Awaited<ReturnType<Contract['calls'][M]>>;
|
|
274
|
+
}): Request<M>;
|
|
275
|
+
type CallType = {
|
|
276
|
+
[K in Calls]: (...args: ExtractArgs<Contract['calls'][K]>) => ReturnType<typeof getRequest<K>>;
|
|
277
|
+
};
|
|
278
|
+
export declare const call: CallType;
|
|
279
|
+
export type SDK = {
|
|
280
|
+
deployAddress: Address | undefined;
|
|
281
|
+
abi: typeof abi;
|
|
282
|
+
userWalletConfig: (...args: ExtractArgs<Contract['calls']['userWalletConfig']>) => Promise<CallReturn<'userWalletConfig'>>;
|
|
283
|
+
agentConfig: (...args: ExtractArgs<Contract['calls']['agentConfig']>) => Promise<CallReturn<'agentConfig'>>;
|
|
284
|
+
managerConfig: (...args: ExtractArgs<Contract['calls']['managerConfig']>) => Promise<CallReturn<'managerConfig'>>;
|
|
285
|
+
payeeConfig: (...args: ExtractArgs<Contract['calls']['payeeConfig']>) => Promise<CallReturn<'payeeConfig'>>;
|
|
286
|
+
chequeConfig: (...args: ExtractArgs<Contract['calls']['chequeConfig']>) => Promise<CallReturn<'chequeConfig'>>;
|
|
287
|
+
};
|
|
288
|
+
export declare function toSdk(publicClient?: PublicClient, walletClient?: WalletClient): SDK;
|
|
289
|
+
export {};
|
|
290
|
+
//# sourceMappingURL=DefaultsBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultsBase.d.ts","sourceRoot":"","sources":["../../src/contracts/DefaultsBase.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEjD,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;AAE5B,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsQN,CAAA;AAEV,eAAO,MAAM,aAAa,EAAE,OAAO,GAAG,SAAwD,CAAA;AAE9F,MAAM,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AE,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;IAC3G,aAAa,EAAE,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAA;IACjH,WAAW,EAAE,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;IAC3G,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAA;CAC/G,CAAA;AAED,wBAAgB,KAAK,CAAC,YAAY,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,GAAG,CAkBnF"}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/* @ts-nocheck */
|
|
5
|
+
import { singleQuery } from '@dappql/async';
|
|
6
|
+
export const abi = [
|
|
7
|
+
{
|
|
8
|
+
stateMutability: 'view',
|
|
9
|
+
type: 'function',
|
|
10
|
+
name: 'userWalletConfig',
|
|
11
|
+
inputs: [],
|
|
12
|
+
outputs: [
|
|
13
|
+
{
|
|
14
|
+
name: '',
|
|
15
|
+
type: 'tuple',
|
|
16
|
+
components: [
|
|
17
|
+
{
|
|
18
|
+
name: 'walletTemplate',
|
|
19
|
+
type: 'address',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'configTemplate',
|
|
23
|
+
type: 'address',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'trialAsset',
|
|
27
|
+
type: 'address',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'trialAmount',
|
|
31
|
+
type: 'uint256',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'numUserWalletsAllowed',
|
|
35
|
+
type: 'uint256',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'enforceCreatorWhitelist',
|
|
39
|
+
type: 'bool',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'minKeyActionTimeLock',
|
|
43
|
+
type: 'uint256',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'maxKeyActionTimeLock',
|
|
47
|
+
type: 'uint256',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'defaultStaleBlocks',
|
|
51
|
+
type: 'uint256',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'depositRewardsAsset',
|
|
55
|
+
type: 'address',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'txFees',
|
|
59
|
+
type: 'tuple',
|
|
60
|
+
components: [
|
|
61
|
+
{
|
|
62
|
+
name: 'swapFee',
|
|
63
|
+
type: 'uint256',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'stableSwapFee',
|
|
67
|
+
type: 'uint256',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'rewardsFee',
|
|
71
|
+
type: 'uint256',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'ambassadorRevShare',
|
|
77
|
+
type: 'tuple',
|
|
78
|
+
components: [
|
|
79
|
+
{
|
|
80
|
+
name: 'swapRatio',
|
|
81
|
+
type: 'uint256',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'rewardsRatio',
|
|
85
|
+
type: 'uint256',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'yieldRatio',
|
|
89
|
+
type: 'uint256',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'defaultYieldMaxIncrease',
|
|
95
|
+
type: 'uint256',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'defaultYieldPerformanceFee',
|
|
99
|
+
type: 'uint256',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'defaultYieldAmbassadorBonusRatio',
|
|
103
|
+
type: 'uint256',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'defaultYieldBonusRatio',
|
|
107
|
+
type: 'uint256',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'defaultYieldAltBonusAsset',
|
|
111
|
+
type: 'address',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'lootClaimCoolOffPeriod',
|
|
115
|
+
type: 'uint256',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
stateMutability: 'view',
|
|
123
|
+
type: 'function',
|
|
124
|
+
name: 'agentConfig',
|
|
125
|
+
inputs: [],
|
|
126
|
+
outputs: [
|
|
127
|
+
{
|
|
128
|
+
name: '',
|
|
129
|
+
type: 'tuple',
|
|
130
|
+
components: [
|
|
131
|
+
{
|
|
132
|
+
name: 'agentTemplate',
|
|
133
|
+
type: 'address',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'numAgentsAllowed',
|
|
137
|
+
type: 'uint256',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'enforceCreatorWhitelist',
|
|
141
|
+
type: 'bool',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'startingAgent',
|
|
145
|
+
type: 'address',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'startingAgentActivationLength',
|
|
149
|
+
type: 'uint256',
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
stateMutability: 'view',
|
|
157
|
+
type: 'function',
|
|
158
|
+
name: 'managerConfig',
|
|
159
|
+
inputs: [],
|
|
160
|
+
outputs: [
|
|
161
|
+
{
|
|
162
|
+
name: '',
|
|
163
|
+
type: 'tuple',
|
|
164
|
+
components: [
|
|
165
|
+
{
|
|
166
|
+
name: 'managerPeriod',
|
|
167
|
+
type: 'uint256',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'managerActivationLength',
|
|
171
|
+
type: 'uint256',
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
stateMutability: 'view',
|
|
179
|
+
type: 'function',
|
|
180
|
+
name: 'payeeConfig',
|
|
181
|
+
inputs: [],
|
|
182
|
+
outputs: [
|
|
183
|
+
{
|
|
184
|
+
name: '',
|
|
185
|
+
type: 'tuple',
|
|
186
|
+
components: [
|
|
187
|
+
{
|
|
188
|
+
name: 'payeePeriod',
|
|
189
|
+
type: 'uint256',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: 'payeeActivationLength',
|
|
193
|
+
type: 'uint256',
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
stateMutability: 'view',
|
|
201
|
+
type: 'function',
|
|
202
|
+
name: 'chequeConfig',
|
|
203
|
+
inputs: [],
|
|
204
|
+
outputs: [
|
|
205
|
+
{
|
|
206
|
+
name: '',
|
|
207
|
+
type: 'tuple',
|
|
208
|
+
components: [
|
|
209
|
+
{
|
|
210
|
+
name: 'maxNumActiveCheques',
|
|
211
|
+
type: 'uint256',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'instantUsdThreshold',
|
|
215
|
+
type: 'uint256',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: 'periodLength',
|
|
219
|
+
type: 'uint256',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'expensiveDelayBlocks',
|
|
223
|
+
type: 'uint256',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: 'defaultExpiryBlocks',
|
|
227
|
+
type: 'uint256',
|
|
228
|
+
},
|
|
229
|
+
],
|
|
230
|
+
},
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
stateMutability: 'nonpayable',
|
|
235
|
+
type: 'constructor',
|
|
236
|
+
inputs: [
|
|
237
|
+
{
|
|
238
|
+
name: '_walletTemplate',
|
|
239
|
+
type: 'address',
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: '_configTemplate',
|
|
243
|
+
type: 'address',
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: '_agentTemplate',
|
|
247
|
+
type: 'address',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: '_startingAgent',
|
|
251
|
+
type: 'address',
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: '_trialAsset',
|
|
255
|
+
type: 'address',
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: '_trialAmount',
|
|
259
|
+
type: 'uint256',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: '_rewardsAsset',
|
|
263
|
+
type: 'address',
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
outputs: [],
|
|
267
|
+
},
|
|
268
|
+
];
|
|
269
|
+
export const deployAddress = '0x33DF7433cAa93277F06561b8A3ceE1Fa324FbDe6';
|
|
270
|
+
function getRequest(method, args, contractAddressOrOptions) {
|
|
271
|
+
const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
|
|
272
|
+
const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
|
|
273
|
+
const call = {
|
|
274
|
+
contractName: 'DefaultsBase',
|
|
275
|
+
method,
|
|
276
|
+
args,
|
|
277
|
+
address,
|
|
278
|
+
deployAddress,
|
|
279
|
+
defaultValue,
|
|
280
|
+
getAbi: () => abi,
|
|
281
|
+
with: (options) => {
|
|
282
|
+
call.address = options.contractAddress;
|
|
283
|
+
call.defaultValue = options.defaultValue;
|
|
284
|
+
return call;
|
|
285
|
+
},
|
|
286
|
+
defaultTo: (defaultValue) => {
|
|
287
|
+
call.defaultValue = defaultValue;
|
|
288
|
+
return call;
|
|
289
|
+
},
|
|
290
|
+
at: (address) => {
|
|
291
|
+
call.address = address;
|
|
292
|
+
return call;
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
return call;
|
|
296
|
+
}
|
|
297
|
+
export const call = {
|
|
298
|
+
userWalletConfig: (...args) => getRequest('userWalletConfig', args),
|
|
299
|
+
agentConfig: (...args) => getRequest('agentConfig', args),
|
|
300
|
+
managerConfig: (...args) => getRequest('managerConfig', args),
|
|
301
|
+
payeeConfig: (...args) => getRequest('payeeConfig', args),
|
|
302
|
+
chequeConfig: (...args) => getRequest('chequeConfig', args),
|
|
303
|
+
};
|
|
304
|
+
export function toSdk(publicClient, walletClient) {
|
|
305
|
+
return {
|
|
306
|
+
deployAddress,
|
|
307
|
+
abi,
|
|
308
|
+
// Queries
|
|
309
|
+
userWalletConfig: (...args) => singleQuery(publicClient, call.userWalletConfig(...args)),
|
|
310
|
+
agentConfig: (...args) => singleQuery(publicClient, call.agentConfig(...args)),
|
|
311
|
+
managerConfig: (...args) => singleQuery(publicClient, call.managerConfig(...args)),
|
|
312
|
+
payeeConfig: (...args) => singleQuery(publicClient, call.payeeConfig(...args)),
|
|
313
|
+
chequeConfig: (...args) => singleQuery(publicClient, call.chequeConfig(...args)),
|
|
314
|
+
// Mutations
|
|
315
|
+
};
|
|
316
|
+
}
|