@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
package/dist/index.js CHANGED
@@ -1344,18 +1344,7 @@ var buySupplyWithV4SwapHookABI = [
1344
1344
  ],
1345
1345
  name: "BuyInitialSupply"
1346
1346
  },
1347
- {
1348
- type: "error",
1349
- inputs: [{ name: "target", internalType: "address", type: "address" }],
1350
- name: "AddressEmptyCode"
1351
- },
1352
- {
1353
- type: "error",
1354
- inputs: [{ name: "account", internalType: "address", type: "address" }],
1355
- name: "AddressInsufficientBalance"
1356
- },
1357
1347
  { type: "error", inputs: [], name: "AddressZero" },
1358
- { type: "error", inputs: [], name: "FailedInnerCall" },
1359
1348
  { type: "error", inputs: [], name: "HookNotImplemented" },
1360
1349
  {
1361
1350
  type: "error",
@@ -1373,7 +1362,6 @@ var buySupplyWithV4SwapHookABI = [
1373
1362
  inputs: [{ name: "token", internalType: "address", type: "address" }],
1374
1363
  name: "SafeERC20FailedOperation"
1375
1364
  },
1376
- { type: "error", inputs: [], name: "V3RouteCannotStartWithInputCurrency" },
1377
1365
  { type: "error", inputs: [], name: "V3RouteDoesNotConnectToV4RouteStart" }
1378
1366
  ];
1379
1367
  var contentCoinABI = [
@@ -4302,31 +4290,6 @@ var iUniswapV3PoolABI = [
4302
4290
  stateMutability: "nonpayable"
4303
4291
  }
4304
4292
  ];
4305
- var iUniversalRouterABI = [
4306
- {
4307
- type: "function",
4308
- inputs: [
4309
- { name: "commands", internalType: "bytes", type: "bytes" },
4310
- { name: "inputs", internalType: "bytes[]", type: "bytes[]" },
4311
- { name: "deadline", internalType: "uint256", type: "uint256" }
4312
- ],
4313
- name: "execute",
4314
- outputs: [],
4315
- stateMutability: "payable"
4316
- },
4317
- { type: "error", inputs: [], name: "ETHNotAccepted" },
4318
- {
4319
- type: "error",
4320
- inputs: [
4321
- { name: "commandIndex", internalType: "uint256", type: "uint256" },
4322
- { name: "message", internalType: "bytes", type: "bytes" }
4323
- ],
4324
- name: "ExecutionFailed"
4325
- },
4326
- { type: "error", inputs: [], name: "InvalidEthSender" },
4327
- { type: "error", inputs: [], name: "LengthMismatch" },
4328
- { type: "error", inputs: [], name: "TransactionDeadlinePassed" }
4329
- ];
4330
4293
  var zoraFactoryImplABI = [
4331
4294
  {
4332
4295
  type: "constructor",
@@ -4876,7 +4839,6 @@ var zoraFactoryImplABI = [
4876
4839
  { type: "error", inputs: [], name: "ArrayLengthMismatch" },
4877
4840
  { type: "error", inputs: [], name: "ConfigTickLowerMustBeLessThanTickUpper" },
4878
4841
  { type: "error", inputs: [], name: "Deprecated" },
4879
- { type: "error", inputs: [], name: "ERC1167FailedCreateClone" },
4880
4842
  {
4881
4843
  type: "error",
4882
4844
  inputs: [
@@ -4886,7 +4848,16 @@ var zoraFactoryImplABI = [
4886
4848
  },
4887
4849
  { type: "error", inputs: [], name: "ERC1967NonPayable" },
4888
4850
  { type: "error", inputs: [], name: "EthTransferInvalid" },
4889
- { type: "error", inputs: [], name: "FailedInnerCall" },
4851
+ { type: "error", inputs: [], name: "FailedCall" },
4852
+ { type: "error", inputs: [], name: "FailedDeployment" },
4853
+ {
4854
+ type: "error",
4855
+ inputs: [
4856
+ { name: "balance", internalType: "uint256", type: "uint256" },
4857
+ { name: "needed", internalType: "uint256", type: "uint256" }
4858
+ ],
4859
+ name: "InsufficientBalance"
4860
+ },
4890
4861
  { type: "error", inputs: [], name: "InvalidConfig" },
4891
4862
  { type: "error", inputs: [], name: "InvalidHook" },
4892
4863
  { type: "error", inputs: [], name: "InvalidInitialization" },
@@ -4937,6 +4908,942 @@ var zoraFactoryImplABI = [
4937
4908
  { type: "error", inputs: [], name: "ZeroDiscoveryPositions" },
4938
4909
  { type: "error", inputs: [], name: "ZeroDiscoverySupplyShare" }
4939
4910
  ];
4911
+ var zoraV4CoinHookABI = [
4912
+ {
4913
+ type: "constructor",
4914
+ inputs: [
4915
+ {
4916
+ name: "poolManager_",
4917
+ internalType: "contract IPoolManager",
4918
+ type: "address"
4919
+ },
4920
+ {
4921
+ name: "coinVersionLookup_",
4922
+ internalType: "contract IDeployedCoinVersionLookup",
4923
+ type: "address"
4924
+ },
4925
+ {
4926
+ name: "trustedMsgSenderLookup_",
4927
+ internalType: "contract ITrustedMsgSenderProviderLookup",
4928
+ type: "address"
4929
+ },
4930
+ {
4931
+ name: "upgradeGate_",
4932
+ internalType: "contract IHooksUpgradeGate",
4933
+ type: "address"
4934
+ },
4935
+ {
4936
+ name: "zoraLimitOrderBook_",
4937
+ internalType: "contract IZoraLimitOrderBookCoinsInterface",
4938
+ type: "address"
4939
+ },
4940
+ {
4941
+ name: "zoraHookRegistry_",
4942
+ internalType: "contract IZoraHookRegistry",
4943
+ type: "address"
4944
+ }
4945
+ ],
4946
+ stateMutability: "nonpayable"
4947
+ },
4948
+ { type: "receive", stateMutability: "payable" },
4949
+ {
4950
+ type: "function",
4951
+ inputs: [
4952
+ { name: "sender", internalType: "address", type: "address" },
4953
+ {
4954
+ name: "key",
4955
+ internalType: "struct PoolKey",
4956
+ type: "tuple",
4957
+ components: [
4958
+ { name: "currency0", internalType: "Currency", type: "address" },
4959
+ { name: "currency1", internalType: "Currency", type: "address" },
4960
+ { name: "fee", internalType: "uint24", type: "uint24" },
4961
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
4962
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
4963
+ ]
4964
+ },
4965
+ {
4966
+ name: "params",
4967
+ internalType: "struct ModifyLiquidityParams",
4968
+ type: "tuple",
4969
+ components: [
4970
+ { name: "tickLower", internalType: "int24", type: "int24" },
4971
+ { name: "tickUpper", internalType: "int24", type: "int24" },
4972
+ { name: "liquidityDelta", internalType: "int256", type: "int256" },
4973
+ { name: "salt", internalType: "bytes32", type: "bytes32" }
4974
+ ]
4975
+ },
4976
+ { name: "delta", internalType: "BalanceDelta", type: "int256" },
4977
+ { name: "feesAccrued", internalType: "BalanceDelta", type: "int256" },
4978
+ { name: "hookData", internalType: "bytes", type: "bytes" }
4979
+ ],
4980
+ name: "afterAddLiquidity",
4981
+ outputs: [
4982
+ { name: "", internalType: "bytes4", type: "bytes4" },
4983
+ { name: "", internalType: "BalanceDelta", type: "int256" }
4984
+ ],
4985
+ stateMutability: "nonpayable"
4986
+ },
4987
+ {
4988
+ type: "function",
4989
+ inputs: [
4990
+ { name: "sender", internalType: "address", type: "address" },
4991
+ {
4992
+ name: "key",
4993
+ internalType: "struct PoolKey",
4994
+ type: "tuple",
4995
+ components: [
4996
+ { name: "currency0", internalType: "Currency", type: "address" },
4997
+ { name: "currency1", internalType: "Currency", type: "address" },
4998
+ { name: "fee", internalType: "uint24", type: "uint24" },
4999
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5000
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5001
+ ]
5002
+ },
5003
+ { name: "amount0", internalType: "uint256", type: "uint256" },
5004
+ { name: "amount1", internalType: "uint256", type: "uint256" },
5005
+ { name: "hookData", internalType: "bytes", type: "bytes" }
5006
+ ],
5007
+ name: "afterDonate",
5008
+ outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }],
5009
+ stateMutability: "nonpayable"
5010
+ },
5011
+ {
5012
+ type: "function",
5013
+ inputs: [
5014
+ { name: "sender", internalType: "address", type: "address" },
5015
+ {
5016
+ name: "key",
5017
+ internalType: "struct PoolKey",
5018
+ type: "tuple",
5019
+ components: [
5020
+ { name: "currency0", internalType: "Currency", type: "address" },
5021
+ { name: "currency1", internalType: "Currency", type: "address" },
5022
+ { name: "fee", internalType: "uint24", type: "uint24" },
5023
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5024
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5025
+ ]
5026
+ },
5027
+ { name: "sqrtPriceX96", internalType: "uint160", type: "uint160" },
5028
+ { name: "tick", internalType: "int24", type: "int24" }
5029
+ ],
5030
+ name: "afterInitialize",
5031
+ outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }],
5032
+ stateMutability: "nonpayable"
5033
+ },
5034
+ {
5035
+ type: "function",
5036
+ inputs: [
5037
+ { name: "sender", internalType: "address", type: "address" },
5038
+ {
5039
+ name: "key",
5040
+ internalType: "struct PoolKey",
5041
+ type: "tuple",
5042
+ components: [
5043
+ { name: "currency0", internalType: "Currency", type: "address" },
5044
+ { name: "currency1", internalType: "Currency", type: "address" },
5045
+ { name: "fee", internalType: "uint24", type: "uint24" },
5046
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5047
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5048
+ ]
5049
+ },
5050
+ {
5051
+ name: "params",
5052
+ internalType: "struct ModifyLiquidityParams",
5053
+ type: "tuple",
5054
+ components: [
5055
+ { name: "tickLower", internalType: "int24", type: "int24" },
5056
+ { name: "tickUpper", internalType: "int24", type: "int24" },
5057
+ { name: "liquidityDelta", internalType: "int256", type: "int256" },
5058
+ { name: "salt", internalType: "bytes32", type: "bytes32" }
5059
+ ]
5060
+ },
5061
+ { name: "delta", internalType: "BalanceDelta", type: "int256" },
5062
+ { name: "feesAccrued", internalType: "BalanceDelta", type: "int256" },
5063
+ { name: "hookData", internalType: "bytes", type: "bytes" }
5064
+ ],
5065
+ name: "afterRemoveLiquidity",
5066
+ outputs: [
5067
+ { name: "", internalType: "bytes4", type: "bytes4" },
5068
+ { name: "", internalType: "BalanceDelta", type: "int256" }
5069
+ ],
5070
+ stateMutability: "nonpayable"
5071
+ },
5072
+ {
5073
+ type: "function",
5074
+ inputs: [
5075
+ { name: "sender", internalType: "address", type: "address" },
5076
+ {
5077
+ name: "key",
5078
+ internalType: "struct PoolKey",
5079
+ type: "tuple",
5080
+ components: [
5081
+ { name: "currency0", internalType: "Currency", type: "address" },
5082
+ { name: "currency1", internalType: "Currency", type: "address" },
5083
+ { name: "fee", internalType: "uint24", type: "uint24" },
5084
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5085
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5086
+ ]
5087
+ },
5088
+ {
5089
+ name: "params",
5090
+ internalType: "struct SwapParams",
5091
+ type: "tuple",
5092
+ components: [
5093
+ { name: "zeroForOne", internalType: "bool", type: "bool" },
5094
+ { name: "amountSpecified", internalType: "int256", type: "int256" },
5095
+ {
5096
+ name: "sqrtPriceLimitX96",
5097
+ internalType: "uint160",
5098
+ type: "uint160"
5099
+ }
5100
+ ]
5101
+ },
5102
+ { name: "delta", internalType: "BalanceDelta", type: "int256" },
5103
+ { name: "hookData", internalType: "bytes", type: "bytes" }
5104
+ ],
5105
+ name: "afterSwap",
5106
+ outputs: [
5107
+ { name: "", internalType: "bytes4", type: "bytes4" },
5108
+ { name: "", internalType: "int128", type: "int128" }
5109
+ ],
5110
+ stateMutability: "nonpayable"
5111
+ },
5112
+ {
5113
+ type: "function",
5114
+ inputs: [
5115
+ { name: "sender", internalType: "address", type: "address" },
5116
+ {
5117
+ name: "key",
5118
+ internalType: "struct PoolKey",
5119
+ type: "tuple",
5120
+ components: [
5121
+ { name: "currency0", internalType: "Currency", type: "address" },
5122
+ { name: "currency1", internalType: "Currency", type: "address" },
5123
+ { name: "fee", internalType: "uint24", type: "uint24" },
5124
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5125
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5126
+ ]
5127
+ },
5128
+ {
5129
+ name: "params",
5130
+ internalType: "struct ModifyLiquidityParams",
5131
+ type: "tuple",
5132
+ components: [
5133
+ { name: "tickLower", internalType: "int24", type: "int24" },
5134
+ { name: "tickUpper", internalType: "int24", type: "int24" },
5135
+ { name: "liquidityDelta", internalType: "int256", type: "int256" },
5136
+ { name: "salt", internalType: "bytes32", type: "bytes32" }
5137
+ ]
5138
+ },
5139
+ { name: "hookData", internalType: "bytes", type: "bytes" }
5140
+ ],
5141
+ name: "beforeAddLiquidity",
5142
+ outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }],
5143
+ stateMutability: "nonpayable"
5144
+ },
5145
+ {
5146
+ type: "function",
5147
+ inputs: [
5148
+ { name: "sender", internalType: "address", type: "address" },
5149
+ {
5150
+ name: "key",
5151
+ internalType: "struct PoolKey",
5152
+ type: "tuple",
5153
+ components: [
5154
+ { name: "currency0", internalType: "Currency", type: "address" },
5155
+ { name: "currency1", internalType: "Currency", type: "address" },
5156
+ { name: "fee", internalType: "uint24", type: "uint24" },
5157
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5158
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5159
+ ]
5160
+ },
5161
+ { name: "amount0", internalType: "uint256", type: "uint256" },
5162
+ { name: "amount1", internalType: "uint256", type: "uint256" },
5163
+ { name: "hookData", internalType: "bytes", type: "bytes" }
5164
+ ],
5165
+ name: "beforeDonate",
5166
+ outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }],
5167
+ stateMutability: "nonpayable"
5168
+ },
5169
+ {
5170
+ type: "function",
5171
+ inputs: [
5172
+ { name: "sender", internalType: "address", type: "address" },
5173
+ {
5174
+ name: "key",
5175
+ internalType: "struct PoolKey",
5176
+ type: "tuple",
5177
+ components: [
5178
+ { name: "currency0", internalType: "Currency", type: "address" },
5179
+ { name: "currency1", internalType: "Currency", type: "address" },
5180
+ { name: "fee", internalType: "uint24", type: "uint24" },
5181
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5182
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5183
+ ]
5184
+ },
5185
+ { name: "sqrtPriceX96", internalType: "uint160", type: "uint160" }
5186
+ ],
5187
+ name: "beforeInitialize",
5188
+ outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }],
5189
+ stateMutability: "nonpayable"
5190
+ },
5191
+ {
5192
+ type: "function",
5193
+ inputs: [
5194
+ { name: "sender", internalType: "address", type: "address" },
5195
+ {
5196
+ name: "key",
5197
+ internalType: "struct PoolKey",
5198
+ type: "tuple",
5199
+ components: [
5200
+ { name: "currency0", internalType: "Currency", type: "address" },
5201
+ { name: "currency1", internalType: "Currency", type: "address" },
5202
+ { name: "fee", internalType: "uint24", type: "uint24" },
5203
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5204
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5205
+ ]
5206
+ },
5207
+ {
5208
+ name: "params",
5209
+ internalType: "struct ModifyLiquidityParams",
5210
+ type: "tuple",
5211
+ components: [
5212
+ { name: "tickLower", internalType: "int24", type: "int24" },
5213
+ { name: "tickUpper", internalType: "int24", type: "int24" },
5214
+ { name: "liquidityDelta", internalType: "int256", type: "int256" },
5215
+ { name: "salt", internalType: "bytes32", type: "bytes32" }
5216
+ ]
5217
+ },
5218
+ { name: "hookData", internalType: "bytes", type: "bytes" }
5219
+ ],
5220
+ name: "beforeRemoveLiquidity",
5221
+ outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }],
5222
+ stateMutability: "nonpayable"
5223
+ },
5224
+ {
5225
+ type: "function",
5226
+ inputs: [
5227
+ { name: "sender", internalType: "address", type: "address" },
5228
+ {
5229
+ name: "key",
5230
+ internalType: "struct PoolKey",
5231
+ type: "tuple",
5232
+ components: [
5233
+ { name: "currency0", internalType: "Currency", type: "address" },
5234
+ { name: "currency1", internalType: "Currency", type: "address" },
5235
+ { name: "fee", internalType: "uint24", type: "uint24" },
5236
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5237
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5238
+ ]
5239
+ },
5240
+ {
5241
+ name: "params",
5242
+ internalType: "struct SwapParams",
5243
+ type: "tuple",
5244
+ components: [
5245
+ { name: "zeroForOne", internalType: "bool", type: "bool" },
5246
+ { name: "amountSpecified", internalType: "int256", type: "int256" },
5247
+ {
5248
+ name: "sqrtPriceLimitX96",
5249
+ internalType: "uint160",
5250
+ type: "uint160"
5251
+ }
5252
+ ]
5253
+ },
5254
+ { name: "hookData", internalType: "bytes", type: "bytes" }
5255
+ ],
5256
+ name: "beforeSwap",
5257
+ outputs: [
5258
+ { name: "", internalType: "bytes4", type: "bytes4" },
5259
+ { name: "", internalType: "BeforeSwapDelta", type: "int256" },
5260
+ { name: "", internalType: "uint24", type: "uint24" }
5261
+ ],
5262
+ stateMutability: "nonpayable"
5263
+ },
5264
+ {
5265
+ type: "function",
5266
+ inputs: [],
5267
+ name: "contractVersion",
5268
+ outputs: [{ name: "", internalType: "string", type: "string" }],
5269
+ stateMutability: "pure"
5270
+ },
5271
+ {
5272
+ type: "function",
5273
+ inputs: [],
5274
+ name: "getHookPermissions",
5275
+ outputs: [
5276
+ {
5277
+ name: "",
5278
+ internalType: "struct Hooks.Permissions",
5279
+ type: "tuple",
5280
+ components: [
5281
+ { name: "beforeInitialize", internalType: "bool", type: "bool" },
5282
+ { name: "afterInitialize", internalType: "bool", type: "bool" },
5283
+ { name: "beforeAddLiquidity", internalType: "bool", type: "bool" },
5284
+ { name: "afterAddLiquidity", internalType: "bool", type: "bool" },
5285
+ { name: "beforeRemoveLiquidity", internalType: "bool", type: "bool" },
5286
+ { name: "afterRemoveLiquidity", internalType: "bool", type: "bool" },
5287
+ { name: "beforeSwap", internalType: "bool", type: "bool" },
5288
+ { name: "afterSwap", internalType: "bool", type: "bool" },
5289
+ { name: "beforeDonate", internalType: "bool", type: "bool" },
5290
+ { name: "afterDonate", internalType: "bool", type: "bool" },
5291
+ { name: "beforeSwapReturnDelta", internalType: "bool", type: "bool" },
5292
+ { name: "afterSwapReturnDelta", internalType: "bool", type: "bool" },
5293
+ {
5294
+ name: "afterAddLiquidityReturnDelta",
5295
+ internalType: "bool",
5296
+ type: "bool"
5297
+ },
5298
+ {
5299
+ name: "afterRemoveLiquidityReturnDelta",
5300
+ internalType: "bool",
5301
+ type: "bool"
5302
+ }
5303
+ ]
5304
+ }
5305
+ ],
5306
+ stateMutability: "pure"
5307
+ },
5308
+ {
5309
+ type: "function",
5310
+ inputs: [
5311
+ {
5312
+ name: "key",
5313
+ internalType: "struct PoolKey",
5314
+ type: "tuple",
5315
+ components: [
5316
+ { name: "currency0", internalType: "Currency", type: "address" },
5317
+ { name: "currency1", internalType: "Currency", type: "address" },
5318
+ { name: "fee", internalType: "uint24", type: "uint24" },
5319
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5320
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5321
+ ]
5322
+ }
5323
+ ],
5324
+ name: "getPoolCoin",
5325
+ outputs: [
5326
+ {
5327
+ name: "",
5328
+ internalType: "struct IZoraV4CoinHook.PoolCoin",
5329
+ type: "tuple",
5330
+ components: [
5331
+ { name: "coin", internalType: "address", type: "address" },
5332
+ {
5333
+ name: "positions",
5334
+ internalType: "struct LpPosition[]",
5335
+ type: "tuple[]",
5336
+ components: [
5337
+ { name: "tickLower", internalType: "int24", type: "int24" },
5338
+ { name: "tickUpper", internalType: "int24", type: "int24" },
5339
+ { name: "liquidity", internalType: "uint128", type: "uint128" }
5340
+ ]
5341
+ }
5342
+ ]
5343
+ }
5344
+ ],
5345
+ stateMutability: "view"
5346
+ },
5347
+ {
5348
+ type: "function",
5349
+ inputs: [{ name: "poolKeyHash", internalType: "bytes32", type: "bytes32" }],
5350
+ name: "getPoolCoinByHash",
5351
+ outputs: [
5352
+ {
5353
+ name: "",
5354
+ internalType: "struct IZoraV4CoinHook.PoolCoin",
5355
+ type: "tuple",
5356
+ components: [
5357
+ { name: "coin", internalType: "address", type: "address" },
5358
+ {
5359
+ name: "positions",
5360
+ internalType: "struct LpPosition[]",
5361
+ type: "tuple[]",
5362
+ components: [
5363
+ { name: "tickLower", internalType: "int24", type: "int24" },
5364
+ { name: "tickUpper", internalType: "int24", type: "int24" },
5365
+ { name: "liquidity", internalType: "uint128", type: "uint128" }
5366
+ ]
5367
+ }
5368
+ ]
5369
+ }
5370
+ ],
5371
+ stateMutability: "view"
5372
+ },
5373
+ {
5374
+ type: "function",
5375
+ inputs: [],
5376
+ name: "getTrustedMsgSenderLookup",
5377
+ outputs: [
5378
+ {
5379
+ name: "",
5380
+ internalType: "contract ITrustedMsgSenderProviderLookup",
5381
+ type: "address"
5382
+ }
5383
+ ],
5384
+ stateMutability: "view"
5385
+ },
5386
+ {
5387
+ type: "function",
5388
+ inputs: [
5389
+ {
5390
+ name: "poolKey",
5391
+ internalType: "struct PoolKey",
5392
+ type: "tuple",
5393
+ components: [
5394
+ { name: "currency0", internalType: "Currency", type: "address" },
5395
+ { name: "currency1", internalType: "Currency", type: "address" },
5396
+ { name: "fee", internalType: "uint24", type: "uint24" },
5397
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5398
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5399
+ ]
5400
+ },
5401
+ { name: "coin", internalType: "address", type: "address" },
5402
+ { name: "sqrtPriceX96", internalType: "uint160", type: "uint160" },
5403
+ {
5404
+ name: "migratedLiquidity",
5405
+ internalType: "struct BurnedPosition[]",
5406
+ type: "tuple[]",
5407
+ components: [
5408
+ { name: "tickLower", internalType: "int24", type: "int24" },
5409
+ { name: "tickUpper", internalType: "int24", type: "int24" },
5410
+ { name: "amount0Received", internalType: "uint128", type: "uint128" },
5411
+ { name: "amount1Received", internalType: "uint128", type: "uint128" }
5412
+ ]
5413
+ },
5414
+ { name: "additionalData", internalType: "bytes", type: "bytes" }
5415
+ ],
5416
+ name: "initializeFromMigration",
5417
+ outputs: [],
5418
+ stateMutability: "nonpayable"
5419
+ },
5420
+ {
5421
+ type: "function",
5422
+ inputs: [
5423
+ {
5424
+ name: "poolKey",
5425
+ internalType: "struct PoolKey",
5426
+ type: "tuple",
5427
+ components: [
5428
+ { name: "currency0", internalType: "Currency", type: "address" },
5429
+ { name: "currency1", internalType: "Currency", type: "address" },
5430
+ { name: "fee", internalType: "uint24", type: "uint24" },
5431
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5432
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5433
+ ]
5434
+ },
5435
+ { name: "coin", internalType: "address", type: "address" },
5436
+ { name: "sqrtPriceX96", internalType: "uint160", type: "uint160" },
5437
+ {
5438
+ name: "migratedLiquidity",
5439
+ internalType: "struct BurnedPosition[]",
5440
+ type: "tuple[]",
5441
+ components: [
5442
+ { name: "tickLower", internalType: "int24", type: "int24" },
5443
+ { name: "tickUpper", internalType: "int24", type: "int24" },
5444
+ { name: "amount0Received", internalType: "uint128", type: "uint128" },
5445
+ { name: "amount1Received", internalType: "uint128", type: "uint128" }
5446
+ ]
5447
+ },
5448
+ { name: "additionalData", internalType: "bytes", type: "bytes" }
5449
+ ],
5450
+ name: "initializeFromMigrationWithUpdateableFee",
5451
+ outputs: [
5452
+ { name: "fee", internalType: "uint24", type: "uint24" },
5453
+ { name: "tickSpacing", internalType: "int24", type: "int24" }
5454
+ ],
5455
+ stateMutability: "nonpayable"
5456
+ },
5457
+ {
5458
+ type: "function",
5459
+ inputs: [{ name: "sender", internalType: "address", type: "address" }],
5460
+ name: "isTrustedMessageSender",
5461
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
5462
+ stateMutability: "view"
5463
+ },
5464
+ {
5465
+ type: "function",
5466
+ inputs: [
5467
+ { name: "newHook", internalType: "address", type: "address" },
5468
+ {
5469
+ name: "poolKey",
5470
+ internalType: "struct PoolKey",
5471
+ type: "tuple",
5472
+ components: [
5473
+ { name: "currency0", internalType: "Currency", type: "address" },
5474
+ { name: "currency1", internalType: "Currency", type: "address" },
5475
+ { name: "fee", internalType: "uint24", type: "uint24" },
5476
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5477
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5478
+ ]
5479
+ },
5480
+ { name: "additionalData", internalType: "bytes", type: "bytes" }
5481
+ ],
5482
+ name: "migrateLiquidity",
5483
+ outputs: [
5484
+ {
5485
+ name: "newPoolKey",
5486
+ internalType: "struct PoolKey",
5487
+ type: "tuple",
5488
+ components: [
5489
+ { name: "currency0", internalType: "Currency", type: "address" },
5490
+ { name: "currency1", internalType: "Currency", type: "address" },
5491
+ { name: "fee", internalType: "uint24", type: "uint24" },
5492
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5493
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5494
+ ]
5495
+ }
5496
+ ],
5497
+ stateMutability: "nonpayable"
5498
+ },
5499
+ {
5500
+ type: "function",
5501
+ inputs: [],
5502
+ name: "poolManager",
5503
+ outputs: [
5504
+ { name: "", internalType: "contract IPoolManager", type: "address" }
5505
+ ],
5506
+ stateMutability: "view"
5507
+ },
5508
+ {
5509
+ type: "function",
5510
+ inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }],
5511
+ name: "supportsInterface",
5512
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
5513
+ stateMutability: "view"
5514
+ },
5515
+ {
5516
+ type: "function",
5517
+ inputs: [{ name: "data", internalType: "bytes", type: "bytes" }],
5518
+ name: "unlockCallback",
5519
+ outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
5520
+ stateMutability: "nonpayable"
5521
+ },
5522
+ {
5523
+ type: "event",
5524
+ anonymous: false,
5525
+ inputs: [
5526
+ {
5527
+ name: "coin",
5528
+ internalType: "address",
5529
+ type: "address",
5530
+ indexed: false
5531
+ },
5532
+ {
5533
+ name: "currency",
5534
+ internalType: "address",
5535
+ type: "address",
5536
+ indexed: false
5537
+ },
5538
+ {
5539
+ name: "payoutRecipient",
5540
+ internalType: "address",
5541
+ type: "address",
5542
+ indexed: false
5543
+ },
5544
+ {
5545
+ name: "platformReferrer",
5546
+ internalType: "address",
5547
+ type: "address",
5548
+ indexed: false
5549
+ },
5550
+ {
5551
+ name: "tradeReferrer",
5552
+ internalType: "address",
5553
+ type: "address",
5554
+ indexed: false
5555
+ },
5556
+ {
5557
+ name: "protocolRewardRecipient",
5558
+ internalType: "address",
5559
+ type: "address",
5560
+ indexed: false
5561
+ },
5562
+ {
5563
+ name: "dopplerRecipient",
5564
+ internalType: "address",
5565
+ type: "address",
5566
+ indexed: false
5567
+ },
5568
+ {
5569
+ name: "marketRewards",
5570
+ internalType: "struct IZoraV4CoinHook.MarketRewardsV4",
5571
+ type: "tuple",
5572
+ components: [
5573
+ {
5574
+ name: "creatorPayoutAmountCurrency",
5575
+ internalType: "uint256",
5576
+ type: "uint256"
5577
+ },
5578
+ {
5579
+ name: "creatorPayoutAmountCoin",
5580
+ internalType: "uint256",
5581
+ type: "uint256"
5582
+ },
5583
+ {
5584
+ name: "platformReferrerAmountCurrency",
5585
+ internalType: "uint256",
5586
+ type: "uint256"
5587
+ },
5588
+ {
5589
+ name: "platformReferrerAmountCoin",
5590
+ internalType: "uint256",
5591
+ type: "uint256"
5592
+ },
5593
+ {
5594
+ name: "tradeReferrerAmountCurrency",
5595
+ internalType: "uint256",
5596
+ type: "uint256"
5597
+ },
5598
+ {
5599
+ name: "tradeReferrerAmountCoin",
5600
+ internalType: "uint256",
5601
+ type: "uint256"
5602
+ },
5603
+ {
5604
+ name: "protocolAmountCurrency",
5605
+ internalType: "uint256",
5606
+ type: "uint256"
5607
+ },
5608
+ {
5609
+ name: "protocolAmountCoin",
5610
+ internalType: "uint256",
5611
+ type: "uint256"
5612
+ },
5613
+ {
5614
+ name: "dopplerAmountCurrency",
5615
+ internalType: "uint256",
5616
+ type: "uint256"
5617
+ },
5618
+ {
5619
+ name: "dopplerAmountCoin",
5620
+ internalType: "uint256",
5621
+ type: "uint256"
5622
+ }
5623
+ ],
5624
+ indexed: false
5625
+ }
5626
+ ],
5627
+ name: "CoinMarketRewardsV4"
5628
+ },
5629
+ {
5630
+ type: "event",
5631
+ anonymous: false,
5632
+ inputs: [
5633
+ { name: "coin", internalType: "address", type: "address", indexed: true },
5634
+ {
5635
+ name: "currency",
5636
+ internalType: "address",
5637
+ type: "address",
5638
+ indexed: false
5639
+ },
5640
+ {
5641
+ name: "creator",
5642
+ internalType: "address",
5643
+ type: "address",
5644
+ indexed: false
5645
+ },
5646
+ {
5647
+ name: "protocol",
5648
+ internalType: "address",
5649
+ type: "address",
5650
+ indexed: false
5651
+ },
5652
+ {
5653
+ name: "creatorAmount",
5654
+ internalType: "uint256",
5655
+ type: "uint256",
5656
+ indexed: false
5657
+ },
5658
+ {
5659
+ name: "protocolAmount",
5660
+ internalType: "uint256",
5661
+ type: "uint256",
5662
+ indexed: false
5663
+ }
5664
+ ],
5665
+ name: "CreatorCoinRewards"
5666
+ },
5667
+ {
5668
+ type: "event",
5669
+ anonymous: false,
5670
+ inputs: [
5671
+ { name: "coin", internalType: "address", type: "address", indexed: true },
5672
+ {
5673
+ name: "currency",
5674
+ internalType: "address",
5675
+ type: "address",
5676
+ indexed: true
5677
+ },
5678
+ {
5679
+ name: "amountCurrency",
5680
+ internalType: "uint256",
5681
+ type: "uint256",
5682
+ indexed: false
5683
+ },
5684
+ { name: "tick", internalType: "int24", type: "int24", indexed: false },
5685
+ {
5686
+ name: "liquidity",
5687
+ internalType: "uint128",
5688
+ type: "uint128",
5689
+ indexed: false
5690
+ }
5691
+ ],
5692
+ name: "LpReward"
5693
+ },
5694
+ {
5695
+ type: "event",
5696
+ anonymous: false,
5697
+ inputs: [
5698
+ {
5699
+ name: "sender",
5700
+ internalType: "address",
5701
+ type: "address",
5702
+ indexed: true
5703
+ },
5704
+ {
5705
+ name: "swapSender",
5706
+ internalType: "address",
5707
+ type: "address",
5708
+ indexed: true
5709
+ },
5710
+ {
5711
+ name: "isTrustedSwapSenderAddress",
5712
+ internalType: "bool",
5713
+ type: "bool",
5714
+ indexed: false
5715
+ },
5716
+ {
5717
+ name: "key",
5718
+ internalType: "struct PoolKey",
5719
+ type: "tuple",
5720
+ components: [
5721
+ { name: "currency0", internalType: "Currency", type: "address" },
5722
+ { name: "currency1", internalType: "Currency", type: "address" },
5723
+ { name: "fee", internalType: "uint24", type: "uint24" },
5724
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5725
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5726
+ ],
5727
+ indexed: false
5728
+ },
5729
+ {
5730
+ name: "poolKeyHash",
5731
+ internalType: "bytes32",
5732
+ type: "bytes32",
5733
+ indexed: true
5734
+ },
5735
+ {
5736
+ name: "params",
5737
+ internalType: "struct SwapParams",
5738
+ type: "tuple",
5739
+ components: [
5740
+ { name: "zeroForOne", internalType: "bool", type: "bool" },
5741
+ { name: "amountSpecified", internalType: "int256", type: "int256" },
5742
+ {
5743
+ name: "sqrtPriceLimitX96",
5744
+ internalType: "uint160",
5745
+ type: "uint160"
5746
+ }
5747
+ ],
5748
+ indexed: false
5749
+ },
5750
+ {
5751
+ name: "amount0",
5752
+ internalType: "int128",
5753
+ type: "int128",
5754
+ indexed: false
5755
+ },
5756
+ {
5757
+ name: "amount1",
5758
+ internalType: "int128",
5759
+ type: "int128",
5760
+ indexed: false
5761
+ },
5762
+ { name: "isCoinBuy", internalType: "bool", type: "bool", indexed: false },
5763
+ {
5764
+ name: "hookData",
5765
+ internalType: "bytes",
5766
+ type: "bytes",
5767
+ indexed: false
5768
+ },
5769
+ {
5770
+ name: "sqrtPriceX96",
5771
+ internalType: "uint160",
5772
+ type: "uint160",
5773
+ indexed: false
5774
+ }
5775
+ ],
5776
+ name: "Swapped"
5777
+ },
5778
+ { type: "error", inputs: [], name: "CoinVersionLookupCannotBeZeroAddress" },
5779
+ { type: "error", inputs: [], name: "EthTransferFailed" },
5780
+ { type: "error", inputs: [], name: "HookNotImplemented" },
5781
+ {
5782
+ type: "error",
5783
+ inputs: [{ name: "callbackId", internalType: "uint8", type: "uint8" }],
5784
+ name: "InvalidCallbackId"
5785
+ },
5786
+ {
5787
+ type: "error",
5788
+ inputs: [{ name: "newHook", internalType: "address", type: "address" }],
5789
+ name: "InvalidNewHook"
5790
+ },
5791
+ {
5792
+ type: "error",
5793
+ inputs: [
5794
+ {
5795
+ name: "key",
5796
+ internalType: "struct PoolKey",
5797
+ type: "tuple",
5798
+ components: [
5799
+ { name: "currency0", internalType: "Currency", type: "address" },
5800
+ { name: "currency1", internalType: "Currency", type: "address" },
5801
+ { name: "fee", internalType: "uint24", type: "uint24" },
5802
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
5803
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
5804
+ ]
5805
+ }
5806
+ ],
5807
+ name: "NoCoinForHook"
5808
+ },
5809
+ {
5810
+ type: "error",
5811
+ inputs: [{ name: "coin", internalType: "address", type: "address" }],
5812
+ name: "NotACoin"
5813
+ },
5814
+ { type: "error", inputs: [], name: "NotPoolManager" },
5815
+ {
5816
+ type: "error",
5817
+ inputs: [
5818
+ { name: "caller", internalType: "address", type: "address" },
5819
+ { name: "expectedCoin", internalType: "address", type: "address" }
5820
+ ],
5821
+ name: "OnlyCoin"
5822
+ },
5823
+ { type: "error", inputs: [], name: "PathMustHaveAtLeastOneStep" },
5824
+ { type: "error", inputs: [], name: "SafeCastOverflow" },
5825
+ {
5826
+ type: "error",
5827
+ inputs: [{ name: "token", internalType: "address", type: "address" }],
5828
+ name: "SafeERC20FailedOperation"
5829
+ },
5830
+ {
5831
+ type: "error",
5832
+ inputs: [],
5833
+ name: "TrustedMsgSenderLookupCannotBeZeroAddress"
5834
+ },
5835
+ { type: "error", inputs: [], name: "UpgradeGateCannotBeZeroAddress" },
5836
+ {
5837
+ type: "error",
5838
+ inputs: [
5839
+ { name: "oldHook", internalType: "address", type: "address" },
5840
+ { name: "newHook", internalType: "address", type: "address" }
5841
+ ],
5842
+ name: "UpgradePathNotRegistered"
5843
+ },
5844
+ { type: "error", inputs: [], name: "ZoraHookRegistryCannotBeZeroAddress" },
5845
+ { type: "error", inputs: [], name: "ZoraLimitOrderBookCannotBeZeroAddress" }
5846
+ ];
4940
5847
  export {
4941
5848
  autoSwapperABI,
4942
5849
  baseCoinABI,
@@ -4946,7 +5853,7 @@ export {
4946
5853
  iPermit2ABI,
4947
5854
  iPoolConfigEncodingABI,
4948
5855
  iUniswapV3PoolABI,
4949
- iUniversalRouterABI,
4950
- zoraFactoryImplABI
5856
+ zoraFactoryImplABI,
5857
+ zoraV4CoinHookABI
4951
5858
  };
4952
5859
  //# sourceMappingURL=index.js.map