@underscore-finance/sdk 0.3.4 → 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.
Files changed (244) hide show
  1. package/dist/contracts/AaveV3.d.ts +2120 -0
  2. package/dist/contracts/AaveV3.d.ts.map +1 -0
  3. package/dist/contracts/AaveV3.js +2714 -0
  4. package/dist/contracts/AeroClassic.d.ts +2017 -0
  5. package/dist/contracts/AeroClassic.d.ts.map +1 -0
  6. package/dist/contracts/AeroClassic.js +2567 -0
  7. package/dist/contracts/AeroSlipstream.d.ts +2113 -0
  8. package/dist/contracts/AeroSlipstream.d.ts.map +1 -0
  9. package/dist/contracts/AeroSlipstream.js +2692 -0
  10. package/dist/contracts/Agent.d.ts +2189 -1138
  11. package/dist/contracts/Agent.d.ts.map +1 -1
  12. package/dist/contracts/Agent.js +2807 -1343
  13. package/dist/contracts/AgentWrapper.d.ts +3760 -0
  14. package/dist/contracts/AgentWrapper.d.ts.map +1 -0
  15. package/dist/contracts/AgentWrapper.js +4922 -0
  16. package/dist/contracts/Appraiser.d.ts +997 -0
  17. package/dist/contracts/Appraiser.d.ts.map +1 -0
  18. package/dist/contracts/Appraiser.js +1285 -0
  19. package/dist/contracts/Billing.d.ts +420 -0
  20. package/dist/contracts/Billing.d.ts.map +1 -0
  21. package/dist/contracts/Billing.js +506 -0
  22. package/dist/contracts/ChequeBook.d.ts +1184 -0
  23. package/dist/contracts/ChequeBook.d.ts.map +1 -0
  24. package/dist/contracts/ChequeBook.js +1352 -0
  25. package/dist/contracts/CompoundV3.d.ts +2158 -0
  26. package/dist/contracts/CompoundV3.d.ts.map +1 -0
  27. package/dist/contracts/CompoundV3.js +2764 -0
  28. package/dist/contracts/Curve.d.ts +1077 -0
  29. package/dist/contracts/Curve.d.ts.map +1 -0
  30. package/dist/contracts/Curve.js +1357 -0
  31. package/dist/contracts/DefaultsBase.d.ts +290 -0
  32. package/dist/contracts/DefaultsBase.d.ts.map +1 -0
  33. package/dist/contracts/DefaultsBase.js +316 -0
  34. package/dist/contracts/Euler.d.ts +2172 -0
  35. package/dist/contracts/Euler.d.ts.map +1 -0
  36. package/dist/contracts/Euler.js +2782 -0
  37. package/dist/contracts/Fluid.d.ts +2106 -0
  38. package/dist/contracts/Fluid.d.ts.map +1 -0
  39. package/dist/contracts/Fluid.js +2696 -0
  40. package/dist/contracts/Hatchery.d.ts +541 -0
  41. package/dist/contracts/Hatchery.d.ts.map +1 -0
  42. package/dist/contracts/Hatchery.js +671 -0
  43. package/dist/contracts/HighCommand.d.ts +1868 -0
  44. package/dist/contracts/HighCommand.d.ts.map +1 -0
  45. package/dist/contracts/HighCommand.js +2149 -0
  46. package/dist/contracts/Kernel.d.ts +354 -0
  47. package/dist/contracts/Kernel.d.ts.map +1 -0
  48. package/dist/contracts/Kernel.js +412 -0
  49. package/dist/contracts/Ledger.d.ts +694 -0
  50. package/dist/contracts/Ledger.d.ts.map +1 -0
  51. package/dist/contracts/Ledger.js +834 -0
  52. package/dist/contracts/LegoBook.d.ts +1424 -0
  53. package/dist/contracts/LegoBook.d.ts.map +1 -0
  54. package/dist/contracts/LegoBook.js +1783 -0
  55. package/dist/contracts/LegoTools.d.ts +1898 -0
  56. package/dist/contracts/LegoTools.d.ts.map +1 -0
  57. package/dist/contracts/LegoTools.js +2378 -0
  58. package/dist/contracts/LegoUniswapV0_2.d.ts +1204 -0
  59. package/dist/contracts/LegoUniswapV0_2.d.ts.map +1 -0
  60. package/dist/contracts/LegoUniswapV0_2.js +1546 -0
  61. package/dist/contracts/LootDistributor.d.ts +996 -0
  62. package/dist/contracts/LootDistributor.d.ts.map +1 -0
  63. package/dist/contracts/LootDistributor.js +1255 -0
  64. package/dist/contracts/Migrator.d.ts +268 -0
  65. package/dist/contracts/Migrator.d.ts.map +1 -0
  66. package/dist/contracts/Migrator.js +324 -0
  67. package/dist/contracts/MissionControl.d.ts +1331 -0
  68. package/dist/contracts/MissionControl.d.ts.map +1 -0
  69. package/dist/contracts/MissionControl.js +1485 -0
  70. package/dist/contracts/Moonwell.d.ts +2137 -0
  71. package/dist/contracts/Moonwell.d.ts.map +1 -0
  72. package/dist/contracts/Moonwell.js +2737 -0
  73. package/dist/contracts/Morpho.d.ts +2172 -0
  74. package/dist/contracts/Morpho.d.ts.map +1 -0
  75. package/dist/contracts/Morpho.js +2782 -0
  76. package/dist/contracts/Paymaster.d.ts +1679 -0
  77. package/dist/contracts/Paymaster.d.ts.map +1 -0
  78. package/dist/contracts/Paymaster.js +2077 -0
  79. package/dist/contracts/RipeLego.d.ts +2263 -0
  80. package/dist/contracts/RipeLego.d.ts.map +1 -0
  81. package/dist/contracts/RipeLego.js +2891 -0
  82. package/dist/contracts/Sentinel.d.ts +1804 -0
  83. package/dist/contracts/Sentinel.d.ts.map +1 -0
  84. package/dist/contracts/Sentinel.js +2152 -0
  85. package/dist/contracts/Switchboard.d.ts +1395 -0
  86. package/dist/contracts/Switchboard.d.ts.map +1 -0
  87. package/dist/contracts/Switchboard.js +1746 -0
  88. package/dist/contracts/SwitchboardAlpha.d.ts +2228 -0
  89. package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -0
  90. package/dist/contracts/SwitchboardAlpha.js +2743 -0
  91. package/dist/contracts/SwitchboardBravo.d.ts +1498 -0
  92. package/dist/contracts/SwitchboardBravo.d.ts.map +1 -0
  93. package/dist/contracts/SwitchboardBravo.js +1855 -0
  94. package/dist/contracts/UndyHq.d.ts +1580 -0
  95. package/dist/contracts/UndyHq.d.ts.map +1 -0
  96. package/dist/contracts/UndyHq.js +1986 -0
  97. package/dist/contracts/UniswapV2.d.ts +2017 -0
  98. package/dist/contracts/UniswapV2.d.ts.map +1 -0
  99. package/dist/contracts/UniswapV2.js +2567 -0
  100. package/dist/contracts/UniswapV3.d.ts +2113 -0
  101. package/dist/contracts/UniswapV3.d.ts.map +1 -0
  102. package/dist/contracts/UniswapV3.js +2692 -0
  103. package/dist/contracts/UserWallet.d.ts +1438 -784
  104. package/dist/contracts/UserWallet.d.ts.map +1 -1
  105. package/dist/contracts/UserWallet.js +1854 -935
  106. package/dist/contracts/UserWalletConfig.d.ts +3034 -1231
  107. package/dist/contracts/UserWalletConfig.d.ts.map +1 -1
  108. package/dist/contracts/UserWalletConfig.js +3395 -1407
  109. package/dist/contracts/WalletBackpack.d.ts +1183 -0
  110. package/dist/contracts/WalletBackpack.d.ts.map +1 -0
  111. package/dist/contracts/WalletBackpack.js +1484 -0
  112. package/dist/contracts/index.d.ts +72 -36
  113. package/dist/contracts/index.d.ts.map +1 -1
  114. package/dist/contracts/index.js +72 -36
  115. package/dist/contracts/sdk.d.ts +146 -72
  116. package/dist/contracts/sdk.d.ts.map +1 -1
  117. package/dist/contracts/sdk.js +146 -72
  118. package/dist/contracts/v0_1_AddyRegistry.d.ts +473 -0
  119. package/dist/contracts/v0_1_AddyRegistry.d.ts.map +1 -0
  120. package/dist/contracts/v0_1_AddyRegistry.js +594 -0
  121. package/dist/contracts/v0_1_Agent.d.ts +2631 -0
  122. package/dist/contracts/v0_1_Agent.d.ts.map +1 -0
  123. package/dist/contracts/v0_1_Agent.js +3372 -0
  124. package/dist/contracts/v0_1_AgentFactory.d.ts +1054 -0
  125. package/dist/contracts/v0_1_AgentFactory.d.ts.map +1 -0
  126. package/dist/contracts/v0_1_AgentFactory.js +1336 -0
  127. package/dist/contracts/v0_1_UserWallet.d.ts +1980 -0
  128. package/dist/contracts/v0_1_UserWallet.d.ts.map +1 -0
  129. package/dist/contracts/v0_1_UserWallet.js +2581 -0
  130. package/dist/contracts/v0_1_UserWalletConfig.d.ts +1400 -0
  131. package/dist/contracts/v0_1_UserWalletConfig.d.ts.map +1 -0
  132. package/dist/contracts/v0_1_UserWalletConfig.js +1676 -0
  133. package/dist/contracts/v0_2_AddyRegistry.d.ts +1050 -0
  134. package/dist/contracts/v0_2_AddyRegistry.d.ts.map +1 -0
  135. package/dist/contracts/v0_2_AddyRegistry.js +1313 -0
  136. package/dist/contracts/v0_2_Agent.d.ts +2709 -0
  137. package/dist/contracts/v0_2_Agent.d.ts.map +1 -0
  138. package/dist/contracts/v0_2_Agent.js +3458 -0
  139. package/dist/contracts/v0_2_AgentFactory.d.ts +1275 -0
  140. package/dist/contracts/v0_2_AgentFactory.d.ts.map +1 -0
  141. package/dist/contracts/v0_2_AgentFactory.js +1609 -0
  142. package/dist/contracts/v0_2_UserWallet.d.ts +1958 -0
  143. package/dist/contracts/v0_2_UserWallet.d.ts.map +1 -0
  144. package/dist/contracts/v0_2_UserWallet.js +2553 -0
  145. package/dist/contracts/v0_2_UserWalletConfig.d.ts +1468 -0
  146. package/dist/contracts/v0_2_UserWalletConfig.d.ts.map +1 -0
  147. package/dist/contracts/v0_2_UserWalletConfig.js +1764 -0
  148. package/dist/contracts/v0_3_AddyRegistry.d.ts +1109 -0
  149. package/dist/contracts/v0_3_AddyRegistry.d.ts.map +1 -0
  150. package/dist/contracts/v0_3_AddyRegistry.js +1392 -0
  151. package/dist/contracts/v0_3_Agent.d.ts +2709 -0
  152. package/dist/contracts/v0_3_Agent.d.ts.map +1 -0
  153. package/dist/contracts/v0_3_Agent.js +3458 -0
  154. package/dist/contracts/v0_3_AgentFactory.d.ts +1665 -0
  155. package/dist/contracts/v0_3_AgentFactory.d.ts.map +1 -0
  156. package/dist/contracts/v0_3_AgentFactory.js +2078 -0
  157. package/dist/contracts/v0_3_ChainlinkFeeds.d.ts +706 -0
  158. package/dist/contracts/v0_3_ChainlinkFeeds.d.ts.map +1 -0
  159. package/dist/contracts/v0_3_ChainlinkFeeds.js +900 -0
  160. package/dist/contracts/v0_3_LegoAaveV3.d.ts +1033 -0
  161. package/dist/contracts/v0_3_LegoAaveV3.d.ts.map +1 -0
  162. package/dist/contracts/v0_3_LegoAaveV3.js +1330 -0
  163. package/dist/contracts/v0_3_LegoAeroClassic.d.ts +1204 -0
  164. package/dist/contracts/v0_3_LegoAeroClassic.d.ts.map +1 -0
  165. package/dist/contracts/v0_3_LegoAeroClassic.js +1546 -0
  166. package/dist/contracts/v0_3_LegoAeroSlipstream.d.ts +1300 -0
  167. package/dist/contracts/v0_3_LegoAeroSlipstream.d.ts.map +1 -0
  168. package/dist/contracts/v0_3_LegoAeroSlipstream.js +1671 -0
  169. package/dist/contracts/v0_3_LegoCommon.d.ts +164 -0
  170. package/dist/contracts/v0_3_LegoCommon.d.ts.map +1 -0
  171. package/dist/contracts/v0_3_LegoCommon.js +202 -0
  172. package/dist/contracts/v0_3_LegoCompoundV3.d.ts +1060 -0
  173. package/dist/contracts/v0_3_LegoCompoundV3.d.ts.map +1 -0
  174. package/dist/contracts/v0_3_LegoCompoundV3.js +1365 -0
  175. package/dist/contracts/v0_3_LegoCredit.d.ts +140 -0
  176. package/dist/contracts/v0_3_LegoCredit.d.ts.map +1 -0
  177. package/dist/contracts/v0_3_LegoCredit.js +179 -0
  178. package/dist/contracts/v0_3_LegoCurve.d.ts +1189 -0
  179. package/dist/contracts/v0_3_LegoCurve.d.ts.map +1 -0
  180. package/dist/contracts/v0_3_LegoCurve.js +1519 -0
  181. package/dist/contracts/v0_3_LegoDex.d.ts +587 -0
  182. package/dist/contracts/v0_3_LegoDex.d.ts.map +1 -0
  183. package/dist/contracts/v0_3_LegoDex.js +774 -0
  184. package/dist/contracts/v0_3_LegoEuler.d.ts +1074 -0
  185. package/dist/contracts/v0_3_LegoEuler.d.ts.map +1 -0
  186. package/dist/contracts/v0_3_LegoEuler.js +1383 -0
  187. package/dist/contracts/v0_3_LegoFluid.d.ts +1025 -0
  188. package/dist/contracts/v0_3_LegoFluid.d.ts.map +1 -0
  189. package/dist/contracts/v0_3_LegoFluid.js +1320 -0
  190. package/dist/contracts/v0_3_LegoHelper.d.ts +1563 -0
  191. package/dist/contracts/v0_3_LegoHelper.d.ts.map +1 -0
  192. package/dist/contracts/v0_3_LegoHelper.js +1947 -0
  193. package/dist/contracts/v0_3_LegoMoonwell.d.ts +1042 -0
  194. package/dist/contracts/v0_3_LegoMoonwell.d.ts.map +1 -0
  195. package/dist/contracts/v0_3_LegoMoonwell.js +1342 -0
  196. package/dist/contracts/v0_3_LegoMorpho.d.ts +1074 -0
  197. package/dist/contracts/v0_3_LegoMorpho.d.ts.map +1 -0
  198. package/dist/contracts/v0_3_LegoMorpho.js +1383 -0
  199. package/dist/contracts/v0_3_LegoRegistry.d.ts +1079 -0
  200. package/dist/contracts/v0_3_LegoRegistry.d.ts.map +1 -0
  201. package/dist/contracts/v0_3_LegoRegistry.js +1368 -0
  202. package/dist/contracts/v0_3_LegoSky.d.ts +923 -0
  203. package/dist/contracts/v0_3_LegoSky.d.ts.map +1 -0
  204. package/dist/contracts/v0_3_LegoSky.js +1180 -0
  205. package/dist/contracts/v0_3_LegoUniswapV3.d.ts +1338 -0
  206. package/dist/contracts/v0_3_LegoUniswapV3.d.ts.map +1 -0
  207. package/dist/contracts/v0_3_LegoUniswapV3.js +1718 -0
  208. package/dist/contracts/v0_3_LegoYield.d.ts +390 -0
  209. package/dist/contracts/v0_3_LegoYield.d.ts.map +1 -0
  210. package/dist/contracts/v0_3_LegoYield.js +511 -0
  211. package/dist/contracts/v0_3_OracleParser.d.ts +207 -0
  212. package/dist/contracts/v0_3_OracleParser.d.ts.map +1 -0
  213. package/dist/contracts/v0_3_OracleParser.js +264 -0
  214. package/dist/contracts/v0_3_OracleRegistry.d.ts +1221 -0
  215. package/dist/contracts/v0_3_OracleRegistry.d.ts.map +1 -0
  216. package/dist/contracts/v0_3_OracleRegistry.js +1562 -0
  217. package/dist/contracts/v0_3_PriceSheets.d.ts +1127 -0
  218. package/dist/contracts/v0_3_PriceSheets.d.ts.map +1 -0
  219. package/dist/contracts/v0_3_PriceSheets.js +1383 -0
  220. package/dist/contracts/v0_3_PythFeeds.d.ts +640 -0
  221. package/dist/contracts/v0_3_PythFeeds.d.ts.map +1 -0
  222. package/dist/contracts/v0_3_PythFeeds.js +813 -0
  223. package/dist/contracts/v0_3_StorkFeeds.d.ts +640 -0
  224. package/dist/contracts/v0_3_StorkFeeds.d.ts.map +1 -0
  225. package/dist/contracts/v0_3_StorkFeeds.js +813 -0
  226. package/dist/contracts/v0_3_UserWallet.d.ts +1975 -0
  227. package/dist/contracts/v0_3_UserWallet.d.ts.map +1 -0
  228. package/dist/contracts/v0_3_UserWallet.js +2577 -0
  229. package/dist/contracts/v0_3_UserWalletConfig.d.ts +1852 -0
  230. package/dist/contracts/v0_3_UserWalletConfig.d.ts.map +1 -0
  231. package/dist/contracts/v0_3_UserWalletConfig.js +2263 -0
  232. package/dist/getContracts.d.ts +77 -0
  233. package/dist/getContracts.d.ts.map +1 -0
  234. package/dist/getContracts.js +67 -0
  235. package/dist/getLegacyContracts.d.ts +69 -0
  236. package/dist/getLegacyContracts.d.ts.map +1 -0
  237. package/dist/getLegacyContracts.js +55 -0
  238. package/dist/getSwapInstructions.d.ts +60 -0
  239. package/dist/getSwapInstructions.d.ts.map +1 -0
  240. package/dist/getSwapInstructions.js +41 -0
  241. package/dist/index.d.ts +7 -477
  242. package/dist/index.d.ts.map +1 -1
  243. package/dist/index.js +8 -182
  244. package/package.json +2 -2
@@ -0,0 +1,1352 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery, mutate } from '@dappql/async';
6
+ export const abi = [
7
+ {
8
+ name: 'ChequeCreated',
9
+ inputs: [
10
+ {
11
+ name: 'user',
12
+ type: 'address',
13
+ indexed: true,
14
+ },
15
+ {
16
+ name: 'recipient',
17
+ type: 'address',
18
+ indexed: true,
19
+ },
20
+ {
21
+ name: 'asset',
22
+ type: 'address',
23
+ indexed: false,
24
+ },
25
+ {
26
+ name: 'amount',
27
+ type: 'uint256',
28
+ indexed: false,
29
+ },
30
+ {
31
+ name: 'usdValue',
32
+ type: 'uint256',
33
+ indexed: false,
34
+ },
35
+ {
36
+ name: 'unlockBlock',
37
+ type: 'uint256',
38
+ indexed: false,
39
+ },
40
+ {
41
+ name: 'expiryBlock',
42
+ type: 'uint256',
43
+ indexed: false,
44
+ },
45
+ {
46
+ name: 'canManagerPay',
47
+ type: 'bool',
48
+ indexed: false,
49
+ },
50
+ {
51
+ name: 'canBePulled',
52
+ type: 'bool',
53
+ indexed: false,
54
+ },
55
+ {
56
+ name: 'creator',
57
+ type: 'address',
58
+ indexed: true,
59
+ },
60
+ ],
61
+ anonymous: false,
62
+ type: 'event',
63
+ },
64
+ {
65
+ name: 'ChequeCancelled',
66
+ inputs: [
67
+ {
68
+ name: 'user',
69
+ type: 'address',
70
+ indexed: true,
71
+ },
72
+ {
73
+ name: 'recipient',
74
+ type: 'address',
75
+ indexed: true,
76
+ },
77
+ {
78
+ name: 'asset',
79
+ type: 'address',
80
+ indexed: false,
81
+ },
82
+ {
83
+ name: 'amount',
84
+ type: 'uint256',
85
+ indexed: false,
86
+ },
87
+ {
88
+ name: 'usdValue',
89
+ type: 'uint256',
90
+ indexed: false,
91
+ },
92
+ {
93
+ name: 'unlockBlock',
94
+ type: 'uint256',
95
+ indexed: false,
96
+ },
97
+ {
98
+ name: 'expiryBlock',
99
+ type: 'uint256',
100
+ indexed: false,
101
+ },
102
+ {
103
+ name: 'canManagerPay',
104
+ type: 'bool',
105
+ indexed: false,
106
+ },
107
+ {
108
+ name: 'canBePulled',
109
+ type: 'bool',
110
+ indexed: false,
111
+ },
112
+ {
113
+ name: 'cancelledBy',
114
+ type: 'address',
115
+ indexed: true,
116
+ },
117
+ ],
118
+ anonymous: false,
119
+ type: 'event',
120
+ },
121
+ {
122
+ name: 'ChequeSettingsModified',
123
+ inputs: [
124
+ {
125
+ name: 'user',
126
+ type: 'address',
127
+ indexed: true,
128
+ },
129
+ {
130
+ name: 'maxNumActiveCheques',
131
+ type: 'uint256',
132
+ indexed: false,
133
+ },
134
+ {
135
+ name: 'maxChequeUsdValue',
136
+ type: 'uint256',
137
+ indexed: false,
138
+ },
139
+ {
140
+ name: 'instantUsdThreshold',
141
+ type: 'uint256',
142
+ indexed: false,
143
+ },
144
+ {
145
+ name: 'perPeriodPaidUsdCap',
146
+ type: 'uint256',
147
+ indexed: false,
148
+ },
149
+ {
150
+ name: 'maxNumChequesPaidPerPeriod',
151
+ type: 'uint256',
152
+ indexed: false,
153
+ },
154
+ {
155
+ name: 'payCooldownBlocks',
156
+ type: 'uint256',
157
+ indexed: false,
158
+ },
159
+ {
160
+ name: 'perPeriodCreatedUsdCap',
161
+ type: 'uint256',
162
+ indexed: false,
163
+ },
164
+ {
165
+ name: 'maxNumChequesCreatedPerPeriod',
166
+ type: 'uint256',
167
+ indexed: false,
168
+ },
169
+ {
170
+ name: 'createCooldownBlocks',
171
+ type: 'uint256',
172
+ indexed: false,
173
+ },
174
+ {
175
+ name: 'periodLength',
176
+ type: 'uint256',
177
+ indexed: false,
178
+ },
179
+ {
180
+ name: 'expensiveDelayBlocks',
181
+ type: 'uint256',
182
+ indexed: false,
183
+ },
184
+ {
185
+ name: 'defaultExpiryBlocks',
186
+ type: 'uint256',
187
+ indexed: false,
188
+ },
189
+ {
190
+ name: 'canManagersCreateCheques',
191
+ type: 'bool',
192
+ indexed: false,
193
+ },
194
+ {
195
+ name: 'canManagerPay',
196
+ type: 'bool',
197
+ indexed: false,
198
+ },
199
+ {
200
+ name: 'canBePulled',
201
+ type: 'bool',
202
+ indexed: false,
203
+ },
204
+ ],
205
+ anonymous: false,
206
+ type: 'event',
207
+ },
208
+ {
209
+ stateMutability: 'nonpayable',
210
+ type: 'function',
211
+ name: 'createCheque',
212
+ inputs: [
213
+ {
214
+ name: '_userWallet',
215
+ type: 'address',
216
+ },
217
+ {
218
+ name: '_recipient',
219
+ type: 'address',
220
+ },
221
+ {
222
+ name: '_asset',
223
+ type: 'address',
224
+ },
225
+ {
226
+ name: '_amount',
227
+ type: 'uint256',
228
+ },
229
+ {
230
+ name: '_unlockNumBlocks',
231
+ type: 'uint256',
232
+ },
233
+ {
234
+ name: '_expiryNumBlocks',
235
+ type: 'uint256',
236
+ },
237
+ {
238
+ name: '_canManagerPay',
239
+ type: 'bool',
240
+ },
241
+ {
242
+ name: '_canBePulled',
243
+ type: 'bool',
244
+ },
245
+ ],
246
+ outputs: [
247
+ {
248
+ name: '',
249
+ type: 'bool',
250
+ },
251
+ ],
252
+ },
253
+ {
254
+ stateMutability: 'view',
255
+ type: 'function',
256
+ name: 'canCreateCheque',
257
+ inputs: [
258
+ {
259
+ name: '_isCreatorOwner',
260
+ type: 'bool',
261
+ },
262
+ {
263
+ name: '_isCreatorManager',
264
+ type: 'bool',
265
+ },
266
+ {
267
+ name: '_canManagersCreateCheques',
268
+ type: 'bool',
269
+ },
270
+ {
271
+ name: '_managerSettings',
272
+ type: 'tuple',
273
+ components: [
274
+ {
275
+ name: 'startBlock',
276
+ type: 'uint256',
277
+ },
278
+ {
279
+ name: 'expiryBlock',
280
+ type: 'uint256',
281
+ },
282
+ {
283
+ name: 'limits',
284
+ type: 'tuple',
285
+ components: [
286
+ {
287
+ name: 'maxUsdValuePerTx',
288
+ type: 'uint256',
289
+ },
290
+ {
291
+ name: 'maxUsdValuePerPeriod',
292
+ type: 'uint256',
293
+ },
294
+ {
295
+ name: 'maxUsdValueLifetime',
296
+ type: 'uint256',
297
+ },
298
+ {
299
+ name: 'maxNumTxsPerPeriod',
300
+ type: 'uint256',
301
+ },
302
+ {
303
+ name: 'txCooldownBlocks',
304
+ type: 'uint256',
305
+ },
306
+ {
307
+ name: 'failOnZeroPrice',
308
+ type: 'bool',
309
+ },
310
+ ],
311
+ },
312
+ {
313
+ name: 'legoPerms',
314
+ type: 'tuple',
315
+ components: [
316
+ {
317
+ name: 'canManageYield',
318
+ type: 'bool',
319
+ },
320
+ {
321
+ name: 'canBuyAndSell',
322
+ type: 'bool',
323
+ },
324
+ {
325
+ name: 'canManageDebt',
326
+ type: 'bool',
327
+ },
328
+ {
329
+ name: 'canManageLiq',
330
+ type: 'bool',
331
+ },
332
+ {
333
+ name: 'canClaimRewards',
334
+ type: 'bool',
335
+ },
336
+ {
337
+ name: 'allowedLegos',
338
+ type: 'uint256[]',
339
+ },
340
+ ],
341
+ },
342
+ {
343
+ name: 'whitelistPerms',
344
+ type: 'tuple',
345
+ components: [
346
+ {
347
+ name: 'canAddPending',
348
+ type: 'bool',
349
+ },
350
+ {
351
+ name: 'canConfirm',
352
+ type: 'bool',
353
+ },
354
+ {
355
+ name: 'canCancel',
356
+ type: 'bool',
357
+ },
358
+ {
359
+ name: 'canRemove',
360
+ type: 'bool',
361
+ },
362
+ ],
363
+ },
364
+ {
365
+ name: 'transferPerms',
366
+ type: 'tuple',
367
+ components: [
368
+ {
369
+ name: 'canTransfer',
370
+ type: 'bool',
371
+ },
372
+ {
373
+ name: 'canCreateCheque',
374
+ type: 'bool',
375
+ },
376
+ {
377
+ name: 'canAddPendingPayee',
378
+ type: 'bool',
379
+ },
380
+ {
381
+ name: 'allowedPayees',
382
+ type: 'address[]',
383
+ },
384
+ ],
385
+ },
386
+ {
387
+ name: 'allowedAssets',
388
+ type: 'address[]',
389
+ },
390
+ {
391
+ name: 'canClaimLoot',
392
+ type: 'bool',
393
+ },
394
+ ],
395
+ },
396
+ ],
397
+ outputs: [
398
+ {
399
+ name: '',
400
+ type: 'bool',
401
+ },
402
+ ],
403
+ },
404
+ {
405
+ stateMutability: 'view',
406
+ type: 'function',
407
+ name: 'isValidNewCheque',
408
+ inputs: [
409
+ {
410
+ name: '_wallet',
411
+ type: 'address',
412
+ },
413
+ {
414
+ name: '_walletConfig',
415
+ type: 'address',
416
+ },
417
+ {
418
+ name: '_owner',
419
+ type: 'address',
420
+ },
421
+ {
422
+ name: '_isRecipientOnWhitelist',
423
+ type: 'bool',
424
+ },
425
+ {
426
+ name: '_chequeSettings',
427
+ type: 'tuple',
428
+ components: [
429
+ {
430
+ name: 'maxNumActiveCheques',
431
+ type: 'uint256',
432
+ },
433
+ {
434
+ name: 'maxChequeUsdValue',
435
+ type: 'uint256',
436
+ },
437
+ {
438
+ name: 'instantUsdThreshold',
439
+ type: 'uint256',
440
+ },
441
+ {
442
+ name: 'perPeriodPaidUsdCap',
443
+ type: 'uint256',
444
+ },
445
+ {
446
+ name: 'maxNumChequesPaidPerPeriod',
447
+ type: 'uint256',
448
+ },
449
+ {
450
+ name: 'payCooldownBlocks',
451
+ type: 'uint256',
452
+ },
453
+ {
454
+ name: 'perPeriodCreatedUsdCap',
455
+ type: 'uint256',
456
+ },
457
+ {
458
+ name: 'maxNumChequesCreatedPerPeriod',
459
+ type: 'uint256',
460
+ },
461
+ {
462
+ name: 'createCooldownBlocks',
463
+ type: 'uint256',
464
+ },
465
+ {
466
+ name: 'periodLength',
467
+ type: 'uint256',
468
+ },
469
+ {
470
+ name: 'expensiveDelayBlocks',
471
+ type: 'uint256',
472
+ },
473
+ {
474
+ name: 'defaultExpiryBlocks',
475
+ type: 'uint256',
476
+ },
477
+ {
478
+ name: 'allowedAssets',
479
+ type: 'address[]',
480
+ },
481
+ {
482
+ name: 'canManagersCreateCheques',
483
+ type: 'bool',
484
+ },
485
+ {
486
+ name: 'canManagerPay',
487
+ type: 'bool',
488
+ },
489
+ {
490
+ name: 'canBePulled',
491
+ type: 'bool',
492
+ },
493
+ ],
494
+ },
495
+ {
496
+ name: '_chequeData',
497
+ type: 'tuple',
498
+ components: [
499
+ {
500
+ name: 'numChequesPaidInPeriod',
501
+ type: 'uint256',
502
+ },
503
+ {
504
+ name: 'totalUsdValuePaidInPeriod',
505
+ type: 'uint256',
506
+ },
507
+ {
508
+ name: 'totalNumChequesPaid',
509
+ type: 'uint256',
510
+ },
511
+ {
512
+ name: 'totalUsdValuePaid',
513
+ type: 'uint256',
514
+ },
515
+ {
516
+ name: 'lastChequePaidBlock',
517
+ type: 'uint256',
518
+ },
519
+ {
520
+ name: 'numChequesCreatedInPeriod',
521
+ type: 'uint256',
522
+ },
523
+ {
524
+ name: 'totalUsdValueCreatedInPeriod',
525
+ type: 'uint256',
526
+ },
527
+ {
528
+ name: 'totalNumChequesCreated',
529
+ type: 'uint256',
530
+ },
531
+ {
532
+ name: 'totalUsdValueCreated',
533
+ type: 'uint256',
534
+ },
535
+ {
536
+ name: 'lastChequeCreatedBlock',
537
+ type: 'uint256',
538
+ },
539
+ {
540
+ name: 'periodStartBlock',
541
+ type: 'uint256',
542
+ },
543
+ ],
544
+ },
545
+ {
546
+ name: '_isExistingCheque',
547
+ type: 'bool',
548
+ },
549
+ {
550
+ name: '_numActiveCheques',
551
+ type: 'uint256',
552
+ },
553
+ {
554
+ name: '_timeLock',
555
+ type: 'uint256',
556
+ },
557
+ {
558
+ name: '_recipient',
559
+ type: 'address',
560
+ },
561
+ {
562
+ name: '_asset',
563
+ type: 'address',
564
+ },
565
+ {
566
+ name: '_amount',
567
+ type: 'uint256',
568
+ },
569
+ {
570
+ name: '_unlockNumBlocks',
571
+ type: 'uint256',
572
+ },
573
+ {
574
+ name: '_expiryNumBlocks',
575
+ type: 'uint256',
576
+ },
577
+ {
578
+ name: '_canManagerPay',
579
+ type: 'bool',
580
+ },
581
+ {
582
+ name: '_canBePulled',
583
+ type: 'bool',
584
+ },
585
+ {
586
+ name: '_creator',
587
+ type: 'address',
588
+ },
589
+ {
590
+ name: '_usdValue',
591
+ type: 'uint256',
592
+ },
593
+ ],
594
+ outputs: [
595
+ {
596
+ name: '',
597
+ type: 'bool',
598
+ },
599
+ ],
600
+ },
601
+ {
602
+ stateMutability: 'nonpayable',
603
+ type: 'function',
604
+ name: 'cancelCheque',
605
+ inputs: [
606
+ {
607
+ name: '_userWallet',
608
+ type: 'address',
609
+ },
610
+ {
611
+ name: '_recipient',
612
+ type: 'address',
613
+ },
614
+ ],
615
+ outputs: [
616
+ {
617
+ name: '',
618
+ type: 'bool',
619
+ },
620
+ ],
621
+ },
622
+ {
623
+ stateMutability: 'nonpayable',
624
+ type: 'function',
625
+ name: 'setChequeSettings',
626
+ inputs: [
627
+ {
628
+ name: '_userWallet',
629
+ type: 'address',
630
+ },
631
+ {
632
+ name: '_maxNumActiveCheques',
633
+ type: 'uint256',
634
+ },
635
+ {
636
+ name: '_maxChequeUsdValue',
637
+ type: 'uint256',
638
+ },
639
+ {
640
+ name: '_instantUsdThreshold',
641
+ type: 'uint256',
642
+ },
643
+ {
644
+ name: '_perPeriodPaidUsdCap',
645
+ type: 'uint256',
646
+ },
647
+ {
648
+ name: '_maxNumChequesPaidPerPeriod',
649
+ type: 'uint256',
650
+ },
651
+ {
652
+ name: '_payCooldownBlocks',
653
+ type: 'uint256',
654
+ },
655
+ {
656
+ name: '_perPeriodCreatedUsdCap',
657
+ type: 'uint256',
658
+ },
659
+ {
660
+ name: '_maxNumChequesCreatedPerPeriod',
661
+ type: 'uint256',
662
+ },
663
+ {
664
+ name: '_createCooldownBlocks',
665
+ type: 'uint256',
666
+ },
667
+ {
668
+ name: '_periodLength',
669
+ type: 'uint256',
670
+ },
671
+ {
672
+ name: '_expensiveDelayBlocks',
673
+ type: 'uint256',
674
+ },
675
+ {
676
+ name: '_defaultExpiryBlocks',
677
+ type: 'uint256',
678
+ },
679
+ {
680
+ name: '_allowedAssets',
681
+ type: 'address[]',
682
+ },
683
+ {
684
+ name: '_canManagersCreateCheques',
685
+ type: 'bool',
686
+ },
687
+ {
688
+ name: '_canManagerPay',
689
+ type: 'bool',
690
+ },
691
+ {
692
+ name: '_canBePulled',
693
+ type: 'bool',
694
+ },
695
+ ],
696
+ outputs: [
697
+ {
698
+ name: '',
699
+ type: 'bool',
700
+ },
701
+ ],
702
+ },
703
+ {
704
+ stateMutability: 'view',
705
+ type: 'function',
706
+ name: 'isValidChequeSettings',
707
+ inputs: [
708
+ {
709
+ name: '_maxNumActiveCheques',
710
+ type: 'uint256',
711
+ },
712
+ {
713
+ name: '_maxChequeUsdValue',
714
+ type: 'uint256',
715
+ },
716
+ {
717
+ name: '_instantUsdThreshold',
718
+ type: 'uint256',
719
+ },
720
+ {
721
+ name: '_perPeriodPaidUsdCap',
722
+ type: 'uint256',
723
+ },
724
+ {
725
+ name: '_maxNumChequesPaidPerPeriod',
726
+ type: 'uint256',
727
+ },
728
+ {
729
+ name: '_payCooldownBlocks',
730
+ type: 'uint256',
731
+ },
732
+ {
733
+ name: '_perPeriodCreatedUsdCap',
734
+ type: 'uint256',
735
+ },
736
+ {
737
+ name: '_maxNumChequesCreatedPerPeriod',
738
+ type: 'uint256',
739
+ },
740
+ {
741
+ name: '_createCooldownBlocks',
742
+ type: 'uint256',
743
+ },
744
+ {
745
+ name: '_periodLength',
746
+ type: 'uint256',
747
+ },
748
+ {
749
+ name: '_expensiveDelayBlocks',
750
+ type: 'uint256',
751
+ },
752
+ {
753
+ name: '_defaultExpiryBlocks',
754
+ type: 'uint256',
755
+ },
756
+ {
757
+ name: '_timeLock',
758
+ type: 'uint256',
759
+ },
760
+ ],
761
+ outputs: [
762
+ {
763
+ name: '',
764
+ type: 'bool',
765
+ },
766
+ ],
767
+ },
768
+ {
769
+ stateMutability: 'view',
770
+ type: 'function',
771
+ name: 'getChequeConfig',
772
+ inputs: [
773
+ {
774
+ name: '_userWallet',
775
+ type: 'address',
776
+ },
777
+ {
778
+ name: '_creator',
779
+ type: 'address',
780
+ },
781
+ {
782
+ name: '_recipient',
783
+ type: 'address',
784
+ },
785
+ ],
786
+ outputs: [
787
+ {
788
+ name: '',
789
+ type: 'tuple',
790
+ components: [
791
+ {
792
+ name: 'wallet',
793
+ type: 'address',
794
+ },
795
+ {
796
+ name: 'walletConfig',
797
+ type: 'address',
798
+ },
799
+ {
800
+ name: 'owner',
801
+ type: 'address',
802
+ },
803
+ {
804
+ name: 'isRecipientOnWhitelist',
805
+ type: 'bool',
806
+ },
807
+ {
808
+ name: 'isCreatorManager',
809
+ type: 'bool',
810
+ },
811
+ {
812
+ name: 'managerSettings',
813
+ type: 'tuple',
814
+ components: [
815
+ {
816
+ name: 'startBlock',
817
+ type: 'uint256',
818
+ },
819
+ {
820
+ name: 'expiryBlock',
821
+ type: 'uint256',
822
+ },
823
+ {
824
+ name: 'limits',
825
+ type: 'tuple',
826
+ components: [
827
+ {
828
+ name: 'maxUsdValuePerTx',
829
+ type: 'uint256',
830
+ },
831
+ {
832
+ name: 'maxUsdValuePerPeriod',
833
+ type: 'uint256',
834
+ },
835
+ {
836
+ name: 'maxUsdValueLifetime',
837
+ type: 'uint256',
838
+ },
839
+ {
840
+ name: 'maxNumTxsPerPeriod',
841
+ type: 'uint256',
842
+ },
843
+ {
844
+ name: 'txCooldownBlocks',
845
+ type: 'uint256',
846
+ },
847
+ {
848
+ name: 'failOnZeroPrice',
849
+ type: 'bool',
850
+ },
851
+ ],
852
+ },
853
+ {
854
+ name: 'legoPerms',
855
+ type: 'tuple',
856
+ components: [
857
+ {
858
+ name: 'canManageYield',
859
+ type: 'bool',
860
+ },
861
+ {
862
+ name: 'canBuyAndSell',
863
+ type: 'bool',
864
+ },
865
+ {
866
+ name: 'canManageDebt',
867
+ type: 'bool',
868
+ },
869
+ {
870
+ name: 'canManageLiq',
871
+ type: 'bool',
872
+ },
873
+ {
874
+ name: 'canClaimRewards',
875
+ type: 'bool',
876
+ },
877
+ {
878
+ name: 'allowedLegos',
879
+ type: 'uint256[]',
880
+ },
881
+ ],
882
+ },
883
+ {
884
+ name: 'whitelistPerms',
885
+ type: 'tuple',
886
+ components: [
887
+ {
888
+ name: 'canAddPending',
889
+ type: 'bool',
890
+ },
891
+ {
892
+ name: 'canConfirm',
893
+ type: 'bool',
894
+ },
895
+ {
896
+ name: 'canCancel',
897
+ type: 'bool',
898
+ },
899
+ {
900
+ name: 'canRemove',
901
+ type: 'bool',
902
+ },
903
+ ],
904
+ },
905
+ {
906
+ name: 'transferPerms',
907
+ type: 'tuple',
908
+ components: [
909
+ {
910
+ name: 'canTransfer',
911
+ type: 'bool',
912
+ },
913
+ {
914
+ name: 'canCreateCheque',
915
+ type: 'bool',
916
+ },
917
+ {
918
+ name: 'canAddPendingPayee',
919
+ type: 'bool',
920
+ },
921
+ {
922
+ name: 'allowedPayees',
923
+ type: 'address[]',
924
+ },
925
+ ],
926
+ },
927
+ {
928
+ name: 'allowedAssets',
929
+ type: 'address[]',
930
+ },
931
+ {
932
+ name: 'canClaimLoot',
933
+ type: 'bool',
934
+ },
935
+ ],
936
+ },
937
+ {
938
+ name: 'chequeSettings',
939
+ type: 'tuple',
940
+ components: [
941
+ {
942
+ name: 'maxNumActiveCheques',
943
+ type: 'uint256',
944
+ },
945
+ {
946
+ name: 'maxChequeUsdValue',
947
+ type: 'uint256',
948
+ },
949
+ {
950
+ name: 'instantUsdThreshold',
951
+ type: 'uint256',
952
+ },
953
+ {
954
+ name: 'perPeriodPaidUsdCap',
955
+ type: 'uint256',
956
+ },
957
+ {
958
+ name: 'maxNumChequesPaidPerPeriod',
959
+ type: 'uint256',
960
+ },
961
+ {
962
+ name: 'payCooldownBlocks',
963
+ type: 'uint256',
964
+ },
965
+ {
966
+ name: 'perPeriodCreatedUsdCap',
967
+ type: 'uint256',
968
+ },
969
+ {
970
+ name: 'maxNumChequesCreatedPerPeriod',
971
+ type: 'uint256',
972
+ },
973
+ {
974
+ name: 'createCooldownBlocks',
975
+ type: 'uint256',
976
+ },
977
+ {
978
+ name: 'periodLength',
979
+ type: 'uint256',
980
+ },
981
+ {
982
+ name: 'expensiveDelayBlocks',
983
+ type: 'uint256',
984
+ },
985
+ {
986
+ name: 'defaultExpiryBlocks',
987
+ type: 'uint256',
988
+ },
989
+ {
990
+ name: 'allowedAssets',
991
+ type: 'address[]',
992
+ },
993
+ {
994
+ name: 'canManagersCreateCheques',
995
+ type: 'bool',
996
+ },
997
+ {
998
+ name: 'canManagerPay',
999
+ type: 'bool',
1000
+ },
1001
+ {
1002
+ name: 'canBePulled',
1003
+ type: 'bool',
1004
+ },
1005
+ ],
1006
+ },
1007
+ {
1008
+ name: 'chequeData',
1009
+ type: 'tuple',
1010
+ components: [
1011
+ {
1012
+ name: 'numChequesPaidInPeriod',
1013
+ type: 'uint256',
1014
+ },
1015
+ {
1016
+ name: 'totalUsdValuePaidInPeriod',
1017
+ type: 'uint256',
1018
+ },
1019
+ {
1020
+ name: 'totalNumChequesPaid',
1021
+ type: 'uint256',
1022
+ },
1023
+ {
1024
+ name: 'totalUsdValuePaid',
1025
+ type: 'uint256',
1026
+ },
1027
+ {
1028
+ name: 'lastChequePaidBlock',
1029
+ type: 'uint256',
1030
+ },
1031
+ {
1032
+ name: 'numChequesCreatedInPeriod',
1033
+ type: 'uint256',
1034
+ },
1035
+ {
1036
+ name: 'totalUsdValueCreatedInPeriod',
1037
+ type: 'uint256',
1038
+ },
1039
+ {
1040
+ name: 'totalNumChequesCreated',
1041
+ type: 'uint256',
1042
+ },
1043
+ {
1044
+ name: 'totalUsdValueCreated',
1045
+ type: 'uint256',
1046
+ },
1047
+ {
1048
+ name: 'lastChequeCreatedBlock',
1049
+ type: 'uint256',
1050
+ },
1051
+ {
1052
+ name: 'periodStartBlock',
1053
+ type: 'uint256',
1054
+ },
1055
+ ],
1056
+ },
1057
+ {
1058
+ name: 'isExistingCheque',
1059
+ type: 'bool',
1060
+ },
1061
+ {
1062
+ name: 'numActiveCheques',
1063
+ type: 'uint256',
1064
+ },
1065
+ {
1066
+ name: 'timeLock',
1067
+ type: 'uint256',
1068
+ },
1069
+ ],
1070
+ },
1071
+ ],
1072
+ },
1073
+ {
1074
+ stateMutability: 'view',
1075
+ type: 'function',
1076
+ name: 'createDefaultChequeSettings',
1077
+ inputs: [
1078
+ {
1079
+ name: '_maxNumActiveCheques',
1080
+ type: 'uint256',
1081
+ },
1082
+ {
1083
+ name: '_instantUsdThreshold',
1084
+ type: 'uint256',
1085
+ },
1086
+ {
1087
+ name: '_periodLength',
1088
+ type: 'uint256',
1089
+ },
1090
+ {
1091
+ name: '_expensiveDelayBlocks',
1092
+ type: 'uint256',
1093
+ },
1094
+ {
1095
+ name: '_defaultExpiryBlocks',
1096
+ type: 'uint256',
1097
+ },
1098
+ ],
1099
+ outputs: [
1100
+ {
1101
+ name: '',
1102
+ type: 'tuple',
1103
+ components: [
1104
+ {
1105
+ name: 'maxNumActiveCheques',
1106
+ type: 'uint256',
1107
+ },
1108
+ {
1109
+ name: 'maxChequeUsdValue',
1110
+ type: 'uint256',
1111
+ },
1112
+ {
1113
+ name: 'instantUsdThreshold',
1114
+ type: 'uint256',
1115
+ },
1116
+ {
1117
+ name: 'perPeriodPaidUsdCap',
1118
+ type: 'uint256',
1119
+ },
1120
+ {
1121
+ name: 'maxNumChequesPaidPerPeriod',
1122
+ type: 'uint256',
1123
+ },
1124
+ {
1125
+ name: 'payCooldownBlocks',
1126
+ type: 'uint256',
1127
+ },
1128
+ {
1129
+ name: 'perPeriodCreatedUsdCap',
1130
+ type: 'uint256',
1131
+ },
1132
+ {
1133
+ name: 'maxNumChequesCreatedPerPeriod',
1134
+ type: 'uint256',
1135
+ },
1136
+ {
1137
+ name: 'createCooldownBlocks',
1138
+ type: 'uint256',
1139
+ },
1140
+ {
1141
+ name: 'periodLength',
1142
+ type: 'uint256',
1143
+ },
1144
+ {
1145
+ name: 'expensiveDelayBlocks',
1146
+ type: 'uint256',
1147
+ },
1148
+ {
1149
+ name: 'defaultExpiryBlocks',
1150
+ type: 'uint256',
1151
+ },
1152
+ {
1153
+ name: 'allowedAssets',
1154
+ type: 'address[]',
1155
+ },
1156
+ {
1157
+ name: 'canManagersCreateCheques',
1158
+ type: 'bool',
1159
+ },
1160
+ {
1161
+ name: 'canManagerPay',
1162
+ type: 'bool',
1163
+ },
1164
+ {
1165
+ name: 'canBePulled',
1166
+ type: 'bool',
1167
+ },
1168
+ ],
1169
+ },
1170
+ ],
1171
+ },
1172
+ {
1173
+ stateMutability: 'view',
1174
+ type: 'function',
1175
+ name: 'UNDY_HQ',
1176
+ inputs: [],
1177
+ outputs: [
1178
+ {
1179
+ name: '',
1180
+ type: 'address',
1181
+ },
1182
+ ],
1183
+ },
1184
+ {
1185
+ stateMutability: 'view',
1186
+ type: 'function',
1187
+ name: 'MIN_CHEQUE_PERIOD',
1188
+ inputs: [],
1189
+ outputs: [
1190
+ {
1191
+ name: '',
1192
+ type: 'uint256',
1193
+ },
1194
+ ],
1195
+ },
1196
+ {
1197
+ stateMutability: 'view',
1198
+ type: 'function',
1199
+ name: 'MAX_CHEQUE_PERIOD',
1200
+ inputs: [],
1201
+ outputs: [
1202
+ {
1203
+ name: '',
1204
+ type: 'uint256',
1205
+ },
1206
+ ],
1207
+ },
1208
+ {
1209
+ stateMutability: 'view',
1210
+ type: 'function',
1211
+ name: 'MIN_EXPENSIVE_CHEQUE_DELAY',
1212
+ inputs: [],
1213
+ outputs: [
1214
+ {
1215
+ name: '',
1216
+ type: 'uint256',
1217
+ },
1218
+ ],
1219
+ },
1220
+ {
1221
+ stateMutability: 'view',
1222
+ type: 'function',
1223
+ name: 'MAX_UNLOCK_BLOCKS',
1224
+ inputs: [],
1225
+ outputs: [
1226
+ {
1227
+ name: '',
1228
+ type: 'uint256',
1229
+ },
1230
+ ],
1231
+ },
1232
+ {
1233
+ stateMutability: 'view',
1234
+ type: 'function',
1235
+ name: 'MAX_EXPIRY_BLOCKS',
1236
+ inputs: [],
1237
+ outputs: [
1238
+ {
1239
+ name: '',
1240
+ type: 'uint256',
1241
+ },
1242
+ ],
1243
+ },
1244
+ {
1245
+ stateMutability: 'nonpayable',
1246
+ type: 'constructor',
1247
+ inputs: [
1248
+ {
1249
+ name: '_undyHq',
1250
+ type: 'address',
1251
+ },
1252
+ {
1253
+ name: '_minChequePeriod',
1254
+ type: 'uint256',
1255
+ },
1256
+ {
1257
+ name: '_maxChequePeriod',
1258
+ type: 'uint256',
1259
+ },
1260
+ {
1261
+ name: '_minExpensiveChequeDelay',
1262
+ type: 'uint256',
1263
+ },
1264
+ {
1265
+ name: '_maxUnlockBlocks',
1266
+ type: 'uint256',
1267
+ },
1268
+ {
1269
+ name: '_maxExpiryBlocks',
1270
+ type: 'uint256',
1271
+ },
1272
+ ],
1273
+ outputs: [],
1274
+ },
1275
+ ];
1276
+ export const deployAddress = '0x27F769D5eFaddB6f3beb5b51A7F083144a55aE5D';
1277
+ function getRequest(method, args, contractAddressOrOptions) {
1278
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1279
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1280
+ const call = {
1281
+ contractName: 'ChequeBook',
1282
+ method,
1283
+ args,
1284
+ address,
1285
+ deployAddress,
1286
+ defaultValue,
1287
+ getAbi: () => abi,
1288
+ with: (options) => {
1289
+ call.address = options.contractAddress;
1290
+ call.defaultValue = options.defaultValue;
1291
+ return call;
1292
+ },
1293
+ defaultTo: (defaultValue) => {
1294
+ call.defaultValue = defaultValue;
1295
+ return call;
1296
+ },
1297
+ at: (address) => {
1298
+ call.address = address;
1299
+ return call;
1300
+ },
1301
+ };
1302
+ return call;
1303
+ }
1304
+ export const call = {
1305
+ canCreateCheque: (...args) => getRequest('canCreateCheque', args),
1306
+ isValidNewCheque: (...args) => getRequest('isValidNewCheque', args),
1307
+ isValidChequeSettings: (...args) => getRequest('isValidChequeSettings', args),
1308
+ getChequeConfig: (...args) => getRequest('getChequeConfig', args),
1309
+ createDefaultChequeSettings: (...args) => getRequest('createDefaultChequeSettings', args),
1310
+ UNDY_HQ: (...args) => getRequest('UNDY_HQ', args),
1311
+ MIN_CHEQUE_PERIOD: (...args) => getRequest('MIN_CHEQUE_PERIOD', args),
1312
+ MAX_CHEQUE_PERIOD: (...args) => getRequest('MAX_CHEQUE_PERIOD', args),
1313
+ MIN_EXPENSIVE_CHEQUE_DELAY: (...args) => getRequest('MIN_EXPENSIVE_CHEQUE_DELAY', args),
1314
+ MAX_UNLOCK_BLOCKS: (...args) => getRequest('MAX_UNLOCK_BLOCKS', args),
1315
+ MAX_EXPIRY_BLOCKS: (...args) => getRequest('MAX_EXPIRY_BLOCKS', args),
1316
+ };
1317
+ function getMutation(functionName) {
1318
+ return {
1319
+ contractName: 'ChequeBook',
1320
+ functionName,
1321
+ deployAddress,
1322
+ argsType: undefined,
1323
+ getAbi: () => abi,
1324
+ };
1325
+ }
1326
+ export const mutation = {
1327
+ createCheque: getMutation('createCheque'),
1328
+ cancelCheque: getMutation('cancelCheque'),
1329
+ setChequeSettings: getMutation('setChequeSettings'),
1330
+ };
1331
+ export function toSdk(publicClient, walletClient) {
1332
+ return {
1333
+ deployAddress,
1334
+ abi,
1335
+ // Queries
1336
+ canCreateCheque: (...args) => singleQuery(publicClient, call.canCreateCheque(...args)),
1337
+ isValidNewCheque: (...args) => singleQuery(publicClient, call.isValidNewCheque(...args)),
1338
+ isValidChequeSettings: (...args) => singleQuery(publicClient, call.isValidChequeSettings(...args)),
1339
+ getChequeConfig: (...args) => singleQuery(publicClient, call.getChequeConfig(...args)),
1340
+ createDefaultChequeSettings: (...args) => singleQuery(publicClient, call.createDefaultChequeSettings(...args)),
1341
+ UNDY_HQ: (...args) => singleQuery(publicClient, call.UNDY_HQ(...args)),
1342
+ MIN_CHEQUE_PERIOD: (...args) => singleQuery(publicClient, call.MIN_CHEQUE_PERIOD(...args)),
1343
+ MAX_CHEQUE_PERIOD: (...args) => singleQuery(publicClient, call.MAX_CHEQUE_PERIOD(...args)),
1344
+ MIN_EXPENSIVE_CHEQUE_DELAY: (...args) => singleQuery(publicClient, call.MIN_EXPENSIVE_CHEQUE_DELAY(...args)),
1345
+ MAX_UNLOCK_BLOCKS: (...args) => singleQuery(publicClient, call.MAX_UNLOCK_BLOCKS(...args)),
1346
+ MAX_EXPIRY_BLOCKS: (...args) => singleQuery(publicClient, call.MAX_EXPIRY_BLOCKS(...args)),
1347
+ // Mutations
1348
+ createCheque: (...args) => mutate(walletClient, mutation.createCheque)(...args),
1349
+ cancelCheque: (...args) => mutate(walletClient, mutation.cancelCheque)(...args),
1350
+ setChequeSettings: (...args) => mutate(walletClient, mutation.setChequeSettings)(...args),
1351
+ };
1352
+ }