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