[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "poolManager_",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "settings_",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "weth_",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "OPENING_DELAY",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "OPENING_WINDOW",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "cancelOpening",
    "inputs": [
      {
        "name": "id",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "marketOf",
    "inputs": [
      {
        "name": "token",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "internalType": "struct ISinjohMigrationFactory.MarketRef",
        "components": [
          {
            "name": "hook",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "poolId",
            "type": "bytes32",
            "internalType": "PoolId"
          },
          {
            "name": "staged",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "open",
    "inputs": [
      {
        "name": "p",
        "type": "tuple",
        "internalType": "struct ISinjohMigrationFactory.OpenParams",
        "components": [
          {
            "name": "openingId",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hook",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "sqrtPriceX96",
            "type": "uint160",
            "internalType": "uint160"
          },
          {
            "name": "slippageBps",
            "type": "uint16",
            "internalType": "uint16"
          },
          {
            "name": "deadline",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "topTick",
            "type": "int24",
            "internalType": "int24"
          },
          {
            "name": "tokens",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "backing",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "buy",
            "type": "tuple",
            "internalType": "struct TaxMath.Params",
            "components": [
              {
                "name": "model",
                "type": "uint8",
                "internalType": "enum TaxMath.Model"
              },
              {
                "name": "x",
                "type": "uint16",
                "internalType": "uint16"
              },
              {
                "name": "y",
                "type": "uint16",
                "internalType": "uint16"
              },
              {
                "name": "z",
                "type": "uint256",
                "internalType": "uint256"
              }
            ]
          },
          {
            "name": "sell",
            "type": "tuple",
            "internalType": "struct TaxMath.Params",
            "components": [
              {
                "name": "model",
                "type": "uint8",
                "internalType": "enum TaxMath.Model"
              },
              {
                "name": "x",
                "type": "uint16",
                "internalType": "uint16"
              },
              {
                "name": "y",
                "type": "uint16",
                "internalType": "uint16"
              },
              {
                "name": "z",
                "type": "uint256",
                "internalType": "uint256"
              }
            ]
          },
          {
            "name": "floorOn",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "sellSurcharge",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "useYield",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "feeDestination",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "routeConfig",
            "type": "bytes",
            "internalType": "bytes"
          },
          {
            "name": "stage",
            "type": "tuple",
            "internalType": "struct ISinjohMigrationRoute.Stage",
            "components": [
              {
                "name": "liquidityBps",
                "type": "uint16",
                "internalType": "uint16"
              },
              {
                "name": "releaseBps",
                "type": "uint16",
                "internalType": "uint16"
              },
              {
                "name": "milestone",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "release",
                "type": "tuple[]",
                "internalType": "struct ActionEngine.Action[]",
                "components": [
                  {
                    "name": "kind",
                    "type": "uint8",
                    "internalType": "enum ActionEngine.Kind"
                  },
                  {
                    "name": "share",
                    "type": "uint16",
                    "internalType": "uint16"
                  },
                  {
                    "name": "recipient",
                    "type": "address",
                    "internalType": "address"
                  },
                  {
                    "name": "disposition",
                    "type": "uint8",
                    "internalType": "enum ActionEngine.Disposition"
                  },
                  {
                    "name": "hook",
                    "type": "address",
                    "internalType": "address"
                  },
                  {
                    "name": "poolId",
                    "type": "bytes32",
                    "internalType": "PoolId"
                  },
                  {
                    "name": "pathId",
                    "type": "uint256",
                    "internalType": "uint256"
                  },
                  {
                    "name": "outToken",
                    "type": "address",
                    "internalType": "address"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "poolId",
        "type": "bytes32",
        "internalType": "PoolId"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "opening",
    "inputs": [
      {
        "name": "id",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "o",
        "type": "tuple",
        "internalType": "struct ISinjohMigrationFactory.Opening",
        "components": [
          {
            "name": "token",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "backing",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "creator",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "legacy",
            "type": "tuple",
            "internalType": "struct ISinjohMigrationFactory.Legacy",
            "components": [
              {
                "name": "kind",
                "type": "uint8",
                "internalType": "enum ISinjohMigrationFactory.LegacyKind"
              },
              {
                "name": "pool",
                "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": "executableAt",
            "type": "uint64",
            "internalType": "uint64"
          },
          {
            "name": "cancelled",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "opened",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "openingCount",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "openingOperatorEpoch",
    "inputs": [
      {
        "name": "id",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "epoch",
        "type": "uint32",
        "internalType": "uint32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "openingSafeRole",
    "inputs": [
      {
        "name": "id",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "role",
        "type": "uint8",
        "internalType": "enum ISinjohGovernance.Role"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "poolManager",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "scheduleOpening",
    "inputs": [
      {
        "name": "token",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "backing",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "creator",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "legacy",
        "type": "tuple",
        "internalType": "struct ISinjohMigrationFactory.Legacy",
        "components": [
          {
            "name": "kind",
            "type": "uint8",
            "internalType": "enum ISinjohMigrationFactory.LegacyKind"
          },
          {
            "name": "pool",
            "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"
              }
            ]
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "id",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "settings",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "weth",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "event",
    "name": "Opened",
    "inputs": [
      {
        "name": "id",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "hook",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "poolId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "PoolId"
      },
      {
        "name": "token",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "backing",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "vault",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "route",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "sqrtPriceX96",
        "type": "uint160",
        "indexed": false,
        "internalType": "uint160"
      },
      {
        "name": "legacySqrtPriceX96",
        "type": "uint160",
        "indexed": false,
        "internalType": "uint160"
      },
      {
        "name": "openingTick",
        "type": "int24",
        "indexed": false,
        "internalType": "int24"
      },
      {
        "name": "topTick",
        "type": "int24",
        "indexed": false,
        "internalType": "int24"
      },
      {
        "name": "openingMarketCap",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "creator",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "OpeningCancelled",
    "inputs": [
      {
        "name": "id",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "OpeningScheduled",
    "inputs": [
      {
        "name": "id",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "token",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "backing",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "creator",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "legacy",
        "type": "tuple",
        "indexed": false,
        "internalType": "struct ISinjohMigrationFactory.Legacy",
        "components": [
          {
            "name": "kind",
            "type": "uint8",
            "internalType": "enum ISinjohMigrationFactory.LegacyKind"
          },
          {
            "name": "pool",
            "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": "executableAt",
        "type": "uint64",
        "indexed": false,
        "internalType": "uint64"
      },
      {
        "name": "expiresAt",
        "type": "uint64",
        "indexed": false,
        "internalType": "uint64"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "BadBacking",
    "inputs": [
      {
        "name": "backing",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "BadLegacy",
    "inputs": []
  },
  {
    "type": "error",
    "name": "BadOpening",
    "inputs": [
      {
        "name": "id",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "BadStage",
    "inputs": []
  },
  {
    "type": "error",
    "name": "FailedDeployment",
    "inputs": []
  },
  {
    "type": "error",
    "name": "HookNotMarket",
    "inputs": [
      {
        "name": "hook",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "InsufficientBalance",
    "inputs": [
      {
        "name": "balance",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "needed",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "MarketExists",
    "inputs": [
      {
        "name": "token",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "NotCreator",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "NotExecutable",
    "inputs": [
      {
        "name": "id",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "executableAt",
        "type": "uint64",
        "internalType": "uint64"
      },
      {
        "name": "expiresAt",
        "type": "uint64",
        "internalType": "uint64"
      }
    ]
  },
  {
    "type": "error",
    "name": "NotOperator",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "NotVeto",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "OpeningDeadline",
    "inputs": [
      {
        "name": "deadline",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "PriceMoved",
    "inputs": [
      {
        "name": "legacySqrtPriceX96",
        "type": "uint160",
        "internalType": "uint160"
      },
      {
        "name": "sqrtPriceX96",
        "type": "uint160",
        "internalType": "uint160"
      }
    ]
  },
  {
    "type": "error",
    "name": "ReentrancyGuardReentrantCall",
    "inputs": []
  },
  {
    "type": "error",
    "name": "RouteMismatch",
    "inputs": [
      {
        "name": "expected",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "created",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "SafeERC20FailedOperation",
    "inputs": [
      {
        "name": "token",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "SinjohToken",
    "inputs": [
      {
        "name": "token",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "TransferShort",
    "inputs": [
      {
        "name": "received",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "expected",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  },
  {
    "type": "error",
    "name": "WrongPair",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ZeroAddress",
    "inputs": []
  }
]
