@underscore-finance/sdk 0.3.5 → 1.0.1

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