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