@zoralabs/coins 1.1.2 → 2.1.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 (78) hide show
  1. package/.turbo/turbo-build.log +107 -110
  2. package/CHANGELOG.md +50 -0
  3. package/README.md +48 -1
  4. package/abis/BaseCoin.json +442 -0
  5. package/abis/BaseZoraV4CoinHook.json +6 -2
  6. package/abis/CoinTest.json +3 -246
  7. package/abis/CoinUniV4Test.json +20 -0
  8. package/abis/ContentCoinHook.json +6 -2
  9. package/abis/CreatorCoinHook.json +6 -2
  10. package/abis/FactoryTest.json +8 -133
  11. package/abis/FeeEstimatorHook.json +6 -2
  12. package/abis/HooksTest.json +0 -26
  13. package/abis/ICoin.json +378 -0
  14. package/abis/ICoinV3.json +378 -0
  15. package/abis/IZoraFactory.json +0 -18
  16. package/abis/IZoraV4CoinHook.json +2 -2
  17. package/abis/LiquidityMigrationTest.json +101 -0
  18. package/abis/MockBadFactory.json +15 -0
  19. package/abis/Ownable2StepUpgradeable.json +138 -0
  20. package/abis/ZoraFactoryImpl.json +38 -65
  21. package/addresses/8453.json +5 -5
  22. package/dist/index.cjs +272 -268
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.js +270 -266
  25. package/dist/index.js.map +1 -1
  26. package/dist/wagmiGenerated.d.ts +397 -470
  27. package/dist/wagmiGenerated.d.ts.map +1 -1
  28. package/package/wagmiGenerated.ts +275 -271
  29. package/package.json +3 -3
  30. package/script/DeployPostDeploymentHooks.s.sol +2 -2
  31. package/script/TestBackingCoinSwap.s.sol +9 -9
  32. package/script/TestV4Swap.s.sol +9 -9
  33. package/script/UpgradeFactoryImpl.s.sol +0 -1
  34. package/src/BaseCoin.sol +109 -6
  35. package/src/ContentCoin.sol +45 -0
  36. package/src/CreatorCoin.sol +7 -5
  37. package/src/ZoraFactoryImpl.sol +12 -95
  38. package/src/deployment/CoinsDeployerBase.sol +13 -30
  39. package/src/hooks/BaseZoraV4CoinHook.sol +8 -6
  40. package/src/hooks/deployment/BuySupplyWithSwapRouterHook.sol +4 -5
  41. package/src/interfaces/ICoin.sol +67 -1
  42. package/src/interfaces/ICreatorCoin.sol +2 -2
  43. package/src/interfaces/IZoraFactory.sol +0 -5
  44. package/src/interfaces/IZoraV4CoinHook.sol +1 -1
  45. package/src/libs/CoinConfigurationVersions.sol +1 -39
  46. package/src/libs/CoinRewardsV4.sol +2 -2
  47. package/src/libs/CoinSetup.sol +1 -4
  48. package/src/libs/UniV4SwapHelper.sol +1 -1
  49. package/src/libs/UniV4SwapToCurrency.sol +2 -2
  50. package/src/libs/V4Liquidity.sol +1 -1
  51. package/src/version/ContractVersionBase.sol +1 -1
  52. package/test/Coin.t.sol +112 -535
  53. package/test/CoinUniV4.t.sol +66 -10
  54. package/test/DeploymentHooks.t.sol +5 -102
  55. package/test/Factory.t.sol +49 -291
  56. package/test/LiquidityMigration.t.sol +160 -2
  57. package/test/MultiOwnable.t.sol +36 -36
  58. package/test/Upgrades.t.sol +23 -42
  59. package/test/utils/BaseTest.sol +39 -84
  60. package/test/utils/FeeEstimatorHook.sol +3 -3
  61. package/wagmi.config.ts +2 -2
  62. package/abis/Coin.json +0 -1912
  63. package/abis/DopplerUniswapV3Test.json +0 -800
  64. package/abis/ICoinV4.json +0 -1048
  65. package/abis/Simulate.json +0 -29
  66. package/abis/UniV3BuySell.json +0 -12
  67. package/abis/UniV3Errors.json +0 -32
  68. package/script/Simulate.s.sol +0 -59
  69. package/src/Coin.sol +0 -236
  70. package/src/CoinV4.sol +0 -151
  71. package/src/interfaces/ICoinV4.sol +0 -74
  72. package/src/libs/CoinDopplerUniV3.sol +0 -50
  73. package/src/libs/CoinRewards.sol +0 -201
  74. package/src/libs/CoinSetupV3.sol +0 -50
  75. package/src/libs/UniV3BuySell.sol +0 -231
  76. package/src/libs/UniV3Errors.sol +0 -11
  77. package/test/CoinDopplerUniV3.t.sol +0 -310
  78. /package/abis/{CoinV4.json → ContentCoin.json} +0 -0
@@ -96,118 +96,10 @@ export const autoSwapperABI = [
96
96
  ] as const
97
97
 
98
98
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
99
- // BuySupplyWithSwapRouterHook
99
+ // BaseCoin
100
100
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
101
101
 
102
- export const buySupplyWithSwapRouterHookABI = [
103
- {
104
- type: 'constructor',
105
- inputs: [
106
- {
107
- name: '_factory',
108
- internalType: 'contract IZoraFactory',
109
- type: 'address',
110
- },
111
- { name: '_swapRouter', internalType: 'address', type: 'address' },
112
- { name: '_poolManager', internalType: 'address', type: 'address' },
113
- ],
114
- stateMutability: 'nonpayable',
115
- },
116
- {
117
- type: 'function',
118
- inputs: [
119
- { name: 'sender', internalType: 'address', type: 'address' },
120
- { name: 'coin', internalType: 'contract ICoin', type: 'address' },
121
- { name: 'hookData', internalType: 'bytes', type: 'bytes' },
122
- ],
123
- name: 'afterCoinDeploy',
124
- outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
125
- stateMutability: 'payable',
126
- },
127
- {
128
- type: 'function',
129
- inputs: [],
130
- name: 'factory',
131
- outputs: [
132
- { name: '', internalType: 'contract IZoraFactory', type: 'address' },
133
- ],
134
- stateMutability: 'view',
135
- },
136
- {
137
- type: 'function',
138
- inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }],
139
- name: 'supportsInterface',
140
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
141
- stateMutability: 'pure',
142
- },
143
- {
144
- type: 'function',
145
- inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
146
- name: 'unlockCallback',
147
- outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
148
- stateMutability: 'nonpayable',
149
- },
150
- {
151
- type: 'error',
152
- inputs: [{ name: 'target', internalType: 'address', type: 'address' }],
153
- name: 'AddressEmptyCode',
154
- },
155
- {
156
- type: 'error',
157
- inputs: [{ name: 'account', internalType: 'address', type: 'address' }],
158
- name: 'AddressInsufficientBalance',
159
- },
160
- { type: 'error', inputs: [], name: 'AddressZero' },
161
- {
162
- type: 'error',
163
- inputs: [{ name: 'balance', internalType: 'uint256', type: 'uint256' }],
164
- name: 'CoinBalanceNot0',
165
- },
166
- {
167
- type: 'error',
168
- inputs: [{ name: 'balance', internalType: 'uint256', type: 'uint256' }],
169
- name: 'CurrencyBalanceNot0',
170
- },
171
- { type: 'error', inputs: [], name: 'Erc20NotReceived' },
172
- { type: 'error', inputs: [], name: 'FailedInnerCall' },
173
- { type: 'error', inputs: [], name: 'HookNotImplemented' },
174
- { type: 'error', inputs: [], name: 'InvalidSwapRouterCall' },
175
- { type: 'error', inputs: [], name: 'NotFactory' },
176
- { type: 'error', inputs: [], name: 'OnlyPoolManager' },
177
- {
178
- type: 'error',
179
- inputs: [{ name: 'token', internalType: 'address', type: 'address' }],
180
- name: 'SafeERC20FailedOperation',
181
- },
182
- {
183
- type: 'error',
184
- inputs: [{ name: 'error', internalType: 'bytes', type: 'bytes' }],
185
- name: 'SwapReverted',
186
- },
187
- ] as const
188
-
189
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
190
- // Coin
191
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
192
-
193
- export const coinABI = [
194
- {
195
- type: 'constructor',
196
- inputs: [
197
- {
198
- name: 'protocolRewardRecipient_',
199
- internalType: 'address',
200
- type: 'address',
201
- },
202
- { name: 'protocolRewards_', internalType: 'address', type: 'address' },
203
- { name: 'weth_', internalType: 'address', type: 'address' },
204
- { name: 'v3Factory_', internalType: 'address', type: 'address' },
205
- { name: 'swapRouter_', internalType: 'address', type: 'address' },
206
- { name: 'airlock_', internalType: 'address', type: 'address' },
207
- ],
208
- stateMutability: 'nonpayable',
209
- },
210
- { type: 'receive', stateMutability: 'payable' },
102
+ export const baseCoinABI = [
211
103
  {
212
104
  type: 'function',
213
105
  inputs: [],
@@ -215,13 +107,6 @@ export const coinABI = [
215
107
  outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
216
108
  stateMutability: 'view',
217
109
  },
218
- {
219
- type: 'function',
220
- inputs: [],
221
- name: 'WETH',
222
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
223
- stateMutability: 'view',
224
- },
225
110
  {
226
111
  type: 'function',
227
112
  inputs: [{ name: 'account', internalType: 'address', type: 'address' }],
@@ -279,29 +164,6 @@ export const coinABI = [
279
164
  outputs: [],
280
165
  stateMutability: 'nonpayable',
281
166
  },
282
- {
283
- type: 'function',
284
- inputs: [
285
- { name: 'recipient', internalType: 'address', type: 'address' },
286
- { name: 'orderSize', internalType: 'uint256', type: 'uint256' },
287
- { name: 'minAmountOut', internalType: 'uint256', type: 'uint256' },
288
- { name: 'sqrtPriceLimitX96', internalType: 'uint160', type: 'uint160' },
289
- { name: 'tradeReferrer', internalType: 'address', type: 'address' },
290
- ],
291
- name: 'buy',
292
- outputs: [
293
- { name: '', internalType: 'uint256', type: 'uint256' },
294
- { name: '', internalType: 'uint256', type: 'uint256' },
295
- ],
296
- stateMutability: 'payable',
297
- },
298
- {
299
- type: 'function',
300
- inputs: [{ name: 'pushEthRewards', internalType: 'bool', type: 'bool' }],
301
- name: 'claimSecondaryRewards',
302
- outputs: [],
303
- stateMutability: 'nonpayable',
304
- },
305
167
  {
306
168
  type: 'function',
307
169
  inputs: [],
@@ -352,6 +214,48 @@ export const coinABI = [
352
214
  ],
353
215
  stateMutability: 'view',
354
216
  },
217
+ {
218
+ type: 'function',
219
+ inputs: [
220
+ {
221
+ name: 'coinVersionLookup',
222
+ internalType: 'contract IDeployedCoinVersionLookup',
223
+ type: 'address',
224
+ },
225
+ ],
226
+ name: 'getPayoutSwapPath',
227
+ outputs: [
228
+ {
229
+ name: 'payoutSwapPath',
230
+ internalType: 'struct IHasSwapPath.PayoutSwapPath',
231
+ type: 'tuple',
232
+ components: [
233
+ {
234
+ name: 'path',
235
+ internalType: 'struct PathKey[]',
236
+ type: 'tuple[]',
237
+ components: [
238
+ {
239
+ name: 'intermediateCurrency',
240
+ internalType: 'Currency',
241
+ type: 'address',
242
+ },
243
+ { name: 'fee', internalType: 'uint24', type: 'uint24' },
244
+ { name: 'tickSpacing', internalType: 'int24', type: 'int24' },
245
+ {
246
+ name: 'hooks',
247
+ internalType: 'contract IHooks',
248
+ type: 'address',
249
+ },
250
+ { name: 'hookData', internalType: 'bytes', type: 'bytes' },
251
+ ],
252
+ },
253
+ { name: 'currencyIn', internalType: 'Currency', type: 'address' },
254
+ ],
255
+ },
256
+ ],
257
+ stateMutability: 'view',
258
+ },
355
259
  {
356
260
  type: 'function',
357
261
  inputs: [],
@@ -383,6 +287,33 @@ export const coinABI = [
383
287
  ],
384
288
  stateMutability: 'view',
385
289
  },
290
+ {
291
+ type: 'function',
292
+ inputs: [],
293
+ name: 'getPoolKey',
294
+ outputs: [
295
+ {
296
+ name: '',
297
+ internalType: 'struct PoolKey',
298
+ type: 'tuple',
299
+ components: [
300
+ { name: 'currency0', internalType: 'Currency', type: 'address' },
301
+ { name: 'currency1', internalType: 'Currency', type: 'address' },
302
+ { name: 'fee', internalType: 'uint24', type: 'uint24' },
303
+ { name: 'tickSpacing', internalType: 'int24', type: 'int24' },
304
+ { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
305
+ ],
306
+ },
307
+ ],
308
+ stateMutability: 'view',
309
+ },
310
+ {
311
+ type: 'function',
312
+ inputs: [],
313
+ name: 'hooks',
314
+ outputs: [{ name: '', internalType: 'contract IHooks', type: 'address' }],
315
+ stateMutability: 'view',
316
+ },
386
317
  {
387
318
  type: 'function',
388
319
  inputs: [
@@ -393,7 +324,19 @@ export const coinABI = [
393
324
  { name: 'symbol_', internalType: 'string', type: 'string' },
394
325
  { name: 'platformReferrer_', internalType: 'address', type: 'address' },
395
326
  { name: 'currency_', internalType: 'address', type: 'address' },
396
- { name: 'poolAddress_', internalType: 'address', type: 'address' },
327
+ {
328
+ name: 'poolKey_',
329
+ internalType: 'struct PoolKey',
330
+ type: 'tuple',
331
+ components: [
332
+ { name: 'currency0', internalType: 'Currency', type: 'address' },
333
+ { name: 'currency1', internalType: 'Currency', type: 'address' },
334
+ { name: 'fee', internalType: 'uint24', type: 'uint24' },
335
+ { name: 'tickSpacing', internalType: 'int24', type: 'int24' },
336
+ { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
337
+ ],
338
+ },
339
+ { name: 'sqrtPriceX96', internalType: 'uint160', type: 'uint160' },
397
340
  {
398
341
  name: 'poolConfiguration_',
399
342
  internalType: 'struct PoolConfiguration',
@@ -417,16 +360,6 @@ export const coinABI = [
417
360
  },
418
361
  ],
419
362
  },
420
- {
421
- name: 'positions_',
422
- internalType: 'struct LpPosition[]',
423
- type: 'tuple[]',
424
- components: [
425
- { name: 'tickLower', internalType: 'int24', type: 'int24' },
426
- { name: 'tickUpper', internalType: 'int24', type: 'int24' },
427
- { name: 'liquidity', internalType: 'uint128', type: 'uint128' },
428
- ],
429
- },
430
363
  ],
431
364
  name: 'initialize',
432
365
  outputs: [],
@@ -441,17 +374,26 @@ export const coinABI = [
441
374
  },
442
375
  {
443
376
  type: 'function',
444
- inputs: [],
445
- name: 'market',
446
- outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
447
- stateMutability: 'view',
448
- },
449
- {
450
- type: 'function',
451
- inputs: [],
452
- name: 'marketVersion',
453
- outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
454
- stateMutability: 'view',
377
+ inputs: [
378
+ { name: 'newHook', internalType: 'address', type: 'address' },
379
+ { name: 'additionalData', internalType: 'bytes', type: 'bytes' },
380
+ ],
381
+ name: 'migrateLiquidity',
382
+ outputs: [
383
+ {
384
+ name: 'newPoolKey',
385
+ internalType: 'struct PoolKey',
386
+ type: 'tuple',
387
+ components: [
388
+ { name: 'currency0', internalType: 'Currency', type: 'address' },
389
+ { name: 'currency1', internalType: 'Currency', type: 'address' },
390
+ { name: 'fee', internalType: 'uint24', type: 'uint24' },
391
+ { name: 'tickSpacing', internalType: 'int24', type: 'int24' },
392
+ { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
393
+ ],
394
+ },
395
+ ],
396
+ stateMutability: 'nonpayable',
455
397
  },
456
398
  {
457
399
  type: 'function',
@@ -506,30 +448,9 @@ export const coinABI = [
506
448
  {
507
449
  type: 'function',
508
450
  inputs: [],
509
- name: 'poolAddress',
510
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
511
- stateMutability: 'view',
512
- },
513
- {
514
- type: 'function',
515
- inputs: [],
516
- name: 'poolConfiguration',
517
- outputs: [
518
- { name: 'version', internalType: 'uint8', type: 'uint8' },
519
- { name: 'numPositions', internalType: 'uint16', type: 'uint16' },
520
- { name: 'fee', internalType: 'uint24', type: 'uint24' },
521
- { name: 'tickSpacing', internalType: 'int24', type: 'int24' },
522
- ],
523
- stateMutability: 'view',
524
- },
525
- {
526
- type: 'function',
527
- inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
528
- name: 'positions',
451
+ name: 'poolManager',
529
452
  outputs: [
530
- { name: 'tickLower', internalType: 'int24', type: 'int24' },
531
- { name: 'tickUpper', internalType: 'int24', type: 'int24' },
532
- { name: 'liquidity', internalType: 'uint128', type: 'uint128' },
453
+ { name: '', internalType: 'contract IPoolManager', type: 'address' },
533
454
  ],
534
455
  stateMutability: 'view',
535
456
  },
@@ -570,22 +491,6 @@ export const coinABI = [
570
491
  outputs: [],
571
492
  stateMutability: 'nonpayable',
572
493
  },
573
- {
574
- type: 'function',
575
- inputs: [
576
- { name: 'recipient', internalType: 'address', type: 'address' },
577
- { name: 'orderSize', internalType: 'uint256', type: 'uint256' },
578
- { name: 'minAmountOut', internalType: 'uint256', type: 'uint256' },
579
- { name: 'sqrtPriceLimitX96', internalType: 'uint160', type: 'uint160' },
580
- { name: 'tradeReferrer', internalType: 'address', type: 'address' },
581
- ],
582
- name: 'sell',
583
- outputs: [
584
- { name: '', internalType: 'uint256', type: 'uint256' },
585
- { name: '', internalType: 'uint256', type: 'uint256' },
586
- ],
587
- stateMutability: 'nonpayable',
588
- },
589
494
  {
590
495
  type: 'function',
591
496
  inputs: [{ name: 'newURI', internalType: 'string', type: 'string' }],
@@ -619,13 +524,6 @@ export const coinABI = [
619
524
  outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
620
525
  stateMutability: 'view',
621
526
  },
622
- {
623
- type: 'function',
624
- inputs: [],
625
- name: 'swapRouter',
626
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
627
- stateMutability: 'view',
628
- },
629
527
  {
630
528
  type: 'function',
631
529
  inputs: [],
@@ -668,24 +566,6 @@ export const coinABI = [
668
566
  outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
669
567
  stateMutability: 'nonpayable',
670
568
  },
671
- {
672
- type: 'function',
673
- inputs: [
674
- { name: 'amount0Owed', internalType: 'uint256', type: 'uint256' },
675
- { name: 'amount1Owed', internalType: 'uint256', type: 'uint256' },
676
- { name: '', internalType: 'bytes', type: 'bytes' },
677
- ],
678
- name: 'uniswapV3MintCallback',
679
- outputs: [],
680
- stateMutability: 'nonpayable',
681
- },
682
- {
683
- type: 'function',
684
- inputs: [],
685
- name: 'v3Factory',
686
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
687
- stateMutability: 'view',
688
- },
689
569
  {
690
570
  type: 'event',
691
571
  anonymous: false,
@@ -1042,6 +922,51 @@ export const coinABI = [
1042
922
  ],
1043
923
  name: 'Initialized',
1044
924
  },
925
+ {
926
+ type: 'event',
927
+ anonymous: false,
928
+ inputs: [
929
+ {
930
+ name: 'fromPoolKey',
931
+ internalType: 'struct PoolKey',
932
+ type: 'tuple',
933
+ components: [
934
+ { name: 'currency0', internalType: 'Currency', type: 'address' },
935
+ { name: 'currency1', internalType: 'Currency', type: 'address' },
936
+ { name: 'fee', internalType: 'uint24', type: 'uint24' },
937
+ { name: 'tickSpacing', internalType: 'int24', type: 'int24' },
938
+ { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
939
+ ],
940
+ indexed: false,
941
+ },
942
+ {
943
+ name: 'fromPoolKeyHash',
944
+ internalType: 'bytes32',
945
+ type: 'bytes32',
946
+ indexed: false,
947
+ },
948
+ {
949
+ name: 'toPoolKey',
950
+ internalType: 'struct PoolKey',
951
+ type: 'tuple',
952
+ components: [
953
+ { name: 'currency0', internalType: 'Currency', type: 'address' },
954
+ { name: 'currency1', internalType: 'Currency', type: 'address' },
955
+ { name: 'fee', internalType: 'uint24', type: 'uint24' },
956
+ { name: 'tickSpacing', internalType: 'int24', type: 'int24' },
957
+ { name: 'hooks', internalType: 'contract IHooks', type: 'address' },
958
+ ],
959
+ indexed: false,
960
+ },
961
+ {
962
+ name: 'toPoolKeyHash',
963
+ internalType: 'bytes32',
964
+ type: 'bytes32',
965
+ indexed: false,
966
+ },
967
+ ],
968
+ name: 'LiquidityMigrated',
969
+ },
1045
970
  {
1046
971
  type: 'event',
1047
972
  anonymous: false,
@@ -1107,17 +1032,6 @@ export const coinABI = [
1107
1032
  ],
1108
1033
  name: 'Transfer',
1109
1034
  },
1110
- {
1111
- type: 'error',
1112
- inputs: [{ name: 'target', internalType: 'address', type: 'address' }],
1113
- name: 'AddressEmptyCode',
1114
- },
1115
- {
1116
- type: 'error',
1117
- inputs: [{ name: 'account', internalType: 'address', type: 'address' }],
1118
- name: 'AddressInsufficientBalance',
1119
- },
1120
- { type: 'error', inputs: [], name: 'AddressZero' },
1121
1035
  { type: 'error', inputs: [], name: 'AddressZero' },
1122
1036
  { type: 'error', inputs: [], name: 'AlreadyOwner' },
1123
1037
  { type: 'error', inputs: [], name: 'CannotMintZeroLiquidity' },
@@ -1193,7 +1107,6 @@ export const coinABI = [
1193
1107
  { type: 'error', inputs: [], name: 'EthAmountTooSmall' },
1194
1108
  { type: 'error', inputs: [], name: 'EthTransferFailed' },
1195
1109
  { type: 'error', inputs: [], name: 'EthTransferInvalid' },
1196
- { type: 'error', inputs: [], name: 'FailedInnerCall' },
1197
1110
  { type: 'error', inputs: [], name: 'InitialOrderSizeTooLarge' },
1198
1111
  { type: 'error', inputs: [], name: 'InsufficientFunds' },
1199
1112
  { type: 'error', inputs: [], name: 'InsufficientLiquidity' },
@@ -1246,20 +1159,106 @@ export const coinABI = [
1246
1159
  { type: 'error', inputs: [], name: 'OnlyWeth' },
1247
1160
  { type: 'error', inputs: [], name: 'OwnerCannotBeAddressZero' },
1248
1161
  { type: 'error', inputs: [], name: 'ReentrancyGuardReentrantCall' },
1162
+ { type: 'error', inputs: [], name: 'SlippageBoundsExceeded' },
1163
+ { type: 'error', inputs: [], name: 'UseRevokeOwnershipToRemoveSelf' },
1164
+ ] as const
1165
+
1166
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1167
+ // BuySupplyWithSwapRouterHook
1168
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1169
+
1170
+ export const buySupplyWithSwapRouterHookABI = [
1171
+ {
1172
+ type: 'constructor',
1173
+ inputs: [
1174
+ {
1175
+ name: '_factory',
1176
+ internalType: 'contract IZoraFactory',
1177
+ type: 'address',
1178
+ },
1179
+ { name: '_swapRouter', internalType: 'address', type: 'address' },
1180
+ { name: '_poolManager', internalType: 'address', type: 'address' },
1181
+ ],
1182
+ stateMutability: 'nonpayable',
1183
+ },
1184
+ {
1185
+ type: 'function',
1186
+ inputs: [
1187
+ { name: 'sender', internalType: 'address', type: 'address' },
1188
+ { name: 'coin', internalType: 'contract ICoin', type: 'address' },
1189
+ { name: 'hookData', internalType: 'bytes', type: 'bytes' },
1190
+ ],
1191
+ name: 'afterCoinDeploy',
1192
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
1193
+ stateMutability: 'payable',
1194
+ },
1195
+ {
1196
+ type: 'function',
1197
+ inputs: [],
1198
+ name: 'factory',
1199
+ outputs: [
1200
+ { name: '', internalType: 'contract IZoraFactory', type: 'address' },
1201
+ ],
1202
+ stateMutability: 'view',
1203
+ },
1204
+ {
1205
+ type: 'function',
1206
+ inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }],
1207
+ name: 'supportsInterface',
1208
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1209
+ stateMutability: 'pure',
1210
+ },
1211
+ {
1212
+ type: 'function',
1213
+ inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
1214
+ name: 'unlockCallback',
1215
+ outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
1216
+ stateMutability: 'nonpayable',
1217
+ },
1218
+ {
1219
+ type: 'error',
1220
+ inputs: [{ name: 'target', internalType: 'address', type: 'address' }],
1221
+ name: 'AddressEmptyCode',
1222
+ },
1223
+ {
1224
+ type: 'error',
1225
+ inputs: [{ name: 'account', internalType: 'address', type: 'address' }],
1226
+ name: 'AddressInsufficientBalance',
1227
+ },
1228
+ { type: 'error', inputs: [], name: 'AddressZero' },
1229
+ {
1230
+ type: 'error',
1231
+ inputs: [{ name: 'balance', internalType: 'uint256', type: 'uint256' }],
1232
+ name: 'CoinBalanceNot0',
1233
+ },
1234
+ {
1235
+ type: 'error',
1236
+ inputs: [{ name: 'balance', internalType: 'uint256', type: 'uint256' }],
1237
+ name: 'CurrencyBalanceNot0',
1238
+ },
1239
+ { type: 'error', inputs: [], name: 'Erc20NotReceived' },
1240
+ { type: 'error', inputs: [], name: 'FailedInnerCall' },
1241
+ { type: 'error', inputs: [], name: 'HookNotImplemented' },
1242
+ { type: 'error', inputs: [], name: 'InvalidSwapRouterCall' },
1243
+ { type: 'error', inputs: [], name: 'NotFactory' },
1244
+ { type: 'error', inputs: [], name: 'OnlyPoolManager' },
1249
1245
  {
1250
1246
  type: 'error',
1251
1247
  inputs: [{ name: 'token', internalType: 'address', type: 'address' }],
1252
1248
  name: 'SafeERC20FailedOperation',
1253
1249
  },
1254
- { type: 'error', inputs: [], name: 'SlippageBoundsExceeded' },
1255
- { type: 'error', inputs: [], name: 'UseRevokeOwnershipToRemoveSelf' },
1250
+ {
1251
+ type: 'error',
1252
+ inputs: [{ name: 'error', internalType: 'bytes', type: 'bytes' }],
1253
+ name: 'SwapReverted',
1254
+ },
1256
1255
  ] as const
1257
1256
 
1258
1257
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1259
- // CoinV4
1258
+ // ContentCoin
1260
1259
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1261
1260
 
1262
- export const coinV4ABI = [
1261
+ export const contentCoinABI = [
1263
1262
  {
1264
1263
  type: 'constructor',
1265
1264
  inputs: [
@@ -4214,7 +4213,6 @@ export const zoraFactoryImplABI = [
4214
4213
  {
4215
4214
  type: 'constructor',
4216
4215
  inputs: [
4217
- { name: '_coinImpl', internalType: 'address', type: 'address' },
4218
4216
  { name: '_coinV4Impl', internalType: 'address', type: 'address' },
4219
4217
  { name: '_creatorCoinImpl', internalType: 'address', type: 'address' },
4220
4218
  { name: '_contentCoinHook', internalType: 'address', type: 'address' },
@@ -4229,6 +4227,13 @@ export const zoraFactoryImplABI = [
4229
4227
  outputs: [{ name: '', internalType: 'string', type: 'string' }],
4230
4228
  stateMutability: 'view',
4231
4229
  },
4230
+ {
4231
+ type: 'function',
4232
+ inputs: [],
4233
+ name: 'acceptOwnership',
4234
+ outputs: [],
4235
+ stateMutability: 'nonpayable',
4236
+ },
4232
4237
  {
4233
4238
  type: 'function',
4234
4239
  inputs: [
@@ -4243,13 +4248,6 @@ export const zoraFactoryImplABI = [
4243
4248
  outputs: [{ name: '', internalType: 'address', type: 'address' }],
4244
4249
  stateMutability: 'view',
4245
4250
  },
4246
- {
4247
- type: 'function',
4248
- inputs: [],
4249
- name: 'coinImpl',
4250
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
4251
- stateMutability: 'view',
4252
- },
4253
4251
  {
4254
4252
  type: 'function',
4255
4253
  inputs: [],
@@ -4343,7 +4341,7 @@ export const zoraFactoryImplABI = [
4343
4341
  { name: 'symbol', internalType: 'string', type: 'string' },
4344
4342
  { name: 'poolConfig', internalType: 'bytes', type: 'bytes' },
4345
4343
  { name: 'platformReferrer', internalType: 'address', type: 'address' },
4346
- { name: 'orderSize', internalType: 'uint256', type: 'uint256' },
4344
+ { name: '', internalType: 'uint256', type: 'uint256' },
4347
4345
  ],
4348
4346
  name: 'deploy',
4349
4347
  outputs: [
@@ -4418,6 +4416,13 @@ export const zoraFactoryImplABI = [
4418
4416
  outputs: [{ name: '', internalType: 'address', type: 'address' }],
4419
4417
  stateMutability: 'view',
4420
4418
  },
4419
+ {
4420
+ type: 'function',
4421
+ inputs: [],
4422
+ name: 'pendingOwner',
4423
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
4424
+ stateMutability: 'view',
4425
+ },
4421
4426
  {
4422
4427
  type: 'function',
4423
4428
  inputs: [],
@@ -4659,6 +4664,25 @@ export const zoraFactoryImplABI = [
4659
4664
  ],
4660
4665
  name: 'Initialized',
4661
4666
  },
4667
+ {
4668
+ type: 'event',
4669
+ anonymous: false,
4670
+ inputs: [
4671
+ {
4672
+ name: 'previousOwner',
4673
+ internalType: 'address',
4674
+ type: 'address',
4675
+ indexed: true,
4676
+ },
4677
+ {
4678
+ name: 'newOwner',
4679
+ internalType: 'address',
4680
+ type: 'address',
4681
+ indexed: true,
4682
+ },
4683
+ ],
4684
+ name: 'OwnershipTransferStarted',
4685
+ },
4662
4686
  {
4663
4687
  type: 'event',
4664
4688
  anonymous: false,
@@ -4696,13 +4720,7 @@ export const zoraFactoryImplABI = [
4696
4720
  inputs: [{ name: 'target', internalType: 'address', type: 'address' }],
4697
4721
  name: 'AddressEmptyCode',
4698
4722
  },
4699
- {
4700
- type: 'error',
4701
- inputs: [{ name: 'account', internalType: 'address', type: 'address' }],
4702
- name: 'AddressInsufficientBalance',
4703
- },
4704
4723
  { type: 'error', inputs: [], name: 'ArrayLengthMismatch' },
4705
- { type: 'error', inputs: [], name: 'CannotMintZeroLiquidity' },
4706
4724
  { type: 'error', inputs: [], name: 'ConfigTickLowerMustBeLessThanTickUpper' },
4707
4725
  { type: 'error', inputs: [], name: 'Deprecated' },
4708
4726
  { type: 'error', inputs: [], name: 'ERC1167FailedCreateClone' },
@@ -4714,7 +4732,6 @@ export const zoraFactoryImplABI = [
4714
4732
  name: 'ERC1967InvalidImplementation',
4715
4733
  },
4716
4734
  { type: 'error', inputs: [], name: 'ERC1967NonPayable' },
4717
- { type: 'error', inputs: [], name: 'ERC20TransferAmountMismatch' },
4718
4735
  { type: 'error', inputs: [], name: 'EthTransferInvalid' },
4719
4736
  { type: 'error', inputs: [], name: 'FailedInnerCall' },
4720
4737
  { type: 'error', inputs: [], name: 'InvalidConfig' },
@@ -4729,14 +4746,6 @@ export const zoraFactoryImplABI = [
4729
4746
  ],
4730
4747
  name: 'InvalidTickRangeMisordered',
4731
4748
  },
4732
- {
4733
- type: 'error',
4734
- inputs: [
4735
- { name: 'tickLower', internalType: 'int24', type: 'int24' },
4736
- { name: 'tickUpper', internalType: 'int24', type: 'int24' },
4737
- ],
4738
- name: 'InvalidTickRangeMisordered',
4739
- },
4740
4749
  {
4741
4750
  type: 'error',
4742
4751
  inputs: [
@@ -4758,11 +4767,6 @@ export const zoraFactoryImplABI = [
4758
4767
  name: 'OwnableUnauthorizedAccount',
4759
4768
  },
4760
4769
  { type: 'error', inputs: [], name: 'ReentrancyGuardReentrantCall' },
4761
- {
4762
- type: 'error',
4763
- inputs: [{ name: 'token', internalType: 'address', type: 'address' }],
4764
- name: 'SafeERC20FailedOperation',
4765
- },
4766
4770
  { type: 'error', inputs: [], name: 'UUPSUnauthorizedCallContext' },
4767
4771
  {
4768
4772
  type: 'error',