@zoralabs/coins 2.5.0 → 2.6.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$colon$js.log +136 -130
- package/CHANGELOG.md +28 -17
- package/abis/BaseCoin.json +5 -0
- package/abis/ContentCoin.json +5 -0
- package/abis/ICoin.json +5 -0
- package/abis/ICoinV3.json +5 -0
- package/abis/ITrendCoin.json +140 -0
- package/abis/ITrendCoinErrors.json +33 -0
- package/abis/IUniversalRouter.json +61 -0
- package/abis/IZoraFactory.json +237 -0
- package/abis/TrendCoin.json +2053 -0
- package/abis/ZoraFactoryImpl.json +242 -0
- package/dist/index.cjs +955 -138
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +953 -138
- package/dist/index.js.map +1 -1
- package/dist/wagmiGenerated.d.ts +1388 -149
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/foundry.toml +1 -0
- package/package/wagmiGenerated.ts +962 -139
- package/package.json +2 -2
- package/src/BaseCoin.sol +12 -12
- package/src/ContentCoin.sol +20 -1
- package/src/CreatorCoin.sol +3 -0
- package/src/TrendCoin.sol +117 -0
- package/src/ZoraFactoryImpl.sol +142 -1
- package/src/hooks/ZoraV4CoinHook.sol +17 -7
- package/src/interfaces/ICoin.sol +5 -1
- package/src/interfaces/ICreatorCoin.sol +0 -3
- package/src/interfaces/IPoolManager.sol +13 -0
- package/src/interfaces/ITrendCoin.sol +26 -0
- package/src/interfaces/ITrendCoinErrors.sol +24 -0
- package/src/interfaces/IZoraFactory.sol +60 -1
- package/src/libs/CoinConstants.sol +13 -1
- package/src/libs/CoinRewardsV4.sol +82 -21
- package/src/libs/TickerUtils.sol +66 -0
- package/src/libs/UniV4SwapToCurrency.sol +2 -1
- package/src/version/ContractVersionBase.sol +1 -1
- package/test/CoinRewardsV4.t.sol +48 -0
- package/test/CreatorCoin.t.sol +2 -1
- package/test/Factory.t.sol +31 -5
- package/test/LaunchFee.t.sol +0 -2
- package/test/LiquidityMigration.t.sol +0 -2
- package/test/TrendCoin.t.sol +1128 -0
- package/test/Upgrades.t.sol +16 -3
- package/test/utils/FeeEstimatorHook.sol +36 -10
- package/test/utils/V4TestSetup.sol +36 -4
- package/wagmi.config.ts +2 -0
|
@@ -1144,6 +1144,7 @@ export const baseCoinABI = [
|
|
|
1144
1144
|
],
|
|
1145
1145
|
name: 'InvalidAccountNonce',
|
|
1146
1146
|
},
|
|
1147
|
+
{ type: 'error', inputs: [], name: 'InvalidCurrency' },
|
|
1147
1148
|
{ type: 'error', inputs: [], name: 'InvalidCurrencyLowerTick' },
|
|
1148
1149
|
{ type: 'error', inputs: [], name: 'InvalidInitialization' },
|
|
1149
1150
|
{ type: 'error', inputs: [], name: 'InvalidMarketType' },
|
|
@@ -2455,6 +2456,7 @@ export const contentCoinABI = [
|
|
|
2455
2456
|
],
|
|
2456
2457
|
name: 'InvalidAccountNonce',
|
|
2457
2458
|
},
|
|
2459
|
+
{ type: 'error', inputs: [], name: 'InvalidCurrency' },
|
|
2458
2460
|
{ type: 'error', inputs: [], name: 'InvalidCurrencyLowerTick' },
|
|
2459
2461
|
{ type: 'error', inputs: [], name: 'InvalidInitialization' },
|
|
2460
2462
|
{ type: 'error', inputs: [], name: 'InvalidMarketType' },
|
|
@@ -4224,60 +4226,60 @@ export const iPoolConfigEncodingABI = [
|
|
|
4224
4226
|
] as const
|
|
4225
4227
|
|
|
4226
4228
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
4227
|
-
//
|
|
4229
|
+
// IPoolManager
|
|
4228
4230
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
4229
4231
|
|
|
4230
|
-
export const
|
|
4232
|
+
export const iPoolManagerABI = [
|
|
4231
4233
|
{
|
|
4232
4234
|
type: 'function',
|
|
4233
4235
|
inputs: [
|
|
4234
|
-
{ name: '
|
|
4235
|
-
{ name: '
|
|
4236
|
-
{ name: '
|
|
4237
|
-
],
|
|
4238
|
-
name: 'burn',
|
|
4239
|
-
outputs: [
|
|
4240
|
-
{ name: 'amount0', internalType: 'uint256', type: 'uint256' },
|
|
4241
|
-
{ name: 'amount1', internalType: 'uint256', type: 'uint256' },
|
|
4236
|
+
{ name: 'owner', internalType: 'address', type: 'address' },
|
|
4237
|
+
{ name: 'spender', internalType: 'address', type: 'address' },
|
|
4238
|
+
{ name: 'id', internalType: 'uint256', type: 'uint256' },
|
|
4242
4239
|
],
|
|
4243
|
-
|
|
4240
|
+
name: 'allowance',
|
|
4241
|
+
outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
|
|
4242
|
+
stateMutability: 'view',
|
|
4244
4243
|
},
|
|
4245
4244
|
{
|
|
4246
4245
|
type: 'function',
|
|
4247
4246
|
inputs: [
|
|
4248
|
-
{ name: '
|
|
4249
|
-
{ name: '
|
|
4250
|
-
{ name: '
|
|
4251
|
-
{ name: 'amount0Requested', internalType: 'uint128', type: 'uint128' },
|
|
4252
|
-
{ name: 'amount1Requested', internalType: 'uint128', type: 'uint128' },
|
|
4253
|
-
],
|
|
4254
|
-
name: 'collect',
|
|
4255
|
-
outputs: [
|
|
4256
|
-
{ name: 'amount0', internalType: 'uint128', type: 'uint128' },
|
|
4257
|
-
{ name: 'amount1', internalType: 'uint128', type: 'uint128' },
|
|
4247
|
+
{ name: 'spender', internalType: 'address', type: 'address' },
|
|
4248
|
+
{ name: 'id', internalType: 'uint256', type: 'uint256' },
|
|
4249
|
+
{ name: 'amount', internalType: 'uint256', type: 'uint256' },
|
|
4258
4250
|
],
|
|
4251
|
+
name: 'approve',
|
|
4252
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
|
4259
4253
|
stateMutability: 'nonpayable',
|
|
4260
4254
|
},
|
|
4261
4255
|
{
|
|
4262
4256
|
type: 'function',
|
|
4263
|
-
inputs: [
|
|
4264
|
-
|
|
4265
|
-
|
|
4257
|
+
inputs: [
|
|
4258
|
+
{ name: 'owner', internalType: 'address', type: 'address' },
|
|
4259
|
+
{ name: 'id', internalType: 'uint256', type: 'uint256' },
|
|
4260
|
+
],
|
|
4261
|
+
name: 'balanceOf',
|
|
4262
|
+
outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
|
|
4266
4263
|
stateMutability: 'view',
|
|
4267
4264
|
},
|
|
4268
4265
|
{
|
|
4269
4266
|
type: 'function',
|
|
4270
|
-
inputs: [
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4267
|
+
inputs: [
|
|
4268
|
+
{ name: 'from', internalType: 'address', type: 'address' },
|
|
4269
|
+
{ name: 'id', internalType: 'uint256', type: 'uint256' },
|
|
4270
|
+
{ name: 'amount', internalType: 'uint256', type: 'uint256' },
|
|
4271
|
+
],
|
|
4272
|
+
name: 'burn',
|
|
4273
|
+
outputs: [],
|
|
4274
|
+
stateMutability: 'nonpayable',
|
|
4274
4275
|
},
|
|
4275
4276
|
{
|
|
4276
4277
|
type: 'function',
|
|
4277
4278
|
inputs: [
|
|
4278
|
-
{ name: '
|
|
4279
|
+
{ name: 'currency', internalType: 'Currency', type: 'address' },
|
|
4280
|
+
{ name: 'amount', internalType: 'uint256', type: 'uint256' },
|
|
4279
4281
|
],
|
|
4280
|
-
name: '
|
|
4282
|
+
name: 'clear',
|
|
4281
4283
|
outputs: [],
|
|
4282
4284
|
stateMutability: 'nonpayable',
|
|
4283
4285
|
},
|
|
@@ -4285,190 +4287,876 @@ export const iUniswapV3PoolABI = [
|
|
|
4285
4287
|
type: 'function',
|
|
4286
4288
|
inputs: [
|
|
4287
4289
|
{ name: 'recipient', internalType: 'address', type: 'address' },
|
|
4288
|
-
{ name: '
|
|
4289
|
-
{ name: '
|
|
4290
|
-
{ name: 'amount', internalType: 'uint128', type: 'uint128' },
|
|
4291
|
-
{ name: 'data', internalType: 'bytes', type: 'bytes' },
|
|
4290
|
+
{ name: 'currency', internalType: 'Currency', type: 'address' },
|
|
4291
|
+
{ name: 'amount', internalType: 'uint256', type: 'uint256' },
|
|
4292
4292
|
],
|
|
4293
|
-
name: '
|
|
4293
|
+
name: 'collectProtocolFees',
|
|
4294
4294
|
outputs: [
|
|
4295
|
-
{ name: '
|
|
4296
|
-
{ name: 'amount1', internalType: 'uint256', type: 'uint256' },
|
|
4295
|
+
{ name: 'amountCollected', internalType: 'uint256', type: 'uint256' },
|
|
4297
4296
|
],
|
|
4298
4297
|
stateMutability: 'nonpayable',
|
|
4299
4298
|
},
|
|
4300
4299
|
{
|
|
4301
4300
|
type: 'function',
|
|
4302
|
-
inputs: [
|
|
4303
|
-
name: 'slot0',
|
|
4304
|
-
outputs: [
|
|
4301
|
+
inputs: [
|
|
4305
4302
|
{
|
|
4306
|
-
name: '
|
|
4307
|
-
internalType: 'struct
|
|
4303
|
+
name: 'key',
|
|
4304
|
+
internalType: 'struct PoolKey',
|
|
4308
4305
|
type: 'tuple',
|
|
4309
4306
|
components: [
|
|
4310
|
-
{ name: '
|
|
4311
|
-
{ name: '
|
|
4312
|
-
{ name: '
|
|
4313
|
-
{
|
|
4314
|
-
|
|
4315
|
-
internalType: 'uint16',
|
|
4316
|
-
type: 'uint16',
|
|
4317
|
-
},
|
|
4318
|
-
{
|
|
4319
|
-
name: 'observationCardinalityNext',
|
|
4320
|
-
internalType: 'uint16',
|
|
4321
|
-
type: 'uint16',
|
|
4322
|
-
},
|
|
4323
|
-
{ name: 'feeProtocol', internalType: 'uint8', type: 'uint8' },
|
|
4324
|
-
{ name: 'unlocked', internalType: 'bool', type: 'bool' },
|
|
4307
|
+
{ name: 'currency0', internalType: 'Currency', type: 'address' },
|
|
4308
|
+
{ name: 'currency1', internalType: 'Currency', type: 'address' },
|
|
4309
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24' },
|
|
4310
|
+
{ name: 'tickSpacing', internalType: 'int24', type: 'int24' },
|
|
4311
|
+
{ name: 'hooks', internalType: 'contract IHooks', type: 'address' },
|
|
4325
4312
|
],
|
|
4326
4313
|
},
|
|
4314
|
+
{ name: 'amount0', internalType: 'uint256', type: 'uint256' },
|
|
4315
|
+
{ name: 'amount1', internalType: 'uint256', type: 'uint256' },
|
|
4316
|
+
{ name: 'hookData', internalType: 'bytes', type: 'bytes' },
|
|
4327
4317
|
],
|
|
4318
|
+
name: 'donate',
|
|
4319
|
+
outputs: [{ name: '', internalType: 'BalanceDelta', type: 'int256' }],
|
|
4320
|
+
stateMutability: 'nonpayable',
|
|
4321
|
+
},
|
|
4322
|
+
{
|
|
4323
|
+
type: 'function',
|
|
4324
|
+
inputs: [{ name: 'slot', internalType: 'bytes32', type: 'bytes32' }],
|
|
4325
|
+
name: 'extsload',
|
|
4326
|
+
outputs: [{ name: 'value', internalType: 'bytes32', type: 'bytes32' }],
|
|
4328
4327
|
stateMutability: 'view',
|
|
4329
4328
|
},
|
|
4330
4329
|
{
|
|
4331
4330
|
type: 'function',
|
|
4332
4331
|
inputs: [
|
|
4333
|
-
{ name: '
|
|
4334
|
-
{ name: '
|
|
4335
|
-
{ name: 'amountSpecified', internalType: 'int256', type: 'int256' },
|
|
4336
|
-
{ name: 'sqrtPriceLimitX96', internalType: 'uint160', type: 'uint160' },
|
|
4337
|
-
{ name: 'data', internalType: 'bytes', type: 'bytes' },
|
|
4338
|
-
],
|
|
4339
|
-
name: 'swap',
|
|
4340
|
-
outputs: [
|
|
4341
|
-
{ name: 'amount0', internalType: 'int256', type: 'int256' },
|
|
4342
|
-
{ name: 'amount1', internalType: 'int256', type: 'int256' },
|
|
4332
|
+
{ name: 'startSlot', internalType: 'bytes32', type: 'bytes32' },
|
|
4333
|
+
{ name: 'nSlots', internalType: 'uint256', type: 'uint256' },
|
|
4343
4334
|
],
|
|
4344
|
-
|
|
4335
|
+
name: 'extsload',
|
|
4336
|
+
outputs: [{ name: 'values', internalType: 'bytes32[]', type: 'bytes32[]' }],
|
|
4337
|
+
stateMutability: 'view',
|
|
4345
4338
|
},
|
|
4346
4339
|
{
|
|
4347
4340
|
type: 'function',
|
|
4348
|
-
inputs: [],
|
|
4349
|
-
name: '
|
|
4350
|
-
outputs: [{ name: '', internalType: '
|
|
4351
|
-
stateMutability: '
|
|
4341
|
+
inputs: [{ name: 'slots', internalType: 'bytes32[]', type: 'bytes32[]' }],
|
|
4342
|
+
name: 'extsload',
|
|
4343
|
+
outputs: [{ name: 'values', internalType: 'bytes32[]', type: 'bytes32[]' }],
|
|
4344
|
+
stateMutability: 'view',
|
|
4352
4345
|
},
|
|
4353
4346
|
{
|
|
4354
4347
|
type: 'function',
|
|
4355
|
-
inputs: [],
|
|
4356
|
-
name: '
|
|
4357
|
-
outputs: [{ name: '', internalType: '
|
|
4358
|
-
stateMutability: '
|
|
4348
|
+
inputs: [{ name: 'slots', internalType: 'bytes32[]', type: 'bytes32[]' }],
|
|
4349
|
+
name: 'exttload',
|
|
4350
|
+
outputs: [{ name: 'values', internalType: 'bytes32[]', type: 'bytes32[]' }],
|
|
4351
|
+
stateMutability: 'view',
|
|
4359
4352
|
},
|
|
4360
|
-
] as const
|
|
4361
|
-
|
|
4362
|
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
4363
|
-
// ZoraFactoryImpl
|
|
4364
|
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
4365
|
-
|
|
4366
|
-
export const zoraFactoryImplABI = [
|
|
4367
4353
|
{
|
|
4368
|
-
type: '
|
|
4354
|
+
type: 'function',
|
|
4355
|
+
inputs: [{ name: 'slot', internalType: 'bytes32', type: 'bytes32' }],
|
|
4356
|
+
name: 'exttload',
|
|
4357
|
+
outputs: [{ name: 'value', internalType: 'bytes32', type: 'bytes32' }],
|
|
4358
|
+
stateMutability: 'view',
|
|
4359
|
+
},
|
|
4360
|
+
{
|
|
4361
|
+
type: 'function',
|
|
4369
4362
|
inputs: [
|
|
4370
|
-
{
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4363
|
+
{
|
|
4364
|
+
name: 'key',
|
|
4365
|
+
internalType: 'struct PoolKey',
|
|
4366
|
+
type: 'tuple',
|
|
4367
|
+
components: [
|
|
4368
|
+
{ name: 'currency0', internalType: 'Currency', type: 'address' },
|
|
4369
|
+
{ name: 'currency1', internalType: 'Currency', type: 'address' },
|
|
4370
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24' },
|
|
4371
|
+
{ name: 'tickSpacing', internalType: 'int24', type: 'int24' },
|
|
4372
|
+
{ name: 'hooks', internalType: 'contract IHooks', type: 'address' },
|
|
4373
|
+
],
|
|
4374
|
+
},
|
|
4375
|
+
{ name: 'sqrtPriceX96', internalType: 'uint160', type: 'uint160' },
|
|
4374
4376
|
],
|
|
4377
|
+
name: 'initialize',
|
|
4378
|
+
outputs: [{ name: 'tick', internalType: 'int24', type: 'int24' }],
|
|
4375
4379
|
stateMutability: 'nonpayable',
|
|
4376
4380
|
},
|
|
4377
4381
|
{
|
|
4378
4382
|
type: 'function',
|
|
4379
|
-
inputs: [
|
|
4380
|
-
|
|
4381
|
-
|
|
4383
|
+
inputs: [
|
|
4384
|
+
{ name: 'owner', internalType: 'address', type: 'address' },
|
|
4385
|
+
{ name: 'spender', internalType: 'address', type: 'address' },
|
|
4386
|
+
],
|
|
4387
|
+
name: 'isOperator',
|
|
4388
|
+
outputs: [{ name: 'approved', internalType: 'bool', type: 'bool' }],
|
|
4382
4389
|
stateMutability: 'view',
|
|
4383
4390
|
},
|
|
4384
4391
|
{
|
|
4385
4392
|
type: 'function',
|
|
4386
|
-
inputs: [
|
|
4387
|
-
|
|
4393
|
+
inputs: [
|
|
4394
|
+
{ name: 'to', internalType: 'address', type: 'address' },
|
|
4395
|
+
{ name: 'id', internalType: 'uint256', type: 'uint256' },
|
|
4396
|
+
{ name: 'amount', internalType: 'uint256', type: 'uint256' },
|
|
4397
|
+
],
|
|
4398
|
+
name: 'mint',
|
|
4388
4399
|
outputs: [],
|
|
4389
4400
|
stateMutability: 'nonpayable',
|
|
4390
4401
|
},
|
|
4391
4402
|
{
|
|
4392
4403
|
type: 'function',
|
|
4393
4404
|
inputs: [
|
|
4394
|
-
{
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4405
|
+
{
|
|
4406
|
+
name: 'key',
|
|
4407
|
+
internalType: 'struct PoolKey',
|
|
4408
|
+
type: 'tuple',
|
|
4409
|
+
components: [
|
|
4410
|
+
{ name: 'currency0', internalType: 'Currency', type: 'address' },
|
|
4411
|
+
{ name: 'currency1', internalType: 'Currency', type: 'address' },
|
|
4412
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24' },
|
|
4413
|
+
{ name: 'tickSpacing', internalType: 'int24', type: 'int24' },
|
|
4414
|
+
{ name: 'hooks', internalType: 'contract IHooks', type: 'address' },
|
|
4415
|
+
],
|
|
4416
|
+
},
|
|
4417
|
+
{
|
|
4418
|
+
name: 'params',
|
|
4419
|
+
internalType: 'struct ModifyLiquidityParams',
|
|
4420
|
+
type: 'tuple',
|
|
4421
|
+
components: [
|
|
4422
|
+
{ name: 'tickLower', internalType: 'int24', type: 'int24' },
|
|
4423
|
+
{ name: 'tickUpper', internalType: 'int24', type: 'int24' },
|
|
4424
|
+
{ name: 'liquidityDelta', internalType: 'int256', type: 'int256' },
|
|
4425
|
+
{ name: 'salt', internalType: 'bytes32', type: 'bytes32' },
|
|
4426
|
+
],
|
|
4427
|
+
},
|
|
4428
|
+
{ name: 'hookData', internalType: 'bytes', type: 'bytes' },
|
|
4400
4429
|
],
|
|
4401
|
-
name: '
|
|
4402
|
-
outputs: [
|
|
4403
|
-
|
|
4430
|
+
name: 'modifyLiquidity',
|
|
4431
|
+
outputs: [
|
|
4432
|
+
{ name: 'callerDelta', internalType: 'BalanceDelta', type: 'int256' },
|
|
4433
|
+
{ name: 'feesAccrued', internalType: 'BalanceDelta', type: 'int256' },
|
|
4434
|
+
],
|
|
4435
|
+
stateMutability: 'nonpayable',
|
|
4404
4436
|
},
|
|
4405
4437
|
{
|
|
4406
4438
|
type: 'function',
|
|
4407
4439
|
inputs: [],
|
|
4408
|
-
name: '
|
|
4440
|
+
name: 'protocolFeeController',
|
|
4409
4441
|
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
4410
4442
|
stateMutability: 'view',
|
|
4411
4443
|
},
|
|
4412
4444
|
{
|
|
4413
4445
|
type: 'function',
|
|
4414
|
-
inputs: [],
|
|
4415
|
-
name: '
|
|
4416
|
-
outputs: [{ name: '', internalType: '
|
|
4446
|
+
inputs: [{ name: 'currency', internalType: 'Currency', type: 'address' }],
|
|
4447
|
+
name: 'protocolFeesAccrued',
|
|
4448
|
+
outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
|
|
4417
4449
|
stateMutability: 'view',
|
|
4418
4450
|
},
|
|
4419
4451
|
{
|
|
4420
4452
|
type: 'function',
|
|
4421
|
-
inputs: [
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4453
|
+
inputs: [
|
|
4454
|
+
{ name: 'operator', internalType: 'address', type: 'address' },
|
|
4455
|
+
{ name: 'approved', internalType: 'bool', type: 'bool' },
|
|
4456
|
+
],
|
|
4457
|
+
name: 'setOperator',
|
|
4458
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
|
4459
|
+
stateMutability: 'nonpayable',
|
|
4425
4460
|
},
|
|
4426
4461
|
{
|
|
4427
4462
|
type: 'function',
|
|
4428
|
-
inputs: [
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4463
|
+
inputs: [
|
|
4464
|
+
{
|
|
4465
|
+
name: 'key',
|
|
4466
|
+
internalType: 'struct PoolKey',
|
|
4467
|
+
type: 'tuple',
|
|
4468
|
+
components: [
|
|
4469
|
+
{ name: 'currency0', internalType: 'Currency', type: 'address' },
|
|
4470
|
+
{ name: 'currency1', internalType: 'Currency', type: 'address' },
|
|
4471
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24' },
|
|
4472
|
+
{ name: 'tickSpacing', internalType: 'int24', type: 'int24' },
|
|
4473
|
+
{ name: 'hooks', internalType: 'contract IHooks', type: 'address' },
|
|
4474
|
+
],
|
|
4475
|
+
},
|
|
4476
|
+
{ name: 'newProtocolFee', internalType: 'uint24', type: 'uint24' },
|
|
4477
|
+
],
|
|
4478
|
+
name: 'setProtocolFee',
|
|
4479
|
+
outputs: [],
|
|
4480
|
+
stateMutability: 'nonpayable',
|
|
4432
4481
|
},
|
|
4433
4482
|
{
|
|
4434
4483
|
type: 'function',
|
|
4435
|
-
inputs: [],
|
|
4436
|
-
name: '
|
|
4437
|
-
outputs: [
|
|
4438
|
-
stateMutability: '
|
|
4484
|
+
inputs: [{ name: 'controller', internalType: 'address', type: 'address' }],
|
|
4485
|
+
name: 'setProtocolFeeController',
|
|
4486
|
+
outputs: [],
|
|
4487
|
+
stateMutability: 'nonpayable',
|
|
4439
4488
|
},
|
|
4440
4489
|
{
|
|
4441
4490
|
type: 'function',
|
|
4442
4491
|
inputs: [],
|
|
4443
|
-
name: '
|
|
4444
|
-
outputs: [{ name: '', internalType: '
|
|
4445
|
-
stateMutability: '
|
|
4492
|
+
name: 'settle',
|
|
4493
|
+
outputs: [{ name: 'paid', internalType: 'uint256', type: 'uint256' }],
|
|
4494
|
+
stateMutability: 'payable',
|
|
4446
4495
|
},
|
|
4447
4496
|
{
|
|
4448
4497
|
type: 'function',
|
|
4449
|
-
inputs: [
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
{ name: 'uri', internalType: 'string', type: 'string' },
|
|
4453
|
-
{ name: 'name', internalType: 'string', type: 'string' },
|
|
4454
|
-
{ name: 'symbol', internalType: 'string', type: 'string' },
|
|
4455
|
-
{ name: 'platformReferrer', internalType: 'address', type: 'address' },
|
|
4456
|
-
{ name: 'currency', internalType: 'address', type: 'address' },
|
|
4457
|
-
{ name: '', internalType: 'int24', type: 'int24' },
|
|
4458
|
-
{ name: '', internalType: 'uint256', type: 'uint256' },
|
|
4459
|
-
],
|
|
4460
|
-
name: 'deploy',
|
|
4461
|
-
outputs: [
|
|
4462
|
-
{ name: '', internalType: 'address', type: 'address' },
|
|
4463
|
-
{ name: '', internalType: 'uint256', type: 'uint256' },
|
|
4464
|
-
],
|
|
4498
|
+
inputs: [{ name: 'recipient', internalType: 'address', type: 'address' }],
|
|
4499
|
+
name: 'settleFor',
|
|
4500
|
+
outputs: [{ name: 'paid', internalType: 'uint256', type: 'uint256' }],
|
|
4465
4501
|
stateMutability: 'payable',
|
|
4466
4502
|
},
|
|
4467
4503
|
{
|
|
4468
4504
|
type: 'function',
|
|
4469
4505
|
inputs: [
|
|
4470
|
-
{
|
|
4471
|
-
|
|
4506
|
+
{
|
|
4507
|
+
name: 'key',
|
|
4508
|
+
internalType: 'struct PoolKey',
|
|
4509
|
+
type: 'tuple',
|
|
4510
|
+
components: [
|
|
4511
|
+
{ name: 'currency0', internalType: 'Currency', type: 'address' },
|
|
4512
|
+
{ name: 'currency1', internalType: 'Currency', type: 'address' },
|
|
4513
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24' },
|
|
4514
|
+
{ name: 'tickSpacing', internalType: 'int24', type: 'int24' },
|
|
4515
|
+
{ name: 'hooks', internalType: 'contract IHooks', type: 'address' },
|
|
4516
|
+
],
|
|
4517
|
+
},
|
|
4518
|
+
{
|
|
4519
|
+
name: 'params',
|
|
4520
|
+
internalType: 'struct SwapParams',
|
|
4521
|
+
type: 'tuple',
|
|
4522
|
+
components: [
|
|
4523
|
+
{ name: 'zeroForOne', internalType: 'bool', type: 'bool' },
|
|
4524
|
+
{ name: 'amountSpecified', internalType: 'int256', type: 'int256' },
|
|
4525
|
+
{
|
|
4526
|
+
name: 'sqrtPriceLimitX96',
|
|
4527
|
+
internalType: 'uint160',
|
|
4528
|
+
type: 'uint160',
|
|
4529
|
+
},
|
|
4530
|
+
],
|
|
4531
|
+
},
|
|
4532
|
+
{ name: 'hookData', internalType: 'bytes', type: 'bytes' },
|
|
4533
|
+
],
|
|
4534
|
+
name: 'swap',
|
|
4535
|
+
outputs: [
|
|
4536
|
+
{ name: 'swapDelta', internalType: 'BalanceDelta', type: 'int256' },
|
|
4537
|
+
],
|
|
4538
|
+
stateMutability: 'nonpayable',
|
|
4539
|
+
},
|
|
4540
|
+
{
|
|
4541
|
+
type: 'function',
|
|
4542
|
+
inputs: [{ name: 'currency', internalType: 'Currency', type: 'address' }],
|
|
4543
|
+
name: 'sync',
|
|
4544
|
+
outputs: [],
|
|
4545
|
+
stateMutability: 'nonpayable',
|
|
4546
|
+
},
|
|
4547
|
+
{
|
|
4548
|
+
type: 'function',
|
|
4549
|
+
inputs: [
|
|
4550
|
+
{ name: 'currency', internalType: 'Currency', type: 'address' },
|
|
4551
|
+
{ name: 'to', internalType: 'address', type: 'address' },
|
|
4552
|
+
{ name: 'amount', internalType: 'uint256', type: 'uint256' },
|
|
4553
|
+
],
|
|
4554
|
+
name: 'take',
|
|
4555
|
+
outputs: [],
|
|
4556
|
+
stateMutability: 'nonpayable',
|
|
4557
|
+
},
|
|
4558
|
+
{
|
|
4559
|
+
type: 'function',
|
|
4560
|
+
inputs: [
|
|
4561
|
+
{ name: 'receiver', internalType: 'address', type: 'address' },
|
|
4562
|
+
{ name: 'id', internalType: 'uint256', type: 'uint256' },
|
|
4563
|
+
{ name: 'amount', internalType: 'uint256', type: 'uint256' },
|
|
4564
|
+
],
|
|
4565
|
+
name: 'transfer',
|
|
4566
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
|
4567
|
+
stateMutability: 'nonpayable',
|
|
4568
|
+
},
|
|
4569
|
+
{
|
|
4570
|
+
type: 'function',
|
|
4571
|
+
inputs: [
|
|
4572
|
+
{ name: 'sender', internalType: 'address', type: 'address' },
|
|
4573
|
+
{ name: 'receiver', internalType: 'address', type: 'address' },
|
|
4574
|
+
{ name: 'id', internalType: 'uint256', type: 'uint256' },
|
|
4575
|
+
{ name: 'amount', internalType: 'uint256', type: 'uint256' },
|
|
4576
|
+
],
|
|
4577
|
+
name: 'transferFrom',
|
|
4578
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
|
4579
|
+
stateMutability: 'nonpayable',
|
|
4580
|
+
},
|
|
4581
|
+
{
|
|
4582
|
+
type: 'function',
|
|
4583
|
+
inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
|
|
4584
|
+
name: 'unlock',
|
|
4585
|
+
outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
|
|
4586
|
+
stateMutability: 'nonpayable',
|
|
4587
|
+
},
|
|
4588
|
+
{
|
|
4589
|
+
type: 'function',
|
|
4590
|
+
inputs: [
|
|
4591
|
+
{
|
|
4592
|
+
name: 'key',
|
|
4593
|
+
internalType: 'struct PoolKey',
|
|
4594
|
+
type: 'tuple',
|
|
4595
|
+
components: [
|
|
4596
|
+
{ name: 'currency0', internalType: 'Currency', type: 'address' },
|
|
4597
|
+
{ name: 'currency1', internalType: 'Currency', type: 'address' },
|
|
4598
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24' },
|
|
4599
|
+
{ name: 'tickSpacing', internalType: 'int24', type: 'int24' },
|
|
4600
|
+
{ name: 'hooks', internalType: 'contract IHooks', type: 'address' },
|
|
4601
|
+
],
|
|
4602
|
+
},
|
|
4603
|
+
{ name: 'newDynamicLPFee', internalType: 'uint24', type: 'uint24' },
|
|
4604
|
+
],
|
|
4605
|
+
name: 'updateDynamicLPFee',
|
|
4606
|
+
outputs: [],
|
|
4607
|
+
stateMutability: 'nonpayable',
|
|
4608
|
+
},
|
|
4609
|
+
{
|
|
4610
|
+
type: 'event',
|
|
4611
|
+
anonymous: false,
|
|
4612
|
+
inputs: [
|
|
4613
|
+
{
|
|
4614
|
+
name: 'owner',
|
|
4615
|
+
internalType: 'address',
|
|
4616
|
+
type: 'address',
|
|
4617
|
+
indexed: true,
|
|
4618
|
+
},
|
|
4619
|
+
{
|
|
4620
|
+
name: 'spender',
|
|
4621
|
+
internalType: 'address',
|
|
4622
|
+
type: 'address',
|
|
4623
|
+
indexed: true,
|
|
4624
|
+
},
|
|
4625
|
+
{ name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
|
|
4626
|
+
{
|
|
4627
|
+
name: 'amount',
|
|
4628
|
+
internalType: 'uint256',
|
|
4629
|
+
type: 'uint256',
|
|
4630
|
+
indexed: false,
|
|
4631
|
+
},
|
|
4632
|
+
],
|
|
4633
|
+
name: 'Approval',
|
|
4634
|
+
},
|
|
4635
|
+
{
|
|
4636
|
+
type: 'event',
|
|
4637
|
+
anonymous: false,
|
|
4638
|
+
inputs: [
|
|
4639
|
+
{ name: 'id', internalType: 'PoolId', type: 'bytes32', indexed: true },
|
|
4640
|
+
{
|
|
4641
|
+
name: 'sender',
|
|
4642
|
+
internalType: 'address',
|
|
4643
|
+
type: 'address',
|
|
4644
|
+
indexed: true,
|
|
4645
|
+
},
|
|
4646
|
+
{
|
|
4647
|
+
name: 'amount0',
|
|
4648
|
+
internalType: 'uint256',
|
|
4649
|
+
type: 'uint256',
|
|
4650
|
+
indexed: false,
|
|
4651
|
+
},
|
|
4652
|
+
{
|
|
4653
|
+
name: 'amount1',
|
|
4654
|
+
internalType: 'uint256',
|
|
4655
|
+
type: 'uint256',
|
|
4656
|
+
indexed: false,
|
|
4657
|
+
},
|
|
4658
|
+
],
|
|
4659
|
+
name: 'Donate',
|
|
4660
|
+
},
|
|
4661
|
+
{
|
|
4662
|
+
type: 'event',
|
|
4663
|
+
anonymous: false,
|
|
4664
|
+
inputs: [
|
|
4665
|
+
{ name: 'id', internalType: 'PoolId', type: 'bytes32', indexed: true },
|
|
4666
|
+
{
|
|
4667
|
+
name: 'currency0',
|
|
4668
|
+
internalType: 'Currency',
|
|
4669
|
+
type: 'address',
|
|
4670
|
+
indexed: true,
|
|
4671
|
+
},
|
|
4672
|
+
{
|
|
4673
|
+
name: 'currency1',
|
|
4674
|
+
internalType: 'Currency',
|
|
4675
|
+
type: 'address',
|
|
4676
|
+
indexed: true,
|
|
4677
|
+
},
|
|
4678
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24', indexed: false },
|
|
4679
|
+
{
|
|
4680
|
+
name: 'tickSpacing',
|
|
4681
|
+
internalType: 'int24',
|
|
4682
|
+
type: 'int24',
|
|
4683
|
+
indexed: false,
|
|
4684
|
+
},
|
|
4685
|
+
{
|
|
4686
|
+
name: 'hooks',
|
|
4687
|
+
internalType: 'contract IHooks',
|
|
4688
|
+
type: 'address',
|
|
4689
|
+
indexed: false,
|
|
4690
|
+
},
|
|
4691
|
+
{
|
|
4692
|
+
name: 'sqrtPriceX96',
|
|
4693
|
+
internalType: 'uint160',
|
|
4694
|
+
type: 'uint160',
|
|
4695
|
+
indexed: false,
|
|
4696
|
+
},
|
|
4697
|
+
{ name: 'tick', internalType: 'int24', type: 'int24', indexed: false },
|
|
4698
|
+
],
|
|
4699
|
+
name: 'Initialize',
|
|
4700
|
+
},
|
|
4701
|
+
{
|
|
4702
|
+
type: 'event',
|
|
4703
|
+
anonymous: false,
|
|
4704
|
+
inputs: [
|
|
4705
|
+
{ name: 'id', internalType: 'PoolId', type: 'bytes32', indexed: true },
|
|
4706
|
+
{
|
|
4707
|
+
name: 'sender',
|
|
4708
|
+
internalType: 'address',
|
|
4709
|
+
type: 'address',
|
|
4710
|
+
indexed: true,
|
|
4711
|
+
},
|
|
4712
|
+
{
|
|
4713
|
+
name: 'tickLower',
|
|
4714
|
+
internalType: 'int24',
|
|
4715
|
+
type: 'int24',
|
|
4716
|
+
indexed: false,
|
|
4717
|
+
},
|
|
4718
|
+
{
|
|
4719
|
+
name: 'tickUpper',
|
|
4720
|
+
internalType: 'int24',
|
|
4721
|
+
type: 'int24',
|
|
4722
|
+
indexed: false,
|
|
4723
|
+
},
|
|
4724
|
+
{
|
|
4725
|
+
name: 'liquidityDelta',
|
|
4726
|
+
internalType: 'int256',
|
|
4727
|
+
type: 'int256',
|
|
4728
|
+
indexed: false,
|
|
4729
|
+
},
|
|
4730
|
+
{
|
|
4731
|
+
name: 'salt',
|
|
4732
|
+
internalType: 'bytes32',
|
|
4733
|
+
type: 'bytes32',
|
|
4734
|
+
indexed: false,
|
|
4735
|
+
},
|
|
4736
|
+
],
|
|
4737
|
+
name: 'ModifyLiquidity',
|
|
4738
|
+
},
|
|
4739
|
+
{
|
|
4740
|
+
type: 'event',
|
|
4741
|
+
anonymous: false,
|
|
4742
|
+
inputs: [
|
|
4743
|
+
{
|
|
4744
|
+
name: 'owner',
|
|
4745
|
+
internalType: 'address',
|
|
4746
|
+
type: 'address',
|
|
4747
|
+
indexed: true,
|
|
4748
|
+
},
|
|
4749
|
+
{
|
|
4750
|
+
name: 'operator',
|
|
4751
|
+
internalType: 'address',
|
|
4752
|
+
type: 'address',
|
|
4753
|
+
indexed: true,
|
|
4754
|
+
},
|
|
4755
|
+
{ name: 'approved', internalType: 'bool', type: 'bool', indexed: false },
|
|
4756
|
+
],
|
|
4757
|
+
name: 'OperatorSet',
|
|
4758
|
+
},
|
|
4759
|
+
{
|
|
4760
|
+
type: 'event',
|
|
4761
|
+
anonymous: false,
|
|
4762
|
+
inputs: [
|
|
4763
|
+
{
|
|
4764
|
+
name: 'protocolFeeController',
|
|
4765
|
+
internalType: 'address',
|
|
4766
|
+
type: 'address',
|
|
4767
|
+
indexed: true,
|
|
4768
|
+
},
|
|
4769
|
+
],
|
|
4770
|
+
name: 'ProtocolFeeControllerUpdated',
|
|
4771
|
+
},
|
|
4772
|
+
{
|
|
4773
|
+
type: 'event',
|
|
4774
|
+
anonymous: false,
|
|
4775
|
+
inputs: [
|
|
4776
|
+
{ name: 'id', internalType: 'PoolId', type: 'bytes32', indexed: true },
|
|
4777
|
+
{
|
|
4778
|
+
name: 'protocolFee',
|
|
4779
|
+
internalType: 'uint24',
|
|
4780
|
+
type: 'uint24',
|
|
4781
|
+
indexed: false,
|
|
4782
|
+
},
|
|
4783
|
+
],
|
|
4784
|
+
name: 'ProtocolFeeUpdated',
|
|
4785
|
+
},
|
|
4786
|
+
{
|
|
4787
|
+
type: 'event',
|
|
4788
|
+
anonymous: false,
|
|
4789
|
+
inputs: [
|
|
4790
|
+
{ name: 'id', internalType: 'PoolId', type: 'bytes32', indexed: true },
|
|
4791
|
+
{
|
|
4792
|
+
name: 'sender',
|
|
4793
|
+
internalType: 'address',
|
|
4794
|
+
type: 'address',
|
|
4795
|
+
indexed: true,
|
|
4796
|
+
},
|
|
4797
|
+
{
|
|
4798
|
+
name: 'amount0',
|
|
4799
|
+
internalType: 'int128',
|
|
4800
|
+
type: 'int128',
|
|
4801
|
+
indexed: false,
|
|
4802
|
+
},
|
|
4803
|
+
{
|
|
4804
|
+
name: 'amount1',
|
|
4805
|
+
internalType: 'int128',
|
|
4806
|
+
type: 'int128',
|
|
4807
|
+
indexed: false,
|
|
4808
|
+
},
|
|
4809
|
+
{
|
|
4810
|
+
name: 'sqrtPriceX96',
|
|
4811
|
+
internalType: 'uint160',
|
|
4812
|
+
type: 'uint160',
|
|
4813
|
+
indexed: false,
|
|
4814
|
+
},
|
|
4815
|
+
{
|
|
4816
|
+
name: 'liquidity',
|
|
4817
|
+
internalType: 'uint128',
|
|
4818
|
+
type: 'uint128',
|
|
4819
|
+
indexed: false,
|
|
4820
|
+
},
|
|
4821
|
+
{ name: 'tick', internalType: 'int24', type: 'int24', indexed: false },
|
|
4822
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24', indexed: false },
|
|
4823
|
+
],
|
|
4824
|
+
name: 'Swap',
|
|
4825
|
+
},
|
|
4826
|
+
{
|
|
4827
|
+
type: 'event',
|
|
4828
|
+
anonymous: false,
|
|
4829
|
+
inputs: [
|
|
4830
|
+
{
|
|
4831
|
+
name: 'caller',
|
|
4832
|
+
internalType: 'address',
|
|
4833
|
+
type: 'address',
|
|
4834
|
+
indexed: false,
|
|
4835
|
+
},
|
|
4836
|
+
{ name: 'from', internalType: 'address', type: 'address', indexed: true },
|
|
4837
|
+
{ name: 'to', internalType: 'address', type: 'address', indexed: true },
|
|
4838
|
+
{ name: 'id', internalType: 'uint256', type: 'uint256', indexed: true },
|
|
4839
|
+
{
|
|
4840
|
+
name: 'amount',
|
|
4841
|
+
internalType: 'uint256',
|
|
4842
|
+
type: 'uint256',
|
|
4843
|
+
indexed: false,
|
|
4844
|
+
},
|
|
4845
|
+
],
|
|
4846
|
+
name: 'Transfer',
|
|
4847
|
+
},
|
|
4848
|
+
{ type: 'error', inputs: [], name: 'AlreadyUnlocked' },
|
|
4849
|
+
{
|
|
4850
|
+
type: 'error',
|
|
4851
|
+
inputs: [
|
|
4852
|
+
{ name: 'currency0', internalType: 'address', type: 'address' },
|
|
4853
|
+
{ name: 'currency1', internalType: 'address', type: 'address' },
|
|
4854
|
+
],
|
|
4855
|
+
name: 'CurrenciesOutOfOrderOrEqual',
|
|
4856
|
+
},
|
|
4857
|
+
{ type: 'error', inputs: [], name: 'CurrencyNotSettled' },
|
|
4858
|
+
{ type: 'error', inputs: [], name: 'InvalidCaller' },
|
|
4859
|
+
{ type: 'error', inputs: [], name: 'ManagerLocked' },
|
|
4860
|
+
{ type: 'error', inputs: [], name: 'MustClearExactPositiveDelta' },
|
|
4861
|
+
{ type: 'error', inputs: [], name: 'NonzeroNativeValue' },
|
|
4862
|
+
{ type: 'error', inputs: [], name: 'PoolNotInitialized' },
|
|
4863
|
+
{ type: 'error', inputs: [], name: 'ProtocolFeeCurrencySynced' },
|
|
4864
|
+
{
|
|
4865
|
+
type: 'error',
|
|
4866
|
+
inputs: [{ name: 'fee', internalType: 'uint24', type: 'uint24' }],
|
|
4867
|
+
name: 'ProtocolFeeTooLarge',
|
|
4868
|
+
},
|
|
4869
|
+
{ type: 'error', inputs: [], name: 'SwapAmountCannotBeZero' },
|
|
4870
|
+
{
|
|
4871
|
+
type: 'error',
|
|
4872
|
+
inputs: [{ name: 'tickSpacing', internalType: 'int24', type: 'int24' }],
|
|
4873
|
+
name: 'TickSpacingTooLarge',
|
|
4874
|
+
},
|
|
4875
|
+
{
|
|
4876
|
+
type: 'error',
|
|
4877
|
+
inputs: [{ name: 'tickSpacing', internalType: 'int24', type: 'int24' }],
|
|
4878
|
+
name: 'TickSpacingTooSmall',
|
|
4879
|
+
},
|
|
4880
|
+
{ type: 'error', inputs: [], name: 'UnauthorizedDynamicLPFeeUpdate' },
|
|
4881
|
+
] as const
|
|
4882
|
+
|
|
4883
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
4884
|
+
// IUniswapV3Pool
|
|
4885
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
4886
|
+
|
|
4887
|
+
export const iUniswapV3PoolABI = [
|
|
4888
|
+
{
|
|
4889
|
+
type: 'function',
|
|
4890
|
+
inputs: [
|
|
4891
|
+
{ name: 'tickLower', internalType: 'int24', type: 'int24' },
|
|
4892
|
+
{ name: 'tickUpper', internalType: 'int24', type: 'int24' },
|
|
4893
|
+
{ name: 'amount', internalType: 'uint128', type: 'uint128' },
|
|
4894
|
+
],
|
|
4895
|
+
name: 'burn',
|
|
4896
|
+
outputs: [
|
|
4897
|
+
{ name: 'amount0', internalType: 'uint256', type: 'uint256' },
|
|
4898
|
+
{ name: 'amount1', internalType: 'uint256', type: 'uint256' },
|
|
4899
|
+
],
|
|
4900
|
+
stateMutability: 'nonpayable',
|
|
4901
|
+
},
|
|
4902
|
+
{
|
|
4903
|
+
type: 'function',
|
|
4904
|
+
inputs: [
|
|
4905
|
+
{ name: 'recipient', internalType: 'address', type: 'address' },
|
|
4906
|
+
{ name: 'tickLower', internalType: 'int24', type: 'int24' },
|
|
4907
|
+
{ name: 'tickUpper', internalType: 'int24', type: 'int24' },
|
|
4908
|
+
{ name: 'amount0Requested', internalType: 'uint128', type: 'uint128' },
|
|
4909
|
+
{ name: 'amount1Requested', internalType: 'uint128', type: 'uint128' },
|
|
4910
|
+
],
|
|
4911
|
+
name: 'collect',
|
|
4912
|
+
outputs: [
|
|
4913
|
+
{ name: 'amount0', internalType: 'uint128', type: 'uint128' },
|
|
4914
|
+
{ name: 'amount1', internalType: 'uint128', type: 'uint128' },
|
|
4915
|
+
],
|
|
4916
|
+
stateMutability: 'nonpayable',
|
|
4917
|
+
},
|
|
4918
|
+
{
|
|
4919
|
+
type: 'function',
|
|
4920
|
+
inputs: [],
|
|
4921
|
+
name: 'feeGrowthGlobal0X128',
|
|
4922
|
+
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
|
|
4923
|
+
stateMutability: 'view',
|
|
4924
|
+
},
|
|
4925
|
+
{
|
|
4926
|
+
type: 'function',
|
|
4927
|
+
inputs: [],
|
|
4928
|
+
name: 'feeGrowthGlobal1X128',
|
|
4929
|
+
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
|
|
4930
|
+
stateMutability: 'view',
|
|
4931
|
+
},
|
|
4932
|
+
{
|
|
4933
|
+
type: 'function',
|
|
4934
|
+
inputs: [
|
|
4935
|
+
{ name: 'sqrtPriceX96', internalType: 'uint160', type: 'uint160' },
|
|
4936
|
+
],
|
|
4937
|
+
name: 'initialize',
|
|
4938
|
+
outputs: [],
|
|
4939
|
+
stateMutability: 'nonpayable',
|
|
4940
|
+
},
|
|
4941
|
+
{
|
|
4942
|
+
type: 'function',
|
|
4943
|
+
inputs: [
|
|
4944
|
+
{ name: 'recipient', internalType: 'address', type: 'address' },
|
|
4945
|
+
{ name: 'tickLower', internalType: 'int24', type: 'int24' },
|
|
4946
|
+
{ name: 'tickUpper', internalType: 'int24', type: 'int24' },
|
|
4947
|
+
{ name: 'amount', internalType: 'uint128', type: 'uint128' },
|
|
4948
|
+
{ name: 'data', internalType: 'bytes', type: 'bytes' },
|
|
4949
|
+
],
|
|
4950
|
+
name: 'mint',
|
|
4951
|
+
outputs: [
|
|
4952
|
+
{ name: 'amount0', internalType: 'uint256', type: 'uint256' },
|
|
4953
|
+
{ name: 'amount1', internalType: 'uint256', type: 'uint256' },
|
|
4954
|
+
],
|
|
4955
|
+
stateMutability: 'nonpayable',
|
|
4956
|
+
},
|
|
4957
|
+
{
|
|
4958
|
+
type: 'function',
|
|
4959
|
+
inputs: [],
|
|
4960
|
+
name: 'slot0',
|
|
4961
|
+
outputs: [
|
|
4962
|
+
{
|
|
4963
|
+
name: 'slot0',
|
|
4964
|
+
internalType: 'struct IUniswapV3Pool.Slot0',
|
|
4965
|
+
type: 'tuple',
|
|
4966
|
+
components: [
|
|
4967
|
+
{ name: 'sqrtPriceX96', internalType: 'uint160', type: 'uint160' },
|
|
4968
|
+
{ name: 'tick', internalType: 'int24', type: 'int24' },
|
|
4969
|
+
{ name: 'observationIndex', internalType: 'uint16', type: 'uint16' },
|
|
4970
|
+
{
|
|
4971
|
+
name: 'observationCardinality',
|
|
4972
|
+
internalType: 'uint16',
|
|
4973
|
+
type: 'uint16',
|
|
4974
|
+
},
|
|
4975
|
+
{
|
|
4976
|
+
name: 'observationCardinalityNext',
|
|
4977
|
+
internalType: 'uint16',
|
|
4978
|
+
type: 'uint16',
|
|
4979
|
+
},
|
|
4980
|
+
{ name: 'feeProtocol', internalType: 'uint8', type: 'uint8' },
|
|
4981
|
+
{ name: 'unlocked', internalType: 'bool', type: 'bool' },
|
|
4982
|
+
],
|
|
4983
|
+
},
|
|
4984
|
+
],
|
|
4985
|
+
stateMutability: 'view',
|
|
4986
|
+
},
|
|
4987
|
+
{
|
|
4988
|
+
type: 'function',
|
|
4989
|
+
inputs: [
|
|
4990
|
+
{ name: 'recipient', internalType: 'address', type: 'address' },
|
|
4991
|
+
{ name: 'zeroForOne', internalType: 'bool', type: 'bool' },
|
|
4992
|
+
{ name: 'amountSpecified', internalType: 'int256', type: 'int256' },
|
|
4993
|
+
{ name: 'sqrtPriceLimitX96', internalType: 'uint160', type: 'uint160' },
|
|
4994
|
+
{ name: 'data', internalType: 'bytes', type: 'bytes' },
|
|
4995
|
+
],
|
|
4996
|
+
name: 'swap',
|
|
4997
|
+
outputs: [
|
|
4998
|
+
{ name: 'amount0', internalType: 'int256', type: 'int256' },
|
|
4999
|
+
{ name: 'amount1', internalType: 'int256', type: 'int256' },
|
|
5000
|
+
],
|
|
5001
|
+
stateMutability: 'nonpayable',
|
|
5002
|
+
},
|
|
5003
|
+
{
|
|
5004
|
+
type: 'function',
|
|
5005
|
+
inputs: [],
|
|
5006
|
+
name: 'token0',
|
|
5007
|
+
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
5008
|
+
stateMutability: 'nonpayable',
|
|
5009
|
+
},
|
|
5010
|
+
{
|
|
5011
|
+
type: 'function',
|
|
5012
|
+
inputs: [],
|
|
5013
|
+
name: 'token1',
|
|
5014
|
+
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
5015
|
+
stateMutability: 'nonpayable',
|
|
5016
|
+
},
|
|
5017
|
+
] as const
|
|
5018
|
+
|
|
5019
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
5020
|
+
// IUniversalRouter
|
|
5021
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
5022
|
+
|
|
5023
|
+
export const iUniversalRouterABI = [
|
|
5024
|
+
{
|
|
5025
|
+
type: 'function',
|
|
5026
|
+
inputs: [
|
|
5027
|
+
{ name: 'commands', internalType: 'bytes', type: 'bytes' },
|
|
5028
|
+
{ name: 'inputs', internalType: 'bytes[]', type: 'bytes[]' },
|
|
5029
|
+
{ name: 'deadline', internalType: 'uint256', type: 'uint256' },
|
|
5030
|
+
],
|
|
5031
|
+
name: 'execute',
|
|
5032
|
+
outputs: [],
|
|
5033
|
+
stateMutability: 'payable',
|
|
5034
|
+
},
|
|
5035
|
+
{ type: 'error', inputs: [], name: 'ETHNotAccepted' },
|
|
5036
|
+
{
|
|
5037
|
+
type: 'error',
|
|
5038
|
+
inputs: [
|
|
5039
|
+
{ name: 'commandIndex', internalType: 'uint256', type: 'uint256' },
|
|
5040
|
+
{ name: 'message', internalType: 'bytes', type: 'bytes' },
|
|
5041
|
+
],
|
|
5042
|
+
name: 'ExecutionFailed',
|
|
5043
|
+
},
|
|
5044
|
+
{ type: 'error', inputs: [], name: 'InvalidEthSender' },
|
|
5045
|
+
{ type: 'error', inputs: [], name: 'LengthMismatch' },
|
|
5046
|
+
{ type: 'error', inputs: [], name: 'TransactionDeadlinePassed' },
|
|
5047
|
+
] as const
|
|
5048
|
+
|
|
5049
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
5050
|
+
// ZoraFactoryImpl
|
|
5051
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
5052
|
+
|
|
5053
|
+
export const zoraFactoryImplABI = [
|
|
5054
|
+
{
|
|
5055
|
+
type: 'constructor',
|
|
5056
|
+
inputs: [
|
|
5057
|
+
{ name: 'coinV4Impl_', internalType: 'address', type: 'address' },
|
|
5058
|
+
{ name: 'creatorCoinImpl_', internalType: 'address', type: 'address' },
|
|
5059
|
+
{ name: 'trendCoinImpl_', internalType: 'address', type: 'address' },
|
|
5060
|
+
{ name: 'hook_', internalType: 'address', type: 'address' },
|
|
5061
|
+
{ name: 'zoraHookRegistry_', internalType: 'address', type: 'address' },
|
|
5062
|
+
],
|
|
5063
|
+
stateMutability: 'nonpayable',
|
|
5064
|
+
},
|
|
5065
|
+
{
|
|
5066
|
+
type: 'function',
|
|
5067
|
+
inputs: [],
|
|
5068
|
+
name: 'UPGRADE_INTERFACE_VERSION',
|
|
5069
|
+
outputs: [{ name: '', internalType: 'string', type: 'string' }],
|
|
5070
|
+
stateMutability: 'view',
|
|
5071
|
+
},
|
|
5072
|
+
{
|
|
5073
|
+
type: 'function',
|
|
5074
|
+
inputs: [],
|
|
5075
|
+
name: 'acceptOwnership',
|
|
5076
|
+
outputs: [],
|
|
5077
|
+
stateMutability: 'nonpayable',
|
|
5078
|
+
},
|
|
5079
|
+
{
|
|
5080
|
+
type: 'function',
|
|
5081
|
+
inputs: [
|
|
5082
|
+
{ name: 'msgSender', internalType: 'address', type: 'address' },
|
|
5083
|
+
{ name: 'name', internalType: 'string', type: 'string' },
|
|
5084
|
+
{ name: 'symbol', internalType: 'string', type: 'string' },
|
|
5085
|
+
{ name: 'poolConfig', internalType: 'bytes', type: 'bytes' },
|
|
5086
|
+
{ name: 'platformReferrer', internalType: 'address', type: 'address' },
|
|
5087
|
+
{ name: 'coinSalt', internalType: 'bytes32', type: 'bytes32' },
|
|
5088
|
+
],
|
|
5089
|
+
name: 'coinAddress',
|
|
5090
|
+
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
5091
|
+
stateMutability: 'view',
|
|
5092
|
+
},
|
|
5093
|
+
{
|
|
5094
|
+
type: 'function',
|
|
5095
|
+
inputs: [],
|
|
5096
|
+
name: 'coinV4Impl',
|
|
5097
|
+
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
5098
|
+
stateMutability: 'view',
|
|
5099
|
+
},
|
|
5100
|
+
{
|
|
5101
|
+
type: 'function',
|
|
5102
|
+
inputs: [],
|
|
5103
|
+
name: 'contentCoinHook',
|
|
5104
|
+
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
5105
|
+
stateMutability: 'view',
|
|
5106
|
+
},
|
|
5107
|
+
{
|
|
5108
|
+
type: 'function',
|
|
5109
|
+
inputs: [],
|
|
5110
|
+
name: 'contractName',
|
|
5111
|
+
outputs: [{ name: '', internalType: 'string', type: 'string' }],
|
|
5112
|
+
stateMutability: 'pure',
|
|
5113
|
+
},
|
|
5114
|
+
{
|
|
5115
|
+
type: 'function',
|
|
5116
|
+
inputs: [],
|
|
5117
|
+
name: 'contractVersion',
|
|
5118
|
+
outputs: [{ name: '', internalType: 'string', type: 'string' }],
|
|
5119
|
+
stateMutability: 'pure',
|
|
5120
|
+
},
|
|
5121
|
+
{
|
|
5122
|
+
type: 'function',
|
|
5123
|
+
inputs: [],
|
|
5124
|
+
name: 'creatorCoinHook',
|
|
5125
|
+
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
5126
|
+
stateMutability: 'view',
|
|
5127
|
+
},
|
|
5128
|
+
{
|
|
5129
|
+
type: 'function',
|
|
5130
|
+
inputs: [],
|
|
5131
|
+
name: 'creatorCoinImpl',
|
|
5132
|
+
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
5133
|
+
stateMutability: 'view',
|
|
5134
|
+
},
|
|
5135
|
+
{
|
|
5136
|
+
type: 'function',
|
|
5137
|
+
inputs: [
|
|
5138
|
+
{ name: 'payoutRecipient', internalType: 'address', type: 'address' },
|
|
5139
|
+
{ name: 'owners', internalType: 'address[]', type: 'address[]' },
|
|
5140
|
+
{ name: 'uri', internalType: 'string', type: 'string' },
|
|
5141
|
+
{ name: 'name', internalType: 'string', type: 'string' },
|
|
5142
|
+
{ name: 'symbol', internalType: 'string', type: 'string' },
|
|
5143
|
+
{ name: 'platformReferrer', internalType: 'address', type: 'address' },
|
|
5144
|
+
{ name: 'currency', internalType: 'address', type: 'address' },
|
|
5145
|
+
{ name: '', internalType: 'int24', type: 'int24' },
|
|
5146
|
+
{ name: '', internalType: 'uint256', type: 'uint256' },
|
|
5147
|
+
],
|
|
5148
|
+
name: 'deploy',
|
|
5149
|
+
outputs: [
|
|
5150
|
+
{ name: '', internalType: 'address', type: 'address' },
|
|
5151
|
+
{ name: '', internalType: 'uint256', type: 'uint256' },
|
|
5152
|
+
],
|
|
5153
|
+
stateMutability: 'payable',
|
|
5154
|
+
},
|
|
5155
|
+
{
|
|
5156
|
+
type: 'function',
|
|
5157
|
+
inputs: [
|
|
5158
|
+
{ name: 'payoutRecipient', internalType: 'address', type: 'address' },
|
|
5159
|
+
{ name: 'owners', internalType: 'address[]', type: 'address[]' },
|
|
4472
5160
|
{ name: 'uri', internalType: 'string', type: 'string' },
|
|
4473
5161
|
{ name: 'name', internalType: 'string', type: 'string' },
|
|
4474
5162
|
{ name: 'symbol', internalType: 'string', type: 'string' },
|
|
@@ -4541,6 +5229,20 @@ export const zoraFactoryImplABI = [
|
|
|
4541
5229
|
],
|
|
4542
5230
|
stateMutability: 'payable',
|
|
4543
5231
|
},
|
|
5232
|
+
{
|
|
5233
|
+
type: 'function',
|
|
5234
|
+
inputs: [
|
|
5235
|
+
{ name: 'symbol', internalType: 'string', type: 'string' },
|
|
5236
|
+
{ name: 'postDeployHook', internalType: 'address', type: 'address' },
|
|
5237
|
+
{ name: 'postDeployHookData', internalType: 'bytes', type: 'bytes' },
|
|
5238
|
+
],
|
|
5239
|
+
name: 'deployTrendCoin',
|
|
5240
|
+
outputs: [
|
|
5241
|
+
{ name: 'coin', internalType: 'address', type: 'address' },
|
|
5242
|
+
{ name: 'postDeployHookDataOut', internalType: 'bytes', type: 'bytes' },
|
|
5243
|
+
],
|
|
5244
|
+
stateMutability: 'payable',
|
|
5245
|
+
},
|
|
4544
5246
|
{
|
|
4545
5247
|
type: 'function',
|
|
4546
5248
|
inputs: [
|
|
@@ -4619,6 +5321,27 @@ export const zoraFactoryImplABI = [
|
|
|
4619
5321
|
outputs: [],
|
|
4620
5322
|
stateMutability: 'nonpayable',
|
|
4621
5323
|
},
|
|
5324
|
+
{
|
|
5325
|
+
type: 'function',
|
|
5326
|
+
inputs: [
|
|
5327
|
+
{ name: 'currency', internalType: 'address', type: 'address' },
|
|
5328
|
+
{ name: 'tickLower', internalType: 'int24[]', type: 'int24[]' },
|
|
5329
|
+
{ name: 'tickUpper', internalType: 'int24[]', type: 'int24[]' },
|
|
5330
|
+
{
|
|
5331
|
+
name: 'numDiscoveryPositions',
|
|
5332
|
+
internalType: 'uint16[]',
|
|
5333
|
+
type: 'uint16[]',
|
|
5334
|
+
},
|
|
5335
|
+
{
|
|
5336
|
+
name: 'maxDiscoverySupplyShare',
|
|
5337
|
+
internalType: 'uint256[]',
|
|
5338
|
+
type: 'uint256[]',
|
|
5339
|
+
},
|
|
5340
|
+
],
|
|
5341
|
+
name: 'setTrendCoinPoolConfig',
|
|
5342
|
+
outputs: [],
|
|
5343
|
+
stateMutability: 'nonpayable',
|
|
5344
|
+
},
|
|
4622
5345
|
{
|
|
4623
5346
|
type: 'function',
|
|
4624
5347
|
inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }],
|
|
@@ -4626,6 +5349,27 @@ export const zoraFactoryImplABI = [
|
|
|
4626
5349
|
outputs: [],
|
|
4627
5350
|
stateMutability: 'nonpayable',
|
|
4628
5351
|
},
|
|
5352
|
+
{
|
|
5353
|
+
type: 'function',
|
|
5354
|
+
inputs: [{ name: 'symbol', internalType: 'string', type: 'string' }],
|
|
5355
|
+
name: 'trendCoinAddress',
|
|
5356
|
+
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
5357
|
+
stateMutability: 'view',
|
|
5358
|
+
},
|
|
5359
|
+
{
|
|
5360
|
+
type: 'function',
|
|
5361
|
+
inputs: [],
|
|
5362
|
+
name: 'trendCoinImpl',
|
|
5363
|
+
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
5364
|
+
stateMutability: 'view',
|
|
5365
|
+
},
|
|
5366
|
+
{
|
|
5367
|
+
type: 'function',
|
|
5368
|
+
inputs: [],
|
|
5369
|
+
name: 'trendCoinPoolConfig',
|
|
5370
|
+
outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
|
|
5371
|
+
stateMutability: 'view',
|
|
5372
|
+
},
|
|
4629
5373
|
{
|
|
4630
5374
|
type: 'function',
|
|
4631
5375
|
inputs: [
|
|
@@ -4891,6 +5635,75 @@ export const zoraFactoryImplABI = [
|
|
|
4891
5635
|
],
|
|
4892
5636
|
name: 'OwnershipTransferred',
|
|
4893
5637
|
},
|
|
5638
|
+
{
|
|
5639
|
+
type: 'event',
|
|
5640
|
+
anonymous: false,
|
|
5641
|
+
inputs: [
|
|
5642
|
+
{
|
|
5643
|
+
name: 'caller',
|
|
5644
|
+
internalType: 'address',
|
|
5645
|
+
type: 'address',
|
|
5646
|
+
indexed: true,
|
|
5647
|
+
},
|
|
5648
|
+
{
|
|
5649
|
+
name: 'symbol',
|
|
5650
|
+
internalType: 'string',
|
|
5651
|
+
type: 'string',
|
|
5652
|
+
indexed: false,
|
|
5653
|
+
},
|
|
5654
|
+
{
|
|
5655
|
+
name: 'coin',
|
|
5656
|
+
internalType: 'address',
|
|
5657
|
+
type: 'address',
|
|
5658
|
+
indexed: false,
|
|
5659
|
+
},
|
|
5660
|
+
{
|
|
5661
|
+
name: 'poolKey',
|
|
5662
|
+
internalType: 'struct PoolKey',
|
|
5663
|
+
type: 'tuple',
|
|
5664
|
+
components: [
|
|
5665
|
+
{ name: 'currency0', internalType: 'Currency', type: 'address' },
|
|
5666
|
+
{ name: 'currency1', internalType: 'Currency', type: 'address' },
|
|
5667
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24' },
|
|
5668
|
+
{ name: 'tickSpacing', internalType: 'int24', type: 'int24' },
|
|
5669
|
+
{ name: 'hooks', internalType: 'contract IHooks', type: 'address' },
|
|
5670
|
+
],
|
|
5671
|
+
indexed: false,
|
|
5672
|
+
},
|
|
5673
|
+
{
|
|
5674
|
+
name: 'poolKeyHash',
|
|
5675
|
+
internalType: 'bytes32',
|
|
5676
|
+
type: 'bytes32',
|
|
5677
|
+
indexed: false,
|
|
5678
|
+
},
|
|
5679
|
+
{
|
|
5680
|
+
name: 'poolConfig',
|
|
5681
|
+
internalType: 'bytes',
|
|
5682
|
+
type: 'bytes',
|
|
5683
|
+
indexed: false,
|
|
5684
|
+
},
|
|
5685
|
+
{
|
|
5686
|
+
name: 'version',
|
|
5687
|
+
internalType: 'string',
|
|
5688
|
+
type: 'string',
|
|
5689
|
+
indexed: false,
|
|
5690
|
+
},
|
|
5691
|
+
],
|
|
5692
|
+
name: 'TrendCoinCreated',
|
|
5693
|
+
},
|
|
5694
|
+
{
|
|
5695
|
+
type: 'event',
|
|
5696
|
+
anonymous: false,
|
|
5697
|
+
inputs: [
|
|
5698
|
+
{
|
|
5699
|
+
name: 'poolConfig',
|
|
5700
|
+
internalType: 'bytes',
|
|
5701
|
+
type: 'bytes',
|
|
5702
|
+
indexed: false,
|
|
5703
|
+
},
|
|
5704
|
+
],
|
|
5705
|
+
name: 'TrendCoinPoolConfigUpdated',
|
|
5706
|
+
},
|
|
4894
5707
|
{
|
|
4895
5708
|
type: 'event',
|
|
4896
5709
|
anonymous: false,
|
|
@@ -4964,6 +5777,15 @@ export const zoraFactoryImplABI = [
|
|
|
4964
5777
|
name: 'OwnableUnauthorizedAccount',
|
|
4965
5778
|
},
|
|
4966
5779
|
{ type: 'error', inputs: [], name: 'ReentrancyGuardReentrantCall' },
|
|
5780
|
+
{
|
|
5781
|
+
type: 'error',
|
|
5782
|
+
inputs: [{ name: 'symbol', internalType: 'string', type: 'string' }],
|
|
5783
|
+
name: 'TickerAlreadyUsed',
|
|
5784
|
+
},
|
|
5785
|
+
{ type: 'error', inputs: [], name: 'TickerInvalidCharacters' },
|
|
5786
|
+
{ type: 'error', inputs: [], name: 'TickerTooLong' },
|
|
5787
|
+
{ type: 'error', inputs: [], name: 'TickerTooShort' },
|
|
5788
|
+
{ type: 'error', inputs: [], name: 'TrendCoinPoolConfigNotSet' },
|
|
4967
5789
|
{ type: 'error', inputs: [], name: 'UUPSUnauthorizedCallContext' },
|
|
4968
5790
|
{
|
|
4969
5791
|
type: 'error',
|
|
@@ -4978,6 +5800,7 @@ export const zoraFactoryImplABI = [
|
|
|
4978
5800
|
],
|
|
4979
5801
|
name: 'UpgradeToMismatchedContractName',
|
|
4980
5802
|
},
|
|
5803
|
+
{ type: 'error', inputs: [], name: 'UseSpecificTrendCoinInitialize' },
|
|
4981
5804
|
{ type: 'error', inputs: [], name: 'ZeroDiscoveryPositions' },
|
|
4982
5805
|
{ type: 'error', inputs: [], name: 'ZeroDiscoverySupplyShare' },
|
|
4983
5806
|
] as const
|