@zoralabs/limit-orders 0.2.0

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 (208) hide show
  1. package/.turbo/turbo-build$colon$js.log +85 -0
  2. package/AUDIT_NOTES.md +33 -0
  3. package/AUDIT_RFP.md +408 -0
  4. package/CHANGELOG.md +25 -0
  5. package/GAS_COMPARISON_RESULTS.md +194 -0
  6. package/LICENSE +21 -0
  7. package/README.md +650 -0
  8. package/SPEC.md +291 -0
  9. package/abis/BalanceDeltaLibrary.json +15 -0
  10. package/abis/BeforeSwapDeltaLibrary.json +15 -0
  11. package/abis/CurrencyLibrary.json +25 -0
  12. package/abis/CustomRevert.json +28 -0
  13. package/abis/IAllowanceTransfer.json +486 -0
  14. package/abis/IAuthority.json +31 -0
  15. package/abis/ICoin.json +1074 -0
  16. package/abis/IDeployedCoinVersionLookup.json +21 -0
  17. package/abis/IDopplerErrors.json +44 -0
  18. package/abis/IEIP712.json +15 -0
  19. package/abis/IERC1363.json +373 -0
  20. package/abis/IERC165.json +21 -0
  21. package/abis/IERC20.json +185 -0
  22. package/abis/IERC20Minimal.json +172 -0
  23. package/abis/IERC6909Claims.json +288 -0
  24. package/abis/IERC7572.json +21 -0
  25. package/abis/IExtsload.json +64 -0
  26. package/abis/IExttload.json +40 -0
  27. package/abis/IHasCoinType.json +15 -0
  28. package/abis/IHasPoolKey.json +42 -0
  29. package/abis/IHasRewardsRecipients.json +54 -0
  30. package/abis/IHasSwapPath.json +60 -0
  31. package/abis/IHasTotalSupplyForPositions.json +15 -0
  32. package/abis/IHooks.json +789 -0
  33. package/abis/IMsgSender.json +15 -0
  34. package/abis/IPoolManager.json +1286 -0
  35. package/abis/IProtocolFees.json +174 -0
  36. package/abis/ISupportsLimitOrderFill.json +15 -0
  37. package/abis/ISwapPathRouter.json +92 -0
  38. package/abis/ISwapRouter.json +219 -0
  39. package/abis/IUniswapV3SwapCallback.json +25 -0
  40. package/abis/IUpgradeableDestinationV4Hook.json +84 -0
  41. package/abis/IUpgradeableDestinationV4HookWithUpdateableFee.json +95 -0
  42. package/abis/IUpgradeableV4Hook.json +112 -0
  43. package/abis/IZoraHookRegistry.json +188 -0
  44. package/abis/IZoraLimitOrderBook.json +623 -0
  45. package/abis/IZoraLimitOrderBookCoinsInterface.json +67 -0
  46. package/abis/IZoraV4CoinHook.json +610 -0
  47. package/abis/Permit2Payments.json +7 -0
  48. package/abis/Position.json +7 -0
  49. package/abis/SafeCast.json +7 -0
  50. package/abis/SafeCast160.json +7 -0
  51. package/abis/SafeERC20.json +34 -0
  52. package/abis/SimpleAccessManaged.json +57 -0
  53. package/abis/SimpleAccessManager.json +351 -0
  54. package/abis/SqrtPriceMath.json +22 -0
  55. package/abis/StateLibrary.json +80 -0
  56. package/abis/SwapLimitOrders.json +22 -0
  57. package/abis/SwapWithLimitOrders.json +457 -0
  58. package/abis/TickBitmap.json +18 -0
  59. package/abis/TickMath.json +24 -0
  60. package/abis/V3ToV4SwapLib.json +28 -0
  61. package/abis/ZoraLimitOrderBook.json +771 -0
  62. package/cache/solidity-files-cache.json +1 -0
  63. package/dist/index.cjs +760 -0
  64. package/dist/index.cjs.map +1 -0
  65. package/dist/index.d.ts +2 -0
  66. package/dist/index.d.ts.map +1 -0
  67. package/dist/index.js +731 -0
  68. package/dist/index.js.map +1 -0
  69. package/dist/wagmiGenerated.d.ts +1012 -0
  70. package/dist/wagmiGenerated.d.ts.map +1 -0
  71. package/foundry.toml +29 -0
  72. package/gas_comparison.py +49 -0
  73. package/out/BalanceDelta.sol/BalanceDeltaLibrary.json +1 -0
  74. package/out/BeforeSwapDelta.sol/BeforeSwapDeltaLibrary.json +1 -0
  75. package/out/BitMath.sol/BitMath.json +1 -0
  76. package/out/BytesLib.sol/BytesLib.json +1 -0
  77. package/out/CoinCommon.sol/CoinCommon.json +1 -0
  78. package/out/CoinConfigurationVersions.sol/CoinConfigurationVersions.json +1 -0
  79. package/out/CoinConstants.sol/CoinConstants.json +1 -0
  80. package/out/Context.sol/Context.json +1 -0
  81. package/out/Currency.sol/CurrencyLibrary.json +1 -0
  82. package/out/CurrencyReserves.sol/CurrencyReserves.json +1 -0
  83. package/out/CustomRevert.sol/CustomRevert.json +1 -0
  84. package/out/DopplerMath.sol/DopplerMath.json +1 -0
  85. package/out/FixedPoint128.sol/FixedPoint128.json +1 -0
  86. package/out/FixedPoint96.sol/FixedPoint96.json +1 -0
  87. package/out/FullMath.sol/FullMath.json +1 -0
  88. package/out/IAllowanceTransfer.sol/IAllowanceTransfer.json +1 -0
  89. package/out/IAuthority.sol/IAuthority.json +1 -0
  90. package/out/ICoin.sol/ICoin.json +1 -0
  91. package/out/ICoin.sol/IHasCoinType.json +1 -0
  92. package/out/ICoin.sol/IHasPoolKey.json +1 -0
  93. package/out/ICoin.sol/IHasSwapPath.json +1 -0
  94. package/out/ICoin.sol/IHasTotalSupplyForPositions.json +1 -0
  95. package/out/IDeployedCoinVersionLookup.sol/IDeployedCoinVersionLookup.json +1 -0
  96. package/out/IDopplerErrors.sol/IDopplerErrors.json +1 -0
  97. package/out/IEIP712.sol/IEIP712.json +1 -0
  98. package/out/IERC1363.sol/IERC1363.json +1 -0
  99. package/out/IERC165.sol/IERC165.json +1 -0
  100. package/out/IERC20.sol/IERC20.json +1 -0
  101. package/out/IERC20Minimal.sol/IERC20Minimal.json +1 -0
  102. package/out/IERC6909Claims.sol/IERC6909Claims.json +1 -0
  103. package/out/IERC7572.sol/IERC7572.json +1 -0
  104. package/out/IExtsload.sol/IExtsload.json +1 -0
  105. package/out/IExttload.sol/IExttload.json +1 -0
  106. package/out/IHasRewardsRecipients.sol/IHasRewardsRecipients.json +1 -0
  107. package/out/IHooks.sol/IHooks.json +1 -0
  108. package/out/IMsgSender.sol/IMsgSender.json +1 -0
  109. package/out/IPoolManager.sol/IPoolManager.json +1 -0
  110. package/out/IProtocolFees.sol/IProtocolFees.json +1 -0
  111. package/out/ISupportsLimitOrderFill.sol/ISupportsLimitOrderFill.json +1 -0
  112. package/out/ISwapPathRouter.sol/ISwapPathRouter.json +1 -0
  113. package/out/ISwapRouter.sol/ISwapRouter.json +1 -0
  114. package/out/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json +1 -0
  115. package/out/IUpgradeableV4Hook.sol/IUpgradeableDestinationV4Hook.json +1 -0
  116. package/out/IUpgradeableV4Hook.sol/IUpgradeableDestinationV4HookWithUpdateableFee.json +1 -0
  117. package/out/IUpgradeableV4Hook.sol/IUpgradeableV4Hook.json +1 -0
  118. package/out/IZoraHookRegistry.sol/IZoraHookRegistry.json +1 -0
  119. package/out/IZoraLimitOrderBook.sol/IZoraLimitOrderBook.json +1 -0
  120. package/out/IZoraLimitOrderBookCoinsInterface.sol/IZoraLimitOrderBookCoinsInterface.json +1 -0
  121. package/out/IZoraV4CoinHook.sol/IZoraV4CoinHook.json +1 -0
  122. package/out/LimitOrderBitmap.sol/LimitOrderBitmap.json +1 -0
  123. package/out/LimitOrderCommon.sol/LimitOrderCommon.json +1 -0
  124. package/out/LimitOrderCreate.sol/LimitOrderCreate.json +1 -0
  125. package/out/LimitOrderFill.sol/LimitOrderFill.json +1 -0
  126. package/out/LimitOrderLiquidity.sol/LimitOrderLiquidity.json +1 -0
  127. package/out/LimitOrderQueues.sol/LimitOrderQueues.json +1 -0
  128. package/out/LimitOrderStorage.sol/LimitOrderStorage.json +1 -0
  129. package/out/LimitOrderTypes.sol/LimitOrderTypes.json +1 -0
  130. package/out/LimitOrderWithdraw.sol/LimitOrderWithdraw.json +1 -0
  131. package/out/LiquidityAmounts.sol/LiquidityAmounts.json +1 -0
  132. package/out/LiquidityMath.sol/LiquidityMath.json +1 -0
  133. package/out/Lock.sol/Lock.json +1 -0
  134. package/out/NonzeroDeltaCount.sol/NonzeroDeltaCount.json +1 -0
  135. package/out/Path.sol/Path.json +1 -0
  136. package/out/PathKey.sol/PathKeyLibrary.json +1 -0
  137. package/out/Permit2Payments.sol/Permit2Payments.json +1 -0
  138. package/out/PoolId.sol/PoolIdLibrary.json +1 -0
  139. package/out/Position.sol/Position.json +1 -0
  140. package/out/SafeCast.sol/SafeCast.json +1 -0
  141. package/out/SafeCast160.sol/SafeCast160.json +1 -0
  142. package/out/SafeERC20.sol/SafeERC20.json +1 -0
  143. package/out/SimpleAccessManaged.sol/SimpleAccessManaged.json +1 -0
  144. package/out/SimpleAccessManager.sol/SimpleAccessManager.json +1 -0
  145. package/out/SqrtPriceMath.sol/SqrtPriceMath.json +1 -0
  146. package/out/StateLibrary.sol/StateLibrary.json +1 -0
  147. package/out/SwapLimitOrders.sol/SwapLimitOrders.json +1 -0
  148. package/out/SwapWithLimitOrders.sol/SwapWithLimitOrders.json +1 -0
  149. package/out/TickBitmap.sol/TickBitmap.json +1 -0
  150. package/out/TickMath.sol/TickMath.json +1 -0
  151. package/out/TransientSlot.sol/TransientSlot.json +1 -0
  152. package/out/TransientStateLibrary.sol/TransientStateLibrary.json +1 -0
  153. package/out/UniV4SwapToCurrency.sol/UniV4SwapToCurrency.json +1 -0
  154. package/out/UnsafeMath.sol/UnsafeMath.json +1 -0
  155. package/out/V3ToV4SwapLib.sol/V3ToV4SwapLib.json +1 -0
  156. package/out/ZoraLimitOrderBook.sol/ZoraLimitOrderBook.json +1 -0
  157. package/out/build-info/69718f10d1dc37f0.json +1 -0
  158. package/out/uniswap/BitMath.sol/BitMath.json +1 -0
  159. package/out/uniswap/CustomRevert.sol/CustomRevert.json +1 -0
  160. package/out/uniswap/FullMath.sol/FullMath.json +1 -0
  161. package/out/uniswap/SafeCast.sol/SafeCast.json +1 -0
  162. package/out/uniswap/TickMath.sol/TickMath.json +1 -0
  163. package/package/index.ts +1 -0
  164. package/package/wagmiGenerated.ts +738 -0
  165. package/package.json +57 -0
  166. package/remappings.txt +11 -0
  167. package/src/IZoraLimitOrderBook.sol +195 -0
  168. package/src/ZoraLimitOrderBook.sol +220 -0
  169. package/src/access/SimpleAccessManaged.sol +76 -0
  170. package/src/access/SimpleAccessManager.sol +268 -0
  171. package/src/libs/LimitOrderBitmap.sol +84 -0
  172. package/src/libs/LimitOrderCommon.sol +91 -0
  173. package/src/libs/LimitOrderCreate.sol +277 -0
  174. package/src/libs/LimitOrderFill.sol +362 -0
  175. package/src/libs/LimitOrderLiquidity.sol +222 -0
  176. package/src/libs/LimitOrderQueues.sol +101 -0
  177. package/src/libs/LimitOrderStorage.sol +34 -0
  178. package/src/libs/LimitOrderTypes.sol +41 -0
  179. package/src/libs/LimitOrderWithdraw.sol +100 -0
  180. package/src/libs/Permit2Payments.sol +41 -0
  181. package/src/libs/SwapLimitOrders.sol +209 -0
  182. package/src/router/SwapWithLimitOrders.sol +454 -0
  183. package/test/LimitOrderAccessControl.t.sol +461 -0
  184. package/test/LimitOrderBitmap.t.sol +194 -0
  185. package/test/LimitOrderCreate.t.sol +348 -0
  186. package/test/LimitOrderFill.t.sol +1005 -0
  187. package/test/LimitOrderLibraries.t.sol +354 -0
  188. package/test/LimitOrderLiquidityPayouts.t.sol +333 -0
  189. package/test/LimitOrderV4Pools.t.sol +157 -0
  190. package/test/LimitOrderWithdraw.t.sol +653 -0
  191. package/test/SimpleAccessManager.t.sol +420 -0
  192. package/test/SwapWithLimitOrders.t.sol +107 -0
  193. package/test/SwapWithLimitOrdersRouter.t.sol +1073 -0
  194. package/test/gas/LimitOrderFillGas.t.sol +1008 -0
  195. package/test/gas/LimitOrderSwapGas.t.sol +403 -0
  196. package/test/gas/logs/gas_benchmarks_fill_20251201.log +30 -0
  197. package/test/gas/logs/gas_benchmarks_swap_20251201.log +27 -0
  198. package/test/unit/LimitOrderBitmapUnit.t.sol +276 -0
  199. package/test/unit/LimitOrderCreateUnit.t.sol +358 -0
  200. package/test/unit/SwapLimitOrdersUnit.t.sol +672 -0
  201. package/test/unit/SwapLimitOrdersValidation.t.sol +423 -0
  202. package/test/unit/SwapWithLimitOrdersUnit.t.sol +321 -0
  203. package/test/utils/BaseTest.sol +793 -0
  204. package/test/utils/TestableZoraLimitOrderBook.sol +54 -0
  205. package/tsconfig.build.json +10 -0
  206. package/tsconfig.json +9 -0
  207. package/tsup.config.ts +11 -0
  208. package/wagmi.config.ts +18 -0
@@ -0,0 +1,1074 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "airlock",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "address",
10
+ "internalType": "address"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
14
+ },
15
+ {
16
+ "type": "function",
17
+ "name": "burn",
18
+ "inputs": [
19
+ {
20
+ "name": "amount",
21
+ "type": "uint256",
22
+ "internalType": "uint256"
23
+ }
24
+ ],
25
+ "outputs": [],
26
+ "stateMutability": "nonpayable"
27
+ },
28
+ {
29
+ "type": "function",
30
+ "name": "coinType",
31
+ "inputs": [],
32
+ "outputs": [
33
+ {
34
+ "name": "",
35
+ "type": "uint8",
36
+ "internalType": "enum IHasCoinType.CoinType"
37
+ }
38
+ ],
39
+ "stateMutability": "view"
40
+ },
41
+ {
42
+ "type": "function",
43
+ "name": "contractURI",
44
+ "inputs": [],
45
+ "outputs": [
46
+ {
47
+ "name": "",
48
+ "type": "string",
49
+ "internalType": "string"
50
+ }
51
+ ],
52
+ "stateMutability": "view"
53
+ },
54
+ {
55
+ "type": "function",
56
+ "name": "currency",
57
+ "inputs": [],
58
+ "outputs": [
59
+ {
60
+ "name": "",
61
+ "type": "address",
62
+ "internalType": "address"
63
+ }
64
+ ],
65
+ "stateMutability": "view"
66
+ },
67
+ {
68
+ "type": "function",
69
+ "name": "dopplerFeeRecipient",
70
+ "inputs": [],
71
+ "outputs": [
72
+ {
73
+ "name": "",
74
+ "type": "address",
75
+ "internalType": "address"
76
+ }
77
+ ],
78
+ "stateMutability": "view"
79
+ },
80
+ {
81
+ "type": "function",
82
+ "name": "getPayoutSwapPath",
83
+ "inputs": [
84
+ {
85
+ "name": "coinVersionLookup",
86
+ "type": "address",
87
+ "internalType": "contract IDeployedCoinVersionLookup"
88
+ }
89
+ ],
90
+ "outputs": [
91
+ {
92
+ "name": "",
93
+ "type": "tuple",
94
+ "internalType": "struct IHasSwapPath.PayoutSwapPath",
95
+ "components": [
96
+ {
97
+ "name": "path",
98
+ "type": "tuple[]",
99
+ "internalType": "struct PathKey[]",
100
+ "components": [
101
+ {
102
+ "name": "intermediateCurrency",
103
+ "type": "address",
104
+ "internalType": "Currency"
105
+ },
106
+ {
107
+ "name": "fee",
108
+ "type": "uint24",
109
+ "internalType": "uint24"
110
+ },
111
+ {
112
+ "name": "tickSpacing",
113
+ "type": "int24",
114
+ "internalType": "int24"
115
+ },
116
+ {
117
+ "name": "hooks",
118
+ "type": "address",
119
+ "internalType": "contract IHooks"
120
+ },
121
+ {
122
+ "name": "hookData",
123
+ "type": "bytes",
124
+ "internalType": "bytes"
125
+ }
126
+ ]
127
+ },
128
+ {
129
+ "name": "currencyIn",
130
+ "type": "address",
131
+ "internalType": "Currency"
132
+ }
133
+ ]
134
+ }
135
+ ],
136
+ "stateMutability": "view"
137
+ },
138
+ {
139
+ "type": "function",
140
+ "name": "getPoolConfiguration",
141
+ "inputs": [],
142
+ "outputs": [
143
+ {
144
+ "name": "",
145
+ "type": "tuple",
146
+ "internalType": "struct PoolConfiguration",
147
+ "components": [
148
+ {
149
+ "name": "version",
150
+ "type": "uint8",
151
+ "internalType": "uint8"
152
+ },
153
+ {
154
+ "name": "numPositions",
155
+ "type": "uint16",
156
+ "internalType": "uint16"
157
+ },
158
+ {
159
+ "name": "fee",
160
+ "type": "uint24",
161
+ "internalType": "uint24"
162
+ },
163
+ {
164
+ "name": "tickSpacing",
165
+ "type": "int24",
166
+ "internalType": "int24"
167
+ },
168
+ {
169
+ "name": "numDiscoveryPositions",
170
+ "type": "uint16[]",
171
+ "internalType": "uint16[]"
172
+ },
173
+ {
174
+ "name": "tickLower",
175
+ "type": "int24[]",
176
+ "internalType": "int24[]"
177
+ },
178
+ {
179
+ "name": "tickUpper",
180
+ "type": "int24[]",
181
+ "internalType": "int24[]"
182
+ },
183
+ {
184
+ "name": "maxDiscoverySupplyShare",
185
+ "type": "uint256[]",
186
+ "internalType": "uint256[]"
187
+ }
188
+ ]
189
+ }
190
+ ],
191
+ "stateMutability": "view"
192
+ },
193
+ {
194
+ "type": "function",
195
+ "name": "getPoolKey",
196
+ "inputs": [],
197
+ "outputs": [
198
+ {
199
+ "name": "",
200
+ "type": "tuple",
201
+ "internalType": "struct PoolKey",
202
+ "components": [
203
+ {
204
+ "name": "currency0",
205
+ "type": "address",
206
+ "internalType": "Currency"
207
+ },
208
+ {
209
+ "name": "currency1",
210
+ "type": "address",
211
+ "internalType": "Currency"
212
+ },
213
+ {
214
+ "name": "fee",
215
+ "type": "uint24",
216
+ "internalType": "uint24"
217
+ },
218
+ {
219
+ "name": "tickSpacing",
220
+ "type": "int24",
221
+ "internalType": "int24"
222
+ },
223
+ {
224
+ "name": "hooks",
225
+ "type": "address",
226
+ "internalType": "contract IHooks"
227
+ }
228
+ ]
229
+ }
230
+ ],
231
+ "stateMutability": "view"
232
+ },
233
+ {
234
+ "type": "function",
235
+ "name": "hooks",
236
+ "inputs": [],
237
+ "outputs": [
238
+ {
239
+ "name": "",
240
+ "type": "address",
241
+ "internalType": "contract IHooks"
242
+ }
243
+ ],
244
+ "stateMutability": "view"
245
+ },
246
+ {
247
+ "type": "function",
248
+ "name": "initialize",
249
+ "inputs": [
250
+ {
251
+ "name": "payoutRecipient_",
252
+ "type": "address",
253
+ "internalType": "address"
254
+ },
255
+ {
256
+ "name": "owners_",
257
+ "type": "address[]",
258
+ "internalType": "address[]"
259
+ },
260
+ {
261
+ "name": "tokenURI_",
262
+ "type": "string",
263
+ "internalType": "string"
264
+ },
265
+ {
266
+ "name": "name_",
267
+ "type": "string",
268
+ "internalType": "string"
269
+ },
270
+ {
271
+ "name": "symbol_",
272
+ "type": "string",
273
+ "internalType": "string"
274
+ },
275
+ {
276
+ "name": "platformReferrer_",
277
+ "type": "address",
278
+ "internalType": "address"
279
+ },
280
+ {
281
+ "name": "currency_",
282
+ "type": "address",
283
+ "internalType": "address"
284
+ },
285
+ {
286
+ "name": "poolKey_",
287
+ "type": "tuple",
288
+ "internalType": "struct PoolKey",
289
+ "components": [
290
+ {
291
+ "name": "currency0",
292
+ "type": "address",
293
+ "internalType": "Currency"
294
+ },
295
+ {
296
+ "name": "currency1",
297
+ "type": "address",
298
+ "internalType": "Currency"
299
+ },
300
+ {
301
+ "name": "fee",
302
+ "type": "uint24",
303
+ "internalType": "uint24"
304
+ },
305
+ {
306
+ "name": "tickSpacing",
307
+ "type": "int24",
308
+ "internalType": "int24"
309
+ },
310
+ {
311
+ "name": "hooks",
312
+ "type": "address",
313
+ "internalType": "contract IHooks"
314
+ }
315
+ ]
316
+ },
317
+ {
318
+ "name": "sqrtPriceX96",
319
+ "type": "uint160",
320
+ "internalType": "uint160"
321
+ },
322
+ {
323
+ "name": "poolConfiguration_",
324
+ "type": "tuple",
325
+ "internalType": "struct PoolConfiguration",
326
+ "components": [
327
+ {
328
+ "name": "version",
329
+ "type": "uint8",
330
+ "internalType": "uint8"
331
+ },
332
+ {
333
+ "name": "numPositions",
334
+ "type": "uint16",
335
+ "internalType": "uint16"
336
+ },
337
+ {
338
+ "name": "fee",
339
+ "type": "uint24",
340
+ "internalType": "uint24"
341
+ },
342
+ {
343
+ "name": "tickSpacing",
344
+ "type": "int24",
345
+ "internalType": "int24"
346
+ },
347
+ {
348
+ "name": "numDiscoveryPositions",
349
+ "type": "uint16[]",
350
+ "internalType": "uint16[]"
351
+ },
352
+ {
353
+ "name": "tickLower",
354
+ "type": "int24[]",
355
+ "internalType": "int24[]"
356
+ },
357
+ {
358
+ "name": "tickUpper",
359
+ "type": "int24[]",
360
+ "internalType": "int24[]"
361
+ },
362
+ {
363
+ "name": "maxDiscoverySupplyShare",
364
+ "type": "uint256[]",
365
+ "internalType": "uint256[]"
366
+ }
367
+ ]
368
+ }
369
+ ],
370
+ "outputs": [],
371
+ "stateMutability": "nonpayable"
372
+ },
373
+ {
374
+ "type": "function",
375
+ "name": "payoutRecipient",
376
+ "inputs": [],
377
+ "outputs": [
378
+ {
379
+ "name": "",
380
+ "type": "address",
381
+ "internalType": "address"
382
+ }
383
+ ],
384
+ "stateMutability": "view"
385
+ },
386
+ {
387
+ "type": "function",
388
+ "name": "platformReferrer",
389
+ "inputs": [],
390
+ "outputs": [
391
+ {
392
+ "name": "",
393
+ "type": "address",
394
+ "internalType": "address"
395
+ }
396
+ ],
397
+ "stateMutability": "view"
398
+ },
399
+ {
400
+ "type": "function",
401
+ "name": "protocolRewardRecipient",
402
+ "inputs": [],
403
+ "outputs": [
404
+ {
405
+ "name": "",
406
+ "type": "address",
407
+ "internalType": "address"
408
+ }
409
+ ],
410
+ "stateMutability": "view"
411
+ },
412
+ {
413
+ "type": "function",
414
+ "name": "setNameAndSymbol",
415
+ "inputs": [
416
+ {
417
+ "name": "newName",
418
+ "type": "string",
419
+ "internalType": "string"
420
+ },
421
+ {
422
+ "name": "newSymbol",
423
+ "type": "string",
424
+ "internalType": "string"
425
+ }
426
+ ],
427
+ "outputs": [],
428
+ "stateMutability": "nonpayable"
429
+ },
430
+ {
431
+ "type": "function",
432
+ "name": "supportsInterface",
433
+ "inputs": [
434
+ {
435
+ "name": "interfaceId",
436
+ "type": "bytes4",
437
+ "internalType": "bytes4"
438
+ }
439
+ ],
440
+ "outputs": [
441
+ {
442
+ "name": "",
443
+ "type": "bool",
444
+ "internalType": "bool"
445
+ }
446
+ ],
447
+ "stateMutability": "view"
448
+ },
449
+ {
450
+ "type": "function",
451
+ "name": "tokenURI",
452
+ "inputs": [],
453
+ "outputs": [
454
+ {
455
+ "name": "",
456
+ "type": "string",
457
+ "internalType": "string"
458
+ }
459
+ ],
460
+ "stateMutability": "view"
461
+ },
462
+ {
463
+ "type": "function",
464
+ "name": "totalSupplyForPositions",
465
+ "inputs": [],
466
+ "outputs": [
467
+ {
468
+ "name": "",
469
+ "type": "uint256",
470
+ "internalType": "uint256"
471
+ }
472
+ ],
473
+ "stateMutability": "view"
474
+ },
475
+ {
476
+ "type": "event",
477
+ "name": "CoinBuy",
478
+ "inputs": [
479
+ {
480
+ "name": "buyer",
481
+ "type": "address",
482
+ "indexed": true,
483
+ "internalType": "address"
484
+ },
485
+ {
486
+ "name": "recipient",
487
+ "type": "address",
488
+ "indexed": true,
489
+ "internalType": "address"
490
+ },
491
+ {
492
+ "name": "tradeReferrer",
493
+ "type": "address",
494
+ "indexed": true,
495
+ "internalType": "address"
496
+ },
497
+ {
498
+ "name": "coinsPurchased",
499
+ "type": "uint256",
500
+ "indexed": false,
501
+ "internalType": "uint256"
502
+ },
503
+ {
504
+ "name": "currency",
505
+ "type": "address",
506
+ "indexed": false,
507
+ "internalType": "address"
508
+ },
509
+ {
510
+ "name": "amountFee",
511
+ "type": "uint256",
512
+ "indexed": false,
513
+ "internalType": "uint256"
514
+ },
515
+ {
516
+ "name": "amountSold",
517
+ "type": "uint256",
518
+ "indexed": false,
519
+ "internalType": "uint256"
520
+ }
521
+ ],
522
+ "anonymous": false
523
+ },
524
+ {
525
+ "type": "event",
526
+ "name": "CoinMarketRewards",
527
+ "inputs": [
528
+ {
529
+ "name": "payoutRecipient",
530
+ "type": "address",
531
+ "indexed": true,
532
+ "internalType": "address"
533
+ },
534
+ {
535
+ "name": "platformReferrer",
536
+ "type": "address",
537
+ "indexed": true,
538
+ "internalType": "address"
539
+ },
540
+ {
541
+ "name": "protocolRewardRecipient",
542
+ "type": "address",
543
+ "indexed": false,
544
+ "internalType": "address"
545
+ },
546
+ {
547
+ "name": "currency",
548
+ "type": "address",
549
+ "indexed": false,
550
+ "internalType": "address"
551
+ },
552
+ {
553
+ "name": "marketRewards",
554
+ "type": "tuple",
555
+ "indexed": false,
556
+ "internalType": "struct ICoin.MarketRewards",
557
+ "components": [
558
+ {
559
+ "name": "totalAmountCurrency",
560
+ "type": "uint256",
561
+ "internalType": "uint256"
562
+ },
563
+ {
564
+ "name": "totalAmountCoin",
565
+ "type": "uint256",
566
+ "internalType": "uint256"
567
+ },
568
+ {
569
+ "name": "creatorPayoutAmountCurrency",
570
+ "type": "uint256",
571
+ "internalType": "uint256"
572
+ },
573
+ {
574
+ "name": "creatorPayoutAmountCoin",
575
+ "type": "uint256",
576
+ "internalType": "uint256"
577
+ },
578
+ {
579
+ "name": "platformReferrerAmountCurrency",
580
+ "type": "uint256",
581
+ "internalType": "uint256"
582
+ },
583
+ {
584
+ "name": "platformReferrerAmountCoin",
585
+ "type": "uint256",
586
+ "internalType": "uint256"
587
+ },
588
+ {
589
+ "name": "protocolAmountCurrency",
590
+ "type": "uint256",
591
+ "internalType": "uint256"
592
+ },
593
+ {
594
+ "name": "protocolAmountCoin",
595
+ "type": "uint256",
596
+ "internalType": "uint256"
597
+ }
598
+ ]
599
+ }
600
+ ],
601
+ "anonymous": false
602
+ },
603
+ {
604
+ "type": "event",
605
+ "name": "CoinPayoutRecipientUpdated",
606
+ "inputs": [
607
+ {
608
+ "name": "caller",
609
+ "type": "address",
610
+ "indexed": true,
611
+ "internalType": "address"
612
+ },
613
+ {
614
+ "name": "prevRecipient",
615
+ "type": "address",
616
+ "indexed": true,
617
+ "internalType": "address"
618
+ },
619
+ {
620
+ "name": "newRecipient",
621
+ "type": "address",
622
+ "indexed": true,
623
+ "internalType": "address"
624
+ }
625
+ ],
626
+ "anonymous": false
627
+ },
628
+ {
629
+ "type": "event",
630
+ "name": "CoinSell",
631
+ "inputs": [
632
+ {
633
+ "name": "seller",
634
+ "type": "address",
635
+ "indexed": true,
636
+ "internalType": "address"
637
+ },
638
+ {
639
+ "name": "recipient",
640
+ "type": "address",
641
+ "indexed": true,
642
+ "internalType": "address"
643
+ },
644
+ {
645
+ "name": "tradeReferrer",
646
+ "type": "address",
647
+ "indexed": true,
648
+ "internalType": "address"
649
+ },
650
+ {
651
+ "name": "coinsSold",
652
+ "type": "uint256",
653
+ "indexed": false,
654
+ "internalType": "uint256"
655
+ },
656
+ {
657
+ "name": "currency",
658
+ "type": "address",
659
+ "indexed": false,
660
+ "internalType": "address"
661
+ },
662
+ {
663
+ "name": "amountFee",
664
+ "type": "uint256",
665
+ "indexed": false,
666
+ "internalType": "uint256"
667
+ },
668
+ {
669
+ "name": "amountPurchased",
670
+ "type": "uint256",
671
+ "indexed": false,
672
+ "internalType": "uint256"
673
+ }
674
+ ],
675
+ "anonymous": false
676
+ },
677
+ {
678
+ "type": "event",
679
+ "name": "CoinTradeRewards",
680
+ "inputs": [
681
+ {
682
+ "name": "payoutRecipient",
683
+ "type": "address",
684
+ "indexed": true,
685
+ "internalType": "address"
686
+ },
687
+ {
688
+ "name": "platformReferrer",
689
+ "type": "address",
690
+ "indexed": true,
691
+ "internalType": "address"
692
+ },
693
+ {
694
+ "name": "tradeReferrer",
695
+ "type": "address",
696
+ "indexed": true,
697
+ "internalType": "address"
698
+ },
699
+ {
700
+ "name": "protocolRewardRecipient",
701
+ "type": "address",
702
+ "indexed": false,
703
+ "internalType": "address"
704
+ },
705
+ {
706
+ "name": "creatorReward",
707
+ "type": "uint256",
708
+ "indexed": false,
709
+ "internalType": "uint256"
710
+ },
711
+ {
712
+ "name": "platformReferrerReward",
713
+ "type": "uint256",
714
+ "indexed": false,
715
+ "internalType": "uint256"
716
+ },
717
+ {
718
+ "name": "traderReferrerReward",
719
+ "type": "uint256",
720
+ "indexed": false,
721
+ "internalType": "uint256"
722
+ },
723
+ {
724
+ "name": "protocolReward",
725
+ "type": "uint256",
726
+ "indexed": false,
727
+ "internalType": "uint256"
728
+ },
729
+ {
730
+ "name": "currency",
731
+ "type": "address",
732
+ "indexed": false,
733
+ "internalType": "address"
734
+ }
735
+ ],
736
+ "anonymous": false
737
+ },
738
+ {
739
+ "type": "event",
740
+ "name": "CoinTransfer",
741
+ "inputs": [
742
+ {
743
+ "name": "sender",
744
+ "type": "address",
745
+ "indexed": true,
746
+ "internalType": "address"
747
+ },
748
+ {
749
+ "name": "recipient",
750
+ "type": "address",
751
+ "indexed": true,
752
+ "internalType": "address"
753
+ },
754
+ {
755
+ "name": "amount",
756
+ "type": "uint256",
757
+ "indexed": false,
758
+ "internalType": "uint256"
759
+ },
760
+ {
761
+ "name": "senderBalance",
762
+ "type": "uint256",
763
+ "indexed": false,
764
+ "internalType": "uint256"
765
+ },
766
+ {
767
+ "name": "recipientBalance",
768
+ "type": "uint256",
769
+ "indexed": false,
770
+ "internalType": "uint256"
771
+ }
772
+ ],
773
+ "anonymous": false
774
+ },
775
+ {
776
+ "type": "event",
777
+ "name": "ContractMetadataUpdated",
778
+ "inputs": [
779
+ {
780
+ "name": "caller",
781
+ "type": "address",
782
+ "indexed": true,
783
+ "internalType": "address"
784
+ },
785
+ {
786
+ "name": "newURI",
787
+ "type": "string",
788
+ "indexed": false,
789
+ "internalType": "string"
790
+ },
791
+ {
792
+ "name": "name",
793
+ "type": "string",
794
+ "indexed": false,
795
+ "internalType": "string"
796
+ }
797
+ ],
798
+ "anonymous": false
799
+ },
800
+ {
801
+ "type": "event",
802
+ "name": "ContractURIUpdated",
803
+ "inputs": [],
804
+ "anonymous": false
805
+ },
806
+ {
807
+ "type": "event",
808
+ "name": "LiquidityMigrated",
809
+ "inputs": [
810
+ {
811
+ "name": "fromPoolKey",
812
+ "type": "tuple",
813
+ "indexed": false,
814
+ "internalType": "struct PoolKey",
815
+ "components": [
816
+ {
817
+ "name": "currency0",
818
+ "type": "address",
819
+ "internalType": "Currency"
820
+ },
821
+ {
822
+ "name": "currency1",
823
+ "type": "address",
824
+ "internalType": "Currency"
825
+ },
826
+ {
827
+ "name": "fee",
828
+ "type": "uint24",
829
+ "internalType": "uint24"
830
+ },
831
+ {
832
+ "name": "tickSpacing",
833
+ "type": "int24",
834
+ "internalType": "int24"
835
+ },
836
+ {
837
+ "name": "hooks",
838
+ "type": "address",
839
+ "internalType": "contract IHooks"
840
+ }
841
+ ]
842
+ },
843
+ {
844
+ "name": "fromPoolKeyHash",
845
+ "type": "bytes32",
846
+ "indexed": false,
847
+ "internalType": "bytes32"
848
+ },
849
+ {
850
+ "name": "toPoolKey",
851
+ "type": "tuple",
852
+ "indexed": false,
853
+ "internalType": "struct PoolKey",
854
+ "components": [
855
+ {
856
+ "name": "currency0",
857
+ "type": "address",
858
+ "internalType": "Currency"
859
+ },
860
+ {
861
+ "name": "currency1",
862
+ "type": "address",
863
+ "internalType": "Currency"
864
+ },
865
+ {
866
+ "name": "fee",
867
+ "type": "uint24",
868
+ "internalType": "uint24"
869
+ },
870
+ {
871
+ "name": "tickSpacing",
872
+ "type": "int24",
873
+ "internalType": "int24"
874
+ },
875
+ {
876
+ "name": "hooks",
877
+ "type": "address",
878
+ "internalType": "contract IHooks"
879
+ }
880
+ ]
881
+ },
882
+ {
883
+ "name": "toPoolKeyHash",
884
+ "type": "bytes32",
885
+ "indexed": false,
886
+ "internalType": "bytes32"
887
+ }
888
+ ],
889
+ "anonymous": false
890
+ },
891
+ {
892
+ "type": "event",
893
+ "name": "NameAndSymbolUpdated",
894
+ "inputs": [
895
+ {
896
+ "name": "caller",
897
+ "type": "address",
898
+ "indexed": true,
899
+ "internalType": "address"
900
+ },
901
+ {
902
+ "name": "newName",
903
+ "type": "string",
904
+ "indexed": false,
905
+ "internalType": "string"
906
+ },
907
+ {
908
+ "name": "newSymbol",
909
+ "type": "string",
910
+ "indexed": false,
911
+ "internalType": "string"
912
+ }
913
+ ],
914
+ "anonymous": false
915
+ },
916
+ {
917
+ "type": "error",
918
+ "name": "AddressZero",
919
+ "inputs": []
920
+ },
921
+ {
922
+ "type": "error",
923
+ "name": "CannotMintZeroLiquidity",
924
+ "inputs": []
925
+ },
926
+ {
927
+ "type": "error",
928
+ "name": "DopplerPoolMustHaveMoreThan2DiscoveryPositions",
929
+ "inputs": []
930
+ },
931
+ {
932
+ "type": "error",
933
+ "name": "ERC20TransferAmountMismatch",
934
+ "inputs": []
935
+ },
936
+ {
937
+ "type": "error",
938
+ "name": "EthAmountMismatch",
939
+ "inputs": []
940
+ },
941
+ {
942
+ "type": "error",
943
+ "name": "EthAmountTooSmall",
944
+ "inputs": []
945
+ },
946
+ {
947
+ "type": "error",
948
+ "name": "EthTransferFailed",
949
+ "inputs": []
950
+ },
951
+ {
952
+ "type": "error",
953
+ "name": "EthTransferInvalid",
954
+ "inputs": []
955
+ },
956
+ {
957
+ "type": "error",
958
+ "name": "InitialOrderSizeTooLarge",
959
+ "inputs": []
960
+ },
961
+ {
962
+ "type": "error",
963
+ "name": "InsufficientFunds",
964
+ "inputs": []
965
+ },
966
+ {
967
+ "type": "error",
968
+ "name": "InsufficientLiquidity",
969
+ "inputs": []
970
+ },
971
+ {
972
+ "type": "error",
973
+ "name": "InvalidCurrencyLowerTick",
974
+ "inputs": []
975
+ },
976
+ {
977
+ "type": "error",
978
+ "name": "InvalidMarketType",
979
+ "inputs": []
980
+ },
981
+ {
982
+ "type": "error",
983
+ "name": "InvalidPoolVersion",
984
+ "inputs": []
985
+ },
986
+ {
987
+ "type": "error",
988
+ "name": "InvalidTickRangeMisordered",
989
+ "inputs": [
990
+ {
991
+ "name": "tickLower",
992
+ "type": "int24",
993
+ "internalType": "int24"
994
+ },
995
+ {
996
+ "name": "tickUpper",
997
+ "type": "int24",
998
+ "internalType": "int24"
999
+ }
1000
+ ]
1001
+ },
1002
+ {
1003
+ "type": "error",
1004
+ "name": "InvalidWethLowerTick",
1005
+ "inputs": []
1006
+ },
1007
+ {
1008
+ "type": "error",
1009
+ "name": "LegacyPoolMustHaveOneDiscoveryPosition",
1010
+ "inputs": []
1011
+ },
1012
+ {
1013
+ "type": "error",
1014
+ "name": "MarketAlreadyGraduated",
1015
+ "inputs": []
1016
+ },
1017
+ {
1018
+ "type": "error",
1019
+ "name": "MarketNotGraduated",
1020
+ "inputs": []
1021
+ },
1022
+ {
1023
+ "type": "error",
1024
+ "name": "MaxShareToBeSoldExceeded",
1025
+ "inputs": [
1026
+ {
1027
+ "name": "value",
1028
+ "type": "uint256",
1029
+ "internalType": "uint256"
1030
+ },
1031
+ {
1032
+ "name": "limit",
1033
+ "type": "uint256",
1034
+ "internalType": "uint256"
1035
+ }
1036
+ ]
1037
+ },
1038
+ {
1039
+ "type": "error",
1040
+ "name": "NameIsRequired",
1041
+ "inputs": []
1042
+ },
1043
+ {
1044
+ "type": "error",
1045
+ "name": "NumDiscoveryPositionsOutOfRange",
1046
+ "inputs": []
1047
+ },
1048
+ {
1049
+ "type": "error",
1050
+ "name": "OnlyPool",
1051
+ "inputs": [
1052
+ {
1053
+ "name": "sender",
1054
+ "type": "address",
1055
+ "internalType": "address"
1056
+ },
1057
+ {
1058
+ "name": "pool",
1059
+ "type": "address",
1060
+ "internalType": "address"
1061
+ }
1062
+ ]
1063
+ },
1064
+ {
1065
+ "type": "error",
1066
+ "name": "OnlyWeth",
1067
+ "inputs": []
1068
+ },
1069
+ {
1070
+ "type": "error",
1071
+ "name": "SlippageBoundsExceeded",
1072
+ "inputs": []
1073
+ }
1074
+ ]