[
 {
  "type": "constructor",
  "inputs": [
   {
    "name": "poolManager_",
    "type": "address",
    "internalType": "contract IPoolManager"
   },
   {
    "name": "stackRegistry_",
    "type": "address",
    "internalType": "contract IHookrStackRegistryV1"
   },
   {
    "name": "coordinator_",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "accountingKernel_",
    "type": "address",
    "internalType": "contract HookrSwapAccountingKernelV3"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "type": "fallback",
  "stateMutability": "nonpayable"
 },
 {
  "type": "function",
  "name": "DYNAMIC_FEE_FLAG",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint24",
    "internalType": "uint24"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "KERNEL_FAMILY_ID",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "KERNEL_INSTANCE_LAYOUT_ID",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "MAX_SQRT_PRICE_LIMIT",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint160",
    "internalType": "uint160"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "MIN_SQRT_PRICE_LIMIT",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint160",
    "internalType": "uint160"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "REQUIRED_FLAGS",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint160",
    "internalType": "uint160"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "STATEFUL_MODULE_MAGIC",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "accountingKernel",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "contract HookrSwapAccountingKernelV3"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "accountingKernelCodeHash",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "afterSwap",
  "inputs": [
   {
    "name": "sender",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "key",
    "type": "tuple",
    "internalType": "struct PoolKey",
    "components": [
     {
      "name": "currency0",
      "type": "address",
      "internalType": "Currency"
     },
     {
      "name": "currency1",
      "type": "address",
      "internalType": "Currency"
     },
     {
      "name": "fee",
      "type": "uint24",
      "internalType": "uint24"
     },
     {
      "name": "tickSpacing",
      "type": "int24",
      "internalType": "int24"
     },
     {
      "name": "hooks",
      "type": "address",
      "internalType": "contract IHooks"
     }
    ]
   },
   {
    "name": "params",
    "type": "tuple",
    "internalType": "struct SwapParams",
    "components": [
     {
      "name": "zeroForOne",
      "type": "bool",
      "internalType": "bool"
     },
     {
      "name": "amountSpecified",
      "type": "int256",
      "internalType": "int256"
     },
     {
      "name": "sqrtPriceLimitX96",
      "type": "uint160",
      "internalType": "uint160"
     }
    ]
   },
   {
    "name": "delta",
    "type": "int256",
    "internalType": "BalanceDelta"
   },
   {
    "name": "hookData",
    "type": "bytes",
    "internalType": "bytes"
   }
  ],
  "outputs": [
   {
    "name": "selector",
    "type": "bytes4",
    "internalType": "bytes4"
   },
   {
    "name": "hookDelta",
    "type": "int128",
    "internalType": "int128"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "type": "function",
  "name": "beforeSwap",
  "inputs": [
   {
    "name": "sender",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "key",
    "type": "tuple",
    "internalType": "struct PoolKey",
    "components": [
     {
      "name": "currency0",
      "type": "address",
      "internalType": "Currency"
     },
     {
      "name": "currency1",
      "type": "address",
      "internalType": "Currency"
     },
     {
      "name": "fee",
      "type": "uint24",
      "internalType": "uint24"
     },
     {
      "name": "tickSpacing",
      "type": "int24",
      "internalType": "int24"
     },
     {
      "name": "hooks",
      "type": "address",
      "internalType": "contract IHooks"
     }
    ]
   },
   {
    "name": "params",
    "type": "tuple",
    "internalType": "struct SwapParams",
    "components": [
     {
      "name": "zeroForOne",
      "type": "bool",
      "internalType": "bool"
     },
     {
      "name": "amountSpecified",
      "type": "int256",
      "internalType": "int256"
     },
     {
      "name": "sqrtPriceLimitX96",
      "type": "uint160",
      "internalType": "uint160"
     }
    ]
   },
   {
    "name": "hookData",
    "type": "bytes",
    "internalType": "bytes"
   }
  ],
  "outputs": [
   {
    "name": "selector",
    "type": "bytes4",
    "internalType": "bytes4"
   },
   {
    "name": "delta",
    "type": "int256",
    "internalType": "BeforeSwapDelta"
   },
   {
    "name": "feeOverride",
    "type": "uint24",
    "internalType": "uint24"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "type": "function",
  "name": "contractName",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "string",
    "internalType": "string"
   }
  ],
  "stateMutability": "pure"
 },
 {
  "type": "function",
  "name": "contractVersion",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "string",
    "internalType": "string"
   }
  ],
  "stateMutability": "pure"
 },
 {
  "type": "function",
  "name": "coordinator",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "kernelInstanceLayoutId",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "stateMutability": "pure"
 },
 {
  "type": "function",
  "name": "poolManager",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "contract IPoolManager"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "stackRegistry",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "contract IHookrStackRegistryV1"
   }
  ],
  "stateMutability": "view"
 },
 {
  "type": "function",
  "name": "statefulModuleKernelMagic",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ],
  "stateMutability": "pure"
 },
 {
  "type": "event",
  "name": "CorrectionAttemptFailed",
  "inputs": [
   {
    "name": "poolId",
    "type": "bytes32",
    "indexed": true,
    "internalType": "PoolId"
   },
   {
    "name": "phase",
    "type": "uint8",
    "indexed": true,
    "internalType": "uint8"
   },
   {
    "name": "payloadHash",
    "type": "bytes32",
    "indexed": false,
    "internalType": "bytes32"
   },
   {
    "name": "reasonHash",
    "type": "bytes32",
    "indexed": false,
    "internalType": "bytes32"
   }
  ],
  "anonymous": false
 },
 {
  "type": "event",
  "name": "CorrectionAttemptSkipped",
  "inputs": [
   {
    "name": "poolId",
    "type": "bytes32",
    "indexed": true,
    "internalType": "PoolId"
   },
   {
    "name": "phase",
    "type": "uint8",
    "indexed": true,
    "internalType": "uint8"
   },
   {
    "name": "payloadHash",
    "type": "bytes32",
    "indexed": false,
    "internalType": "bytes32"
   },
   {
    "name": "reasonHash",
    "type": "bytes32",
    "indexed": false,
    "internalType": "bytes32"
   }
  ],
  "anonymous": false
 },
 {
  "type": "event",
  "name": "CorrectionAttemptSucceeded",
  "inputs": [
   {
    "name": "poolId",
    "type": "bytes32",
    "indexed": true,
    "internalType": "PoolId"
   },
   {
    "name": "phase",
    "type": "uint8",
    "indexed": true,
    "internalType": "uint8"
   },
   {
    "name": "planDigest",
    "type": "bytes32",
    "indexed": true,
    "internalType": "bytes32"
   },
   {
    "name": "realizedProfitQuote",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "type": "error",
  "name": "AccountingKernelCodeChanged",
  "inputs": [
   {
    "name": "expected",
    "type": "bytes32",
    "internalType": "bytes32"
   },
   {
    "name": "actual",
    "type": "bytes32",
    "internalType": "bytes32"
   }
  ]
 },
 {
  "type": "error",
  "name": "DelegateCallFailed",
  "inputs": []
 },
 {
  "type": "error",
  "name": "InvalidHookData",
  "inputs": []
 },
 {
  "type": "error",
  "name": "InvalidPayload",
  "inputs": []
 },
 {
  "type": "error",
  "name": "InvalidStack",
  "inputs": []
 },
 {
  "type": "error",
  "name": "InvalidWiring",
  "inputs": []
 },
 {
  "type": "error",
  "name": "ReentrantCallback",
  "inputs": []
 }
]