@zoralabs/coins 2.4.0 → 2.4.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 (120) hide show
  1. package/.turbo/turbo-build$colon$js.log +116 -124
  2. package/CHANGELOG.md +6 -0
  3. package/abis/Address.json +0 -16
  4. package/abis/BuySupplyWithSwapRouterHook.json +0 -27
  5. package/abis/BuySupplyWithV4SwapHook.json +0 -32
  6. package/abis/Clones.json +1 -1
  7. package/abis/CoinDopplerMultiCurve.json +109 -0
  8. package/abis/Create2.json +0 -21
  9. package/abis/ERC1967Proxy.json +1 -1
  10. package/abis/ERC1967Utils.json +0 -45
  11. package/abis/{UpgradeCoinImpl.json → Errors.json} +14 -10
  12. package/abis/{MockERC20.json → IERC1363.json} +134 -104
  13. package/abis/IERC1967.json +47 -0
  14. package/abis/IERC20.json +0 -36
  15. package/abis/IProtocolRewards.json +0 -258
  16. package/abis/{Script.json → ISupportsLimitOrderFill.json} +2 -2
  17. package/abis/IZoraLimitOrderBookCoinsInterface.json +67 -0
  18. package/abis/IZoraV4CoinHook.json +10 -0
  19. package/abis/ProxyShim.json +15 -16
  20. package/abis/SafeCast.json +51 -0
  21. package/abis/{AddressConstants.json → SafeCast160.json} +1 -1
  22. package/abis/Strings.json +10 -0
  23. package/abis/UUPSUpgradeable.json +1 -1
  24. package/abis/V3ToV4SwapLib.json +28 -0
  25. package/abis/ZoraFactory.json +1 -1
  26. package/abis/ZoraFactoryImpl.json +22 -6
  27. package/abis/ZoraV4CoinHook.json +20 -48
  28. package/dist/index.cjs +950 -43
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.js +948 -41
  31. package/dist/index.js.map +1 -1
  32. package/dist/wagmiGenerated.d.ts +1459 -76
  33. package/dist/wagmiGenerated.d.ts.map +1 -1
  34. package/package/wagmiGenerated.ts +951 -44
  35. package/package.json +9 -9
  36. package/remappings.txt +2 -1
  37. package/src/ZoraFactoryImpl.sol +8 -0
  38. package/src/deployment/ForkedCoinsAddresses.sol +54 -0
  39. package/src/hooks/ZoraV4CoinHook.sol +74 -20
  40. package/src/hooks/deployment/BuySupplyWithV4SwapHook.sol +20 -142
  41. package/src/interfaces/ISupportsLimitOrderFill.sol +11 -0
  42. package/src/interfaces/IZoraLimitOrderBookCoinsInterface.sol +21 -0
  43. package/src/interfaces/IZoraV4CoinHook.sol +6 -0
  44. package/src/libs/CoinConstants.sol +6 -0
  45. package/src/libs/CoinDopplerMultiCurve.sol +1 -1
  46. package/src/libs/CoinRewardsV4.sol +0 -1
  47. package/src/libs/HooksDeployment.sol +20 -8
  48. package/src/libs/UniV4SwapHelper.sol +35 -0
  49. package/src/libs/V3ToV4SwapLib.sol +261 -0
  50. package/src/version/ContractVersionBase.sol +1 -1
  51. package/test/BuySupplyWithV4SwapHook.t.sol +4 -3
  52. package/test/Coin.t.sol +7 -1
  53. package/test/CoinUniV4.t.sol +2 -1
  54. package/test/ContentCoinRewards.t.sol +5 -1
  55. package/test/CreatorCoin.t.sol +3 -1
  56. package/test/CreatorCoinRewards.t.sol +3 -1
  57. package/test/Factory.t.sol +20 -7
  58. package/test/HooksDeployment.t.sol +16 -3
  59. package/test/LiquidityMigration.t.sol +52 -44
  60. package/test/MultiOwnable.t.sol +2 -1
  61. package/test/Upgrades.t.sol +110 -81
  62. package/test/V4Liquidity.t.sol +1 -1
  63. package/test/mocks/MockSwapRouter.sol +33 -0
  64. package/test/mocks/MockZoraLimitOrderBook.sol +14 -0
  65. package/test/utils/BaseTest.sol +14 -448
  66. package/test/utils/FeeEstimatorHook.sol +6 -2
  67. package/test/utils/V4TestSetup.sol +595 -0
  68. package/wagmi.config.ts +1 -1
  69. package/abis/BaseTest.json +0 -718
  70. package/abis/DeterministicDeployerAndCaller.json +0 -315
  71. package/abis/DeterministicUUPSProxyDeployer.json +0 -167
  72. package/abis/EIP712.json +0 -67
  73. package/abis/ERC20.json +0 -310
  74. package/abis/FeeEstimatorHook.json +0 -1938
  75. package/abis/IERC721.json +0 -287
  76. package/abis/IERC721Enumerable.json +0 -343
  77. package/abis/IERC721Metadata.json +0 -332
  78. package/abis/IERC721TokenReceiver.json +0 -36
  79. package/abis/IImmutableCreate2Factory.json +0 -93
  80. package/abis/IMulticall3.json +0 -440
  81. package/abis/ISafe.json +0 -15
  82. package/abis/ISymbol.json +0 -15
  83. package/abis/IUniswapV4Router04.json +0 -484
  84. package/abis/IUniversalRouter.json +0 -61
  85. package/abis/IV4Quoter.json +0 -310
  86. package/abis/ImmutableCreate2FactoryUtils.json +0 -15
  87. package/abis/LibString.json +0 -7
  88. package/abis/Math.json +0 -7
  89. package/abis/MockAirlock.json +0 -39
  90. package/abis/MockERC721.json +0 -350
  91. package/abis/ProtocolRewards.json +0 -494
  92. package/abis/ShortStrings.json +0 -18
  93. package/abis/SimpleERC20.json +0 -326
  94. package/abis/StdAssertions.json +0 -379
  95. package/abis/StdInvariant.json +0 -180
  96. package/abis/Test.json +0 -570
  97. package/abis/VmContractHelper235.json +0 -233
  98. package/abis/VmContractHelper242.json +0 -233
  99. package/abis/stdError.json +0 -119
  100. package/abis/stdStorageSafe.json +0 -52
  101. package/addresses/8453.json +0 -13
  102. package/addresses/84532.json +0 -10
  103. package/deterministicConfig/deployerAndCaller.json +0 -5
  104. package/deterministicConfig/zoraFactory.json +0 -8
  105. package/script/Deploy.s.sol +0 -23
  106. package/script/DeployAutoSwapper.s.sol +0 -30
  107. package/script/DeployDevFactory.s.sol +0 -21
  108. package/script/DeployPostDeploymentHooks.s.sol +0 -20
  109. package/script/DeployTrustedMsgSenderLookup.s.sol +0 -20
  110. package/script/DeployUpgradeGate.s.sol +0 -21
  111. package/script/GenerateDeterministicParams.s.sol +0 -43
  112. package/script/PrintRegisterUpgradePath.s.sol +0 -28
  113. package/script/PrintUpgradeCommand.s.sol +0 -13
  114. package/script/TestBackingCoinSwap.s.sol +0 -144
  115. package/script/TestV4Swap.s.sol +0 -133
  116. package/script/UpgradeCoinImpl.sol +0 -23
  117. package/script/UpgradeFactoryImpl.s.sol +0 -28
  118. package/script/UpgradeHooks.s.sol +0 -23
  119. package/src/deployment/CoinsDeployerBase.sol +0 -297
  120. /package/{test → src}/utils/ProxyShim.sol +0 -0
@@ -1,310 +0,0 @@
1
- [
2
- {
3
- "type": "function",
4
- "name": "msgSender",
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": "poolManager",
18
- "inputs": [],
19
- "outputs": [
20
- {
21
- "name": "",
22
- "type": "address",
23
- "internalType": "contract IPoolManager"
24
- }
25
- ],
26
- "stateMutability": "view"
27
- },
28
- {
29
- "type": "function",
30
- "name": "quoteExactInput",
31
- "inputs": [
32
- {
33
- "name": "params",
34
- "type": "tuple",
35
- "internalType": "struct IV4Quoter.QuoteExactParams",
36
- "components": [
37
- {
38
- "name": "exactCurrency",
39
- "type": "address",
40
- "internalType": "Currency"
41
- },
42
- {
43
- "name": "path",
44
- "type": "tuple[]",
45
- "internalType": "struct PathKey[]",
46
- "components": [
47
- {
48
- "name": "intermediateCurrency",
49
- "type": "address",
50
- "internalType": "Currency"
51
- },
52
- {
53
- "name": "fee",
54
- "type": "uint24",
55
- "internalType": "uint24"
56
- },
57
- {
58
- "name": "tickSpacing",
59
- "type": "int24",
60
- "internalType": "int24"
61
- },
62
- {
63
- "name": "hooks",
64
- "type": "address",
65
- "internalType": "contract IHooks"
66
- },
67
- {
68
- "name": "hookData",
69
- "type": "bytes",
70
- "internalType": "bytes"
71
- }
72
- ]
73
- },
74
- {
75
- "name": "exactAmount",
76
- "type": "uint128",
77
- "internalType": "uint128"
78
- }
79
- ]
80
- }
81
- ],
82
- "outputs": [
83
- {
84
- "name": "amountOut",
85
- "type": "uint256",
86
- "internalType": "uint256"
87
- },
88
- {
89
- "name": "gasEstimate",
90
- "type": "uint256",
91
- "internalType": "uint256"
92
- }
93
- ],
94
- "stateMutability": "nonpayable"
95
- },
96
- {
97
- "type": "function",
98
- "name": "quoteExactInputSingle",
99
- "inputs": [
100
- {
101
- "name": "params",
102
- "type": "tuple",
103
- "internalType": "struct IV4Quoter.QuoteExactSingleParams",
104
- "components": [
105
- {
106
- "name": "poolKey",
107
- "type": "tuple",
108
- "internalType": "struct PoolKey",
109
- "components": [
110
- {
111
- "name": "currency0",
112
- "type": "address",
113
- "internalType": "Currency"
114
- },
115
- {
116
- "name": "currency1",
117
- "type": "address",
118
- "internalType": "Currency"
119
- },
120
- {
121
- "name": "fee",
122
- "type": "uint24",
123
- "internalType": "uint24"
124
- },
125
- {
126
- "name": "tickSpacing",
127
- "type": "int24",
128
- "internalType": "int24"
129
- },
130
- {
131
- "name": "hooks",
132
- "type": "address",
133
- "internalType": "contract IHooks"
134
- }
135
- ]
136
- },
137
- {
138
- "name": "zeroForOne",
139
- "type": "bool",
140
- "internalType": "bool"
141
- },
142
- {
143
- "name": "exactAmount",
144
- "type": "uint128",
145
- "internalType": "uint128"
146
- },
147
- {
148
- "name": "hookData",
149
- "type": "bytes",
150
- "internalType": "bytes"
151
- }
152
- ]
153
- }
154
- ],
155
- "outputs": [
156
- {
157
- "name": "amountOut",
158
- "type": "uint256",
159
- "internalType": "uint256"
160
- },
161
- {
162
- "name": "gasEstimate",
163
- "type": "uint256",
164
- "internalType": "uint256"
165
- }
166
- ],
167
- "stateMutability": "nonpayable"
168
- },
169
- {
170
- "type": "function",
171
- "name": "quoteExactOutput",
172
- "inputs": [
173
- {
174
- "name": "params",
175
- "type": "tuple",
176
- "internalType": "struct IV4Quoter.QuoteExactParams",
177
- "components": [
178
- {
179
- "name": "exactCurrency",
180
- "type": "address",
181
- "internalType": "Currency"
182
- },
183
- {
184
- "name": "path",
185
- "type": "tuple[]",
186
- "internalType": "struct PathKey[]",
187
- "components": [
188
- {
189
- "name": "intermediateCurrency",
190
- "type": "address",
191
- "internalType": "Currency"
192
- },
193
- {
194
- "name": "fee",
195
- "type": "uint24",
196
- "internalType": "uint24"
197
- },
198
- {
199
- "name": "tickSpacing",
200
- "type": "int24",
201
- "internalType": "int24"
202
- },
203
- {
204
- "name": "hooks",
205
- "type": "address",
206
- "internalType": "contract IHooks"
207
- },
208
- {
209
- "name": "hookData",
210
- "type": "bytes",
211
- "internalType": "bytes"
212
- }
213
- ]
214
- },
215
- {
216
- "name": "exactAmount",
217
- "type": "uint128",
218
- "internalType": "uint128"
219
- }
220
- ]
221
- }
222
- ],
223
- "outputs": [
224
- {
225
- "name": "amountIn",
226
- "type": "uint256",
227
- "internalType": "uint256"
228
- },
229
- {
230
- "name": "gasEstimate",
231
- "type": "uint256",
232
- "internalType": "uint256"
233
- }
234
- ],
235
- "stateMutability": "nonpayable"
236
- },
237
- {
238
- "type": "function",
239
- "name": "quoteExactOutputSingle",
240
- "inputs": [
241
- {
242
- "name": "params",
243
- "type": "tuple",
244
- "internalType": "struct IV4Quoter.QuoteExactSingleParams",
245
- "components": [
246
- {
247
- "name": "poolKey",
248
- "type": "tuple",
249
- "internalType": "struct PoolKey",
250
- "components": [
251
- {
252
- "name": "currency0",
253
- "type": "address",
254
- "internalType": "Currency"
255
- },
256
- {
257
- "name": "currency1",
258
- "type": "address",
259
- "internalType": "Currency"
260
- },
261
- {
262
- "name": "fee",
263
- "type": "uint24",
264
- "internalType": "uint24"
265
- },
266
- {
267
- "name": "tickSpacing",
268
- "type": "int24",
269
- "internalType": "int24"
270
- },
271
- {
272
- "name": "hooks",
273
- "type": "address",
274
- "internalType": "contract IHooks"
275
- }
276
- ]
277
- },
278
- {
279
- "name": "zeroForOne",
280
- "type": "bool",
281
- "internalType": "bool"
282
- },
283
- {
284
- "name": "exactAmount",
285
- "type": "uint128",
286
- "internalType": "uint128"
287
- },
288
- {
289
- "name": "hookData",
290
- "type": "bytes",
291
- "internalType": "bytes"
292
- }
293
- ]
294
- }
295
- ],
296
- "outputs": [
297
- {
298
- "name": "amountIn",
299
- "type": "uint256",
300
- "internalType": "uint256"
301
- },
302
- {
303
- "name": "gasEstimate",
304
- "type": "uint256",
305
- "internalType": "uint256"
306
- }
307
- ],
308
- "stateMutability": "nonpayable"
309
- }
310
- ]
@@ -1,15 +0,0 @@
1
- [
2
- {
3
- "type": "function",
4
- "name": "IMMUTABLE_CREATE2_FACTORY",
5
- "inputs": [],
6
- "outputs": [
7
- {
8
- "name": "",
9
- "type": "IImmutableCreate2Factory",
10
- "internalType": "contract IImmutableCreate2Factory"
11
- }
12
- ],
13
- "stateMutability": "view"
14
- }
15
- ]
@@ -1,7 +0,0 @@
1
- [
2
- {
3
- "type": "error",
4
- "name": "HexLengthInsufficient",
5
- "inputs": []
6
- }
7
- ]
package/abis/Math.json DELETED
@@ -1,7 +0,0 @@
1
- [
2
- {
3
- "type": "error",
4
- "name": "MathOverflowedMulDiv",
5
- "inputs": []
6
- }
7
- ]
@@ -1,39 +0,0 @@
1
- [
2
- {
3
- "type": "constructor",
4
- "inputs": [
5
- {
6
- "name": "owner_",
7
- "type": "address",
8
- "internalType": "address"
9
- }
10
- ],
11
- "stateMutability": "nonpayable"
12
- },
13
- {
14
- "type": "function",
15
- "name": "owner",
16
- "inputs": [],
17
- "outputs": [
18
- {
19
- "name": "",
20
- "type": "address",
21
- "internalType": "address"
22
- }
23
- ],
24
- "stateMutability": "view"
25
- },
26
- {
27
- "type": "function",
28
- "name": "setOwner",
29
- "inputs": [
30
- {
31
- "name": "newOwner",
32
- "type": "address",
33
- "internalType": "address"
34
- }
35
- ],
36
- "outputs": [],
37
- "stateMutability": "nonpayable"
38
- }
39
- ]