@zoralabs/coins 0.9.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/.turbo/turbo-build.log +179 -114
  2. package/CHANGELOG.md +46 -0
  3. package/abis/BaseCoin.json +26 -118
  4. package/abis/BaseTest.json +47 -0
  5. package/abis/BuySupplyWithSwapRouterHook.json +40 -0
  6. package/abis/Coin.json +171 -63
  7. package/abis/CoinDopplerMultiCurve.json +38 -0
  8. package/abis/CoinRewardsV4.json +54 -0
  9. package/abis/CoinTest.json +53 -20
  10. package/abis/CoinUniV4Test.json +1091 -0
  11. package/abis/CoinV4.json +234 -211
  12. package/abis/DeployScript.json +47 -0
  13. package/abis/DeployedCoinVersionLookup.json +21 -0
  14. package/abis/DeployedCoinVersionLookupTest.json +716 -0
  15. package/abis/DifferentNamespaceVersionLookup.json +39 -0
  16. package/abis/DopplerUniswapV3Test.json +49 -93
  17. package/abis/ERC20.json +310 -0
  18. package/abis/FactoryTest.json +85 -7
  19. package/abis/FeeEstimatorHook.json +1515 -0
  20. package/abis/HooksDeployment.json +23 -0
  21. package/abis/HooksTest.json +60 -0
  22. package/abis/ICoin.json +40 -71
  23. package/abis/ICoinV3.json +879 -0
  24. package/abis/ICoinV4.json +915 -0
  25. package/abis/IDeployedCoinVersionLookup.json +21 -0
  26. package/abis/IERC721.json +36 -36
  27. package/abis/IHasPoolKey.json +42 -0
  28. package/abis/IHasRewardsRecipients.json +54 -0
  29. package/abis/IHasSwapPath.json +60 -0
  30. package/abis/IMsgSender.json +15 -0
  31. package/abis/IPoolConfigEncoding.json +46 -0
  32. package/abis/ISwapPathRouter.json +92 -0
  33. package/abis/IUniversalRouter.json +61 -0
  34. package/abis/IUnlockCallback.json +21 -0
  35. package/abis/IV4Quoter.json +310 -0
  36. package/abis/IZoraFactory.json +210 -11
  37. package/abis/IZoraV4CoinHook.json +348 -4
  38. package/abis/MockERC20.json +21 -0
  39. package/abis/MultiOwnableTest.json +47 -0
  40. package/abis/{CoinConfigurationVersions.json → Position.json} +1 -1
  41. package/abis/PrintUpgradeCommand.json +9 -0
  42. package/abis/ProxyShim.json +24 -0
  43. package/abis/StateLibrary.json +80 -0
  44. package/abis/TestDeployedCoinVersionLookupImplementation.json +39 -0
  45. package/abis/TestV4Swap.json +9 -0
  46. package/abis/UpgradeCoinImpl.json +47 -0
  47. package/abis/UpgradesTest.json +81 -0
  48. package/abis/Vm.json +1482 -111
  49. package/abis/VmSafe.json +856 -32
  50. package/abis/ZoraFactoryImpl.json +339 -1
  51. package/abis/ZoraV4CoinHook.json +442 -5
  52. package/addresses/8453.json +7 -4
  53. package/addresses/84532.json +8 -5
  54. package/addresses/dev/8453.json +10 -0
  55. package/dist/index.cjs +1932 -167
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.js +1928 -167
  58. package/dist/index.js.map +1 -1
  59. package/dist/wagmiGenerated.d.ts +2606 -160
  60. package/dist/wagmiGenerated.d.ts.map +1 -1
  61. package/foundry.toml +1 -0
  62. package/package/wagmiGenerated.ts +1941 -164
  63. package/package.json +8 -3
  64. package/remappings.txt +6 -1
  65. package/script/Deploy.s.sol +1 -1
  66. package/script/DeployDevFactory.s.sol +21 -0
  67. package/script/DeployHooks.s.sol +1 -1
  68. package/script/PrintUpgradeCommand.s.sol +13 -0
  69. package/script/Simulate.s.sol +1 -10
  70. package/script/TestBackingCoinSwap.s.sol +147 -0
  71. package/script/TestV4Swap.s.sol +136 -0
  72. package/script/UpgradeCoinImpl.sol +2 -2
  73. package/script/UpgradeFactoryImpl.s.sol +2 -2
  74. package/src/BaseCoin.sol +190 -0
  75. package/src/Coin.sol +87 -202
  76. package/src/CoinV4.sol +121 -0
  77. package/src/ZoraFactoryImpl.sol +208 -36
  78. package/{script → src/deployment}/CoinsDeployerBase.sol +111 -17
  79. package/src/hooks/ZoraV4CoinHook.sol +212 -0
  80. package/src/hooks/{BaseCoinDeployHook.sol → deployment/BaseCoinDeployHook.sol} +3 -3
  81. package/src/hooks/deployment/BuySupplyWithSwapRouterHook.sol +140 -0
  82. package/src/interfaces/ICoin.sol +31 -39
  83. package/src/interfaces/ICoinV3.sol +71 -0
  84. package/src/interfaces/ICoinV4.sol +69 -0
  85. package/src/interfaces/IDeployedCoinVersionLookup.sol +11 -0
  86. package/src/interfaces/IMsgSender.sol +9 -0
  87. package/src/interfaces/IPoolConfigEncoding.sol +14 -0
  88. package/src/interfaces/ISwapPathRouter.sol +14 -0
  89. package/src/interfaces/IZoraFactory.sol +67 -28
  90. package/src/interfaces/IZoraV4CoinHook.sol +116 -0
  91. package/src/libs/CoinCommon.sol +15 -0
  92. package/src/libs/CoinConfigurationVersions.sol +116 -1
  93. package/src/libs/CoinConstants.sol +5 -0
  94. package/src/libs/CoinDopplerMultiCurve.sol +134 -0
  95. package/src/libs/CoinDopplerUniV3.sol +19 -171
  96. package/src/libs/CoinRewards.sol +195 -0
  97. package/src/libs/CoinRewardsV4.sol +179 -0
  98. package/src/libs/CoinSetup.sol +57 -0
  99. package/src/libs/CoinSetupV3.sol +6 -67
  100. package/src/libs/DopplerMath.sol +156 -0
  101. package/src/libs/HooksDeployment.sol +128 -0
  102. package/src/libs/MarketConstants.sol +4 -0
  103. package/src/libs/PoolStateReader.sol +22 -0
  104. package/src/libs/UniV3BuySell.sol +74 -292
  105. package/src/libs/UniV4SwapHelper.sol +65 -0
  106. package/src/libs/UniV4SwapToCurrency.sol +109 -0
  107. package/src/libs/V4Liquidity.sol +122 -0
  108. package/src/types/PoolConfiguration.sol +15 -0
  109. package/src/utils/DeployedCoinVersionLookup.sol +52 -0
  110. package/src/version/ContractVersionBase.sol +1 -1
  111. package/test/Coin.t.sol +78 -88
  112. package/test/CoinDopplerUniV3.t.sol +32 -171
  113. package/test/CoinUniV4.t.sol +777 -0
  114. package/test/{Hooks.t.sol → DeploymentHooks.t.sol} +53 -16
  115. package/test/Factory.t.sol +80 -47
  116. package/test/MultiOwnable.t.sol +6 -3
  117. package/test/Upgrades.t.sol +97 -5
  118. package/test/mocks/MockERC20.sol +12 -0
  119. package/test/utils/BaseTest.sol +162 -57
  120. package/test/utils/DeployedCoinVersionLookup.t.sol +127 -0
  121. package/test/utils/FeeEstimatorHook.sol +84 -0
  122. package/test/utils/ProxyShim.sol +17 -0
  123. package/wagmi.config.ts +4 -0
  124. package/.env +0 -1
  125. package/.turbo/turbo-update-contract-version.log +0 -22
  126. package/abis/CoinSetupV3.json +0 -7
  127. package/abis/HookDeployer.json +0 -68
  128. package/abis/IHookDeployer.json +0 -42
  129. package/src/hooks/BuySupplyWithSwapRouterHook.sol +0 -78
  130. package/src/libs/CoinLegacy.sol +0 -48
  131. package/src/libs/CoinLegacyMarket.sol +0 -182
package/dist/index.js CHANGED
@@ -8,7 +8,8 @@ var buySupplyWithSwapRouterHookABI = [
8
8
  internalType: "contract IZoraFactory",
9
9
  type: "address"
10
10
  },
11
- { name: "_swapRouter", internalType: "address", type: "address" }
11
+ { name: "_swapRouter", internalType: "address", type: "address" },
12
+ { name: "_poolManager", internalType: "address", type: "address" }
12
13
  ],
13
14
  stateMutability: "nonpayable"
14
15
  },
@@ -39,16 +40,29 @@ var buySupplyWithSwapRouterHookABI = [
39
40
  outputs: [{ name: "", internalType: "bool", type: "bool" }],
40
41
  stateMutability: "pure"
41
42
  },
43
+ {
44
+ type: "function",
45
+ inputs: [{ name: "data", internalType: "bytes", type: "bytes" }],
46
+ name: "unlockCallback",
47
+ outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
48
+ stateMutability: "nonpayable"
49
+ },
42
50
  { type: "error", inputs: [], name: "AddressZero" },
43
51
  {
44
52
  type: "error",
45
53
  inputs: [{ name: "balance", internalType: "uint256", type: "uint256" }],
46
54
  name: "CoinBalanceNot0"
47
55
  },
56
+ {
57
+ type: "error",
58
+ inputs: [{ name: "balance", internalType: "uint256", type: "uint256" }],
59
+ name: "CurrencyBalanceNot0"
60
+ },
48
61
  { type: "error", inputs: [], name: "Erc20NotReceived" },
49
62
  { type: "error", inputs: [], name: "HookNotImplemented" },
50
63
  { type: "error", inputs: [], name: "InvalidSwapRouterCall" },
51
64
  { type: "error", inputs: [], name: "NotFactory" },
65
+ { type: "error", inputs: [], name: "OnlyPoolManager" },
52
66
  {
53
67
  type: "error",
54
68
  inputs: [{ name: "error", internalType: "bytes", type: "bytes" }],
@@ -60,15 +74,15 @@ var coinABI = [
60
74
  type: "constructor",
61
75
  inputs: [
62
76
  {
63
- name: "_protocolRewardRecipient",
77
+ name: "protocolRewardRecipient_",
64
78
  internalType: "address",
65
79
  type: "address"
66
80
  },
67
- { name: "_protocolRewards", internalType: "address", type: "address" },
68
- { name: "_weth", internalType: "address", type: "address" },
69
- { name: "_v3Factory", internalType: "address", type: "address" },
70
- { name: "_swapRouter", internalType: "address", type: "address" },
71
- { name: "_airlock", internalType: "address", type: "address" }
81
+ { name: "protocolRewards_", internalType: "address", type: "address" },
82
+ { name: "weth_", internalType: "address", type: "address" },
83
+ { name: "v3Factory_", internalType: "address", type: "address" },
84
+ { name: "swapRouter_", internalType: "address", type: "address" },
85
+ { name: "airlock_", internalType: "address", type: "address" }
72
86
  ],
73
87
  stateMutability: "nonpayable"
74
88
  },
@@ -195,6 +209,13 @@ var coinABI = [
195
209
  outputs: [{ name: "", internalType: "uint8", type: "uint8" }],
196
210
  stateMutability: "view"
197
211
  },
212
+ {
213
+ type: "function",
214
+ inputs: [],
215
+ name: "dopplerFeeRecipient",
216
+ outputs: [{ name: "", internalType: "address", type: "address" }],
217
+ stateMutability: "view"
218
+ },
198
219
  {
199
220
  type: "function",
200
221
  inputs: [],
@@ -210,6 +231,37 @@ var coinABI = [
210
231
  ],
211
232
  stateMutability: "view"
212
233
  },
234
+ {
235
+ type: "function",
236
+ inputs: [],
237
+ name: "getPoolConfiguration",
238
+ outputs: [
239
+ {
240
+ name: "",
241
+ internalType: "struct PoolConfiguration",
242
+ type: "tuple",
243
+ components: [
244
+ { name: "version", internalType: "uint8", type: "uint8" },
245
+ { name: "numPositions", internalType: "uint16", type: "uint16" },
246
+ { name: "fee", internalType: "uint24", type: "uint24" },
247
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
248
+ {
249
+ name: "numDiscoveryPositions",
250
+ internalType: "uint16[]",
251
+ type: "uint16[]"
252
+ },
253
+ { name: "tickLower", internalType: "int24[]", type: "int24[]" },
254
+ { name: "tickUpper", internalType: "int24[]", type: "int24[]" },
255
+ {
256
+ name: "maxDiscoverySupplyShare",
257
+ internalType: "uint256[]",
258
+ type: "uint256[]"
259
+ }
260
+ ]
261
+ }
262
+ ],
263
+ stateMutability: "view"
264
+ },
213
265
  {
214
266
  type: "function",
215
267
  inputs: [
@@ -218,8 +270,42 @@ var coinABI = [
218
270
  { name: "tokenURI_", internalType: "string", type: "string" },
219
271
  { name: "name_", internalType: "string", type: "string" },
220
272
  { name: "symbol_", internalType: "string", type: "string" },
221
- { name: "poolConfig_", internalType: "bytes", type: "bytes" },
222
- { name: "platformReferrer_", internalType: "address", type: "address" }
273
+ { name: "platformReferrer_", internalType: "address", type: "address" },
274
+ { name: "currency_", internalType: "address", type: "address" },
275
+ { name: "poolAddress_", internalType: "address", type: "address" },
276
+ {
277
+ name: "poolConfiguration_",
278
+ internalType: "struct PoolConfiguration",
279
+ type: "tuple",
280
+ components: [
281
+ { name: "version", internalType: "uint8", type: "uint8" },
282
+ { name: "numPositions", internalType: "uint16", type: "uint16" },
283
+ { name: "fee", internalType: "uint24", type: "uint24" },
284
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
285
+ {
286
+ name: "numDiscoveryPositions",
287
+ internalType: "uint16[]",
288
+ type: "uint16[]"
289
+ },
290
+ { name: "tickLower", internalType: "int24[]", type: "int24[]" },
291
+ { name: "tickUpper", internalType: "int24[]", type: "int24[]" },
292
+ {
293
+ name: "maxDiscoverySupplyShare",
294
+ internalType: "uint256[]",
295
+ type: "uint256[]"
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ name: "positions_",
301
+ internalType: "struct LpPosition[]",
302
+ type: "tuple[]",
303
+ components: [
304
+ { name: "tickLower", internalType: "int24", type: "int24" },
305
+ { name: "tickUpper", internalType: "int24", type: "int24" },
306
+ { name: "liquidity", internalType: "uint128", type: "uint128" }
307
+ ]
308
+ }
223
309
  ],
224
310
  name: "initialize",
225
311
  outputs: [],
@@ -309,35 +395,20 @@ var coinABI = [
309
395
  name: "poolConfiguration",
310
396
  outputs: [
311
397
  { name: "version", internalType: "uint8", type: "uint8" },
312
- { name: "tickLower", internalType: "int24", type: "int24" },
313
- { name: "tickUpper", internalType: "int24", type: "int24" },
314
398
  { name: "numPositions", internalType: "uint16", type: "uint16" },
315
- {
316
- name: "maxDiscoverySupplyShare",
317
- internalType: "uint256",
318
- type: "uint256"
319
- }
399
+ { name: "fee", internalType: "uint24", type: "uint24" },
400
+ { name: "tickSpacing", internalType: "int24", type: "int24" }
320
401
  ],
321
402
  stateMutability: "view"
322
403
  },
323
404
  {
324
405
  type: "function",
325
- inputs: [],
326
- name: "poolState",
406
+ inputs: [{ name: "", internalType: "uint256", type: "uint256" }],
407
+ name: "positions",
327
408
  outputs: [
328
- { name: "asset", internalType: "address", type: "address" },
329
- { name: "numeraire", internalType: "address", type: "address" },
330
409
  { name: "tickLower", internalType: "int24", type: "int24" },
331
410
  { name: "tickUpper", internalType: "int24", type: "int24" },
332
- { name: "numPositions", internalType: "uint16", type: "uint16" },
333
- { name: "isInitialized", internalType: "bool", type: "bool" },
334
- { name: "isExited", internalType: "bool", type: "bool" },
335
- { name: "maxShareToBeSold", internalType: "uint256", type: "uint256" },
336
- {
337
- name: "totalTokensOnBondingCurve",
338
- internalType: "uint256",
339
- type: "uint256"
340
- }
411
+ { name: "liquidity", internalType: "uint128", type: "uint128" }
341
412
  ],
342
413
  stateMutability: "view"
343
414
  },
@@ -982,7 +1053,6 @@ var coinABI = [
982
1053
  { type: "error", inputs: [], name: "InvalidInitialization" },
983
1054
  { type: "error", inputs: [], name: "InvalidMarketType" },
984
1055
  { type: "error", inputs: [], name: "InvalidPoolVersion" },
985
- { type: "error", inputs: [], name: "InvalidPoolVersion" },
986
1056
  {
987
1057
  type: "error",
988
1058
  inputs: [
@@ -1027,213 +1097,1791 @@ var coinABI = [
1027
1097
  { type: "error", inputs: [], name: "SlippageBoundsExceeded" },
1028
1098
  { type: "error", inputs: [], name: "UseRevokeOwnershipToRemoveSelf" }
1029
1099
  ];
1030
- var iUniswapV3PoolABI = [
1031
- {
1032
- type: "function",
1033
- inputs: [
1034
- { name: "tickLower", internalType: "int24", type: "int24" },
1035
- { name: "tickUpper", internalType: "int24", type: "int24" },
1036
- { name: "amount", internalType: "uint128", type: "uint128" }
1037
- ],
1038
- name: "burn",
1039
- outputs: [
1040
- { name: "amount0", internalType: "uint256", type: "uint256" },
1041
- { name: "amount1", internalType: "uint256", type: "uint256" }
1042
- ],
1043
- stateMutability: "nonpayable"
1044
- },
1100
+ var coinV4ABI = [
1045
1101
  {
1046
- type: "function",
1102
+ type: "constructor",
1047
1103
  inputs: [
1048
- { name: "recipient", internalType: "address", type: "address" },
1049
- { name: "tickLower", internalType: "int24", type: "int24" },
1050
- { name: "tickUpper", internalType: "int24", type: "int24" },
1051
- { name: "amount0Requested", internalType: "uint128", type: "uint128" },
1052
- { name: "amount1Requested", internalType: "uint128", type: "uint128" }
1053
- ],
1054
- name: "collect",
1055
- outputs: [
1056
- { name: "amount0", internalType: "uint128", type: "uint128" },
1057
- { name: "amount1", internalType: "uint128", type: "uint128" }
1104
+ {
1105
+ name: "protocolRewardRecipient_",
1106
+ internalType: "address",
1107
+ type: "address"
1108
+ },
1109
+ { name: "protocolRewards_", internalType: "address", type: "address" },
1110
+ {
1111
+ name: "poolManager_",
1112
+ internalType: "contract IPoolManager",
1113
+ type: "address"
1114
+ },
1115
+ { name: "airlock_", internalType: "address", type: "address" },
1116
+ { name: "hooks_", internalType: "contract IHooks", type: "address" }
1058
1117
  ],
1059
1118
  stateMutability: "nonpayable"
1060
1119
  },
1061
1120
  {
1062
1121
  type: "function",
1063
1122
  inputs: [],
1064
- name: "feeGrowthGlobal0X128",
1065
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
1123
+ name: "DOMAIN_SEPARATOR",
1124
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
1066
1125
  stateMutability: "view"
1067
1126
  },
1068
1127
  {
1069
1128
  type: "function",
1070
- inputs: [],
1071
- name: "feeGrowthGlobal1X128",
1072
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
1073
- stateMutability: "view"
1129
+ inputs: [{ name: "account", internalType: "address", type: "address" }],
1130
+ name: "addOwner",
1131
+ outputs: [],
1132
+ stateMutability: "nonpayable"
1074
1133
  },
1075
1134
  {
1076
1135
  type: "function",
1077
1136
  inputs: [
1078
- { name: "sqrtPriceX96", internalType: "uint160", type: "uint160" }
1137
+ { name: "accounts", internalType: "address[]", type: "address[]" }
1079
1138
  ],
1080
- name: "initialize",
1139
+ name: "addOwners",
1081
1140
  outputs: [],
1082
1141
  stateMutability: "nonpayable"
1083
1142
  },
1084
1143
  {
1085
1144
  type: "function",
1086
- inputs: [
1087
- { name: "recipient", internalType: "address", type: "address" },
1088
- { name: "tickLower", internalType: "int24", type: "int24" },
1089
- { name: "tickUpper", internalType: "int24", type: "int24" },
1090
- { name: "amount", internalType: "uint128", type: "uint128" },
1091
- { name: "data", internalType: "bytes", type: "bytes" }
1092
- ],
1093
- name: "mint",
1094
- outputs: [
1095
- { name: "amount0", internalType: "uint256", type: "uint256" },
1096
- { name: "amount1", internalType: "uint256", type: "uint256" }
1097
- ],
1098
- stateMutability: "nonpayable"
1145
+ inputs: [],
1146
+ name: "airlock",
1147
+ outputs: [{ name: "", internalType: "address", type: "address" }],
1148
+ stateMutability: "view"
1099
1149
  },
1100
1150
  {
1101
1151
  type: "function",
1102
- inputs: [],
1103
- name: "slot0",
1104
- outputs: [
1105
- {
1106
- name: "slot0",
1107
- internalType: "struct IUniswapV3Pool.Slot0",
1108
- type: "tuple",
1109
- components: [
1110
- { name: "sqrtPriceX96", internalType: "uint160", type: "uint160" },
1111
- { name: "tick", internalType: "int24", type: "int24" },
1112
- { name: "observationIndex", internalType: "uint16", type: "uint16" },
1113
- {
1114
- name: "observationCardinality",
1115
- internalType: "uint16",
1116
- type: "uint16"
1117
- },
1118
- {
1119
- name: "observationCardinalityNext",
1120
- internalType: "uint16",
1121
- type: "uint16"
1122
- },
1123
- { name: "feeProtocol", internalType: "uint8", type: "uint8" },
1124
- { name: "unlocked", internalType: "bool", type: "bool" }
1125
- ]
1126
- }
1152
+ inputs: [
1153
+ { name: "owner", internalType: "address", type: "address" },
1154
+ { name: "spender", internalType: "address", type: "address" }
1127
1155
  ],
1156
+ name: "allowance",
1157
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
1128
1158
  stateMutability: "view"
1129
1159
  },
1130
1160
  {
1131
1161
  type: "function",
1132
1162
  inputs: [
1133
- { name: "recipient", internalType: "address", type: "address" },
1134
- { name: "zeroForOne", internalType: "bool", type: "bool" },
1135
- { name: "amountSpecified", internalType: "int256", type: "int256" },
1136
- { name: "sqrtPriceLimitX96", internalType: "uint160", type: "uint160" },
1137
- { name: "data", internalType: "bytes", type: "bytes" }
1138
- ],
1139
- name: "swap",
1140
- outputs: [
1141
- { name: "amount0", internalType: "int256", type: "int256" },
1142
- { name: "amount1", internalType: "int256", type: "int256" }
1163
+ { name: "spender", internalType: "address", type: "address" },
1164
+ { name: "value", internalType: "uint256", type: "uint256" }
1143
1165
  ],
1166
+ name: "approve",
1167
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
1144
1168
  stateMutability: "nonpayable"
1145
1169
  },
1146
1170
  {
1147
1171
  type: "function",
1148
- inputs: [],
1149
- name: "token0",
1150
- outputs: [{ name: "", internalType: "address", type: "address" }],
1151
- stateMutability: "nonpayable"
1172
+ inputs: [{ name: "account", internalType: "address", type: "address" }],
1173
+ name: "balanceOf",
1174
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
1175
+ stateMutability: "view"
1152
1176
  },
1153
1177
  {
1154
1178
  type: "function",
1155
- inputs: [],
1156
- name: "token1",
1157
- outputs: [{ name: "", internalType: "address", type: "address" }],
1158
- stateMutability: "nonpayable"
1159
- }
1160
- ];
1161
- var zoraFactoryImplABI = [
1162
- {
1163
- type: "constructor",
1164
- inputs: [{ name: "_coinImpl", internalType: "address", type: "address" }],
1179
+ inputs: [{ name: "amount", internalType: "uint256", type: "uint256" }],
1180
+ name: "burn",
1181
+ outputs: [],
1165
1182
  stateMutability: "nonpayable"
1166
1183
  },
1167
1184
  {
1168
1185
  type: "function",
1169
1186
  inputs: [],
1170
- name: "UPGRADE_INTERFACE_VERSION",
1187
+ name: "contractURI",
1171
1188
  outputs: [{ name: "", internalType: "string", type: "string" }],
1172
1189
  stateMutability: "view"
1173
1190
  },
1174
1191
  {
1175
1192
  type: "function",
1176
1193
  inputs: [],
1177
- name: "coinImpl",
1194
+ name: "contractVersion",
1195
+ outputs: [{ name: "", internalType: "string", type: "string" }],
1196
+ stateMutability: "pure"
1197
+ },
1198
+ {
1199
+ type: "function",
1200
+ inputs: [],
1201
+ name: "currency",
1178
1202
  outputs: [{ name: "", internalType: "address", type: "address" }],
1179
1203
  stateMutability: "view"
1180
1204
  },
1181
1205
  {
1182
1206
  type: "function",
1183
1207
  inputs: [],
1184
- name: "contractName",
1185
- outputs: [{ name: "", internalType: "string", type: "string" }],
1186
- stateMutability: "pure"
1208
+ name: "decimals",
1209
+ outputs: [{ name: "", internalType: "uint8", type: "uint8" }],
1210
+ stateMutability: "view"
1187
1211
  },
1188
1212
  {
1189
1213
  type: "function",
1190
1214
  inputs: [],
1191
- name: "contractVersion",
1192
- outputs: [{ name: "", internalType: "string", type: "string" }],
1193
- stateMutability: "pure"
1215
+ name: "dopplerFeeRecipient",
1216
+ outputs: [{ name: "", internalType: "address", type: "address" }],
1217
+ stateMutability: "view"
1194
1218
  },
1195
1219
  {
1196
1220
  type: "function",
1197
- inputs: [
1198
- { name: "payoutRecipient", internalType: "address", type: "address" },
1199
- { name: "owners", internalType: "address[]", type: "address[]" },
1200
- { name: "uri", internalType: "string", type: "string" },
1201
- { name: "name", internalType: "string", type: "string" },
1202
- { name: "symbol", internalType: "string", type: "string" },
1203
- { name: "platformReferrer", internalType: "address", type: "address" },
1204
- { name: "currency", internalType: "address", type: "address" },
1205
- { name: "tickLower", internalType: "int24", type: "int24" },
1206
- { name: "orderSize", internalType: "uint256", type: "uint256" }
1207
- ],
1208
- name: "deploy",
1221
+ inputs: [],
1222
+ name: "eip712Domain",
1209
1223
  outputs: [
1210
- { name: "", internalType: "address", type: "address" },
1211
- { name: "", internalType: "uint256", type: "uint256" }
1224
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
1225
+ { name: "name", internalType: "string", type: "string" },
1226
+ { name: "version", internalType: "string", type: "string" },
1227
+ { name: "chainId", internalType: "uint256", type: "uint256" },
1228
+ { name: "verifyingContract", internalType: "address", type: "address" },
1229
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
1230
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" }
1212
1231
  ],
1213
- stateMutability: "payable"
1232
+ stateMutability: "view"
1214
1233
  },
1215
1234
  {
1216
1235
  type: "function",
1217
1236
  inputs: [
1218
- { name: "payoutRecipient", internalType: "address", type: "address" },
1219
- { name: "owners", internalType: "address[]", type: "address[]" },
1220
- { name: "uri", internalType: "string", type: "string" },
1221
- { name: "name", internalType: "string", type: "string" },
1222
- { name: "symbol", internalType: "string", type: "string" },
1223
- { name: "poolConfig", internalType: "bytes", type: "bytes" },
1224
- { name: "platformReferrer", internalType: "address", type: "address" },
1225
- { name: "orderSize", internalType: "uint256", type: "uint256" }
1237
+ {
1238
+ name: "coinVersionLookup",
1239
+ internalType: "contract IDeployedCoinVersionLookup",
1240
+ type: "address"
1241
+ }
1226
1242
  ],
1227
- name: "deploy",
1243
+ name: "getPayoutSwapPath",
1228
1244
  outputs: [
1229
- { name: "", internalType: "address", type: "address" },
1230
- { name: "", internalType: "uint256", type: "uint256" }
1231
- ],
1232
- stateMutability: "payable"
1233
- },
1234
- {
1235
- type: "function",
1236
- inputs: [
1245
+ {
1246
+ name: "payoutSwapPath",
1247
+ internalType: "struct IHasSwapPath.PayoutSwapPath",
1248
+ type: "tuple",
1249
+ components: [
1250
+ {
1251
+ name: "path",
1252
+ internalType: "struct PathKey[]",
1253
+ type: "tuple[]",
1254
+ components: [
1255
+ {
1256
+ name: "intermediateCurrency",
1257
+ internalType: "Currency",
1258
+ type: "address"
1259
+ },
1260
+ { name: "fee", internalType: "uint24", type: "uint24" },
1261
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
1262
+ {
1263
+ name: "hooks",
1264
+ internalType: "contract IHooks",
1265
+ type: "address"
1266
+ },
1267
+ { name: "hookData", internalType: "bytes", type: "bytes" }
1268
+ ]
1269
+ },
1270
+ { name: "currencyIn", internalType: "Currency", type: "address" }
1271
+ ]
1272
+ }
1273
+ ],
1274
+ stateMutability: "view"
1275
+ },
1276
+ {
1277
+ type: "function",
1278
+ inputs: [],
1279
+ name: "getPoolConfiguration",
1280
+ outputs: [
1281
+ {
1282
+ name: "",
1283
+ internalType: "struct PoolConfiguration",
1284
+ type: "tuple",
1285
+ components: [
1286
+ { name: "version", internalType: "uint8", type: "uint8" },
1287
+ { name: "numPositions", internalType: "uint16", type: "uint16" },
1288
+ { name: "fee", internalType: "uint24", type: "uint24" },
1289
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
1290
+ {
1291
+ name: "numDiscoveryPositions",
1292
+ internalType: "uint16[]",
1293
+ type: "uint16[]"
1294
+ },
1295
+ { name: "tickLower", internalType: "int24[]", type: "int24[]" },
1296
+ { name: "tickUpper", internalType: "int24[]", type: "int24[]" },
1297
+ {
1298
+ name: "maxDiscoverySupplyShare",
1299
+ internalType: "uint256[]",
1300
+ type: "uint256[]"
1301
+ }
1302
+ ]
1303
+ }
1304
+ ],
1305
+ stateMutability: "view"
1306
+ },
1307
+ {
1308
+ type: "function",
1309
+ inputs: [],
1310
+ name: "getPoolKey",
1311
+ outputs: [
1312
+ {
1313
+ name: "",
1314
+ internalType: "struct PoolKey",
1315
+ type: "tuple",
1316
+ components: [
1317
+ { name: "currency0", internalType: "Currency", type: "address" },
1318
+ { name: "currency1", internalType: "Currency", type: "address" },
1319
+ { name: "fee", internalType: "uint24", type: "uint24" },
1320
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
1321
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
1322
+ ]
1323
+ }
1324
+ ],
1325
+ stateMutability: "view"
1326
+ },
1327
+ {
1328
+ type: "function",
1329
+ inputs: [],
1330
+ name: "hooks",
1331
+ outputs: [{ name: "", internalType: "contract IHooks", type: "address" }],
1332
+ stateMutability: "view"
1333
+ },
1334
+ {
1335
+ type: "function",
1336
+ inputs: [
1337
+ { name: "payoutRecipient_", internalType: "address", type: "address" },
1338
+ { name: "owners_", internalType: "address[]", type: "address[]" },
1339
+ { name: "tokenURI_", internalType: "string", type: "string" },
1340
+ { name: "name_", internalType: "string", type: "string" },
1341
+ { name: "symbol_", internalType: "string", type: "string" },
1342
+ { name: "platformReferrer_", internalType: "address", type: "address" },
1343
+ { name: "currency_", internalType: "address", type: "address" },
1344
+ {
1345
+ name: "poolKey_",
1346
+ internalType: "struct PoolKey",
1347
+ type: "tuple",
1348
+ components: [
1349
+ { name: "currency0", internalType: "Currency", type: "address" },
1350
+ { name: "currency1", internalType: "Currency", type: "address" },
1351
+ { name: "fee", internalType: "uint24", type: "uint24" },
1352
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
1353
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
1354
+ ]
1355
+ },
1356
+ { name: "sqrtPriceX96", internalType: "uint160", type: "uint160" },
1357
+ {
1358
+ name: "poolConfiguration_",
1359
+ internalType: "struct PoolConfiguration",
1360
+ type: "tuple",
1361
+ components: [
1362
+ { name: "version", internalType: "uint8", type: "uint8" },
1363
+ { name: "numPositions", internalType: "uint16", type: "uint16" },
1364
+ { name: "fee", internalType: "uint24", type: "uint24" },
1365
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
1366
+ {
1367
+ name: "numDiscoveryPositions",
1368
+ internalType: "uint16[]",
1369
+ type: "uint16[]"
1370
+ },
1371
+ { name: "tickLower", internalType: "int24[]", type: "int24[]" },
1372
+ { name: "tickUpper", internalType: "int24[]", type: "int24[]" },
1373
+ {
1374
+ name: "maxDiscoverySupplyShare",
1375
+ internalType: "uint256[]",
1376
+ type: "uint256[]"
1377
+ }
1378
+ ]
1379
+ }
1380
+ ],
1381
+ name: "initialize",
1382
+ outputs: [],
1383
+ stateMutability: "nonpayable"
1384
+ },
1385
+ {
1386
+ type: "function",
1387
+ inputs: [{ name: "account", internalType: "address", type: "address" }],
1388
+ name: "isOwner",
1389
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
1390
+ stateMutability: "view"
1391
+ },
1392
+ {
1393
+ type: "function",
1394
+ inputs: [],
1395
+ name: "name",
1396
+ outputs: [{ name: "", internalType: "string", type: "string" }],
1397
+ stateMutability: "view"
1398
+ },
1399
+ {
1400
+ type: "function",
1401
+ inputs: [{ name: "owner", internalType: "address", type: "address" }],
1402
+ name: "nonces",
1403
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
1404
+ stateMutability: "view"
1405
+ },
1406
+ {
1407
+ type: "function",
1408
+ inputs: [],
1409
+ name: "owners",
1410
+ outputs: [{ name: "", internalType: "address[]", type: "address[]" }],
1411
+ stateMutability: "view"
1412
+ },
1413
+ {
1414
+ type: "function",
1415
+ inputs: [],
1416
+ name: "payoutRecipient",
1417
+ outputs: [{ name: "", internalType: "address", type: "address" }],
1418
+ stateMutability: "view"
1419
+ },
1420
+ {
1421
+ type: "function",
1422
+ inputs: [
1423
+ { name: "owner", internalType: "address", type: "address" },
1424
+ { name: "spender", internalType: "address", type: "address" },
1425
+ { name: "value", internalType: "uint256", type: "uint256" },
1426
+ { name: "deadline", internalType: "uint256", type: "uint256" },
1427
+ { name: "v", internalType: "uint8", type: "uint8" },
1428
+ { name: "r", internalType: "bytes32", type: "bytes32" },
1429
+ { name: "s", internalType: "bytes32", type: "bytes32" }
1430
+ ],
1431
+ name: "permit",
1432
+ outputs: [],
1433
+ stateMutability: "nonpayable"
1434
+ },
1435
+ {
1436
+ type: "function",
1437
+ inputs: [],
1438
+ name: "platformReferrer",
1439
+ outputs: [{ name: "", internalType: "address", type: "address" }],
1440
+ stateMutability: "view"
1441
+ },
1442
+ {
1443
+ type: "function",
1444
+ inputs: [],
1445
+ name: "poolManager",
1446
+ outputs: [
1447
+ { name: "", internalType: "contract IPoolManager", type: "address" }
1448
+ ],
1449
+ stateMutability: "view"
1450
+ },
1451
+ {
1452
+ type: "function",
1453
+ inputs: [],
1454
+ name: "protocolRewardRecipient",
1455
+ outputs: [{ name: "", internalType: "address", type: "address" }],
1456
+ stateMutability: "view"
1457
+ },
1458
+ {
1459
+ type: "function",
1460
+ inputs: [],
1461
+ name: "protocolRewards",
1462
+ outputs: [{ name: "", internalType: "address", type: "address" }],
1463
+ stateMutability: "view"
1464
+ },
1465
+ {
1466
+ type: "function",
1467
+ inputs: [{ name: "account", internalType: "address", type: "address" }],
1468
+ name: "removeOwner",
1469
+ outputs: [],
1470
+ stateMutability: "nonpayable"
1471
+ },
1472
+ {
1473
+ type: "function",
1474
+ inputs: [
1475
+ { name: "accounts", internalType: "address[]", type: "address[]" }
1476
+ ],
1477
+ name: "removeOwners",
1478
+ outputs: [],
1479
+ stateMutability: "nonpayable"
1480
+ },
1481
+ {
1482
+ type: "function",
1483
+ inputs: [],
1484
+ name: "revokeOwnership",
1485
+ outputs: [],
1486
+ stateMutability: "nonpayable"
1487
+ },
1488
+ {
1489
+ type: "function",
1490
+ inputs: [{ name: "newURI", internalType: "string", type: "string" }],
1491
+ name: "setContractURI",
1492
+ outputs: [],
1493
+ stateMutability: "nonpayable"
1494
+ },
1495
+ {
1496
+ type: "function",
1497
+ inputs: [
1498
+ { name: "newPayoutRecipient", internalType: "address", type: "address" }
1499
+ ],
1500
+ name: "setPayoutRecipient",
1501
+ outputs: [],
1502
+ stateMutability: "nonpayable"
1503
+ },
1504
+ {
1505
+ type: "function",
1506
+ inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }],
1507
+ name: "supportsInterface",
1508
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
1509
+ stateMutability: "pure"
1510
+ },
1511
+ {
1512
+ type: "function",
1513
+ inputs: [],
1514
+ name: "symbol",
1515
+ outputs: [{ name: "", internalType: "string", type: "string" }],
1516
+ stateMutability: "view"
1517
+ },
1518
+ {
1519
+ type: "function",
1520
+ inputs: [],
1521
+ name: "tokenURI",
1522
+ outputs: [{ name: "", internalType: "string", type: "string" }],
1523
+ stateMutability: "view"
1524
+ },
1525
+ {
1526
+ type: "function",
1527
+ inputs: [],
1528
+ name: "totalSupply",
1529
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
1530
+ stateMutability: "view"
1531
+ },
1532
+ {
1533
+ type: "function",
1534
+ inputs: [
1535
+ { name: "to", internalType: "address", type: "address" },
1536
+ { name: "value", internalType: "uint256", type: "uint256" }
1537
+ ],
1538
+ name: "transfer",
1539
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
1540
+ stateMutability: "nonpayable"
1541
+ },
1542
+ {
1543
+ type: "function",
1544
+ inputs: [
1545
+ { name: "from", internalType: "address", type: "address" },
1546
+ { name: "to", internalType: "address", type: "address" },
1547
+ { name: "value", internalType: "uint256", type: "uint256" }
1548
+ ],
1549
+ name: "transferFrom",
1550
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
1551
+ stateMutability: "nonpayable"
1552
+ },
1553
+ {
1554
+ type: "event",
1555
+ anonymous: false,
1556
+ inputs: [
1557
+ {
1558
+ name: "owner",
1559
+ internalType: "address",
1560
+ type: "address",
1561
+ indexed: true
1562
+ },
1563
+ {
1564
+ name: "spender",
1565
+ internalType: "address",
1566
+ type: "address",
1567
+ indexed: true
1568
+ },
1569
+ {
1570
+ name: "value",
1571
+ internalType: "uint256",
1572
+ type: "uint256",
1573
+ indexed: false
1574
+ }
1575
+ ],
1576
+ name: "Approval"
1577
+ },
1578
+ {
1579
+ type: "event",
1580
+ anonymous: false,
1581
+ inputs: [
1582
+ {
1583
+ name: "buyer",
1584
+ internalType: "address",
1585
+ type: "address",
1586
+ indexed: true
1587
+ },
1588
+ {
1589
+ name: "recipient",
1590
+ internalType: "address",
1591
+ type: "address",
1592
+ indexed: true
1593
+ },
1594
+ {
1595
+ name: "tradeReferrer",
1596
+ internalType: "address",
1597
+ type: "address",
1598
+ indexed: true
1599
+ },
1600
+ {
1601
+ name: "coinsPurchased",
1602
+ internalType: "uint256",
1603
+ type: "uint256",
1604
+ indexed: false
1605
+ },
1606
+ {
1607
+ name: "currency",
1608
+ internalType: "address",
1609
+ type: "address",
1610
+ indexed: false
1611
+ },
1612
+ {
1613
+ name: "amountFee",
1614
+ internalType: "uint256",
1615
+ type: "uint256",
1616
+ indexed: false
1617
+ },
1618
+ {
1619
+ name: "amountSold",
1620
+ internalType: "uint256",
1621
+ type: "uint256",
1622
+ indexed: false
1623
+ }
1624
+ ],
1625
+ name: "CoinBuy"
1626
+ },
1627
+ {
1628
+ type: "event",
1629
+ anonymous: false,
1630
+ inputs: [
1631
+ {
1632
+ name: "payoutRecipient",
1633
+ internalType: "address",
1634
+ type: "address",
1635
+ indexed: true
1636
+ },
1637
+ {
1638
+ name: "platformReferrer",
1639
+ internalType: "address",
1640
+ type: "address",
1641
+ indexed: true
1642
+ },
1643
+ {
1644
+ name: "protocolRewardRecipient",
1645
+ internalType: "address",
1646
+ type: "address",
1647
+ indexed: false
1648
+ },
1649
+ {
1650
+ name: "currency",
1651
+ internalType: "address",
1652
+ type: "address",
1653
+ indexed: false
1654
+ },
1655
+ {
1656
+ name: "marketRewards",
1657
+ internalType: "struct ICoin.MarketRewards",
1658
+ type: "tuple",
1659
+ components: [
1660
+ {
1661
+ name: "totalAmountCurrency",
1662
+ internalType: "uint256",
1663
+ type: "uint256"
1664
+ },
1665
+ { name: "totalAmountCoin", internalType: "uint256", type: "uint256" },
1666
+ {
1667
+ name: "creatorPayoutAmountCurrency",
1668
+ internalType: "uint256",
1669
+ type: "uint256"
1670
+ },
1671
+ {
1672
+ name: "creatorPayoutAmountCoin",
1673
+ internalType: "uint256",
1674
+ type: "uint256"
1675
+ },
1676
+ {
1677
+ name: "platformReferrerAmountCurrency",
1678
+ internalType: "uint256",
1679
+ type: "uint256"
1680
+ },
1681
+ {
1682
+ name: "platformReferrerAmountCoin",
1683
+ internalType: "uint256",
1684
+ type: "uint256"
1685
+ },
1686
+ {
1687
+ name: "protocolAmountCurrency",
1688
+ internalType: "uint256",
1689
+ type: "uint256"
1690
+ },
1691
+ {
1692
+ name: "protocolAmountCoin",
1693
+ internalType: "uint256",
1694
+ type: "uint256"
1695
+ }
1696
+ ],
1697
+ indexed: false
1698
+ }
1699
+ ],
1700
+ name: "CoinMarketRewards"
1701
+ },
1702
+ {
1703
+ type: "event",
1704
+ anonymous: false,
1705
+ inputs: [
1706
+ {
1707
+ name: "caller",
1708
+ internalType: "address",
1709
+ type: "address",
1710
+ indexed: true
1711
+ },
1712
+ {
1713
+ name: "prevRecipient",
1714
+ internalType: "address",
1715
+ type: "address",
1716
+ indexed: true
1717
+ },
1718
+ {
1719
+ name: "newRecipient",
1720
+ internalType: "address",
1721
+ type: "address",
1722
+ indexed: true
1723
+ }
1724
+ ],
1725
+ name: "CoinPayoutRecipientUpdated"
1726
+ },
1727
+ {
1728
+ type: "event",
1729
+ anonymous: false,
1730
+ inputs: [
1731
+ {
1732
+ name: "seller",
1733
+ internalType: "address",
1734
+ type: "address",
1735
+ indexed: true
1736
+ },
1737
+ {
1738
+ name: "recipient",
1739
+ internalType: "address",
1740
+ type: "address",
1741
+ indexed: true
1742
+ },
1743
+ {
1744
+ name: "tradeReferrer",
1745
+ internalType: "address",
1746
+ type: "address",
1747
+ indexed: true
1748
+ },
1749
+ {
1750
+ name: "coinsSold",
1751
+ internalType: "uint256",
1752
+ type: "uint256",
1753
+ indexed: false
1754
+ },
1755
+ {
1756
+ name: "currency",
1757
+ internalType: "address",
1758
+ type: "address",
1759
+ indexed: false
1760
+ },
1761
+ {
1762
+ name: "amountFee",
1763
+ internalType: "uint256",
1764
+ type: "uint256",
1765
+ indexed: false
1766
+ },
1767
+ {
1768
+ name: "amountPurchased",
1769
+ internalType: "uint256",
1770
+ type: "uint256",
1771
+ indexed: false
1772
+ }
1773
+ ],
1774
+ name: "CoinSell"
1775
+ },
1776
+ {
1777
+ type: "event",
1778
+ anonymous: false,
1779
+ inputs: [
1780
+ {
1781
+ name: "payoutRecipient",
1782
+ internalType: "address",
1783
+ type: "address",
1784
+ indexed: true
1785
+ },
1786
+ {
1787
+ name: "platformReferrer",
1788
+ internalType: "address",
1789
+ type: "address",
1790
+ indexed: true
1791
+ },
1792
+ {
1793
+ name: "tradeReferrer",
1794
+ internalType: "address",
1795
+ type: "address",
1796
+ indexed: true
1797
+ },
1798
+ {
1799
+ name: "protocolRewardRecipient",
1800
+ internalType: "address",
1801
+ type: "address",
1802
+ indexed: false
1803
+ },
1804
+ {
1805
+ name: "creatorReward",
1806
+ internalType: "uint256",
1807
+ type: "uint256",
1808
+ indexed: false
1809
+ },
1810
+ {
1811
+ name: "platformReferrerReward",
1812
+ internalType: "uint256",
1813
+ type: "uint256",
1814
+ indexed: false
1815
+ },
1816
+ {
1817
+ name: "traderReferrerReward",
1818
+ internalType: "uint256",
1819
+ type: "uint256",
1820
+ indexed: false
1821
+ },
1822
+ {
1823
+ name: "protocolReward",
1824
+ internalType: "uint256",
1825
+ type: "uint256",
1826
+ indexed: false
1827
+ },
1828
+ {
1829
+ name: "currency",
1830
+ internalType: "address",
1831
+ type: "address",
1832
+ indexed: false
1833
+ }
1834
+ ],
1835
+ name: "CoinTradeRewards"
1836
+ },
1837
+ {
1838
+ type: "event",
1839
+ anonymous: false,
1840
+ inputs: [
1841
+ {
1842
+ name: "sender",
1843
+ internalType: "address",
1844
+ type: "address",
1845
+ indexed: true
1846
+ },
1847
+ {
1848
+ name: "recipient",
1849
+ internalType: "address",
1850
+ type: "address",
1851
+ indexed: true
1852
+ },
1853
+ {
1854
+ name: "amount",
1855
+ internalType: "uint256",
1856
+ type: "uint256",
1857
+ indexed: false
1858
+ },
1859
+ {
1860
+ name: "senderBalance",
1861
+ internalType: "uint256",
1862
+ type: "uint256",
1863
+ indexed: false
1864
+ },
1865
+ {
1866
+ name: "recipientBalance",
1867
+ internalType: "uint256",
1868
+ type: "uint256",
1869
+ indexed: false
1870
+ }
1871
+ ],
1872
+ name: "CoinTransfer"
1873
+ },
1874
+ {
1875
+ type: "event",
1876
+ anonymous: false,
1877
+ inputs: [
1878
+ {
1879
+ name: "caller",
1880
+ internalType: "address",
1881
+ type: "address",
1882
+ indexed: true
1883
+ },
1884
+ {
1885
+ name: "newURI",
1886
+ internalType: "string",
1887
+ type: "string",
1888
+ indexed: false
1889
+ },
1890
+ { name: "name", internalType: "string", type: "string", indexed: false }
1891
+ ],
1892
+ name: "ContractMetadataUpdated"
1893
+ },
1894
+ { type: "event", anonymous: false, inputs: [], name: "ContractURIUpdated" },
1895
+ { type: "event", anonymous: false, inputs: [], name: "EIP712DomainChanged" },
1896
+ {
1897
+ type: "event",
1898
+ anonymous: false,
1899
+ inputs: [
1900
+ {
1901
+ name: "version",
1902
+ internalType: "uint64",
1903
+ type: "uint64",
1904
+ indexed: false
1905
+ }
1906
+ ],
1907
+ name: "Initialized"
1908
+ },
1909
+ {
1910
+ type: "event",
1911
+ anonymous: false,
1912
+ inputs: [
1913
+ {
1914
+ name: "caller",
1915
+ internalType: "address",
1916
+ type: "address",
1917
+ indexed: true
1918
+ },
1919
+ {
1920
+ name: "prevOwner",
1921
+ internalType: "address",
1922
+ type: "address",
1923
+ indexed: true
1924
+ },
1925
+ {
1926
+ name: "newOwner",
1927
+ internalType: "address",
1928
+ type: "address",
1929
+ indexed: true
1930
+ }
1931
+ ],
1932
+ name: "OwnerUpdated"
1933
+ },
1934
+ {
1935
+ type: "event",
1936
+ anonymous: false,
1937
+ inputs: [
1938
+ { name: "from", internalType: "address", type: "address", indexed: true },
1939
+ { name: "to", internalType: "address", type: "address", indexed: true },
1940
+ {
1941
+ name: "value",
1942
+ internalType: "uint256",
1943
+ type: "uint256",
1944
+ indexed: false
1945
+ }
1946
+ ],
1947
+ name: "Transfer"
1948
+ },
1949
+ { type: "error", inputs: [], name: "AddressZero" },
1950
+ { type: "error", inputs: [], name: "AlreadyOwner" },
1951
+ { type: "error", inputs: [], name: "CannotMintZeroLiquidity" },
1952
+ {
1953
+ type: "error",
1954
+ inputs: [],
1955
+ name: "DopplerPoolMustHaveMoreThan2DiscoveryPositions"
1956
+ },
1957
+ { type: "error", inputs: [], name: "ECDSAInvalidSignature" },
1958
+ {
1959
+ type: "error",
1960
+ inputs: [{ name: "length", internalType: "uint256", type: "uint256" }],
1961
+ name: "ECDSAInvalidSignatureLength"
1962
+ },
1963
+ {
1964
+ type: "error",
1965
+ inputs: [{ name: "s", internalType: "bytes32", type: "bytes32" }],
1966
+ name: "ECDSAInvalidSignatureS"
1967
+ },
1968
+ {
1969
+ type: "error",
1970
+ inputs: [
1971
+ { name: "spender", internalType: "address", type: "address" },
1972
+ { name: "allowance", internalType: "uint256", type: "uint256" },
1973
+ { name: "needed", internalType: "uint256", type: "uint256" }
1974
+ ],
1975
+ name: "ERC20InsufficientAllowance"
1976
+ },
1977
+ {
1978
+ type: "error",
1979
+ inputs: [
1980
+ { name: "sender", internalType: "address", type: "address" },
1981
+ { name: "balance", internalType: "uint256", type: "uint256" },
1982
+ { name: "needed", internalType: "uint256", type: "uint256" }
1983
+ ],
1984
+ name: "ERC20InsufficientBalance"
1985
+ },
1986
+ {
1987
+ type: "error",
1988
+ inputs: [{ name: "approver", internalType: "address", type: "address" }],
1989
+ name: "ERC20InvalidApprover"
1990
+ },
1991
+ {
1992
+ type: "error",
1993
+ inputs: [{ name: "receiver", internalType: "address", type: "address" }],
1994
+ name: "ERC20InvalidReceiver"
1995
+ },
1996
+ {
1997
+ type: "error",
1998
+ inputs: [{ name: "sender", internalType: "address", type: "address" }],
1999
+ name: "ERC20InvalidSender"
2000
+ },
2001
+ {
2002
+ type: "error",
2003
+ inputs: [{ name: "spender", internalType: "address", type: "address" }],
2004
+ name: "ERC20InvalidSpender"
2005
+ },
2006
+ { type: "error", inputs: [], name: "ERC20TransferAmountMismatch" },
2007
+ {
2008
+ type: "error",
2009
+ inputs: [{ name: "deadline", internalType: "uint256", type: "uint256" }],
2010
+ name: "ERC2612ExpiredSignature"
2011
+ },
2012
+ {
2013
+ type: "error",
2014
+ inputs: [
2015
+ { name: "signer", internalType: "address", type: "address" },
2016
+ { name: "owner", internalType: "address", type: "address" }
2017
+ ],
2018
+ name: "ERC2612InvalidSigner"
2019
+ },
2020
+ { type: "error", inputs: [], name: "EthAmountMismatch" },
2021
+ { type: "error", inputs: [], name: "EthAmountTooSmall" },
2022
+ { type: "error", inputs: [], name: "EthTransferFailed" },
2023
+ { type: "error", inputs: [], name: "EthTransferInvalid" },
2024
+ { type: "error", inputs: [], name: "InitialOrderSizeTooLarge" },
2025
+ { type: "error", inputs: [], name: "InsufficientFunds" },
2026
+ { type: "error", inputs: [], name: "InsufficientLiquidity" },
2027
+ {
2028
+ type: "error",
2029
+ inputs: [
2030
+ { name: "account", internalType: "address", type: "address" },
2031
+ { name: "currentNonce", internalType: "uint256", type: "uint256" }
2032
+ ],
2033
+ name: "InvalidAccountNonce"
2034
+ },
2035
+ { type: "error", inputs: [], name: "InvalidCurrencyLowerTick" },
2036
+ { type: "error", inputs: [], name: "InvalidInitialization" },
2037
+ { type: "error", inputs: [], name: "InvalidMarketType" },
2038
+ { type: "error", inputs: [], name: "InvalidPoolVersion" },
2039
+ {
2040
+ type: "error",
2041
+ inputs: [
2042
+ { name: "tickLower", internalType: "int24", type: "int24" },
2043
+ { name: "tickUpper", internalType: "int24", type: "int24" }
2044
+ ],
2045
+ name: "InvalidTickRangeMisordered"
2046
+ },
2047
+ { type: "error", inputs: [], name: "InvalidWethLowerTick" },
2048
+ { type: "error", inputs: [], name: "LegacyPoolMustHaveOneDiscoveryPosition" },
2049
+ { type: "error", inputs: [], name: "MarketAlreadyGraduated" },
2050
+ { type: "error", inputs: [], name: "MarketNotGraduated" },
2051
+ {
2052
+ type: "error",
2053
+ inputs: [
2054
+ { name: "value", internalType: "uint256", type: "uint256" },
2055
+ { name: "limit", internalType: "uint256", type: "uint256" }
2056
+ ],
2057
+ name: "MaxShareToBeSoldExceeded"
2058
+ },
2059
+ { type: "error", inputs: [], name: "NotInitializing" },
2060
+ { type: "error", inputs: [], name: "NotOwner" },
2061
+ { type: "error", inputs: [], name: "NumDiscoveryPositionsOutOfRange" },
2062
+ { type: "error", inputs: [], name: "OneOwnerRequired" },
2063
+ { type: "error", inputs: [], name: "OnlyOwner" },
2064
+ {
2065
+ type: "error",
2066
+ inputs: [
2067
+ { name: "sender", internalType: "address", type: "address" },
2068
+ { name: "pool", internalType: "address", type: "address" }
2069
+ ],
2070
+ name: "OnlyPool"
2071
+ },
2072
+ { type: "error", inputs: [], name: "OnlyWeth" },
2073
+ { type: "error", inputs: [], name: "OwnerCannotBeAddressZero" },
2074
+ { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" },
2075
+ { type: "error", inputs: [], name: "SlippageBoundsExceeded" },
2076
+ { type: "error", inputs: [], name: "UseRevokeOwnershipToRemoveSelf" }
2077
+ ];
2078
+ var iPermit2ABI = [
2079
+ {
2080
+ type: "function",
2081
+ inputs: [],
2082
+ name: "DOMAIN_SEPARATOR",
2083
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
2084
+ stateMutability: "view"
2085
+ },
2086
+ {
2087
+ type: "function",
2088
+ inputs: [
2089
+ { name: "user", internalType: "address", type: "address" },
2090
+ { name: "token", internalType: "address", type: "address" },
2091
+ { name: "spender", internalType: "address", type: "address" }
2092
+ ],
2093
+ name: "allowance",
2094
+ outputs: [
2095
+ { name: "amount", internalType: "uint160", type: "uint160" },
2096
+ { name: "expiration", internalType: "uint48", type: "uint48" },
2097
+ { name: "nonce", internalType: "uint48", type: "uint48" }
2098
+ ],
2099
+ stateMutability: "view"
2100
+ },
2101
+ {
2102
+ type: "function",
2103
+ inputs: [
2104
+ { name: "token", internalType: "address", type: "address" },
2105
+ { name: "spender", internalType: "address", type: "address" },
2106
+ { name: "amount", internalType: "uint160", type: "uint160" },
2107
+ { name: "expiration", internalType: "uint48", type: "uint48" }
2108
+ ],
2109
+ name: "approve",
2110
+ outputs: [],
2111
+ stateMutability: "nonpayable"
2112
+ },
2113
+ {
2114
+ type: "function",
2115
+ inputs: [
2116
+ { name: "token", internalType: "address", type: "address" },
2117
+ { name: "spender", internalType: "address", type: "address" },
2118
+ { name: "newNonce", internalType: "uint48", type: "uint48" }
2119
+ ],
2120
+ name: "invalidateNonces",
2121
+ outputs: [],
2122
+ stateMutability: "nonpayable"
2123
+ },
2124
+ {
2125
+ type: "function",
2126
+ inputs: [
2127
+ { name: "wordPos", internalType: "uint256", type: "uint256" },
2128
+ { name: "mask", internalType: "uint256", type: "uint256" }
2129
+ ],
2130
+ name: "invalidateUnorderedNonces",
2131
+ outputs: [],
2132
+ stateMutability: "nonpayable"
2133
+ },
2134
+ {
2135
+ type: "function",
2136
+ inputs: [
2137
+ {
2138
+ name: "approvals",
2139
+ internalType: "struct IAllowanceTransfer.TokenSpenderPair[]",
2140
+ type: "tuple[]",
2141
+ components: [
2142
+ { name: "token", internalType: "address", type: "address" },
2143
+ { name: "spender", internalType: "address", type: "address" }
2144
+ ]
2145
+ }
2146
+ ],
2147
+ name: "lockdown",
2148
+ outputs: [],
2149
+ stateMutability: "nonpayable"
2150
+ },
2151
+ {
2152
+ type: "function",
2153
+ inputs: [
2154
+ { name: "", internalType: "address", type: "address" },
2155
+ { name: "", internalType: "uint256", type: "uint256" }
2156
+ ],
2157
+ name: "nonceBitmap",
2158
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
2159
+ stateMutability: "view"
2160
+ },
2161
+ {
2162
+ type: "function",
2163
+ inputs: [
2164
+ { name: "owner", internalType: "address", type: "address" },
2165
+ {
2166
+ name: "permitBatch",
2167
+ internalType: "struct IAllowanceTransfer.PermitBatch",
2168
+ type: "tuple",
2169
+ components: [
2170
+ {
2171
+ name: "details",
2172
+ internalType: "struct IAllowanceTransfer.PermitDetails[]",
2173
+ type: "tuple[]",
2174
+ components: [
2175
+ { name: "token", internalType: "address", type: "address" },
2176
+ { name: "amount", internalType: "uint160", type: "uint160" },
2177
+ { name: "expiration", internalType: "uint48", type: "uint48" },
2178
+ { name: "nonce", internalType: "uint48", type: "uint48" }
2179
+ ]
2180
+ },
2181
+ { name: "spender", internalType: "address", type: "address" },
2182
+ { name: "sigDeadline", internalType: "uint256", type: "uint256" }
2183
+ ]
2184
+ },
2185
+ { name: "signature", internalType: "bytes", type: "bytes" }
2186
+ ],
2187
+ name: "permit",
2188
+ outputs: [],
2189
+ stateMutability: "nonpayable"
2190
+ },
2191
+ {
2192
+ type: "function",
2193
+ inputs: [
2194
+ { name: "owner", internalType: "address", type: "address" },
2195
+ {
2196
+ name: "permitSingle",
2197
+ internalType: "struct IAllowanceTransfer.PermitSingle",
2198
+ type: "tuple",
2199
+ components: [
2200
+ {
2201
+ name: "details",
2202
+ internalType: "struct IAllowanceTransfer.PermitDetails",
2203
+ type: "tuple",
2204
+ components: [
2205
+ { name: "token", internalType: "address", type: "address" },
2206
+ { name: "amount", internalType: "uint160", type: "uint160" },
2207
+ { name: "expiration", internalType: "uint48", type: "uint48" },
2208
+ { name: "nonce", internalType: "uint48", type: "uint48" }
2209
+ ]
2210
+ },
2211
+ { name: "spender", internalType: "address", type: "address" },
2212
+ { name: "sigDeadline", internalType: "uint256", type: "uint256" }
2213
+ ]
2214
+ },
2215
+ { name: "signature", internalType: "bytes", type: "bytes" }
2216
+ ],
2217
+ name: "permit",
2218
+ outputs: [],
2219
+ stateMutability: "nonpayable"
2220
+ },
2221
+ {
2222
+ type: "function",
2223
+ inputs: [
2224
+ {
2225
+ name: "permit",
2226
+ internalType: "struct ISignatureTransfer.PermitTransferFrom",
2227
+ type: "tuple",
2228
+ components: [
2229
+ {
2230
+ name: "permitted",
2231
+ internalType: "struct ISignatureTransfer.TokenPermissions",
2232
+ type: "tuple",
2233
+ components: [
2234
+ { name: "token", internalType: "address", type: "address" },
2235
+ { name: "amount", internalType: "uint256", type: "uint256" }
2236
+ ]
2237
+ },
2238
+ { name: "nonce", internalType: "uint256", type: "uint256" },
2239
+ { name: "deadline", internalType: "uint256", type: "uint256" }
2240
+ ]
2241
+ },
2242
+ {
2243
+ name: "transferDetails",
2244
+ internalType: "struct ISignatureTransfer.SignatureTransferDetails",
2245
+ type: "tuple",
2246
+ components: [
2247
+ { name: "to", internalType: "address", type: "address" },
2248
+ { name: "requestedAmount", internalType: "uint256", type: "uint256" }
2249
+ ]
2250
+ },
2251
+ { name: "owner", internalType: "address", type: "address" },
2252
+ { name: "signature", internalType: "bytes", type: "bytes" }
2253
+ ],
2254
+ name: "permitTransferFrom",
2255
+ outputs: [],
2256
+ stateMutability: "nonpayable"
2257
+ },
2258
+ {
2259
+ type: "function",
2260
+ inputs: [
2261
+ {
2262
+ name: "permit",
2263
+ internalType: "struct ISignatureTransfer.PermitBatchTransferFrom",
2264
+ type: "tuple",
2265
+ components: [
2266
+ {
2267
+ name: "permitted",
2268
+ internalType: "struct ISignatureTransfer.TokenPermissions[]",
2269
+ type: "tuple[]",
2270
+ components: [
2271
+ { name: "token", internalType: "address", type: "address" },
2272
+ { name: "amount", internalType: "uint256", type: "uint256" }
2273
+ ]
2274
+ },
2275
+ { name: "nonce", internalType: "uint256", type: "uint256" },
2276
+ { name: "deadline", internalType: "uint256", type: "uint256" }
2277
+ ]
2278
+ },
2279
+ {
2280
+ name: "transferDetails",
2281
+ internalType: "struct ISignatureTransfer.SignatureTransferDetails[]",
2282
+ type: "tuple[]",
2283
+ components: [
2284
+ { name: "to", internalType: "address", type: "address" },
2285
+ { name: "requestedAmount", internalType: "uint256", type: "uint256" }
2286
+ ]
2287
+ },
2288
+ { name: "owner", internalType: "address", type: "address" },
2289
+ { name: "signature", internalType: "bytes", type: "bytes" }
2290
+ ],
2291
+ name: "permitTransferFrom",
2292
+ outputs: [],
2293
+ stateMutability: "nonpayable"
2294
+ },
2295
+ {
2296
+ type: "function",
2297
+ inputs: [
2298
+ {
2299
+ name: "permit",
2300
+ internalType: "struct ISignatureTransfer.PermitTransferFrom",
2301
+ type: "tuple",
2302
+ components: [
2303
+ {
2304
+ name: "permitted",
2305
+ internalType: "struct ISignatureTransfer.TokenPermissions",
2306
+ type: "tuple",
2307
+ components: [
2308
+ { name: "token", internalType: "address", type: "address" },
2309
+ { name: "amount", internalType: "uint256", type: "uint256" }
2310
+ ]
2311
+ },
2312
+ { name: "nonce", internalType: "uint256", type: "uint256" },
2313
+ { name: "deadline", internalType: "uint256", type: "uint256" }
2314
+ ]
2315
+ },
2316
+ {
2317
+ name: "transferDetails",
2318
+ internalType: "struct ISignatureTransfer.SignatureTransferDetails",
2319
+ type: "tuple",
2320
+ components: [
2321
+ { name: "to", internalType: "address", type: "address" },
2322
+ { name: "requestedAmount", internalType: "uint256", type: "uint256" }
2323
+ ]
2324
+ },
2325
+ { name: "owner", internalType: "address", type: "address" },
2326
+ { name: "witness", internalType: "bytes32", type: "bytes32" },
2327
+ { name: "witnessTypeString", internalType: "string", type: "string" },
2328
+ { name: "signature", internalType: "bytes", type: "bytes" }
2329
+ ],
2330
+ name: "permitWitnessTransferFrom",
2331
+ outputs: [],
2332
+ stateMutability: "nonpayable"
2333
+ },
2334
+ {
2335
+ type: "function",
2336
+ inputs: [
2337
+ {
2338
+ name: "permit",
2339
+ internalType: "struct ISignatureTransfer.PermitBatchTransferFrom",
2340
+ type: "tuple",
2341
+ components: [
2342
+ {
2343
+ name: "permitted",
2344
+ internalType: "struct ISignatureTransfer.TokenPermissions[]",
2345
+ type: "tuple[]",
2346
+ components: [
2347
+ { name: "token", internalType: "address", type: "address" },
2348
+ { name: "amount", internalType: "uint256", type: "uint256" }
2349
+ ]
2350
+ },
2351
+ { name: "nonce", internalType: "uint256", type: "uint256" },
2352
+ { name: "deadline", internalType: "uint256", type: "uint256" }
2353
+ ]
2354
+ },
2355
+ {
2356
+ name: "transferDetails",
2357
+ internalType: "struct ISignatureTransfer.SignatureTransferDetails[]",
2358
+ type: "tuple[]",
2359
+ components: [
2360
+ { name: "to", internalType: "address", type: "address" },
2361
+ { name: "requestedAmount", internalType: "uint256", type: "uint256" }
2362
+ ]
2363
+ },
2364
+ { name: "owner", internalType: "address", type: "address" },
2365
+ { name: "witness", internalType: "bytes32", type: "bytes32" },
2366
+ { name: "witnessTypeString", internalType: "string", type: "string" },
2367
+ { name: "signature", internalType: "bytes", type: "bytes" }
2368
+ ],
2369
+ name: "permitWitnessTransferFrom",
2370
+ outputs: [],
2371
+ stateMutability: "nonpayable"
2372
+ },
2373
+ {
2374
+ type: "function",
2375
+ inputs: [
2376
+ {
2377
+ name: "transferDetails",
2378
+ internalType: "struct IAllowanceTransfer.AllowanceTransferDetails[]",
2379
+ type: "tuple[]",
2380
+ components: [
2381
+ { name: "from", internalType: "address", type: "address" },
2382
+ { name: "to", internalType: "address", type: "address" },
2383
+ { name: "amount", internalType: "uint160", type: "uint160" },
2384
+ { name: "token", internalType: "address", type: "address" }
2385
+ ]
2386
+ }
2387
+ ],
2388
+ name: "transferFrom",
2389
+ outputs: [],
2390
+ stateMutability: "nonpayable"
2391
+ },
2392
+ {
2393
+ type: "function",
2394
+ inputs: [
2395
+ { name: "from", internalType: "address", type: "address" },
2396
+ { name: "to", internalType: "address", type: "address" },
2397
+ { name: "amount", internalType: "uint160", type: "uint160" },
2398
+ { name: "token", internalType: "address", type: "address" }
2399
+ ],
2400
+ name: "transferFrom",
2401
+ outputs: [],
2402
+ stateMutability: "nonpayable"
2403
+ },
2404
+ {
2405
+ type: "event",
2406
+ anonymous: false,
2407
+ inputs: [
2408
+ {
2409
+ name: "owner",
2410
+ internalType: "address",
2411
+ type: "address",
2412
+ indexed: true
2413
+ },
2414
+ {
2415
+ name: "token",
2416
+ internalType: "address",
2417
+ type: "address",
2418
+ indexed: true
2419
+ },
2420
+ {
2421
+ name: "spender",
2422
+ internalType: "address",
2423
+ type: "address",
2424
+ indexed: true
2425
+ },
2426
+ {
2427
+ name: "amount",
2428
+ internalType: "uint160",
2429
+ type: "uint160",
2430
+ indexed: false
2431
+ },
2432
+ {
2433
+ name: "expiration",
2434
+ internalType: "uint48",
2435
+ type: "uint48",
2436
+ indexed: false
2437
+ }
2438
+ ],
2439
+ name: "Approval"
2440
+ },
2441
+ {
2442
+ type: "event",
2443
+ anonymous: false,
2444
+ inputs: [
2445
+ {
2446
+ name: "owner",
2447
+ internalType: "address",
2448
+ type: "address",
2449
+ indexed: true
2450
+ },
2451
+ {
2452
+ name: "token",
2453
+ internalType: "address",
2454
+ type: "address",
2455
+ indexed: false
2456
+ },
2457
+ {
2458
+ name: "spender",
2459
+ internalType: "address",
2460
+ type: "address",
2461
+ indexed: false
2462
+ }
2463
+ ],
2464
+ name: "Lockdown"
2465
+ },
2466
+ {
2467
+ type: "event",
2468
+ anonymous: false,
2469
+ inputs: [
2470
+ {
2471
+ name: "owner",
2472
+ internalType: "address",
2473
+ type: "address",
2474
+ indexed: true
2475
+ },
2476
+ {
2477
+ name: "token",
2478
+ internalType: "address",
2479
+ type: "address",
2480
+ indexed: true
2481
+ },
2482
+ {
2483
+ name: "spender",
2484
+ internalType: "address",
2485
+ type: "address",
2486
+ indexed: true
2487
+ },
2488
+ {
2489
+ name: "newNonce",
2490
+ internalType: "uint48",
2491
+ type: "uint48",
2492
+ indexed: false
2493
+ },
2494
+ {
2495
+ name: "oldNonce",
2496
+ internalType: "uint48",
2497
+ type: "uint48",
2498
+ indexed: false
2499
+ }
2500
+ ],
2501
+ name: "NonceInvalidation"
2502
+ },
2503
+ {
2504
+ type: "event",
2505
+ anonymous: false,
2506
+ inputs: [
2507
+ {
2508
+ name: "owner",
2509
+ internalType: "address",
2510
+ type: "address",
2511
+ indexed: true
2512
+ },
2513
+ {
2514
+ name: "token",
2515
+ internalType: "address",
2516
+ type: "address",
2517
+ indexed: true
2518
+ },
2519
+ {
2520
+ name: "spender",
2521
+ internalType: "address",
2522
+ type: "address",
2523
+ indexed: true
2524
+ },
2525
+ {
2526
+ name: "amount",
2527
+ internalType: "uint160",
2528
+ type: "uint160",
2529
+ indexed: false
2530
+ },
2531
+ {
2532
+ name: "expiration",
2533
+ internalType: "uint48",
2534
+ type: "uint48",
2535
+ indexed: false
2536
+ },
2537
+ { name: "nonce", internalType: "uint48", type: "uint48", indexed: false }
2538
+ ],
2539
+ name: "Permit"
2540
+ },
2541
+ {
2542
+ type: "event",
2543
+ anonymous: false,
2544
+ inputs: [
2545
+ {
2546
+ name: "owner",
2547
+ internalType: "address",
2548
+ type: "address",
2549
+ indexed: true
2550
+ },
2551
+ {
2552
+ name: "word",
2553
+ internalType: "uint256",
2554
+ type: "uint256",
2555
+ indexed: false
2556
+ },
2557
+ {
2558
+ name: "mask",
2559
+ internalType: "uint256",
2560
+ type: "uint256",
2561
+ indexed: false
2562
+ }
2563
+ ],
2564
+ name: "UnorderedNonceInvalidation"
2565
+ },
2566
+ {
2567
+ type: "error",
2568
+ inputs: [{ name: "deadline", internalType: "uint256", type: "uint256" }],
2569
+ name: "AllowanceExpired"
2570
+ },
2571
+ { type: "error", inputs: [], name: "ExcessiveInvalidation" },
2572
+ {
2573
+ type: "error",
2574
+ inputs: [{ name: "amount", internalType: "uint256", type: "uint256" }],
2575
+ name: "InsufficientAllowance"
2576
+ },
2577
+ {
2578
+ type: "error",
2579
+ inputs: [{ name: "maxAmount", internalType: "uint256", type: "uint256" }],
2580
+ name: "InvalidAmount"
2581
+ },
2582
+ { type: "error", inputs: [], name: "LengthMismatch" }
2583
+ ];
2584
+ var iPoolConfigEncodingABI = [
2585
+ {
2586
+ type: "function",
2587
+ inputs: [
2588
+ { name: "version", internalType: "uint8", type: "uint8" },
2589
+ { name: "currency", internalType: "address", type: "address" },
2590
+ { name: "tickLower", internalType: "int24[]", type: "int24[]" },
2591
+ { name: "tickUpper", internalType: "int24[]", type: "int24[]" },
2592
+ {
2593
+ name: "numDiscoveryPositions",
2594
+ internalType: "uint16[]",
2595
+ type: "uint16[]"
2596
+ },
2597
+ {
2598
+ name: "maxDiscoverySupplyShare",
2599
+ internalType: "uint256[]",
2600
+ type: "uint256[]"
2601
+ }
2602
+ ],
2603
+ name: "encodeMultiCurvePoolConfig",
2604
+ outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
2605
+ stateMutability: "pure"
2606
+ }
2607
+ ];
2608
+ var iUniswapV3PoolABI = [
2609
+ {
2610
+ type: "function",
2611
+ inputs: [
2612
+ { name: "tickLower", internalType: "int24", type: "int24" },
2613
+ { name: "tickUpper", internalType: "int24", type: "int24" },
2614
+ { name: "amount", internalType: "uint128", type: "uint128" }
2615
+ ],
2616
+ name: "burn",
2617
+ outputs: [
2618
+ { name: "amount0", internalType: "uint256", type: "uint256" },
2619
+ { name: "amount1", internalType: "uint256", type: "uint256" }
2620
+ ],
2621
+ stateMutability: "nonpayable"
2622
+ },
2623
+ {
2624
+ type: "function",
2625
+ inputs: [
2626
+ { name: "recipient", internalType: "address", type: "address" },
2627
+ { name: "tickLower", internalType: "int24", type: "int24" },
2628
+ { name: "tickUpper", internalType: "int24", type: "int24" },
2629
+ { name: "amount0Requested", internalType: "uint128", type: "uint128" },
2630
+ { name: "amount1Requested", internalType: "uint128", type: "uint128" }
2631
+ ],
2632
+ name: "collect",
2633
+ outputs: [
2634
+ { name: "amount0", internalType: "uint128", type: "uint128" },
2635
+ { name: "amount1", internalType: "uint128", type: "uint128" }
2636
+ ],
2637
+ stateMutability: "nonpayable"
2638
+ },
2639
+ {
2640
+ type: "function",
2641
+ inputs: [],
2642
+ name: "feeGrowthGlobal0X128",
2643
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
2644
+ stateMutability: "view"
2645
+ },
2646
+ {
2647
+ type: "function",
2648
+ inputs: [],
2649
+ name: "feeGrowthGlobal1X128",
2650
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
2651
+ stateMutability: "view"
2652
+ },
2653
+ {
2654
+ type: "function",
2655
+ inputs: [
2656
+ { name: "sqrtPriceX96", internalType: "uint160", type: "uint160" }
2657
+ ],
2658
+ name: "initialize",
2659
+ outputs: [],
2660
+ stateMutability: "nonpayable"
2661
+ },
2662
+ {
2663
+ type: "function",
2664
+ inputs: [
2665
+ { name: "recipient", internalType: "address", type: "address" },
2666
+ { name: "tickLower", internalType: "int24", type: "int24" },
2667
+ { name: "tickUpper", internalType: "int24", type: "int24" },
2668
+ { name: "amount", internalType: "uint128", type: "uint128" },
2669
+ { name: "data", internalType: "bytes", type: "bytes" }
2670
+ ],
2671
+ name: "mint",
2672
+ outputs: [
2673
+ { name: "amount0", internalType: "uint256", type: "uint256" },
2674
+ { name: "amount1", internalType: "uint256", type: "uint256" }
2675
+ ],
2676
+ stateMutability: "nonpayable"
2677
+ },
2678
+ {
2679
+ type: "function",
2680
+ inputs: [],
2681
+ name: "slot0",
2682
+ outputs: [
2683
+ {
2684
+ name: "slot0",
2685
+ internalType: "struct IUniswapV3Pool.Slot0",
2686
+ type: "tuple",
2687
+ components: [
2688
+ { name: "sqrtPriceX96", internalType: "uint160", type: "uint160" },
2689
+ { name: "tick", internalType: "int24", type: "int24" },
2690
+ { name: "observationIndex", internalType: "uint16", type: "uint16" },
2691
+ {
2692
+ name: "observationCardinality",
2693
+ internalType: "uint16",
2694
+ type: "uint16"
2695
+ },
2696
+ {
2697
+ name: "observationCardinalityNext",
2698
+ internalType: "uint16",
2699
+ type: "uint16"
2700
+ },
2701
+ { name: "feeProtocol", internalType: "uint8", type: "uint8" },
2702
+ { name: "unlocked", internalType: "bool", type: "bool" }
2703
+ ]
2704
+ }
2705
+ ],
2706
+ stateMutability: "view"
2707
+ },
2708
+ {
2709
+ type: "function",
2710
+ inputs: [
2711
+ { name: "recipient", internalType: "address", type: "address" },
2712
+ { name: "zeroForOne", internalType: "bool", type: "bool" },
2713
+ { name: "amountSpecified", internalType: "int256", type: "int256" },
2714
+ { name: "sqrtPriceLimitX96", internalType: "uint160", type: "uint160" },
2715
+ { name: "data", internalType: "bytes", type: "bytes" }
2716
+ ],
2717
+ name: "swap",
2718
+ outputs: [
2719
+ { name: "amount0", internalType: "int256", type: "int256" },
2720
+ { name: "amount1", internalType: "int256", type: "int256" }
2721
+ ],
2722
+ stateMutability: "nonpayable"
2723
+ },
2724
+ {
2725
+ type: "function",
2726
+ inputs: [],
2727
+ name: "token0",
2728
+ outputs: [{ name: "", internalType: "address", type: "address" }],
2729
+ stateMutability: "nonpayable"
2730
+ },
2731
+ {
2732
+ type: "function",
2733
+ inputs: [],
2734
+ name: "token1",
2735
+ outputs: [{ name: "", internalType: "address", type: "address" }],
2736
+ stateMutability: "nonpayable"
2737
+ }
2738
+ ];
2739
+ var iUniversalRouterABI = [
2740
+ {
2741
+ type: "function",
2742
+ inputs: [
2743
+ { name: "commands", internalType: "bytes", type: "bytes" },
2744
+ { name: "inputs", internalType: "bytes[]", type: "bytes[]" },
2745
+ { name: "deadline", internalType: "uint256", type: "uint256" }
2746
+ ],
2747
+ name: "execute",
2748
+ outputs: [],
2749
+ stateMutability: "payable"
2750
+ },
2751
+ { type: "error", inputs: [], name: "ETHNotAccepted" },
2752
+ {
2753
+ type: "error",
2754
+ inputs: [
2755
+ { name: "commandIndex", internalType: "uint256", type: "uint256" },
2756
+ { name: "message", internalType: "bytes", type: "bytes" }
2757
+ ],
2758
+ name: "ExecutionFailed"
2759
+ },
2760
+ { type: "error", inputs: [], name: "InvalidEthSender" },
2761
+ { type: "error", inputs: [], name: "LengthMismatch" },
2762
+ { type: "error", inputs: [], name: "TransactionDeadlinePassed" }
2763
+ ];
2764
+ var zoraFactoryImplABI = [
2765
+ {
2766
+ type: "constructor",
2767
+ inputs: [
2768
+ { name: "_coinImpl", internalType: "address", type: "address" },
2769
+ { name: "_coinV4Impl", internalType: "address", type: "address" }
2770
+ ],
2771
+ stateMutability: "nonpayable"
2772
+ },
2773
+ {
2774
+ type: "function",
2775
+ inputs: [],
2776
+ name: "UPGRADE_INTERFACE_VERSION",
2777
+ outputs: [{ name: "", internalType: "string", type: "string" }],
2778
+ stateMutability: "view"
2779
+ },
2780
+ {
2781
+ type: "function",
2782
+ inputs: [
2783
+ { name: "msgSender", internalType: "address", type: "address" },
2784
+ { name: "name", internalType: "string", type: "string" },
2785
+ { name: "symbol", internalType: "string", type: "string" },
2786
+ { name: "poolConfig", internalType: "bytes", type: "bytes" },
2787
+ { name: "platformReferrer", internalType: "address", type: "address" },
2788
+ { name: "coinSalt", internalType: "bytes32", type: "bytes32" }
2789
+ ],
2790
+ name: "coinAddress",
2791
+ outputs: [{ name: "", internalType: "address", type: "address" }],
2792
+ stateMutability: "view"
2793
+ },
2794
+ {
2795
+ type: "function",
2796
+ inputs: [],
2797
+ name: "coinImpl",
2798
+ outputs: [{ name: "", internalType: "address", type: "address" }],
2799
+ stateMutability: "view"
2800
+ },
2801
+ {
2802
+ type: "function",
2803
+ inputs: [],
2804
+ name: "coinV4Impl",
2805
+ outputs: [{ name: "", internalType: "address", type: "address" }],
2806
+ stateMutability: "view"
2807
+ },
2808
+ {
2809
+ type: "function",
2810
+ inputs: [],
2811
+ name: "contractName",
2812
+ outputs: [{ name: "", internalType: "string", type: "string" }],
2813
+ stateMutability: "pure"
2814
+ },
2815
+ {
2816
+ type: "function",
2817
+ inputs: [],
2818
+ name: "contractVersion",
2819
+ outputs: [{ name: "", internalType: "string", type: "string" }],
2820
+ stateMutability: "pure"
2821
+ },
2822
+ {
2823
+ type: "function",
2824
+ inputs: [
2825
+ { name: "payoutRecipient", internalType: "address", type: "address" },
2826
+ { name: "owners", internalType: "address[]", type: "address[]" },
2827
+ { name: "uri", internalType: "string", type: "string" },
2828
+ { name: "name", internalType: "string", type: "string" },
2829
+ { name: "symbol", internalType: "string", type: "string" },
2830
+ { name: "platformReferrer", internalType: "address", type: "address" },
2831
+ { name: "currency", internalType: "address", type: "address" },
2832
+ { name: "", internalType: "int24", type: "int24" },
2833
+ { name: "orderSize", internalType: "uint256", type: "uint256" }
2834
+ ],
2835
+ name: "deploy",
2836
+ outputs: [
2837
+ { name: "", internalType: "address", type: "address" },
2838
+ { name: "", internalType: "uint256", type: "uint256" }
2839
+ ],
2840
+ stateMutability: "payable"
2841
+ },
2842
+ {
2843
+ type: "function",
2844
+ inputs: [
2845
+ { name: "payoutRecipient", internalType: "address", type: "address" },
2846
+ { name: "owners", internalType: "address[]", type: "address[]" },
2847
+ { name: "uri", internalType: "string", type: "string" },
2848
+ { name: "name", internalType: "string", type: "string" },
2849
+ { name: "symbol", internalType: "string", type: "string" },
2850
+ { name: "poolConfig", internalType: "bytes", type: "bytes" },
2851
+ { name: "platformReferrer", internalType: "address", type: "address" },
2852
+ { name: "postDeployHook", internalType: "address", type: "address" },
2853
+ { name: "postDeployHookData", internalType: "bytes", type: "bytes" },
2854
+ { name: "coinSalt", internalType: "bytes32", type: "bytes32" }
2855
+ ],
2856
+ name: "deploy",
2857
+ outputs: [
2858
+ { name: "coin", internalType: "address", type: "address" },
2859
+ { name: "postDeployHookDataOut", internalType: "bytes", type: "bytes" }
2860
+ ],
2861
+ stateMutability: "payable"
2862
+ },
2863
+ {
2864
+ type: "function",
2865
+ inputs: [
2866
+ { name: "payoutRecipient", internalType: "address", type: "address" },
2867
+ { name: "owners", internalType: "address[]", type: "address[]" },
2868
+ { name: "uri", internalType: "string", type: "string" },
2869
+ { name: "name", internalType: "string", type: "string" },
2870
+ { name: "symbol", internalType: "string", type: "string" },
2871
+ { name: "poolConfig", internalType: "bytes", type: "bytes" },
2872
+ { name: "platformReferrer", internalType: "address", type: "address" },
2873
+ { name: "orderSize", internalType: "uint256", type: "uint256" }
2874
+ ],
2875
+ name: "deploy",
2876
+ outputs: [
2877
+ { name: "", internalType: "address", type: "address" },
2878
+ { name: "", internalType: "uint256", type: "uint256" }
2879
+ ],
2880
+ stateMutability: "payable"
2881
+ },
2882
+ {
2883
+ type: "function",
2884
+ inputs: [
1237
2885
  { name: "payoutRecipient", internalType: "address", type: "address" },
1238
2886
  { name: "owners", internalType: "address[]", type: "address[]" },
1239
2887
  { name: "uri", internalType: "string", type: "string" },
@@ -1251,6 +2899,13 @@ var zoraFactoryImplABI = [
1251
2899
  ],
1252
2900
  stateMutability: "payable"
1253
2901
  },
2902
+ {
2903
+ type: "function",
2904
+ inputs: [{ name: "coin", internalType: "address", type: "address" }],
2905
+ name: "getVersionForDeployedCoin",
2906
+ outputs: [{ name: "", internalType: "uint8", type: "uint8" }],
2907
+ stateMutability: "view"
2908
+ },
1254
2909
  {
1255
2910
  type: "function",
1256
2911
  inputs: [],
@@ -1362,6 +3017,76 @@ var zoraFactoryImplABI = [
1362
3017
  ],
1363
3018
  name: "CoinCreated"
1364
3019
  },
3020
+ {
3021
+ type: "event",
3022
+ anonymous: false,
3023
+ inputs: [
3024
+ {
3025
+ name: "caller",
3026
+ internalType: "address",
3027
+ type: "address",
3028
+ indexed: true
3029
+ },
3030
+ {
3031
+ name: "payoutRecipient",
3032
+ internalType: "address",
3033
+ type: "address",
3034
+ indexed: true
3035
+ },
3036
+ {
3037
+ name: "platformReferrer",
3038
+ internalType: "address",
3039
+ type: "address",
3040
+ indexed: true
3041
+ },
3042
+ {
3043
+ name: "currency",
3044
+ internalType: "address",
3045
+ type: "address",
3046
+ indexed: false
3047
+ },
3048
+ { name: "uri", internalType: "string", type: "string", indexed: false },
3049
+ { name: "name", internalType: "string", type: "string", indexed: false },
3050
+ {
3051
+ name: "symbol",
3052
+ internalType: "string",
3053
+ type: "string",
3054
+ indexed: false
3055
+ },
3056
+ {
3057
+ name: "coin",
3058
+ internalType: "address",
3059
+ type: "address",
3060
+ indexed: false
3061
+ },
3062
+ {
3063
+ name: "poolKey",
3064
+ internalType: "struct PoolKey",
3065
+ type: "tuple",
3066
+ components: [
3067
+ { name: "currency0", internalType: "Currency", type: "address" },
3068
+ { name: "currency1", internalType: "Currency", type: "address" },
3069
+ { name: "fee", internalType: "uint24", type: "uint24" },
3070
+ { name: "tickSpacing", internalType: "int24", type: "int24" },
3071
+ { name: "hooks", internalType: "contract IHooks", type: "address" }
3072
+ ],
3073
+ indexed: false
3074
+ },
3075
+ {
3076
+ name: "poolKeyHash",
3077
+ internalType: "bytes32",
3078
+ type: "bytes32",
3079
+ indexed: false
3080
+ },
3081
+ {
3082
+ name: "version",
3083
+ internalType: "string",
3084
+ type: "string",
3085
+ indexed: false
3086
+ }
3087
+ ],
3088
+ name: "CoinCreatedV4"
3089
+ },
1365
3090
  {
1366
3091
  type: "event",
1367
3092
  anonymous: false,
@@ -1417,6 +3142,10 @@ var zoraFactoryImplABI = [
1417
3142
  inputs: [{ name: "account", internalType: "address", type: "address" }],
1418
3143
  name: "AddressInsufficientBalance"
1419
3144
  },
3145
+ { type: "error", inputs: [], name: "ArrayLengthMismatch" },
3146
+ { type: "error", inputs: [], name: "CannotMintZeroLiquidity" },
3147
+ { type: "error", inputs: [], name: "ConfigTickLowerMustBeLessThanTickUpper" },
3148
+ { type: "error", inputs: [], name: "Deprecated" },
1420
3149
  { type: "error", inputs: [], name: "ERC1167FailedCreateClone" },
1421
3150
  {
1422
3151
  type: "error",
@@ -1431,7 +3160,33 @@ var zoraFactoryImplABI = [
1431
3160
  { type: "error", inputs: [], name: "FailedInnerCall" },
1432
3161
  { type: "error", inputs: [], name: "InvalidHook" },
1433
3162
  { type: "error", inputs: [], name: "InvalidInitialization" },
3163
+ { type: "error", inputs: [], name: "InvalidPoolVersion" },
3164
+ {
3165
+ type: "error",
3166
+ inputs: [
3167
+ { name: "tickLower", internalType: "int24", type: "int24" },
3168
+ { name: "tickUpper", internalType: "int24", type: "int24" }
3169
+ ],
3170
+ name: "InvalidTickRangeMisordered"
3171
+ },
3172
+ {
3173
+ type: "error",
3174
+ inputs: [
3175
+ { name: "tickLower", internalType: "int24", type: "int24" },
3176
+ { name: "tickUpper", internalType: "int24", type: "int24" }
3177
+ ],
3178
+ name: "InvalidTickRangeMisordered"
3179
+ },
3180
+ {
3181
+ type: "error",
3182
+ inputs: [
3183
+ { name: "value", internalType: "uint256", type: "uint256" },
3184
+ { name: "limit", internalType: "uint256", type: "uint256" }
3185
+ ],
3186
+ name: "MaxShareToBeSoldExceeded"
3187
+ },
1434
3188
  { type: "error", inputs: [], name: "NotInitializing" },
3189
+ { type: "error", inputs: [], name: "NumDiscoveryPositionsOutOfRange" },
1435
3190
  {
1436
3191
  type: "error",
1437
3192
  inputs: [{ name: "owner", internalType: "address", type: "address" }],
@@ -1461,12 +3216,18 @@ var zoraFactoryImplABI = [
1461
3216
  { name: "newName", internalType: "string", type: "string" }
1462
3217
  ],
1463
3218
  name: "UpgradeToMismatchedContractName"
1464
- }
3219
+ },
3220
+ { type: "error", inputs: [], name: "ZeroDiscoveryPositions" },
3221
+ { type: "error", inputs: [], name: "ZeroDiscoverySupplyShare" }
1465
3222
  ];
1466
3223
  export {
1467
3224
  buySupplyWithSwapRouterHookABI,
1468
3225
  coinABI,
3226
+ coinV4ABI,
3227
+ iPermit2ABI,
3228
+ iPoolConfigEncodingABI,
1469
3229
  iUniswapV3PoolABI,
3230
+ iUniversalRouterABI,
1470
3231
  zoraFactoryImplABI
1471
3232
  };
1472
3233
  //# sourceMappingURL=index.js.map