@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,2098 +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": "PayeeAdded",
10
- "inputs": [
11
- {
12
- "name": "user",
13
- "type": "address",
14
- "indexed": true
15
- },
16
- {
17
- "name": "payee",
18
- "type": "address",
19
- "indexed": true
20
- },
21
- {
22
- "name": "startBlock",
23
- "type": "uint256",
24
- "indexed": false
25
- },
26
- {
27
- "name": "expiryBlock",
28
- "type": "uint256",
29
- "indexed": false
30
- },
31
- {
32
- "name": "canPull",
33
- "type": "bool",
34
- "indexed": false
35
- },
36
- {
37
- "name": "periodLength",
38
- "type": "uint256",
39
- "indexed": false
40
- },
41
- {
42
- "name": "maxNumTxsPerPeriod",
43
- "type": "uint256",
44
- "indexed": false
45
- },
46
- {
47
- "name": "txCooldownBlocks",
48
- "type": "uint256",
49
- "indexed": false
50
- },
51
- {
52
- "name": "failOnZeroPrice",
53
- "type": "bool",
54
- "indexed": false
55
- },
56
- {
57
- "name": "primaryAsset",
58
- "type": "address",
59
- "indexed": false
60
- },
61
- {
62
- "name": "onlyPrimaryAsset",
63
- "type": "bool",
64
- "indexed": false
65
- },
66
- {
67
- "name": "unitPerTxCap",
68
- "type": "uint256",
69
- "indexed": false
70
- },
71
- {
72
- "name": "unitPerPeriodCap",
73
- "type": "uint256",
74
- "indexed": false
75
- },
76
- {
77
- "name": "unitLifetimeCap",
78
- "type": "uint256",
79
- "indexed": false
80
- },
81
- {
82
- "name": "usdPerTxCap",
83
- "type": "uint256",
84
- "indexed": false
85
- },
86
- {
87
- "name": "usdPerPeriodCap",
88
- "type": "uint256",
89
- "indexed": false
90
- },
91
- {
92
- "name": "usdLifetimeCap",
93
- "type": "uint256",
94
- "indexed": false
95
- }
96
- ],
97
- "anonymous": false,
98
- "type": "event"
99
- },
100
- {
101
- "name": "PayeeUpdated",
102
- "inputs": [
103
- {
104
- "name": "user",
105
- "type": "address",
106
- "indexed": true
107
- },
108
- {
109
- "name": "payee",
110
- "type": "address",
111
- "indexed": true
112
- },
113
- {
114
- "name": "startBlock",
115
- "type": "uint256",
116
- "indexed": false
117
- },
118
- {
119
- "name": "expiryBlock",
120
- "type": "uint256",
121
- "indexed": false
122
- },
123
- {
124
- "name": "canPull",
125
- "type": "bool",
126
- "indexed": false
127
- },
128
- {
129
- "name": "periodLength",
130
- "type": "uint256",
131
- "indexed": false
132
- },
133
- {
134
- "name": "maxNumTxsPerPeriod",
135
- "type": "uint256",
136
- "indexed": false
137
- },
138
- {
139
- "name": "txCooldownBlocks",
140
- "type": "uint256",
141
- "indexed": false
142
- },
143
- {
144
- "name": "failOnZeroPrice",
145
- "type": "bool",
146
- "indexed": false
147
- },
148
- {
149
- "name": "primaryAsset",
150
- "type": "address",
151
- "indexed": false
152
- },
153
- {
154
- "name": "onlyPrimaryAsset",
155
- "type": "bool",
156
- "indexed": false
157
- },
158
- {
159
- "name": "unitPerTxCap",
160
- "type": "uint256",
161
- "indexed": false
162
- },
163
- {
164
- "name": "unitPerPeriodCap",
165
- "type": "uint256",
166
- "indexed": false
167
- },
168
- {
169
- "name": "unitLifetimeCap",
170
- "type": "uint256",
171
- "indexed": false
172
- },
173
- {
174
- "name": "usdPerTxCap",
175
- "type": "uint256",
176
- "indexed": false
177
- },
178
- {
179
- "name": "usdPerPeriodCap",
180
- "type": "uint256",
181
- "indexed": false
182
- },
183
- {
184
- "name": "usdLifetimeCap",
185
- "type": "uint256",
186
- "indexed": false
187
- }
188
- ],
189
- "anonymous": false,
190
- "type": "event"
191
- },
192
- {
193
- "name": "PayeeRemoved",
194
- "inputs": [
195
- {
196
- "name": "user",
197
- "type": "address",
198
- "indexed": true
199
- },
200
- {
201
- "name": "payee",
202
- "type": "address",
203
- "indexed": true
204
- },
205
- {
206
- "name": "removedBy",
207
- "type": "address",
208
- "indexed": true
209
- }
210
- ],
211
- "anonymous": false,
212
- "type": "event"
213
- },
214
- {
215
- "name": "GlobalPayeeSettingsModified",
216
- "inputs": [
217
- {
218
- "name": "user",
219
- "type": "address",
220
- "indexed": true
221
- },
222
- {
223
- "name": "defaultPeriodLength",
224
- "type": "uint256",
225
- "indexed": false
226
- },
227
- {
228
- "name": "startDelay",
229
- "type": "uint256",
230
- "indexed": false
231
- },
232
- {
233
- "name": "activationLength",
234
- "type": "uint256",
235
- "indexed": false
236
- },
237
- {
238
- "name": "maxNumTxsPerPeriod",
239
- "type": "uint256",
240
- "indexed": false
241
- },
242
- {
243
- "name": "txCooldownBlocks",
244
- "type": "uint256",
245
- "indexed": false
246
- },
247
- {
248
- "name": "failOnZeroPrice",
249
- "type": "bool",
250
- "indexed": false
251
- },
252
- {
253
- "name": "canPayOwner",
254
- "type": "bool",
255
- "indexed": false
256
- },
257
- {
258
- "name": "canPull",
259
- "type": "bool",
260
- "indexed": false
261
- },
262
- {
263
- "name": "usdPerTxCap",
264
- "type": "uint256",
265
- "indexed": false
266
- },
267
- {
268
- "name": "usdPerPeriodCap",
269
- "type": "uint256",
270
- "indexed": false
271
- },
272
- {
273
- "name": "usdLifetimeCap",
274
- "type": "uint256",
275
- "indexed": false
276
- }
277
- ],
278
- "anonymous": false,
279
- "type": "event"
280
- },
281
- {
282
- "name": "PayeePending",
283
- "inputs": [
284
- {
285
- "name": "user",
286
- "type": "address",
287
- "indexed": true
288
- },
289
- {
290
- "name": "payee",
291
- "type": "address",
292
- "indexed": true
293
- },
294
- {
295
- "name": "confirmBlock",
296
- "type": "uint256",
297
- "indexed": false
298
- },
299
- {
300
- "name": "addedBy",
301
- "type": "address",
302
- "indexed": true
303
- },
304
- {
305
- "name": "canPull",
306
- "type": "bool",
307
- "indexed": false
308
- },
309
- {
310
- "name": "periodLength",
311
- "type": "uint256",
312
- "indexed": false
313
- },
314
- {
315
- "name": "maxNumTxsPerPeriod",
316
- "type": "uint256",
317
- "indexed": false
318
- },
319
- {
320
- "name": "txCooldownBlocks",
321
- "type": "uint256",
322
- "indexed": false
323
- },
324
- {
325
- "name": "failOnZeroPrice",
326
- "type": "bool",
327
- "indexed": false
328
- },
329
- {
330
- "name": "primaryAsset",
331
- "type": "address",
332
- "indexed": false
333
- },
334
- {
335
- "name": "onlyPrimaryAsset",
336
- "type": "bool",
337
- "indexed": false
338
- },
339
- {
340
- "name": "unitPerTxCap",
341
- "type": "uint256",
342
- "indexed": false
343
- },
344
- {
345
- "name": "unitPerPeriodCap",
346
- "type": "uint256",
347
- "indexed": false
348
- },
349
- {
350
- "name": "unitLifetimeCap",
351
- "type": "uint256",
352
- "indexed": false
353
- },
354
- {
355
- "name": "usdPerTxCap",
356
- "type": "uint256",
357
- "indexed": false
358
- },
359
- {
360
- "name": "usdPerPeriodCap",
361
- "type": "uint256",
362
- "indexed": false
363
- },
364
- {
365
- "name": "usdLifetimeCap",
366
- "type": "uint256",
367
- "indexed": false
368
- }
369
- ],
370
- "anonymous": false,
371
- "type": "event"
372
- },
373
- {
374
- "name": "PayeePendingConfirmed",
375
- "inputs": [
376
- {
377
- "name": "user",
378
- "type": "address",
379
- "indexed": true
380
- },
381
- {
382
- "name": "payee",
383
- "type": "address",
384
- "indexed": true
385
- },
386
- {
387
- "name": "initiatedBlock",
388
- "type": "uint256",
389
- "indexed": false
390
- },
391
- {
392
- "name": "confirmBlock",
393
- "type": "uint256",
394
- "indexed": false
395
- },
396
- {
397
- "name": "confirmedBy",
398
- "type": "address",
399
- "indexed": true
400
- }
401
- ],
402
- "anonymous": false,
403
- "type": "event"
404
- },
405
- {
406
- "name": "PayeePendingCancelled",
407
- "inputs": [
408
- {
409
- "name": "user",
410
- "type": "address",
411
- "indexed": true
412
- },
413
- {
414
- "name": "payee",
415
- "type": "address",
416
- "indexed": true
417
- },
418
- {
419
- "name": "initiatedBlock",
420
- "type": "uint256",
421
- "indexed": false
422
- },
423
- {
424
- "name": "confirmBlock",
425
- "type": "uint256",
426
- "indexed": false
427
- },
428
- {
429
- "name": "cancelledBy",
430
- "type": "address",
431
- "indexed": true
432
- }
433
- ],
434
- "anonymous": false,
435
- "type": "event"
436
- },
437
- {
438
- "stateMutability": "nonpayable",
439
- "type": "function",
440
- "name": "setGlobalPayeeSettings",
441
- "inputs": [
442
- {
443
- "name": "_userWallet",
444
- "type": "address"
445
- },
446
- {
447
- "name": "_defaultPeriodLength",
448
- "type": "uint256"
449
- },
450
- {
451
- "name": "_startDelay",
452
- "type": "uint256"
453
- },
454
- {
455
- "name": "_activationLength",
456
- "type": "uint256"
457
- },
458
- {
459
- "name": "_maxNumTxsPerPeriod",
460
- "type": "uint256"
461
- },
462
- {
463
- "name": "_txCooldownBlocks",
464
- "type": "uint256"
465
- },
466
- {
467
- "name": "_failOnZeroPrice",
468
- "type": "bool"
469
- },
470
- {
471
- "name": "_usdLimits",
472
- "type": "tuple",
473
- "components": [
474
- {
475
- "name": "perTxCap",
476
- "type": "uint256"
477
- },
478
- {
479
- "name": "perPeriodCap",
480
- "type": "uint256"
481
- },
482
- {
483
- "name": "lifetimeCap",
484
- "type": "uint256"
485
- }
486
- ]
487
- },
488
- {
489
- "name": "_canPull",
490
- "type": "bool"
491
- }
492
- ],
493
- "outputs": [
494
- {
495
- "name": "",
496
- "type": "bool"
497
- }
498
- ]
499
- },
500
- {
501
- "stateMutability": "nonpayable",
502
- "type": "function",
503
- "name": "addPayee",
504
- "inputs": [
505
- {
506
- "name": "_userWallet",
507
- "type": "address"
508
- },
509
- {
510
- "name": "_payee",
511
- "type": "address"
512
- },
513
- {
514
- "name": "_canPull",
515
- "type": "bool"
516
- },
517
- {
518
- "name": "_periodLength",
519
- "type": "uint256"
520
- },
521
- {
522
- "name": "_maxNumTxsPerPeriod",
523
- "type": "uint256"
524
- },
525
- {
526
- "name": "_txCooldownBlocks",
527
- "type": "uint256"
528
- },
529
- {
530
- "name": "_failOnZeroPrice",
531
- "type": "bool"
532
- },
533
- {
534
- "name": "_primaryAsset",
535
- "type": "address"
536
- },
537
- {
538
- "name": "_onlyPrimaryAsset",
539
- "type": "bool"
540
- },
541
- {
542
- "name": "_unitLimits",
543
- "type": "tuple",
544
- "components": [
545
- {
546
- "name": "perTxCap",
547
- "type": "uint256"
548
- },
549
- {
550
- "name": "perPeriodCap",
551
- "type": "uint256"
552
- },
553
- {
554
- "name": "lifetimeCap",
555
- "type": "uint256"
556
- }
557
- ]
558
- },
559
- {
560
- "name": "_usdLimits",
561
- "type": "tuple",
562
- "components": [
563
- {
564
- "name": "perTxCap",
565
- "type": "uint256"
566
- },
567
- {
568
- "name": "perPeriodCap",
569
- "type": "uint256"
570
- },
571
- {
572
- "name": "lifetimeCap",
573
- "type": "uint256"
574
- }
575
- ]
576
- }
577
- ],
578
- "outputs": [
579
- {
580
- "name": "",
581
- "type": "bool"
582
- }
583
- ]
584
- },
585
- {
586
- "stateMutability": "nonpayable",
587
- "type": "function",
588
- "name": "addPayee",
589
- "inputs": [
590
- {
591
- "name": "_userWallet",
592
- "type": "address"
593
- },
594
- {
595
- "name": "_payee",
596
- "type": "address"
597
- },
598
- {
599
- "name": "_canPull",
600
- "type": "bool"
601
- },
602
- {
603
- "name": "_periodLength",
604
- "type": "uint256"
605
- },
606
- {
607
- "name": "_maxNumTxsPerPeriod",
608
- "type": "uint256"
609
- },
610
- {
611
- "name": "_txCooldownBlocks",
612
- "type": "uint256"
613
- },
614
- {
615
- "name": "_failOnZeroPrice",
616
- "type": "bool"
617
- },
618
- {
619
- "name": "_primaryAsset",
620
- "type": "address"
621
- },
622
- {
623
- "name": "_onlyPrimaryAsset",
624
- "type": "bool"
625
- },
626
- {
627
- "name": "_unitLimits",
628
- "type": "tuple",
629
- "components": [
630
- {
631
- "name": "perTxCap",
632
- "type": "uint256"
633
- },
634
- {
635
- "name": "perPeriodCap",
636
- "type": "uint256"
637
- },
638
- {
639
- "name": "lifetimeCap",
640
- "type": "uint256"
641
- }
642
- ]
643
- },
644
- {
645
- "name": "_usdLimits",
646
- "type": "tuple",
647
- "components": [
648
- {
649
- "name": "perTxCap",
650
- "type": "uint256"
651
- },
652
- {
653
- "name": "perPeriodCap",
654
- "type": "uint256"
655
- },
656
- {
657
- "name": "lifetimeCap",
658
- "type": "uint256"
659
- }
660
- ]
661
- },
662
- {
663
- "name": "_startDelay",
664
- "type": "uint256"
665
- }
666
- ],
667
- "outputs": [
668
- {
669
- "name": "",
670
- "type": "bool"
671
- }
672
- ]
673
- },
674
- {
675
- "stateMutability": "nonpayable",
676
- "type": "function",
677
- "name": "addPayee",
678
- "inputs": [
679
- {
680
- "name": "_userWallet",
681
- "type": "address"
682
- },
683
- {
684
- "name": "_payee",
685
- "type": "address"
686
- },
687
- {
688
- "name": "_canPull",
689
- "type": "bool"
690
- },
691
- {
692
- "name": "_periodLength",
693
- "type": "uint256"
694
- },
695
- {
696
- "name": "_maxNumTxsPerPeriod",
697
- "type": "uint256"
698
- },
699
- {
700
- "name": "_txCooldownBlocks",
701
- "type": "uint256"
702
- },
703
- {
704
- "name": "_failOnZeroPrice",
705
- "type": "bool"
706
- },
707
- {
708
- "name": "_primaryAsset",
709
- "type": "address"
710
- },
711
- {
712
- "name": "_onlyPrimaryAsset",
713
- "type": "bool"
714
- },
715
- {
716
- "name": "_unitLimits",
717
- "type": "tuple",
718
- "components": [
719
- {
720
- "name": "perTxCap",
721
- "type": "uint256"
722
- },
723
- {
724
- "name": "perPeriodCap",
725
- "type": "uint256"
726
- },
727
- {
728
- "name": "lifetimeCap",
729
- "type": "uint256"
730
- }
731
- ]
732
- },
733
- {
734
- "name": "_usdLimits",
735
- "type": "tuple",
736
- "components": [
737
- {
738
- "name": "perTxCap",
739
- "type": "uint256"
740
- },
741
- {
742
- "name": "perPeriodCap",
743
- "type": "uint256"
744
- },
745
- {
746
- "name": "lifetimeCap",
747
- "type": "uint256"
748
- }
749
- ]
750
- },
751
- {
752
- "name": "_startDelay",
753
- "type": "uint256"
754
- },
755
- {
756
- "name": "_activationLength",
757
- "type": "uint256"
758
- }
759
- ],
760
- "outputs": [
761
- {
762
- "name": "",
763
- "type": "bool"
764
- }
765
- ]
766
- },
767
- {
768
- "stateMutability": "nonpayable",
769
- "type": "function",
770
- "name": "updatePayee",
771
- "inputs": [
772
- {
773
- "name": "_userWallet",
774
- "type": "address"
775
- },
776
- {
777
- "name": "_payee",
778
- "type": "address"
779
- },
780
- {
781
- "name": "_canPull",
782
- "type": "bool"
783
- },
784
- {
785
- "name": "_periodLength",
786
- "type": "uint256"
787
- },
788
- {
789
- "name": "_maxNumTxsPerPeriod",
790
- "type": "uint256"
791
- },
792
- {
793
- "name": "_txCooldownBlocks",
794
- "type": "uint256"
795
- },
796
- {
797
- "name": "_failOnZeroPrice",
798
- "type": "bool"
799
- },
800
- {
801
- "name": "_primaryAsset",
802
- "type": "address"
803
- },
804
- {
805
- "name": "_onlyPrimaryAsset",
806
- "type": "bool"
807
- },
808
- {
809
- "name": "_unitLimits",
810
- "type": "tuple",
811
- "components": [
812
- {
813
- "name": "perTxCap",
814
- "type": "uint256"
815
- },
816
- {
817
- "name": "perPeriodCap",
818
- "type": "uint256"
819
- },
820
- {
821
- "name": "lifetimeCap",
822
- "type": "uint256"
823
- }
824
- ]
825
- },
826
- {
827
- "name": "_usdLimits",
828
- "type": "tuple",
829
- "components": [
830
- {
831
- "name": "perTxCap",
832
- "type": "uint256"
833
- },
834
- {
835
- "name": "perPeriodCap",
836
- "type": "uint256"
837
- },
838
- {
839
- "name": "lifetimeCap",
840
- "type": "uint256"
841
- }
842
- ]
843
- }
844
- ],
845
- "outputs": [
846
- {
847
- "name": "",
848
- "type": "bool"
849
- }
850
- ]
851
- },
852
- {
853
- "stateMutability": "nonpayable",
854
- "type": "function",
855
- "name": "removePayee",
856
- "inputs": [
857
- {
858
- "name": "_userWallet",
859
- "type": "address"
860
- },
861
- {
862
- "name": "_payee",
863
- "type": "address"
864
- }
865
- ],
866
- "outputs": [
867
- {
868
- "name": "",
869
- "type": "bool"
870
- }
871
- ]
872
- },
873
- {
874
- "stateMutability": "nonpayable",
875
- "type": "function",
876
- "name": "addPendingPayee",
877
- "inputs": [
878
- {
879
- "name": "_userWallet",
880
- "type": "address"
881
- },
882
- {
883
- "name": "_payee",
884
- "type": "address"
885
- },
886
- {
887
- "name": "_canPull",
888
- "type": "bool"
889
- },
890
- {
891
- "name": "_periodLength",
892
- "type": "uint256"
893
- },
894
- {
895
- "name": "_maxNumTxsPerPeriod",
896
- "type": "uint256"
897
- },
898
- {
899
- "name": "_txCooldownBlocks",
900
- "type": "uint256"
901
- },
902
- {
903
- "name": "_failOnZeroPrice",
904
- "type": "bool"
905
- },
906
- {
907
- "name": "_primaryAsset",
908
- "type": "address"
909
- },
910
- {
911
- "name": "_onlyPrimaryAsset",
912
- "type": "bool"
913
- },
914
- {
915
- "name": "_unitLimits",
916
- "type": "tuple",
917
- "components": [
918
- {
919
- "name": "perTxCap",
920
- "type": "uint256"
921
- },
922
- {
923
- "name": "perPeriodCap",
924
- "type": "uint256"
925
- },
926
- {
927
- "name": "lifetimeCap",
928
- "type": "uint256"
929
- }
930
- ]
931
- },
932
- {
933
- "name": "_usdLimits",
934
- "type": "tuple",
935
- "components": [
936
- {
937
- "name": "perTxCap",
938
- "type": "uint256"
939
- },
940
- {
941
- "name": "perPeriodCap",
942
- "type": "uint256"
943
- },
944
- {
945
- "name": "lifetimeCap",
946
- "type": "uint256"
947
- }
948
- ]
949
- }
950
- ],
951
- "outputs": [
952
- {
953
- "name": "",
954
- "type": "bool"
955
- }
956
- ]
957
- },
958
- {
959
- "stateMutability": "nonpayable",
960
- "type": "function",
961
- "name": "addPendingPayee",
962
- "inputs": [
963
- {
964
- "name": "_userWallet",
965
- "type": "address"
966
- },
967
- {
968
- "name": "_payee",
969
- "type": "address"
970
- },
971
- {
972
- "name": "_canPull",
973
- "type": "bool"
974
- },
975
- {
976
- "name": "_periodLength",
977
- "type": "uint256"
978
- },
979
- {
980
- "name": "_maxNumTxsPerPeriod",
981
- "type": "uint256"
982
- },
983
- {
984
- "name": "_txCooldownBlocks",
985
- "type": "uint256"
986
- },
987
- {
988
- "name": "_failOnZeroPrice",
989
- "type": "bool"
990
- },
991
- {
992
- "name": "_primaryAsset",
993
- "type": "address"
994
- },
995
- {
996
- "name": "_onlyPrimaryAsset",
997
- "type": "bool"
998
- },
999
- {
1000
- "name": "_unitLimits",
1001
- "type": "tuple",
1002
- "components": [
1003
- {
1004
- "name": "perTxCap",
1005
- "type": "uint256"
1006
- },
1007
- {
1008
- "name": "perPeriodCap",
1009
- "type": "uint256"
1010
- },
1011
- {
1012
- "name": "lifetimeCap",
1013
- "type": "uint256"
1014
- }
1015
- ]
1016
- },
1017
- {
1018
- "name": "_usdLimits",
1019
- "type": "tuple",
1020
- "components": [
1021
- {
1022
- "name": "perTxCap",
1023
- "type": "uint256"
1024
- },
1025
- {
1026
- "name": "perPeriodCap",
1027
- "type": "uint256"
1028
- },
1029
- {
1030
- "name": "lifetimeCap",
1031
- "type": "uint256"
1032
- }
1033
- ]
1034
- },
1035
- {
1036
- "name": "_startDelay",
1037
- "type": "uint256"
1038
- }
1039
- ],
1040
- "outputs": [
1041
- {
1042
- "name": "",
1043
- "type": "bool"
1044
- }
1045
- ]
1046
- },
1047
- {
1048
- "stateMutability": "nonpayable",
1049
- "type": "function",
1050
- "name": "addPendingPayee",
1051
- "inputs": [
1052
- {
1053
- "name": "_userWallet",
1054
- "type": "address"
1055
- },
1056
- {
1057
- "name": "_payee",
1058
- "type": "address"
1059
- },
1060
- {
1061
- "name": "_canPull",
1062
- "type": "bool"
1063
- },
1064
- {
1065
- "name": "_periodLength",
1066
- "type": "uint256"
1067
- },
1068
- {
1069
- "name": "_maxNumTxsPerPeriod",
1070
- "type": "uint256"
1071
- },
1072
- {
1073
- "name": "_txCooldownBlocks",
1074
- "type": "uint256"
1075
- },
1076
- {
1077
- "name": "_failOnZeroPrice",
1078
- "type": "bool"
1079
- },
1080
- {
1081
- "name": "_primaryAsset",
1082
- "type": "address"
1083
- },
1084
- {
1085
- "name": "_onlyPrimaryAsset",
1086
- "type": "bool"
1087
- },
1088
- {
1089
- "name": "_unitLimits",
1090
- "type": "tuple",
1091
- "components": [
1092
- {
1093
- "name": "perTxCap",
1094
- "type": "uint256"
1095
- },
1096
- {
1097
- "name": "perPeriodCap",
1098
- "type": "uint256"
1099
- },
1100
- {
1101
- "name": "lifetimeCap",
1102
- "type": "uint256"
1103
- }
1104
- ]
1105
- },
1106
- {
1107
- "name": "_usdLimits",
1108
- "type": "tuple",
1109
- "components": [
1110
- {
1111
- "name": "perTxCap",
1112
- "type": "uint256"
1113
- },
1114
- {
1115
- "name": "perPeriodCap",
1116
- "type": "uint256"
1117
- },
1118
- {
1119
- "name": "lifetimeCap",
1120
- "type": "uint256"
1121
- }
1122
- ]
1123
- },
1124
- {
1125
- "name": "_startDelay",
1126
- "type": "uint256"
1127
- },
1128
- {
1129
- "name": "_activationLength",
1130
- "type": "uint256"
1131
- }
1132
- ],
1133
- "outputs": [
1134
- {
1135
- "name": "",
1136
- "type": "bool"
1137
- }
1138
- ]
1139
- },
1140
- {
1141
- "stateMutability": "nonpayable",
1142
- "type": "function",
1143
- "name": "confirmPendingPayee",
1144
- "inputs": [
1145
- {
1146
- "name": "_userWallet",
1147
- "type": "address"
1148
- },
1149
- {
1150
- "name": "_payee",
1151
- "type": "address"
1152
- }
1153
- ],
1154
- "outputs": [
1155
- {
1156
- "name": "",
1157
- "type": "bool"
1158
- }
1159
- ]
1160
- },
1161
- {
1162
- "stateMutability": "nonpayable",
1163
- "type": "function",
1164
- "name": "cancelPendingPayee",
1165
- "inputs": [
1166
- {
1167
- "name": "_userWallet",
1168
- "type": "address"
1169
- },
1170
- {
1171
- "name": "_payee",
1172
- "type": "address"
1173
- }
1174
- ],
1175
- "outputs": [
1176
- {
1177
- "name": "",
1178
- "type": "bool"
1179
- }
1180
- ]
1181
- },
1182
- {
1183
- "stateMutability": "view",
1184
- "type": "function",
1185
- "name": "isValidNewPayee",
1186
- "inputs": [
1187
- {
1188
- "name": "_userWallet",
1189
- "type": "address"
1190
- },
1191
- {
1192
- "name": "_payee",
1193
- "type": "address"
1194
- },
1195
- {
1196
- "name": "_canPull",
1197
- "type": "bool"
1198
- },
1199
- {
1200
- "name": "_periodLength",
1201
- "type": "uint256"
1202
- },
1203
- {
1204
- "name": "_maxNumTxsPerPeriod",
1205
- "type": "uint256"
1206
- },
1207
- {
1208
- "name": "_txCooldownBlocks",
1209
- "type": "uint256"
1210
- },
1211
- {
1212
- "name": "_failOnZeroPrice",
1213
- "type": "bool"
1214
- },
1215
- {
1216
- "name": "_primaryAsset",
1217
- "type": "address"
1218
- },
1219
- {
1220
- "name": "_onlyPrimaryAsset",
1221
- "type": "bool"
1222
- },
1223
- {
1224
- "name": "_unitLimits",
1225
- "type": "tuple",
1226
- "components": [
1227
- {
1228
- "name": "perTxCap",
1229
- "type": "uint256"
1230
- },
1231
- {
1232
- "name": "perPeriodCap",
1233
- "type": "uint256"
1234
- },
1235
- {
1236
- "name": "lifetimeCap",
1237
- "type": "uint256"
1238
- }
1239
- ]
1240
- },
1241
- {
1242
- "name": "_usdLimits",
1243
- "type": "tuple",
1244
- "components": [
1245
- {
1246
- "name": "perTxCap",
1247
- "type": "uint256"
1248
- },
1249
- {
1250
- "name": "perPeriodCap",
1251
- "type": "uint256"
1252
- },
1253
- {
1254
- "name": "lifetimeCap",
1255
- "type": "uint256"
1256
- }
1257
- ]
1258
- }
1259
- ],
1260
- "outputs": [
1261
- {
1262
- "name": "",
1263
- "type": "bool"
1264
- }
1265
- ]
1266
- },
1267
- {
1268
- "stateMutability": "view",
1269
- "type": "function",
1270
- "name": "isValidNewPayee",
1271
- "inputs": [
1272
- {
1273
- "name": "_userWallet",
1274
- "type": "address"
1275
- },
1276
- {
1277
- "name": "_payee",
1278
- "type": "address"
1279
- },
1280
- {
1281
- "name": "_canPull",
1282
- "type": "bool"
1283
- },
1284
- {
1285
- "name": "_periodLength",
1286
- "type": "uint256"
1287
- },
1288
- {
1289
- "name": "_maxNumTxsPerPeriod",
1290
- "type": "uint256"
1291
- },
1292
- {
1293
- "name": "_txCooldownBlocks",
1294
- "type": "uint256"
1295
- },
1296
- {
1297
- "name": "_failOnZeroPrice",
1298
- "type": "bool"
1299
- },
1300
- {
1301
- "name": "_primaryAsset",
1302
- "type": "address"
1303
- },
1304
- {
1305
- "name": "_onlyPrimaryAsset",
1306
- "type": "bool"
1307
- },
1308
- {
1309
- "name": "_unitLimits",
1310
- "type": "tuple",
1311
- "components": [
1312
- {
1313
- "name": "perTxCap",
1314
- "type": "uint256"
1315
- },
1316
- {
1317
- "name": "perPeriodCap",
1318
- "type": "uint256"
1319
- },
1320
- {
1321
- "name": "lifetimeCap",
1322
- "type": "uint256"
1323
- }
1324
- ]
1325
- },
1326
- {
1327
- "name": "_usdLimits",
1328
- "type": "tuple",
1329
- "components": [
1330
- {
1331
- "name": "perTxCap",
1332
- "type": "uint256"
1333
- },
1334
- {
1335
- "name": "perPeriodCap",
1336
- "type": "uint256"
1337
- },
1338
- {
1339
- "name": "lifetimeCap",
1340
- "type": "uint256"
1341
- }
1342
- ]
1343
- },
1344
- {
1345
- "name": "_startDelay",
1346
- "type": "uint256"
1347
- }
1348
- ],
1349
- "outputs": [
1350
- {
1351
- "name": "",
1352
- "type": "bool"
1353
- }
1354
- ]
1355
- },
1356
- {
1357
- "stateMutability": "view",
1358
- "type": "function",
1359
- "name": "isValidNewPayee",
1360
- "inputs": [
1361
- {
1362
- "name": "_userWallet",
1363
- "type": "address"
1364
- },
1365
- {
1366
- "name": "_payee",
1367
- "type": "address"
1368
- },
1369
- {
1370
- "name": "_canPull",
1371
- "type": "bool"
1372
- },
1373
- {
1374
- "name": "_periodLength",
1375
- "type": "uint256"
1376
- },
1377
- {
1378
- "name": "_maxNumTxsPerPeriod",
1379
- "type": "uint256"
1380
- },
1381
- {
1382
- "name": "_txCooldownBlocks",
1383
- "type": "uint256"
1384
- },
1385
- {
1386
- "name": "_failOnZeroPrice",
1387
- "type": "bool"
1388
- },
1389
- {
1390
- "name": "_primaryAsset",
1391
- "type": "address"
1392
- },
1393
- {
1394
- "name": "_onlyPrimaryAsset",
1395
- "type": "bool"
1396
- },
1397
- {
1398
- "name": "_unitLimits",
1399
- "type": "tuple",
1400
- "components": [
1401
- {
1402
- "name": "perTxCap",
1403
- "type": "uint256"
1404
- },
1405
- {
1406
- "name": "perPeriodCap",
1407
- "type": "uint256"
1408
- },
1409
- {
1410
- "name": "lifetimeCap",
1411
- "type": "uint256"
1412
- }
1413
- ]
1414
- },
1415
- {
1416
- "name": "_usdLimits",
1417
- "type": "tuple",
1418
- "components": [
1419
- {
1420
- "name": "perTxCap",
1421
- "type": "uint256"
1422
- },
1423
- {
1424
- "name": "perPeriodCap",
1425
- "type": "uint256"
1426
- },
1427
- {
1428
- "name": "lifetimeCap",
1429
- "type": "uint256"
1430
- }
1431
- ]
1432
- },
1433
- {
1434
- "name": "_startDelay",
1435
- "type": "uint256"
1436
- },
1437
- {
1438
- "name": "_activationLength",
1439
- "type": "uint256"
1440
- }
1441
- ],
1442
- "outputs": [
1443
- {
1444
- "name": "",
1445
- "type": "bool"
1446
- }
1447
- ]
1448
- },
1449
- {
1450
- "stateMutability": "view",
1451
- "type": "function",
1452
- "name": "isValidPayeeUpdate",
1453
- "inputs": [
1454
- {
1455
- "name": "_userWallet",
1456
- "type": "address"
1457
- },
1458
- {
1459
- "name": "_payee",
1460
- "type": "address"
1461
- },
1462
- {
1463
- "name": "_canPull",
1464
- "type": "bool"
1465
- },
1466
- {
1467
- "name": "_periodLength",
1468
- "type": "uint256"
1469
- },
1470
- {
1471
- "name": "_maxNumTxsPerPeriod",
1472
- "type": "uint256"
1473
- },
1474
- {
1475
- "name": "_txCooldownBlocks",
1476
- "type": "uint256"
1477
- },
1478
- {
1479
- "name": "_failOnZeroPrice",
1480
- "type": "bool"
1481
- },
1482
- {
1483
- "name": "_primaryAsset",
1484
- "type": "address"
1485
- },
1486
- {
1487
- "name": "_onlyPrimaryAsset",
1488
- "type": "bool"
1489
- },
1490
- {
1491
- "name": "_unitLimits",
1492
- "type": "tuple",
1493
- "components": [
1494
- {
1495
- "name": "perTxCap",
1496
- "type": "uint256"
1497
- },
1498
- {
1499
- "name": "perPeriodCap",
1500
- "type": "uint256"
1501
- },
1502
- {
1503
- "name": "lifetimeCap",
1504
- "type": "uint256"
1505
- }
1506
- ]
1507
- },
1508
- {
1509
- "name": "_usdLimits",
1510
- "type": "tuple",
1511
- "components": [
1512
- {
1513
- "name": "perTxCap",
1514
- "type": "uint256"
1515
- },
1516
- {
1517
- "name": "perPeriodCap",
1518
- "type": "uint256"
1519
- },
1520
- {
1521
- "name": "lifetimeCap",
1522
- "type": "uint256"
1523
- }
1524
- ]
1525
- }
1526
- ],
1527
- "outputs": [
1528
- {
1529
- "name": "",
1530
- "type": "bool"
1531
- }
1532
- ]
1533
- },
1534
- {
1535
- "stateMutability": "view",
1536
- "type": "function",
1537
- "name": "canAddPendingPayee",
1538
- "inputs": [
1539
- {
1540
- "name": "_userWallet",
1541
- "type": "address"
1542
- },
1543
- {
1544
- "name": "_payee",
1545
- "type": "address"
1546
- },
1547
- {
1548
- "name": "_caller",
1549
- "type": "address"
1550
- }
1551
- ],
1552
- "outputs": [
1553
- {
1554
- "name": "",
1555
- "type": "bool"
1556
- }
1557
- ]
1558
- },
1559
- {
1560
- "stateMutability": "view",
1561
- "type": "function",
1562
- "name": "isValidGlobalPayeeSettings",
1563
- "inputs": [
1564
- {
1565
- "name": "_userWallet",
1566
- "type": "address"
1567
- },
1568
- {
1569
- "name": "_defaultPeriodLength",
1570
- "type": "uint256"
1571
- },
1572
- {
1573
- "name": "_startDelay",
1574
- "type": "uint256"
1575
- },
1576
- {
1577
- "name": "_activationLength",
1578
- "type": "uint256"
1579
- },
1580
- {
1581
- "name": "_maxNumTxsPerPeriod",
1582
- "type": "uint256"
1583
- },
1584
- {
1585
- "name": "_txCooldownBlocks",
1586
- "type": "uint256"
1587
- },
1588
- {
1589
- "name": "_failOnZeroPrice",
1590
- "type": "bool"
1591
- },
1592
- {
1593
- "name": "_usdLimits",
1594
- "type": "tuple",
1595
- "components": [
1596
- {
1597
- "name": "perTxCap",
1598
- "type": "uint256"
1599
- },
1600
- {
1601
- "name": "perPeriodCap",
1602
- "type": "uint256"
1603
- },
1604
- {
1605
- "name": "lifetimeCap",
1606
- "type": "uint256"
1607
- }
1608
- ]
1609
- },
1610
- {
1611
- "name": "_canPull",
1612
- "type": "bool"
1613
- }
1614
- ],
1615
- "outputs": [
1616
- {
1617
- "name": "",
1618
- "type": "bool"
1619
- }
1620
- ]
1621
- },
1622
- {
1623
- "stateMutability": "view",
1624
- "type": "function",
1625
- "name": "getPayeeConfig",
1626
- "inputs": [
1627
- {
1628
- "name": "_userWallet",
1629
- "type": "address"
1630
- },
1631
- {
1632
- "name": "_payee",
1633
- "type": "address"
1634
- }
1635
- ],
1636
- "outputs": [
1637
- {
1638
- "name": "",
1639
- "type": "tuple",
1640
- "components": [
1641
- {
1642
- "name": "owner",
1643
- "type": "address"
1644
- },
1645
- {
1646
- "name": "wallet",
1647
- "type": "address"
1648
- },
1649
- {
1650
- "name": "isRegisteredPayee",
1651
- "type": "bool"
1652
- },
1653
- {
1654
- "name": "isWhitelisted",
1655
- "type": "bool"
1656
- },
1657
- {
1658
- "name": "isExistingCheque",
1659
- "type": "bool"
1660
- },
1661
- {
1662
- "name": "payeeSettings",
1663
- "type": "tuple",
1664
- "components": [
1665
- {
1666
- "name": "startBlock",
1667
- "type": "uint256"
1668
- },
1669
- {
1670
- "name": "expiryBlock",
1671
- "type": "uint256"
1672
- },
1673
- {
1674
- "name": "canPull",
1675
- "type": "bool"
1676
- },
1677
- {
1678
- "name": "periodLength",
1679
- "type": "uint256"
1680
- },
1681
- {
1682
- "name": "maxNumTxsPerPeriod",
1683
- "type": "uint256"
1684
- },
1685
- {
1686
- "name": "txCooldownBlocks",
1687
- "type": "uint256"
1688
- },
1689
- {
1690
- "name": "failOnZeroPrice",
1691
- "type": "bool"
1692
- },
1693
- {
1694
- "name": "primaryAsset",
1695
- "type": "address"
1696
- },
1697
- {
1698
- "name": "onlyPrimaryAsset",
1699
- "type": "bool"
1700
- },
1701
- {
1702
- "name": "unitLimits",
1703
- "type": "tuple",
1704
- "components": [
1705
- {
1706
- "name": "perTxCap",
1707
- "type": "uint256"
1708
- },
1709
- {
1710
- "name": "perPeriodCap",
1711
- "type": "uint256"
1712
- },
1713
- {
1714
- "name": "lifetimeCap",
1715
- "type": "uint256"
1716
- }
1717
- ]
1718
- },
1719
- {
1720
- "name": "usdLimits",
1721
- "type": "tuple",
1722
- "components": [
1723
- {
1724
- "name": "perTxCap",
1725
- "type": "uint256"
1726
- },
1727
- {
1728
- "name": "perPeriodCap",
1729
- "type": "uint256"
1730
- },
1731
- {
1732
- "name": "lifetimeCap",
1733
- "type": "uint256"
1734
- }
1735
- ]
1736
- }
1737
- ]
1738
- },
1739
- {
1740
- "name": "globalPayeeSettings",
1741
- "type": "tuple",
1742
- "components": [
1743
- {
1744
- "name": "defaultPeriodLength",
1745
- "type": "uint256"
1746
- },
1747
- {
1748
- "name": "startDelay",
1749
- "type": "uint256"
1750
- },
1751
- {
1752
- "name": "activationLength",
1753
- "type": "uint256"
1754
- },
1755
- {
1756
- "name": "maxNumTxsPerPeriod",
1757
- "type": "uint256"
1758
- },
1759
- {
1760
- "name": "txCooldownBlocks",
1761
- "type": "uint256"
1762
- },
1763
- {
1764
- "name": "failOnZeroPrice",
1765
- "type": "bool"
1766
- },
1767
- {
1768
- "name": "usdLimits",
1769
- "type": "tuple",
1770
- "components": [
1771
- {
1772
- "name": "perTxCap",
1773
- "type": "uint256"
1774
- },
1775
- {
1776
- "name": "perPeriodCap",
1777
- "type": "uint256"
1778
- },
1779
- {
1780
- "name": "lifetimeCap",
1781
- "type": "uint256"
1782
- }
1783
- ]
1784
- },
1785
- {
1786
- "name": "canPayOwner",
1787
- "type": "bool"
1788
- },
1789
- {
1790
- "name": "canPull",
1791
- "type": "bool"
1792
- }
1793
- ]
1794
- },
1795
- {
1796
- "name": "timeLock",
1797
- "type": "uint256"
1798
- },
1799
- {
1800
- "name": "walletConfig",
1801
- "type": "address"
1802
- }
1803
- ]
1804
- }
1805
- ]
1806
- },
1807
- {
1808
- "stateMutability": "view",
1809
- "type": "function",
1810
- "name": "createDefaultGlobalPayeeSettings",
1811
- "inputs": [
1812
- {
1813
- "name": "_defaultPeriodLength",
1814
- "type": "uint256"
1815
- },
1816
- {
1817
- "name": "_startDelay",
1818
- "type": "uint256"
1819
- },
1820
- {
1821
- "name": "_activationLength",
1822
- "type": "uint256"
1823
- }
1824
- ],
1825
- "outputs": [
1826
- {
1827
- "name": "",
1828
- "type": "tuple",
1829
- "components": [
1830
- {
1831
- "name": "defaultPeriodLength",
1832
- "type": "uint256"
1833
- },
1834
- {
1835
- "name": "startDelay",
1836
- "type": "uint256"
1837
- },
1838
- {
1839
- "name": "activationLength",
1840
- "type": "uint256"
1841
- },
1842
- {
1843
- "name": "maxNumTxsPerPeriod",
1844
- "type": "uint256"
1845
- },
1846
- {
1847
- "name": "txCooldownBlocks",
1848
- "type": "uint256"
1849
- },
1850
- {
1851
- "name": "failOnZeroPrice",
1852
- "type": "bool"
1853
- },
1854
- {
1855
- "name": "usdLimits",
1856
- "type": "tuple",
1857
- "components": [
1858
- {
1859
- "name": "perTxCap",
1860
- "type": "uint256"
1861
- },
1862
- {
1863
- "name": "perPeriodCap",
1864
- "type": "uint256"
1865
- },
1866
- {
1867
- "name": "lifetimeCap",
1868
- "type": "uint256"
1869
- }
1870
- ]
1871
- },
1872
- {
1873
- "name": "canPayOwner",
1874
- "type": "bool"
1875
- },
1876
- {
1877
- "name": "canPull",
1878
- "type": "bool"
1879
- }
1880
- ]
1881
- }
1882
- ]
1883
- },
1884
- {
1885
- "stateMutability": "view",
1886
- "type": "function",
1887
- "name": "UNDY_HQ",
1888
- "inputs": [],
1889
- "outputs": [
1890
- {
1891
- "name": "",
1892
- "type": "address"
1893
- }
1894
- ]
1895
- },
1896
- {
1897
- "stateMutability": "view",
1898
- "type": "function",
1899
- "name": "MIN_PAYEE_PERIOD",
1900
- "inputs": [],
1901
- "outputs": [
1902
- {
1903
- "name": "",
1904
- "type": "uint256"
1905
- }
1906
- ]
1907
- },
1908
- {
1909
- "stateMutability": "view",
1910
- "type": "function",
1911
- "name": "MAX_PAYEE_PERIOD",
1912
- "inputs": [],
1913
- "outputs": [
1914
- {
1915
- "name": "",
1916
- "type": "uint256"
1917
- }
1918
- ]
1919
- },
1920
- {
1921
- "stateMutability": "view",
1922
- "type": "function",
1923
- "name": "MIN_ACTIVATION_LENGTH",
1924
- "inputs": [],
1925
- "outputs": [
1926
- {
1927
- "name": "",
1928
- "type": "uint256"
1929
- }
1930
- ]
1931
- },
1932
- {
1933
- "stateMutability": "view",
1934
- "type": "function",
1935
- "name": "MAX_ACTIVATION_LENGTH",
1936
- "inputs": [],
1937
- "outputs": [
1938
- {
1939
- "name": "",
1940
- "type": "uint256"
1941
- }
1942
- ]
1943
- },
1944
- {
1945
- "stateMutability": "view",
1946
- "type": "function",
1947
- "name": "MAX_START_DELAY",
1948
- "inputs": [],
1949
- "outputs": [
1950
- {
1951
- "name": "",
1952
- "type": "uint256"
1953
- }
1954
- ]
1955
- },
1956
- {
1957
- "stateMutability": "nonpayable",
1958
- "type": "constructor",
1959
- "inputs": [
1960
- {
1961
- "name": "_undyHq",
1962
- "type": "address"
1963
- },
1964
- {
1965
- "name": "_minPayeePeriod",
1966
- "type": "uint256"
1967
- },
1968
- {
1969
- "name": "_maxPayeePeriod",
1970
- "type": "uint256"
1971
- },
1972
- {
1973
- "name": "_minActivationLength",
1974
- "type": "uint256"
1975
- },
1976
- {
1977
- "name": "_maxActivationLength",
1978
- "type": "uint256"
1979
- },
1980
- {
1981
- "name": "_maxStartDelay",
1982
- "type": "uint256"
1983
- }
1984
- ],
1985
- "outputs": []
1986
- }
1987
- ];
1988
- export const deployAddress = '0xdA73Ea2545b0e7c7Fb32976fEFa70a45D20b8321';
1989
- function getRequest(method, args, contractAddressOrOptions) {
1990
- const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1991
- const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1992
- const call = {
1993
- contractName: 'Paymaster',
1994
- method,
1995
- args,
1996
- address,
1997
- deployAddress,
1998
- defaultValue,
1999
- getAbi: () => abi,
2000
- with: (options) => {
2001
- call.address = options.contractAddress;
2002
- call.defaultValue = options.defaultValue;
2003
- return call;
2004
- },
2005
- defaultTo: (defaultValue) => {
2006
- call.defaultValue = defaultValue;
2007
- return call;
2008
- },
2009
- at: (address) => {
2010
- call.address = address;
2011
- return call;
2012
- },
2013
- };
2014
- return call;
2015
- }
2016
- export const call = {
2017
- isValidNewPayee: (...args) => getRequest('isValidNewPayee', args),
2018
- isValidPayeeUpdate: (...args) => getRequest('isValidPayeeUpdate', args),
2019
- canAddPendingPayee: (...args) => getRequest('canAddPendingPayee', args),
2020
- isValidGlobalPayeeSettings: (...args) => getRequest('isValidGlobalPayeeSettings', args),
2021
- getPayeeConfig: (...args) => getRequest('getPayeeConfig', args),
2022
- createDefaultGlobalPayeeSettings: (...args) => getRequest('createDefaultGlobalPayeeSettings', args),
2023
- UNDY_HQ: (...args) => getRequest('UNDY_HQ', args),
2024
- MIN_PAYEE_PERIOD: (...args) => getRequest('MIN_PAYEE_PERIOD', args),
2025
- MAX_PAYEE_PERIOD: (...args) => getRequest('MAX_PAYEE_PERIOD', args),
2026
- MIN_ACTIVATION_LENGTH: (...args) => getRequest('MIN_ACTIVATION_LENGTH', args),
2027
- MAX_ACTIVATION_LENGTH: (...args) => getRequest('MAX_ACTIVATION_LENGTH', args),
2028
- MAX_START_DELAY: (...args) => getRequest('MAX_START_DELAY', args),
2029
- };
2030
- function getMutation(functionName) {
2031
- return {
2032
- contractName: 'Paymaster',
2033
- functionName,
2034
- deployAddress,
2035
- argsType: undefined,
2036
- getAbi: () => abi,
2037
- };
2038
- }
2039
- export const mutation = {
2040
- setGlobalPayeeSettings: getMutation('setGlobalPayeeSettings'),
2041
- addPayee: getMutation('addPayee'),
2042
- updatePayee: getMutation('updatePayee'),
2043
- removePayee: getMutation('removePayee'),
2044
- addPendingPayee: getMutation('addPendingPayee'),
2045
- confirmPendingPayee: getMutation('confirmPendingPayee'),
2046
- cancelPendingPayee: getMutation('cancelPendingPayee'),
2047
- };
2048
- export function parseEvents(eventName, events) {
2049
- return events.map((event) => {
2050
- return {
2051
- event,
2052
- parsed: parseEventLogs({
2053
- abi,
2054
- eventName,
2055
- logs: [event],
2056
- }),
2057
- };
2058
- });
2059
- }
2060
- export function getEventTopic(eventName) {
2061
- return encodeEventTopics({ abi, eventName })[0];
2062
- }
2063
- export function toSdk(publicClient, walletClient, addressResolver) {
2064
- return {
2065
- deployAddress,
2066
- abi,
2067
- events: {
2068
- PayeeAdded: { topic: getEventTopic('PayeeAdded'), parse: (events) => parseEvents('PayeeAdded', events) },
2069
- PayeeUpdated: { topic: getEventTopic('PayeeUpdated'), parse: (events) => parseEvents('PayeeUpdated', events) },
2070
- PayeeRemoved: { topic: getEventTopic('PayeeRemoved'), parse: (events) => parseEvents('PayeeRemoved', events) },
2071
- GlobalPayeeSettingsModified: { topic: getEventTopic('GlobalPayeeSettingsModified'), parse: (events) => parseEvents('GlobalPayeeSettingsModified', events) },
2072
- PayeePending: { topic: getEventTopic('PayeePending'), parse: (events) => parseEvents('PayeePending', events) },
2073
- PayeePendingConfirmed: { topic: getEventTopic('PayeePendingConfirmed'), parse: (events) => parseEvents('PayeePendingConfirmed', events) },
2074
- PayeePendingCancelled: { topic: getEventTopic('PayeePendingCancelled'), parse: (events) => parseEvents('PayeePendingCancelled', events) },
2075
- },
2076
- // Queries
2077
- isValidNewPayee: (...args) => singleQuery(publicClient, call.isValidNewPayee(...args), {}, addressResolver),
2078
- isValidPayeeUpdate: (...args) => singleQuery(publicClient, call.isValidPayeeUpdate(...args), {}, addressResolver),
2079
- canAddPendingPayee: (...args) => singleQuery(publicClient, call.canAddPendingPayee(...args), {}, addressResolver),
2080
- isValidGlobalPayeeSettings: (...args) => singleQuery(publicClient, call.isValidGlobalPayeeSettings(...args), {}, addressResolver),
2081
- getPayeeConfig: (...args) => singleQuery(publicClient, call.getPayeeConfig(...args), {}, addressResolver),
2082
- createDefaultGlobalPayeeSettings: (...args) => singleQuery(publicClient, call.createDefaultGlobalPayeeSettings(...args), {}, addressResolver),
2083
- UNDY_HQ: (...args) => singleQuery(publicClient, call.UNDY_HQ(...args), {}, addressResolver),
2084
- MIN_PAYEE_PERIOD: (...args) => singleQuery(publicClient, call.MIN_PAYEE_PERIOD(...args), {}, addressResolver),
2085
- MAX_PAYEE_PERIOD: (...args) => singleQuery(publicClient, call.MAX_PAYEE_PERIOD(...args), {}, addressResolver),
2086
- MIN_ACTIVATION_LENGTH: (...args) => singleQuery(publicClient, call.MIN_ACTIVATION_LENGTH(...args), {}, addressResolver),
2087
- MAX_ACTIVATION_LENGTH: (...args) => singleQuery(publicClient, call.MAX_ACTIVATION_LENGTH(...args), {}, addressResolver),
2088
- MAX_START_DELAY: (...args) => singleQuery(publicClient, call.MAX_START_DELAY(...args), {}, addressResolver),
2089
- // Mutations
2090
- setGlobalPayeeSettings: (...args) => mutate(walletClient, mutation.setGlobalPayeeSettings, { addressResolver })(...args),
2091
- addPayee: (...args) => mutate(walletClient, mutation.addPayee, { addressResolver })(...args),
2092
- updatePayee: (...args) => mutate(walletClient, mutation.updatePayee, { addressResolver })(...args),
2093
- removePayee: (...args) => mutate(walletClient, mutation.removePayee, { addressResolver })(...args),
2094
- addPendingPayee: (...args) => mutate(walletClient, mutation.addPendingPayee, { addressResolver })(...args),
2095
- confirmPendingPayee: (...args) => mutate(walletClient, mutation.confirmPendingPayee, { addressResolver })(...args),
2096
- cancelPendingPayee: (...args) => mutate(walletClient, mutation.cancelPendingPayee, { addressResolver })(...args),
2097
- };
2098
- }