@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.
Files changed (254) hide show
  1. package/.claude/settings.local.json +31 -0
  2. package/.eslintrc.json +27 -0
  3. package/.prettierrc +9 -0
  4. package/.tool-versions +1 -0
  5. package/LICENSE +41 -0
  6. package/LICENSE_DATE.md +34 -0
  7. package/LICENSE_GRANTS.md +33 -0
  8. package/LICENSE_INFO.md +90 -0
  9. package/README.md +116 -17
  10. package/dapp.config.js +154 -0
  11. package/package.json +17 -44
  12. package/src/getSwapInstructions.ts +55 -0
  13. package/src/index.ts +192 -0
  14. package/tsconfig.json +18 -0
  15. package/AGENTS.md +0 -162
  16. package/abis.json +0 -181875
  17. package/addresses.json +0 -76
  18. package/dist/contracts/AaveV3.d.ts +0 -2594
  19. package/dist/contracts/AaveV3.d.ts.map +0 -1
  20. package/dist/contracts/AaveV3.js +0 -3272
  21. package/dist/contracts/AeroClassic.d.ts +0 -2118
  22. package/dist/contracts/AeroClassic.d.ts.map +0 -1
  23. package/dist/contracts/AeroClassic.js +0 -2679
  24. package/dist/contracts/AeroSlipstream.d.ts +0 -2256
  25. package/dist/contracts/AeroSlipstream.d.ts.map +0 -1
  26. package/dist/contracts/AeroSlipstream.js +0 -2848
  27. package/dist/contracts/AgentSenderGeneric.d.ts +0 -4129
  28. package/dist/contracts/AgentSenderGeneric.d.ts.map +0 -1
  29. package/dist/contracts/AgentSenderGeneric.js +0 -5397
  30. package/dist/contracts/AgentSenderSpecial.d.ts +0 -1997
  31. package/dist/contracts/AgentSenderSpecial.d.ts.map +0 -1
  32. package/dist/contracts/AgentSenderSpecial.js +0 -2532
  33. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts +0 -2245
  34. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts.map +0 -1
  35. package/dist/contracts/AgentSenderSpecialSigHelper.js +0 -2971
  36. package/dist/contracts/AgentWrapper.d.ts +0 -2520
  37. package/dist/contracts/AgentWrapper.d.ts.map +0 -1
  38. package/dist/contracts/AgentWrapper.js +0 -3389
  39. package/dist/contracts/AgentWrapperV1.d.ts +0 -3789
  40. package/dist/contracts/AgentWrapperV1.d.ts.map +0 -1
  41. package/dist/contracts/AgentWrapperV1.js +0 -4945
  42. package/dist/contracts/AgentWrapperV2.d.ts +0 -2494
  43. package/dist/contracts/AgentWrapperV2.d.ts.map +0 -1
  44. package/dist/contracts/AgentWrapperV2.js +0 -3354
  45. package/dist/contracts/Appraiser.d.ts +0 -577
  46. package/dist/contracts/Appraiser.d.ts.map +0 -1
  47. package/dist/contracts/Appraiser.js +0 -735
  48. package/dist/contracts/Avantis.d.ts +0 -2606
  49. package/dist/contracts/Avantis.d.ts.map +0 -1
  50. package/dist/contracts/Avantis.js +0 -3282
  51. package/dist/contracts/Billing.d.ts +0 -381
  52. package/dist/contracts/Billing.d.ts.map +0 -1
  53. package/dist/contracts/Billing.js +0 -451
  54. package/dist/contracts/ChequeBook.d.ts +0 -1704
  55. package/dist/contracts/ChequeBook.d.ts.map +0 -1
  56. package/dist/contracts/ChequeBook.js +0 -1922
  57. package/dist/contracts/CompoundV3.d.ts +0 -2622
  58. package/dist/contracts/CompoundV3.d.ts.map +0 -1
  59. package/dist/contracts/CompoundV3.js +0 -3304
  60. package/dist/contracts/ConvertVaultToken.d.ts +0 -64
  61. package/dist/contracts/ConvertVaultToken.d.ts.map +0 -1
  62. package/dist/contracts/ConvertVaultToken.js +0 -75
  63. package/dist/contracts/Curve.d.ts +0 -1107
  64. package/dist/contracts/Curve.d.ts.map +0 -1
  65. package/dist/contracts/Curve.js +0 -1379
  66. package/dist/contracts/DefaultsBase.d.ts +0 -306
  67. package/dist/contracts/DefaultsBase.d.ts.map +0 -1
  68. package/dist/contracts/DefaultsBase.js +0 -331
  69. package/dist/contracts/ERC20.d.ts +0 -288
  70. package/dist/contracts/ERC20.d.ts.map +0 -1
  71. package/dist/contracts/ERC20.js +0 -359
  72. package/dist/contracts/EarnVault.d.ts +0 -1733
  73. package/dist/contracts/EarnVault.d.ts.map +0 -1
  74. package/dist/contracts/EarnVault.js +0 -2235
  75. package/dist/contracts/EarnVaultAgent.d.ts +0 -1033
  76. package/dist/contracts/EarnVaultAgent.d.ts.map +0 -1
  77. package/dist/contracts/EarnVaultAgent.js +0 -1296
  78. package/dist/contracts/EarnVaultAgentSigHelper.d.ts +0 -905
  79. package/dist/contracts/EarnVaultAgentSigHelper.d.ts.map +0 -1
  80. package/dist/contracts/EarnVaultAgentSigHelper.js +0 -1198
  81. package/dist/contracts/Euler.d.ts +0 -2662
  82. package/dist/contracts/Euler.d.ts.map +0 -1
  83. package/dist/contracts/Euler.js +0 -3350
  84. package/dist/contracts/ExtraFi.d.ts +0 -2637
  85. package/dist/contracts/ExtraFi.d.ts.map +0 -1
  86. package/dist/contracts/ExtraFi.js +0 -3323
  87. package/dist/contracts/Fluid.d.ts +0 -2634
  88. package/dist/contracts/Fluid.d.ts.map +0 -1
  89. package/dist/contracts/Fluid.js +0 -3318
  90. package/dist/contracts/FortyAcres.d.ts +0 -2620
  91. package/dist/contracts/FortyAcres.d.ts.map +0 -1
  92. package/dist/contracts/FortyAcres.js +0 -3300
  93. package/dist/contracts/Hatchery.d.ts +0 -392
  94. package/dist/contracts/Hatchery.d.ts.map +0 -1
  95. package/dist/contracts/Hatchery.js +0 -472
  96. package/dist/contracts/Helpers.d.ts +0 -1463
  97. package/dist/contracts/Helpers.d.ts.map +0 -1
  98. package/dist/contracts/Helpers.js +0 -1763
  99. package/dist/contracts/HighCommand.d.ts +0 -2129
  100. package/dist/contracts/HighCommand.d.ts.map +0 -1
  101. package/dist/contracts/HighCommand.js +0 -2429
  102. package/dist/contracts/Kernel.d.ts +0 -387
  103. package/dist/contracts/Kernel.d.ts.map +0 -1
  104. package/dist/contracts/Kernel.js +0 -442
  105. package/dist/contracts/Ledger.d.ts +0 -708
  106. package/dist/contracts/Ledger.d.ts.map +0 -1
  107. package/dist/contracts/Ledger.js +0 -854
  108. package/dist/contracts/LegoBook.d.ts +0 -1463
  109. package/dist/contracts/LegoBook.d.ts.map +0 -1
  110. package/dist/contracts/LegoBook.js +0 -1763
  111. package/dist/contracts/LegoTools.d.ts +0 -1913
  112. package/dist/contracts/LegoTools.d.ts.map +0 -1
  113. package/dist/contracts/LegoTools.js +0 -2402
  114. package/dist/contracts/LevgVault.d.ts +0 -2115
  115. package/dist/contracts/LevgVault.d.ts.map +0 -1
  116. package/dist/contracts/LevgVault.js +0 -2733
  117. package/dist/contracts/LevgVaultAgent.d.ts +0 -1955
  118. package/dist/contracts/LevgVaultAgent.d.ts.map +0 -1
  119. package/dist/contracts/LevgVaultAgent.js +0 -2508
  120. package/dist/contracts/LevgVaultAgentSigHelper.d.ts +0 -2221
  121. package/dist/contracts/LevgVaultAgentSigHelper.d.ts.map +0 -1
  122. package/dist/contracts/LevgVaultAgentSigHelper.js +0 -2963
  123. package/dist/contracts/LevgVaultHelper.d.ts +0 -977
  124. package/dist/contracts/LevgVaultHelper.d.ts.map +0 -1
  125. package/dist/contracts/LevgVaultHelper.js +0 -1289
  126. package/dist/contracts/LevgVaultTools.d.ts +0 -2629
  127. package/dist/contracts/LevgVaultTools.d.ts.map +0 -1
  128. package/dist/contracts/LevgVaultTools.js +0 -3560
  129. package/dist/contracts/LootDistributor.d.ts +0 -1053
  130. package/dist/contracts/LootDistributor.d.ts.map +0 -1
  131. package/dist/contracts/LootDistributor.js +0 -1291
  132. package/dist/contracts/Migrator.d.ts +0 -289
  133. package/dist/contracts/Migrator.d.ts.map +0 -1
  134. package/dist/contracts/Migrator.js +0 -348
  135. package/dist/contracts/MissionControl.d.ts +0 -1405
  136. package/dist/contracts/MissionControl.d.ts.map +0 -1
  137. package/dist/contracts/MissionControl.js +0 -1592
  138. package/dist/contracts/Moonwell.d.ts +0 -2623
  139. package/dist/contracts/Moonwell.d.ts.map +0 -1
  140. package/dist/contracts/Moonwell.js +0 -3304
  141. package/dist/contracts/Morpho.d.ts +0 -2662
  142. package/dist/contracts/Morpho.d.ts.map +0 -1
  143. package/dist/contracts/Morpho.js +0 -3350
  144. package/dist/contracts/Paymaster.d.ts +0 -1714
  145. package/dist/contracts/Paymaster.d.ts.map +0 -1
  146. package/dist/contracts/Paymaster.js +0 -2098
  147. package/dist/contracts/RipeLego.d.ts +0 -2913
  148. package/dist/contracts/RipeLego.d.ts.map +0 -1
  149. package/dist/contracts/RipeLego.js +0 -3643
  150. package/dist/contracts/Sentinel.d.ts +0 -2064
  151. package/dist/contracts/Sentinel.d.ts.map +0 -1
  152. package/dist/contracts/Sentinel.js +0 -2476
  153. package/dist/contracts/SignatureHelper.d.ts +0 -4250
  154. package/dist/contracts/SignatureHelper.d.ts.map +0 -1
  155. package/dist/contracts/SignatureHelper.js +0 -5714
  156. package/dist/contracts/SignatureHelperV1.d.ts +0 -4250
  157. package/dist/contracts/SignatureHelperV1.d.ts.map +0 -1
  158. package/dist/contracts/SignatureHelperV1.js +0 -5714
  159. package/dist/contracts/SkyPsm.d.ts +0 -2667
  160. package/dist/contracts/SkyPsm.d.ts.map +0 -1
  161. package/dist/contracts/SkyPsm.js +0 -3356
  162. package/dist/contracts/Switchboard.d.ts +0 -1483
  163. package/dist/contracts/Switchboard.d.ts.map +0 -1
  164. package/dist/contracts/Switchboard.js +0 -1790
  165. package/dist/contracts/SwitchboardAlpha.d.ts +0 -3161
  166. package/dist/contracts/SwitchboardAlpha.d.ts.map +0 -1
  167. package/dist/contracts/SwitchboardAlpha.js +0 -3771
  168. package/dist/contracts/SwitchboardBravo.d.ts +0 -1591
  169. package/dist/contracts/SwitchboardBravo.d.ts.map +0 -1
  170. package/dist/contracts/SwitchboardBravo.js +0 -1872
  171. package/dist/contracts/SwitchboardCharlie.d.ts +0 -3172
  172. package/dist/contracts/SwitchboardCharlie.d.ts.map +0 -1
  173. package/dist/contracts/SwitchboardCharlie.js +0 -3713
  174. package/dist/contracts/UnderscoreLego.d.ts +0 -2592
  175. package/dist/contracts/UnderscoreLego.d.ts.map +0 -1
  176. package/dist/contracts/UnderscoreLego.js +0 -3264
  177. package/dist/contracts/UndyAero.d.ts +0 -1733
  178. package/dist/contracts/UndyAero.d.ts.map +0 -1
  179. package/dist/contracts/UndyAero.js +0 -2235
  180. package/dist/contracts/UndyBtc.d.ts +0 -1733
  181. package/dist/contracts/UndyBtc.d.ts.map +0 -1
  182. package/dist/contracts/UndyBtc.js +0 -2235
  183. package/dist/contracts/UndyCbeth.d.ts +0 -1733
  184. package/dist/contracts/UndyCbeth.d.ts.map +0 -1
  185. package/dist/contracts/UndyCbeth.js +0 -2235
  186. package/dist/contracts/UndyEth.d.ts +0 -1733
  187. package/dist/contracts/UndyEth.d.ts.map +0 -1
  188. package/dist/contracts/UndyEth.js +0 -2235
  189. package/dist/contracts/UndyEurc.d.ts +0 -1733
  190. package/dist/contracts/UndyEurc.d.ts.map +0 -1
  191. package/dist/contracts/UndyEurc.js +0 -2235
  192. package/dist/contracts/UndyGho.d.ts +0 -1733
  193. package/dist/contracts/UndyGho.d.ts.map +0 -1
  194. package/dist/contracts/UndyGho.js +0 -2235
  195. package/dist/contracts/UndyHq.d.ts +0 -1677
  196. package/dist/contracts/UndyHq.d.ts.map +0 -1
  197. package/dist/contracts/UndyHq.js +0 -2026
  198. package/dist/contracts/UndyRewardsLego.d.ts +0 -1572
  199. package/dist/contracts/UndyRewardsLego.d.ts.map +0 -1
  200. package/dist/contracts/UndyRewardsLego.js +0 -1994
  201. package/dist/contracts/UndyUsd.d.ts +0 -1733
  202. package/dist/contracts/UndyUsd.d.ts.map +0 -1
  203. package/dist/contracts/UndyUsd.js +0 -2235
  204. package/dist/contracts/UndyUsdV2.d.ts +0 -1762
  205. package/dist/contracts/UndyUsdV2.d.ts.map +0 -1
  206. package/dist/contracts/UndyUsdV2.js +0 -2267
  207. package/dist/contracts/UndyUsds.d.ts +0 -1733
  208. package/dist/contracts/UndyUsds.d.ts.map +0 -1
  209. package/dist/contracts/UndyUsds.js +0 -2235
  210. package/dist/contracts/UndyVirtual.d.ts +0 -1762
  211. package/dist/contracts/UndyVirtual.d.ts.map +0 -1
  212. package/dist/contracts/UndyVirtual.js +0 -2267
  213. package/dist/contracts/UniswapV2.d.ts +0 -2118
  214. package/dist/contracts/UniswapV2.d.ts.map +0 -1
  215. package/dist/contracts/UniswapV2.js +0 -2679
  216. package/dist/contracts/UniswapV3.d.ts +0 -2256
  217. package/dist/contracts/UniswapV3.d.ts.map +0 -1
  218. package/dist/contracts/UniswapV3.js +0 -2848
  219. package/dist/contracts/UserWallet.d.ts +0 -2650
  220. package/dist/contracts/UserWallet.d.ts.map +0 -1
  221. package/dist/contracts/UserWallet.js +0 -3520
  222. package/dist/contracts/UserWalletConfig.d.ts +0 -3901
  223. package/dist/contracts/UserWalletConfig.d.ts.map +0 -1
  224. package/dist/contracts/UserWalletConfig.js +0 -4507
  225. package/dist/contracts/UserWalletConfigV1.d.ts +0 -3692
  226. package/dist/contracts/UserWalletConfigV1.d.ts.map +0 -1
  227. package/dist/contracts/UserWalletConfigV1.js +0 -4276
  228. package/dist/contracts/UserWalletSignatureHelper.d.ts +0 -4552
  229. package/dist/contracts/UserWalletSignatureHelper.d.ts.map +0 -1
  230. package/dist/contracts/UserWalletSignatureHelper.js +0 -6123
  231. package/dist/contracts/UserWalletV1.d.ts +0 -2650
  232. package/dist/contracts/UserWalletV1.d.ts.map +0 -1
  233. package/dist/contracts/UserWalletV1.js +0 -3520
  234. package/dist/contracts/VaultRegistry.d.ts +0 -3162
  235. package/dist/contracts/VaultRegistry.d.ts.map +0 -1
  236. package/dist/contracts/VaultRegistry.js +0 -3893
  237. package/dist/contracts/WalletBackpack.d.ts +0 -1248
  238. package/dist/contracts/WalletBackpack.d.ts.map +0 -1
  239. package/dist/contracts/WalletBackpack.js +0 -1519
  240. package/dist/contracts/Wasabi.d.ts +0 -2620
  241. package/dist/contracts/Wasabi.d.ts.map +0 -1
  242. package/dist/contracts/Wasabi.js +0 -3300
  243. package/dist/contracts/index.d.ts +0 -76
  244. package/dist/contracts/index.d.ts.map +0 -1
  245. package/dist/contracts/index.js +0 -79
  246. package/dist/contracts/sdk.d.ts +0 -156
  247. package/dist/contracts/sdk.d.ts.map +0 -1
  248. package/dist/contracts/sdk.js +0 -158
  249. package/dist/getSwapInstructions.d.ts +0 -34
  250. package/dist/getSwapInstructions.d.ts.map +0 -1
  251. package/dist/getSwapInstructions.js +0 -21
  252. package/dist/index.d.ts +0 -135
  253. package/dist/index.d.ts.map +0 -1
  254. package/dist/index.js +0 -137
@@ -1,1519 +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": "PendingBackpackItemAdded",
10
- "inputs": [
11
- {
12
- "name": "backpackType",
13
- "type": "uint256",
14
- "indexed": false
15
- },
16
- {
17
- "name": "addr",
18
- "type": "address",
19
- "indexed": true
20
- },
21
- {
22
- "name": "actionId",
23
- "type": "uint256",
24
- "indexed": false
25
- },
26
- {
27
- "name": "confirmationBlock",
28
- "type": "uint256",
29
- "indexed": false
30
- },
31
- {
32
- "name": "addedBy",
33
- "type": "address",
34
- "indexed": true
35
- }
36
- ],
37
- "anonymous": false,
38
- "type": "event"
39
- },
40
- {
41
- "name": "BackpackItemConfirmed",
42
- "inputs": [
43
- {
44
- "name": "backpackType",
45
- "type": "uint256",
46
- "indexed": false
47
- },
48
- {
49
- "name": "addr",
50
- "type": "address",
51
- "indexed": true
52
- },
53
- {
54
- "name": "actionId",
55
- "type": "uint256",
56
- "indexed": false
57
- },
58
- {
59
- "name": "confirmedBy",
60
- "type": "address",
61
- "indexed": true
62
- }
63
- ],
64
- "anonymous": false,
65
- "type": "event"
66
- },
67
- {
68
- "name": "PendingBackpackItemCancelled",
69
- "inputs": [
70
- {
71
- "name": "backpackType",
72
- "type": "uint256",
73
- "indexed": false
74
- },
75
- {
76
- "name": "addr",
77
- "type": "address",
78
- "indexed": true
79
- },
80
- {
81
- "name": "actionId",
82
- "type": "uint256",
83
- "indexed": false
84
- },
85
- {
86
- "name": "cancelledBy",
87
- "type": "address",
88
- "indexed": true
89
- }
90
- ],
91
- "anonymous": false,
92
- "type": "event"
93
- },
94
- {
95
- "name": "GovChangeTimeLockModified",
96
- "inputs": [
97
- {
98
- "name": "prevTimeLock",
99
- "type": "uint256",
100
- "indexed": false
101
- },
102
- {
103
- "name": "newTimeLock",
104
- "type": "uint256",
105
- "indexed": false
106
- }
107
- ],
108
- "anonymous": false,
109
- "type": "event"
110
- },
111
- {
112
- "name": "ExpirationSet",
113
- "inputs": [
114
- {
115
- "name": "expiration",
116
- "type": "uint256",
117
- "indexed": false
118
- }
119
- ],
120
- "anonymous": false,
121
- "type": "event"
122
- },
123
- {
124
- "name": "ActionTimeLockSet",
125
- "inputs": [
126
- {
127
- "name": "newTimeLock",
128
- "type": "uint256",
129
- "indexed": false
130
- },
131
- {
132
- "name": "prevTimeLock",
133
- "type": "uint256",
134
- "indexed": false
135
- }
136
- ],
137
- "anonymous": false,
138
- "type": "event"
139
- },
140
- {
141
- "name": "GovChangeStarted",
142
- "inputs": [
143
- {
144
- "name": "prevGov",
145
- "type": "address",
146
- "indexed": true
147
- },
148
- {
149
- "name": "newGov",
150
- "type": "address",
151
- "indexed": true
152
- },
153
- {
154
- "name": "confirmBlock",
155
- "type": "uint256",
156
- "indexed": false
157
- }
158
- ],
159
- "anonymous": false,
160
- "type": "event"
161
- },
162
- {
163
- "name": "GovChangeConfirmed",
164
- "inputs": [
165
- {
166
- "name": "prevGov",
167
- "type": "address",
168
- "indexed": true
169
- },
170
- {
171
- "name": "newGov",
172
- "type": "address",
173
- "indexed": true
174
- },
175
- {
176
- "name": "initiatedBlock",
177
- "type": "uint256",
178
- "indexed": false
179
- },
180
- {
181
- "name": "confirmBlock",
182
- "type": "uint256",
183
- "indexed": false
184
- }
185
- ],
186
- "anonymous": false,
187
- "type": "event"
188
- },
189
- {
190
- "name": "GovChangeCancelled",
191
- "inputs": [
192
- {
193
- "name": "cancelledGov",
194
- "type": "address",
195
- "indexed": true
196
- },
197
- {
198
- "name": "initiatedBlock",
199
- "type": "uint256",
200
- "indexed": false
201
- },
202
- {
203
- "name": "confirmBlock",
204
- "type": "uint256",
205
- "indexed": false
206
- }
207
- ],
208
- "anonymous": false,
209
- "type": "event"
210
- },
211
- {
212
- "name": "GovRelinquished",
213
- "inputs": [
214
- {
215
- "name": "prevGov",
216
- "type": "address",
217
- "indexed": true
218
- }
219
- ],
220
- "anonymous": false,
221
- "type": "event"
222
- },
223
- {
224
- "name": "UndyHqSetupFinished",
225
- "inputs": [
226
- {
227
- "name": "prevGov",
228
- "type": "address",
229
- "indexed": true
230
- },
231
- {
232
- "name": "newGov",
233
- "type": "address",
234
- "indexed": true
235
- },
236
- {
237
- "name": "timeLock",
238
- "type": "uint256",
239
- "indexed": false
240
- }
241
- ],
242
- "anonymous": false,
243
- "type": "event"
244
- },
245
- {
246
- "name": "DepartmentPauseModified",
247
- "inputs": [
248
- {
249
- "name": "isPaused",
250
- "type": "bool",
251
- "indexed": false
252
- }
253
- ],
254
- "anonymous": false,
255
- "type": "event"
256
- },
257
- {
258
- "name": "DepartmentFundsRecovered",
259
- "inputs": [
260
- {
261
- "name": "asset",
262
- "type": "address",
263
- "indexed": true
264
- },
265
- {
266
- "name": "recipient",
267
- "type": "address",
268
- "indexed": true
269
- },
270
- {
271
- "name": "balance",
272
- "type": "uint256",
273
- "indexed": false
274
- }
275
- ],
276
- "anonymous": false,
277
- "type": "event"
278
- },
279
- {
280
- "stateMutability": "view",
281
- "type": "function",
282
- "name": "getUndyHqFromGov",
283
- "inputs": [],
284
- "outputs": [
285
- {
286
- "name": "",
287
- "type": "address"
288
- }
289
- ]
290
- },
291
- {
292
- "stateMutability": "view",
293
- "type": "function",
294
- "name": "canGovern",
295
- "inputs": [
296
- {
297
- "name": "_addr",
298
- "type": "address"
299
- }
300
- ],
301
- "outputs": [
302
- {
303
- "name": "",
304
- "type": "bool"
305
- }
306
- ]
307
- },
308
- {
309
- "stateMutability": "view",
310
- "type": "function",
311
- "name": "getGovernors",
312
- "inputs": [],
313
- "outputs": [
314
- {
315
- "name": "",
316
- "type": "address[]"
317
- }
318
- ]
319
- },
320
- {
321
- "stateMutability": "view",
322
- "type": "function",
323
- "name": "hasPendingGovChange",
324
- "inputs": [],
325
- "outputs": [
326
- {
327
- "name": "",
328
- "type": "bool"
329
- }
330
- ]
331
- },
332
- {
333
- "stateMutability": "nonpayable",
334
- "type": "function",
335
- "name": "startGovernanceChange",
336
- "inputs": [
337
- {
338
- "name": "_newGov",
339
- "type": "address"
340
- }
341
- ],
342
- "outputs": []
343
- },
344
- {
345
- "stateMutability": "nonpayable",
346
- "type": "function",
347
- "name": "confirmGovernanceChange",
348
- "inputs": [],
349
- "outputs": []
350
- },
351
- {
352
- "stateMutability": "nonpayable",
353
- "type": "function",
354
- "name": "cancelGovernanceChange",
355
- "inputs": [],
356
- "outputs": []
357
- },
358
- {
359
- "stateMutability": "nonpayable",
360
- "type": "function",
361
- "name": "relinquishGov",
362
- "inputs": [],
363
- "outputs": []
364
- },
365
- {
366
- "stateMutability": "nonpayable",
367
- "type": "function",
368
- "name": "setGovTimeLock",
369
- "inputs": [
370
- {
371
- "name": "_numBlocks",
372
- "type": "uint256"
373
- }
374
- ],
375
- "outputs": [
376
- {
377
- "name": "",
378
- "type": "bool"
379
- }
380
- ]
381
- },
382
- {
383
- "stateMutability": "view",
384
- "type": "function",
385
- "name": "isValidGovTimeLock",
386
- "inputs": [
387
- {
388
- "name": "_newTimeLock",
389
- "type": "uint256"
390
- }
391
- ],
392
- "outputs": [
393
- {
394
- "name": "",
395
- "type": "bool"
396
- }
397
- ]
398
- },
399
- {
400
- "stateMutability": "view",
401
- "type": "function",
402
- "name": "minGovChangeTimeLock",
403
- "inputs": [],
404
- "outputs": [
405
- {
406
- "name": "",
407
- "type": "uint256"
408
- }
409
- ]
410
- },
411
- {
412
- "stateMutability": "view",
413
- "type": "function",
414
- "name": "maxGovChangeTimeLock",
415
- "inputs": [],
416
- "outputs": [
417
- {
418
- "name": "",
419
- "type": "uint256"
420
- }
421
- ]
422
- },
423
- {
424
- "stateMutability": "nonpayable",
425
- "type": "function",
426
- "name": "finishUndyHqSetup",
427
- "inputs": [
428
- {
429
- "name": "_newGov",
430
- "type": "address"
431
- }
432
- ],
433
- "outputs": [
434
- {
435
- "name": "",
436
- "type": "bool"
437
- }
438
- ]
439
- },
440
- {
441
- "stateMutability": "nonpayable",
442
- "type": "function",
443
- "name": "finishUndyHqSetup",
444
- "inputs": [
445
- {
446
- "name": "_newGov",
447
- "type": "address"
448
- },
449
- {
450
- "name": "_timeLock",
451
- "type": "uint256"
452
- }
453
- ],
454
- "outputs": [
455
- {
456
- "name": "",
457
- "type": "bool"
458
- }
459
- ]
460
- },
461
- {
462
- "stateMutability": "view",
463
- "type": "function",
464
- "name": "governance",
465
- "inputs": [],
466
- "outputs": [
467
- {
468
- "name": "",
469
- "type": "address"
470
- }
471
- ]
472
- },
473
- {
474
- "stateMutability": "view",
475
- "type": "function",
476
- "name": "pendingGov",
477
- "inputs": [],
478
- "outputs": [
479
- {
480
- "name": "",
481
- "type": "tuple",
482
- "components": [
483
- {
484
- "name": "newGov",
485
- "type": "address"
486
- },
487
- {
488
- "name": "initiatedBlock",
489
- "type": "uint256"
490
- },
491
- {
492
- "name": "confirmBlock",
493
- "type": "uint256"
494
- }
495
- ]
496
- }
497
- ]
498
- },
499
- {
500
- "stateMutability": "view",
501
- "type": "function",
502
- "name": "numGovChanges",
503
- "inputs": [],
504
- "outputs": [
505
- {
506
- "name": "",
507
- "type": "uint256"
508
- }
509
- ]
510
- },
511
- {
512
- "stateMutability": "view",
513
- "type": "function",
514
- "name": "govChangeTimeLock",
515
- "inputs": [],
516
- "outputs": [
517
- {
518
- "name": "",
519
- "type": "uint256"
520
- }
521
- ]
522
- },
523
- {
524
- "stateMutability": "view",
525
- "type": "function",
526
- "name": "getAddys",
527
- "inputs": [],
528
- "outputs": [
529
- {
530
- "name": "",
531
- "type": "tuple",
532
- "components": [
533
- {
534
- "name": "hq",
535
- "type": "address"
536
- },
537
- {
538
- "name": "undyToken",
539
- "type": "address"
540
- },
541
- {
542
- "name": "ledger",
543
- "type": "address"
544
- },
545
- {
546
- "name": "missionControl",
547
- "type": "address"
548
- },
549
- {
550
- "name": "legoBook",
551
- "type": "address"
552
- },
553
- {
554
- "name": "switchboard",
555
- "type": "address"
556
- },
557
- {
558
- "name": "hatchery",
559
- "type": "address"
560
- },
561
- {
562
- "name": "lootDistributor",
563
- "type": "address"
564
- },
565
- {
566
- "name": "appraiser",
567
- "type": "address"
568
- },
569
- {
570
- "name": "walletBackpack",
571
- "type": "address"
572
- },
573
- {
574
- "name": "billing",
575
- "type": "address"
576
- },
577
- {
578
- "name": "vaultRegistry",
579
- "type": "address"
580
- }
581
- ]
582
- }
583
- ]
584
- },
585
- {
586
- "stateMutability": "view",
587
- "type": "function",
588
- "name": "getUndyHq",
589
- "inputs": [],
590
- "outputs": [
591
- {
592
- "name": "",
593
- "type": "address"
594
- }
595
- ]
596
- },
597
- {
598
- "stateMutability": "view",
599
- "type": "function",
600
- "name": "canMintUndy",
601
- "inputs": [],
602
- "outputs": [
603
- {
604
- "name": "",
605
- "type": "bool"
606
- }
607
- ]
608
- },
609
- {
610
- "stateMutability": "nonpayable",
611
- "type": "function",
612
- "name": "pause",
613
- "inputs": [
614
- {
615
- "name": "_shouldPause",
616
- "type": "bool"
617
- }
618
- ],
619
- "outputs": []
620
- },
621
- {
622
- "stateMutability": "nonpayable",
623
- "type": "function",
624
- "name": "recoverFunds",
625
- "inputs": [
626
- {
627
- "name": "_recipient",
628
- "type": "address"
629
- },
630
- {
631
- "name": "_asset",
632
- "type": "address"
633
- }
634
- ],
635
- "outputs": []
636
- },
637
- {
638
- "stateMutability": "nonpayable",
639
- "type": "function",
640
- "name": "recoverFundsMany",
641
- "inputs": [
642
- {
643
- "name": "_recipient",
644
- "type": "address"
645
- },
646
- {
647
- "name": "_assets",
648
- "type": "address[]"
649
- }
650
- ],
651
- "outputs": []
652
- },
653
- {
654
- "stateMutability": "view",
655
- "type": "function",
656
- "name": "isPaused",
657
- "inputs": [],
658
- "outputs": [
659
- {
660
- "name": "",
661
- "type": "bool"
662
- }
663
- ]
664
- },
665
- {
666
- "stateMutability": "view",
667
- "type": "function",
668
- "name": "canConfirmAction",
669
- "inputs": [
670
- {
671
- "name": "_actionId",
672
- "type": "uint256"
673
- }
674
- ],
675
- "outputs": [
676
- {
677
- "name": "",
678
- "type": "bool"
679
- }
680
- ]
681
- },
682
- {
683
- "stateMutability": "view",
684
- "type": "function",
685
- "name": "isExpired",
686
- "inputs": [
687
- {
688
- "name": "_actionId",
689
- "type": "uint256"
690
- }
691
- ],
692
- "outputs": [
693
- {
694
- "name": "",
695
- "type": "bool"
696
- }
697
- ]
698
- },
699
- {
700
- "stateMutability": "view",
701
- "type": "function",
702
- "name": "hasPendingAction",
703
- "inputs": [
704
- {
705
- "name": "_actionId",
706
- "type": "uint256"
707
- }
708
- ],
709
- "outputs": [
710
- {
711
- "name": "",
712
- "type": "bool"
713
- }
714
- ]
715
- },
716
- {
717
- "stateMutability": "view",
718
- "type": "function",
719
- "name": "getActionConfirmationBlock",
720
- "inputs": [
721
- {
722
- "name": "_actionId",
723
- "type": "uint256"
724
- }
725
- ],
726
- "outputs": [
727
- {
728
- "name": "",
729
- "type": "uint256"
730
- }
731
- ]
732
- },
733
- {
734
- "stateMutability": "nonpayable",
735
- "type": "function",
736
- "name": "setActionTimeLock",
737
- "inputs": [
738
- {
739
- "name": "_newTimeLock",
740
- "type": "uint256"
741
- }
742
- ],
743
- "outputs": [
744
- {
745
- "name": "",
746
- "type": "bool"
747
- }
748
- ]
749
- },
750
- {
751
- "stateMutability": "view",
752
- "type": "function",
753
- "name": "isValidActionTimeLock",
754
- "inputs": [
755
- {
756
- "name": "_newTimeLock",
757
- "type": "uint256"
758
- }
759
- ],
760
- "outputs": [
761
- {
762
- "name": "",
763
- "type": "bool"
764
- }
765
- ]
766
- },
767
- {
768
- "stateMutability": "view",
769
- "type": "function",
770
- "name": "minActionTimeLock",
771
- "inputs": [],
772
- "outputs": [
773
- {
774
- "name": "",
775
- "type": "uint256"
776
- }
777
- ]
778
- },
779
- {
780
- "stateMutability": "view",
781
- "type": "function",
782
- "name": "maxActionTimeLock",
783
- "inputs": [],
784
- "outputs": [
785
- {
786
- "name": "",
787
- "type": "uint256"
788
- }
789
- ]
790
- },
791
- {
792
- "stateMutability": "nonpayable",
793
- "type": "function",
794
- "name": "setExpiration",
795
- "inputs": [
796
- {
797
- "name": "_expiration",
798
- "type": "uint256"
799
- }
800
- ],
801
- "outputs": [
802
- {
803
- "name": "",
804
- "type": "bool"
805
- }
806
- ]
807
- },
808
- {
809
- "stateMutability": "nonpayable",
810
- "type": "function",
811
- "name": "setActionTimeLockAfterSetup",
812
- "inputs": [],
813
- "outputs": [
814
- {
815
- "name": "",
816
- "type": "bool"
817
- }
818
- ]
819
- },
820
- {
821
- "stateMutability": "nonpayable",
822
- "type": "function",
823
- "name": "setActionTimeLockAfterSetup",
824
- "inputs": [
825
- {
826
- "name": "_newTimeLock",
827
- "type": "uint256"
828
- }
829
- ],
830
- "outputs": [
831
- {
832
- "name": "",
833
- "type": "bool"
834
- }
835
- ]
836
- },
837
- {
838
- "stateMutability": "view",
839
- "type": "function",
840
- "name": "pendingActions",
841
- "inputs": [
842
- {
843
- "name": "arg0",
844
- "type": "uint256"
845
- }
846
- ],
847
- "outputs": [
848
- {
849
- "name": "",
850
- "type": "tuple",
851
- "components": [
852
- {
853
- "name": "initiatedBlock",
854
- "type": "uint256"
855
- },
856
- {
857
- "name": "confirmBlock",
858
- "type": "uint256"
859
- },
860
- {
861
- "name": "expiration",
862
- "type": "uint256"
863
- }
864
- ]
865
- }
866
- ]
867
- },
868
- {
869
- "stateMutability": "view",
870
- "type": "function",
871
- "name": "actionId",
872
- "inputs": [],
873
- "outputs": [
874
- {
875
- "name": "",
876
- "type": "uint256"
877
- }
878
- ]
879
- },
880
- {
881
- "stateMutability": "view",
882
- "type": "function",
883
- "name": "actionTimeLock",
884
- "inputs": [],
885
- "outputs": [
886
- {
887
- "name": "",
888
- "type": "uint256"
889
- }
890
- ]
891
- },
892
- {
893
- "stateMutability": "view",
894
- "type": "function",
895
- "name": "expiration",
896
- "inputs": [],
897
- "outputs": [
898
- {
899
- "name": "",
900
- "type": "uint256"
901
- }
902
- ]
903
- },
904
- {
905
- "stateMutability": "nonpayable",
906
- "type": "function",
907
- "name": "addPendingKernel",
908
- "inputs": [
909
- {
910
- "name": "_addr",
911
- "type": "address"
912
- }
913
- ],
914
- "outputs": [
915
- {
916
- "name": "",
917
- "type": "bool"
918
- }
919
- ]
920
- },
921
- {
922
- "stateMutability": "nonpayable",
923
- "type": "function",
924
- "name": "addPendingSentinel",
925
- "inputs": [
926
- {
927
- "name": "_addr",
928
- "type": "address"
929
- }
930
- ],
931
- "outputs": [
932
- {
933
- "name": "",
934
- "type": "bool"
935
- }
936
- ]
937
- },
938
- {
939
- "stateMutability": "nonpayable",
940
- "type": "function",
941
- "name": "addPendingHighCommand",
942
- "inputs": [
943
- {
944
- "name": "_addr",
945
- "type": "address"
946
- }
947
- ],
948
- "outputs": [
949
- {
950
- "name": "",
951
- "type": "bool"
952
- }
953
- ]
954
- },
955
- {
956
- "stateMutability": "nonpayable",
957
- "type": "function",
958
- "name": "addPendingPaymaster",
959
- "inputs": [
960
- {
961
- "name": "_addr",
962
- "type": "address"
963
- }
964
- ],
965
- "outputs": [
966
- {
967
- "name": "",
968
- "type": "bool"
969
- }
970
- ]
971
- },
972
- {
973
- "stateMutability": "nonpayable",
974
- "type": "function",
975
- "name": "addPendingChequeBook",
976
- "inputs": [
977
- {
978
- "name": "_addr",
979
- "type": "address"
980
- }
981
- ],
982
- "outputs": [
983
- {
984
- "name": "",
985
- "type": "bool"
986
- }
987
- ]
988
- },
989
- {
990
- "stateMutability": "nonpayable",
991
- "type": "function",
992
- "name": "addPendingMigrator",
993
- "inputs": [
994
- {
995
- "name": "_addr",
996
- "type": "address"
997
- }
998
- ],
999
- "outputs": [
1000
- {
1001
- "name": "",
1002
- "type": "bool"
1003
- }
1004
- ]
1005
- },
1006
- {
1007
- "stateMutability": "view",
1008
- "type": "function",
1009
- "name": "canAddBackpackItem",
1010
- "inputs": [
1011
- {
1012
- "name": "_backpackType",
1013
- "type": "uint256"
1014
- },
1015
- {
1016
- "name": "_addr",
1017
- "type": "address"
1018
- }
1019
- ],
1020
- "outputs": [
1021
- {
1022
- "name": "",
1023
- "type": "bool"
1024
- }
1025
- ]
1026
- },
1027
- {
1028
- "stateMutability": "nonpayable",
1029
- "type": "function",
1030
- "name": "confirmPendingKernel",
1031
- "inputs": [],
1032
- "outputs": [
1033
- {
1034
- "name": "",
1035
- "type": "bool"
1036
- }
1037
- ]
1038
- },
1039
- {
1040
- "stateMutability": "nonpayable",
1041
- "type": "function",
1042
- "name": "confirmPendingSentinel",
1043
- "inputs": [],
1044
- "outputs": [
1045
- {
1046
- "name": "",
1047
- "type": "bool"
1048
- }
1049
- ]
1050
- },
1051
- {
1052
- "stateMutability": "nonpayable",
1053
- "type": "function",
1054
- "name": "confirmPendingHighCommand",
1055
- "inputs": [],
1056
- "outputs": [
1057
- {
1058
- "name": "",
1059
- "type": "bool"
1060
- }
1061
- ]
1062
- },
1063
- {
1064
- "stateMutability": "nonpayable",
1065
- "type": "function",
1066
- "name": "confirmPendingPaymaster",
1067
- "inputs": [],
1068
- "outputs": [
1069
- {
1070
- "name": "",
1071
- "type": "bool"
1072
- }
1073
- ]
1074
- },
1075
- {
1076
- "stateMutability": "nonpayable",
1077
- "type": "function",
1078
- "name": "confirmPendingChequeBook",
1079
- "inputs": [],
1080
- "outputs": [
1081
- {
1082
- "name": "",
1083
- "type": "bool"
1084
- }
1085
- ]
1086
- },
1087
- {
1088
- "stateMutability": "nonpayable",
1089
- "type": "function",
1090
- "name": "confirmPendingMigrator",
1091
- "inputs": [],
1092
- "outputs": [
1093
- {
1094
- "name": "",
1095
- "type": "bool"
1096
- }
1097
- ]
1098
- },
1099
- {
1100
- "stateMutability": "nonpayable",
1101
- "type": "function",
1102
- "name": "cancelPendingKernel",
1103
- "inputs": [],
1104
- "outputs": [
1105
- {
1106
- "name": "",
1107
- "type": "bool"
1108
- }
1109
- ]
1110
- },
1111
- {
1112
- "stateMutability": "nonpayable",
1113
- "type": "function",
1114
- "name": "cancelPendingSentinel",
1115
- "inputs": [],
1116
- "outputs": [
1117
- {
1118
- "name": "",
1119
- "type": "bool"
1120
- }
1121
- ]
1122
- },
1123
- {
1124
- "stateMutability": "nonpayable",
1125
- "type": "function",
1126
- "name": "cancelPendingHighCommand",
1127
- "inputs": [],
1128
- "outputs": [
1129
- {
1130
- "name": "",
1131
- "type": "bool"
1132
- }
1133
- ]
1134
- },
1135
- {
1136
- "stateMutability": "nonpayable",
1137
- "type": "function",
1138
- "name": "cancelPendingPaymaster",
1139
- "inputs": [],
1140
- "outputs": [
1141
- {
1142
- "name": "",
1143
- "type": "bool"
1144
- }
1145
- ]
1146
- },
1147
- {
1148
- "stateMutability": "nonpayable",
1149
- "type": "function",
1150
- "name": "cancelPendingChequeBook",
1151
- "inputs": [],
1152
- "outputs": [
1153
- {
1154
- "name": "",
1155
- "type": "bool"
1156
- }
1157
- ]
1158
- },
1159
- {
1160
- "stateMutability": "nonpayable",
1161
- "type": "function",
1162
- "name": "cancelPendingMigrator",
1163
- "inputs": [],
1164
- "outputs": [
1165
- {
1166
- "name": "",
1167
- "type": "bool"
1168
- }
1169
- ]
1170
- },
1171
- {
1172
- "stateMutability": "view",
1173
- "type": "function",
1174
- "name": "isRegisteredBackpackItem",
1175
- "inputs": [
1176
- {
1177
- "name": "_addr",
1178
- "type": "address"
1179
- }
1180
- ],
1181
- "outputs": [
1182
- {
1183
- "name": "",
1184
- "type": "bool"
1185
- }
1186
- ]
1187
- },
1188
- {
1189
- "stateMutability": "view",
1190
- "type": "function",
1191
- "name": "kernel",
1192
- "inputs": [],
1193
- "outputs": [
1194
- {
1195
- "name": "",
1196
- "type": "address"
1197
- }
1198
- ]
1199
- },
1200
- {
1201
- "stateMutability": "view",
1202
- "type": "function",
1203
- "name": "sentinel",
1204
- "inputs": [],
1205
- "outputs": [
1206
- {
1207
- "name": "",
1208
- "type": "address"
1209
- }
1210
- ]
1211
- },
1212
- {
1213
- "stateMutability": "view",
1214
- "type": "function",
1215
- "name": "highCommand",
1216
- "inputs": [],
1217
- "outputs": [
1218
- {
1219
- "name": "",
1220
- "type": "address"
1221
- }
1222
- ]
1223
- },
1224
- {
1225
- "stateMutability": "view",
1226
- "type": "function",
1227
- "name": "paymaster",
1228
- "inputs": [],
1229
- "outputs": [
1230
- {
1231
- "name": "",
1232
- "type": "address"
1233
- }
1234
- ]
1235
- },
1236
- {
1237
- "stateMutability": "view",
1238
- "type": "function",
1239
- "name": "chequeBook",
1240
- "inputs": [],
1241
- "outputs": [
1242
- {
1243
- "name": "",
1244
- "type": "address"
1245
- }
1246
- ]
1247
- },
1248
- {
1249
- "stateMutability": "view",
1250
- "type": "function",
1251
- "name": "migrator",
1252
- "inputs": [],
1253
- "outputs": [
1254
- {
1255
- "name": "",
1256
- "type": "address"
1257
- }
1258
- ]
1259
- },
1260
- {
1261
- "stateMutability": "view",
1262
- "type": "function",
1263
- "name": "pendingUpdates",
1264
- "inputs": [
1265
- {
1266
- "name": "arg0",
1267
- "type": "uint256"
1268
- }
1269
- ],
1270
- "outputs": [
1271
- {
1272
- "name": "",
1273
- "type": "tuple",
1274
- "components": [
1275
- {
1276
- "name": "actionId",
1277
- "type": "uint256"
1278
- },
1279
- {
1280
- "name": "addr",
1281
- "type": "address"
1282
- }
1283
- ]
1284
- }
1285
- ]
1286
- },
1287
- {
1288
- "stateMutability": "nonpayable",
1289
- "type": "constructor",
1290
- "inputs": [
1291
- {
1292
- "name": "_undyHq",
1293
- "type": "address"
1294
- },
1295
- {
1296
- "name": "_tempGov",
1297
- "type": "address"
1298
- },
1299
- {
1300
- "name": "_minTimeLock",
1301
- "type": "uint256"
1302
- },
1303
- {
1304
- "name": "_maxTimeLock",
1305
- "type": "uint256"
1306
- }
1307
- ],
1308
- "outputs": []
1309
- }
1310
- ];
1311
- export const deployAddress = '0x10099b1386b434Ea4da1967d952931b645Df6250';
1312
- function getRequest(method, args, contractAddressOrOptions) {
1313
- const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1314
- const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1315
- const call = {
1316
- contractName: 'WalletBackpack',
1317
- method,
1318
- args,
1319
- address,
1320
- deployAddress,
1321
- defaultValue,
1322
- getAbi: () => abi,
1323
- with: (options) => {
1324
- call.address = options.contractAddress;
1325
- call.defaultValue = options.defaultValue;
1326
- return call;
1327
- },
1328
- defaultTo: (defaultValue) => {
1329
- call.defaultValue = defaultValue;
1330
- return call;
1331
- },
1332
- at: (address) => {
1333
- call.address = address;
1334
- return call;
1335
- },
1336
- };
1337
- return call;
1338
- }
1339
- export const call = {
1340
- getUndyHqFromGov: (...args) => getRequest('getUndyHqFromGov', args),
1341
- canGovern: (...args) => getRequest('canGovern', args),
1342
- getGovernors: (...args) => getRequest('getGovernors', args),
1343
- hasPendingGovChange: (...args) => getRequest('hasPendingGovChange', args),
1344
- isValidGovTimeLock: (...args) => getRequest('isValidGovTimeLock', args),
1345
- minGovChangeTimeLock: (...args) => getRequest('minGovChangeTimeLock', args),
1346
- maxGovChangeTimeLock: (...args) => getRequest('maxGovChangeTimeLock', args),
1347
- governance: (...args) => getRequest('governance', args),
1348
- pendingGov: (...args) => getRequest('pendingGov', args),
1349
- numGovChanges: (...args) => getRequest('numGovChanges', args),
1350
- govChangeTimeLock: (...args) => getRequest('govChangeTimeLock', args),
1351
- getAddys: (...args) => getRequest('getAddys', args),
1352
- getUndyHq: (...args) => getRequest('getUndyHq', args),
1353
- canMintUndy: (...args) => getRequest('canMintUndy', args),
1354
- isPaused: (...args) => getRequest('isPaused', args),
1355
- canConfirmAction: (...args) => getRequest('canConfirmAction', args),
1356
- isExpired: (...args) => getRequest('isExpired', args),
1357
- hasPendingAction: (...args) => getRequest('hasPendingAction', args),
1358
- getActionConfirmationBlock: (...args) => getRequest('getActionConfirmationBlock', args),
1359
- isValidActionTimeLock: (...args) => getRequest('isValidActionTimeLock', args),
1360
- minActionTimeLock: (...args) => getRequest('minActionTimeLock', args),
1361
- maxActionTimeLock: (...args) => getRequest('maxActionTimeLock', args),
1362
- pendingActions: (...args) => getRequest('pendingActions', args),
1363
- actionId: (...args) => getRequest('actionId', args),
1364
- actionTimeLock: (...args) => getRequest('actionTimeLock', args),
1365
- expiration: (...args) => getRequest('expiration', args),
1366
- canAddBackpackItem: (...args) => getRequest('canAddBackpackItem', args),
1367
- isRegisteredBackpackItem: (...args) => getRequest('isRegisteredBackpackItem', args),
1368
- kernel: (...args) => getRequest('kernel', args),
1369
- sentinel: (...args) => getRequest('sentinel', args),
1370
- highCommand: (...args) => getRequest('highCommand', args),
1371
- paymaster: (...args) => getRequest('paymaster', args),
1372
- chequeBook: (...args) => getRequest('chequeBook', args),
1373
- migrator: (...args) => getRequest('migrator', args),
1374
- pendingUpdates: (...args) => getRequest('pendingUpdates', args),
1375
- };
1376
- function getMutation(functionName) {
1377
- return {
1378
- contractName: 'WalletBackpack',
1379
- functionName,
1380
- deployAddress,
1381
- argsType: undefined,
1382
- getAbi: () => abi,
1383
- };
1384
- }
1385
- export const mutation = {
1386
- startGovernanceChange: getMutation('startGovernanceChange'),
1387
- confirmGovernanceChange: getMutation('confirmGovernanceChange'),
1388
- cancelGovernanceChange: getMutation('cancelGovernanceChange'),
1389
- relinquishGov: getMutation('relinquishGov'),
1390
- setGovTimeLock: getMutation('setGovTimeLock'),
1391
- finishUndyHqSetup: getMutation('finishUndyHqSetup'),
1392
- pause: getMutation('pause'),
1393
- recoverFunds: getMutation('recoverFunds'),
1394
- recoverFundsMany: getMutation('recoverFundsMany'),
1395
- setActionTimeLock: getMutation('setActionTimeLock'),
1396
- setExpiration: getMutation('setExpiration'),
1397
- setActionTimeLockAfterSetup: getMutation('setActionTimeLockAfterSetup'),
1398
- addPendingKernel: getMutation('addPendingKernel'),
1399
- addPendingSentinel: getMutation('addPendingSentinel'),
1400
- addPendingHighCommand: getMutation('addPendingHighCommand'),
1401
- addPendingPaymaster: getMutation('addPendingPaymaster'),
1402
- addPendingChequeBook: getMutation('addPendingChequeBook'),
1403
- addPendingMigrator: getMutation('addPendingMigrator'),
1404
- confirmPendingKernel: getMutation('confirmPendingKernel'),
1405
- confirmPendingSentinel: getMutation('confirmPendingSentinel'),
1406
- confirmPendingHighCommand: getMutation('confirmPendingHighCommand'),
1407
- confirmPendingPaymaster: getMutation('confirmPendingPaymaster'),
1408
- confirmPendingChequeBook: getMutation('confirmPendingChequeBook'),
1409
- confirmPendingMigrator: getMutation('confirmPendingMigrator'),
1410
- cancelPendingKernel: getMutation('cancelPendingKernel'),
1411
- cancelPendingSentinel: getMutation('cancelPendingSentinel'),
1412
- cancelPendingHighCommand: getMutation('cancelPendingHighCommand'),
1413
- cancelPendingPaymaster: getMutation('cancelPendingPaymaster'),
1414
- cancelPendingChequeBook: getMutation('cancelPendingChequeBook'),
1415
- cancelPendingMigrator: getMutation('cancelPendingMigrator'),
1416
- };
1417
- export function parseEvents(eventName, events) {
1418
- return events.map((event) => {
1419
- return {
1420
- event,
1421
- parsed: parseEventLogs({
1422
- abi,
1423
- eventName,
1424
- logs: [event],
1425
- }),
1426
- };
1427
- });
1428
- }
1429
- export function getEventTopic(eventName) {
1430
- return encodeEventTopics({ abi, eventName })[0];
1431
- }
1432
- export function toSdk(publicClient, walletClient, addressResolver) {
1433
- return {
1434
- deployAddress,
1435
- abi,
1436
- events: {
1437
- PendingBackpackItemAdded: { topic: getEventTopic('PendingBackpackItemAdded'), parse: (events) => parseEvents('PendingBackpackItemAdded', events) },
1438
- BackpackItemConfirmed: { topic: getEventTopic('BackpackItemConfirmed'), parse: (events) => parseEvents('BackpackItemConfirmed', events) },
1439
- PendingBackpackItemCancelled: { topic: getEventTopic('PendingBackpackItemCancelled'), parse: (events) => parseEvents('PendingBackpackItemCancelled', events) },
1440
- GovChangeTimeLockModified: { topic: getEventTopic('GovChangeTimeLockModified'), parse: (events) => parseEvents('GovChangeTimeLockModified', events) },
1441
- ExpirationSet: { topic: getEventTopic('ExpirationSet'), parse: (events) => parseEvents('ExpirationSet', events) },
1442
- ActionTimeLockSet: { topic: getEventTopic('ActionTimeLockSet'), parse: (events) => parseEvents('ActionTimeLockSet', events) },
1443
- GovChangeStarted: { topic: getEventTopic('GovChangeStarted'), parse: (events) => parseEvents('GovChangeStarted', events) },
1444
- GovChangeConfirmed: { topic: getEventTopic('GovChangeConfirmed'), parse: (events) => parseEvents('GovChangeConfirmed', events) },
1445
- GovChangeCancelled: { topic: getEventTopic('GovChangeCancelled'), parse: (events) => parseEvents('GovChangeCancelled', events) },
1446
- GovRelinquished: { topic: getEventTopic('GovRelinquished'), parse: (events) => parseEvents('GovRelinquished', events) },
1447
- UndyHqSetupFinished: { topic: getEventTopic('UndyHqSetupFinished'), parse: (events) => parseEvents('UndyHqSetupFinished', events) },
1448
- DepartmentPauseModified: { topic: getEventTopic('DepartmentPauseModified'), parse: (events) => parseEvents('DepartmentPauseModified', events) },
1449
- DepartmentFundsRecovered: { topic: getEventTopic('DepartmentFundsRecovered'), parse: (events) => parseEvents('DepartmentFundsRecovered', events) },
1450
- },
1451
- // Queries
1452
- getUndyHqFromGov: (...args) => singleQuery(publicClient, call.getUndyHqFromGov(...args), {}, addressResolver),
1453
- canGovern: (...args) => singleQuery(publicClient, call.canGovern(...args), {}, addressResolver),
1454
- getGovernors: (...args) => singleQuery(publicClient, call.getGovernors(...args), {}, addressResolver),
1455
- hasPendingGovChange: (...args) => singleQuery(publicClient, call.hasPendingGovChange(...args), {}, addressResolver),
1456
- isValidGovTimeLock: (...args) => singleQuery(publicClient, call.isValidGovTimeLock(...args), {}, addressResolver),
1457
- minGovChangeTimeLock: (...args) => singleQuery(publicClient, call.minGovChangeTimeLock(...args), {}, addressResolver),
1458
- maxGovChangeTimeLock: (...args) => singleQuery(publicClient, call.maxGovChangeTimeLock(...args), {}, addressResolver),
1459
- governance: (...args) => singleQuery(publicClient, call.governance(...args), {}, addressResolver),
1460
- pendingGov: (...args) => singleQuery(publicClient, call.pendingGov(...args), {}, addressResolver),
1461
- numGovChanges: (...args) => singleQuery(publicClient, call.numGovChanges(...args), {}, addressResolver),
1462
- govChangeTimeLock: (...args) => singleQuery(publicClient, call.govChangeTimeLock(...args), {}, addressResolver),
1463
- getAddys: (...args) => singleQuery(publicClient, call.getAddys(...args), {}, addressResolver),
1464
- getUndyHq: (...args) => singleQuery(publicClient, call.getUndyHq(...args), {}, addressResolver),
1465
- canMintUndy: (...args) => singleQuery(publicClient, call.canMintUndy(...args), {}, addressResolver),
1466
- isPaused: (...args) => singleQuery(publicClient, call.isPaused(...args), {}, addressResolver),
1467
- canConfirmAction: (...args) => singleQuery(publicClient, call.canConfirmAction(...args), {}, addressResolver),
1468
- isExpired: (...args) => singleQuery(publicClient, call.isExpired(...args), {}, addressResolver),
1469
- hasPendingAction: (...args) => singleQuery(publicClient, call.hasPendingAction(...args), {}, addressResolver),
1470
- getActionConfirmationBlock: (...args) => singleQuery(publicClient, call.getActionConfirmationBlock(...args), {}, addressResolver),
1471
- isValidActionTimeLock: (...args) => singleQuery(publicClient, call.isValidActionTimeLock(...args), {}, addressResolver),
1472
- minActionTimeLock: (...args) => singleQuery(publicClient, call.minActionTimeLock(...args), {}, addressResolver),
1473
- maxActionTimeLock: (...args) => singleQuery(publicClient, call.maxActionTimeLock(...args), {}, addressResolver),
1474
- pendingActions: (...args) => singleQuery(publicClient, call.pendingActions(...args), {}, addressResolver),
1475
- actionId: (...args) => singleQuery(publicClient, call.actionId(...args), {}, addressResolver),
1476
- actionTimeLock: (...args) => singleQuery(publicClient, call.actionTimeLock(...args), {}, addressResolver),
1477
- expiration: (...args) => singleQuery(publicClient, call.expiration(...args), {}, addressResolver),
1478
- canAddBackpackItem: (...args) => singleQuery(publicClient, call.canAddBackpackItem(...args), {}, addressResolver),
1479
- isRegisteredBackpackItem: (...args) => singleQuery(publicClient, call.isRegisteredBackpackItem(...args), {}, addressResolver),
1480
- kernel: (...args) => singleQuery(publicClient, call.kernel(...args), {}, addressResolver),
1481
- sentinel: (...args) => singleQuery(publicClient, call.sentinel(...args), {}, addressResolver),
1482
- highCommand: (...args) => singleQuery(publicClient, call.highCommand(...args), {}, addressResolver),
1483
- paymaster: (...args) => singleQuery(publicClient, call.paymaster(...args), {}, addressResolver),
1484
- chequeBook: (...args) => singleQuery(publicClient, call.chequeBook(...args), {}, addressResolver),
1485
- migrator: (...args) => singleQuery(publicClient, call.migrator(...args), {}, addressResolver),
1486
- pendingUpdates: (...args) => singleQuery(publicClient, call.pendingUpdates(...args), {}, addressResolver),
1487
- // Mutations
1488
- startGovernanceChange: (...args) => mutate(walletClient, mutation.startGovernanceChange, { addressResolver })(...args),
1489
- confirmGovernanceChange: (...args) => mutate(walletClient, mutation.confirmGovernanceChange, { addressResolver })(...args),
1490
- cancelGovernanceChange: (...args) => mutate(walletClient, mutation.cancelGovernanceChange, { addressResolver })(...args),
1491
- relinquishGov: (...args) => mutate(walletClient, mutation.relinquishGov, { addressResolver })(...args),
1492
- setGovTimeLock: (...args) => mutate(walletClient, mutation.setGovTimeLock, { addressResolver })(...args),
1493
- finishUndyHqSetup: (...args) => mutate(walletClient, mutation.finishUndyHqSetup, { addressResolver })(...args),
1494
- pause: (...args) => mutate(walletClient, mutation.pause, { addressResolver })(...args),
1495
- recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds, { addressResolver })(...args),
1496
- recoverFundsMany: (...args) => mutate(walletClient, mutation.recoverFundsMany, { addressResolver })(...args),
1497
- setActionTimeLock: (...args) => mutate(walletClient, mutation.setActionTimeLock, { addressResolver })(...args),
1498
- setExpiration: (...args) => mutate(walletClient, mutation.setExpiration, { addressResolver })(...args),
1499
- setActionTimeLockAfterSetup: (...args) => mutate(walletClient, mutation.setActionTimeLockAfterSetup, { addressResolver })(...args),
1500
- addPendingKernel: (...args) => mutate(walletClient, mutation.addPendingKernel, { addressResolver })(...args),
1501
- addPendingSentinel: (...args) => mutate(walletClient, mutation.addPendingSentinel, { addressResolver })(...args),
1502
- addPendingHighCommand: (...args) => mutate(walletClient, mutation.addPendingHighCommand, { addressResolver })(...args),
1503
- addPendingPaymaster: (...args) => mutate(walletClient, mutation.addPendingPaymaster, { addressResolver })(...args),
1504
- addPendingChequeBook: (...args) => mutate(walletClient, mutation.addPendingChequeBook, { addressResolver })(...args),
1505
- addPendingMigrator: (...args) => mutate(walletClient, mutation.addPendingMigrator, { addressResolver })(...args),
1506
- confirmPendingKernel: (...args) => mutate(walletClient, mutation.confirmPendingKernel, { addressResolver })(...args),
1507
- confirmPendingSentinel: (...args) => mutate(walletClient, mutation.confirmPendingSentinel, { addressResolver })(...args),
1508
- confirmPendingHighCommand: (...args) => mutate(walletClient, mutation.confirmPendingHighCommand, { addressResolver })(...args),
1509
- confirmPendingPaymaster: (...args) => mutate(walletClient, mutation.confirmPendingPaymaster, { addressResolver })(...args),
1510
- confirmPendingChequeBook: (...args) => mutate(walletClient, mutation.confirmPendingChequeBook, { addressResolver })(...args),
1511
- confirmPendingMigrator: (...args) => mutate(walletClient, mutation.confirmPendingMigrator, { addressResolver })(...args),
1512
- cancelPendingKernel: (...args) => mutate(walletClient, mutation.cancelPendingKernel, { addressResolver })(...args),
1513
- cancelPendingSentinel: (...args) => mutate(walletClient, mutation.cancelPendingSentinel, { addressResolver })(...args),
1514
- cancelPendingHighCommand: (...args) => mutate(walletClient, mutation.cancelPendingHighCommand, { addressResolver })(...args),
1515
- cancelPendingPaymaster: (...args) => mutate(walletClient, mutation.cancelPendingPaymaster, { addressResolver })(...args),
1516
- cancelPendingChequeBook: (...args) => mutate(walletClient, mutation.cancelPendingChequeBook, { addressResolver })(...args),
1517
- cancelPendingMigrator: (...args) => mutate(walletClient, mutation.cancelPendingMigrator, { addressResolver })(...args),
1518
- };
1519
- }