[
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "_fee",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "_tickSpacing",
                "type": "uint256"
            },
            {
                "internalType": "int32",
                "name": "_activeTick",
                "type": "int32"
            },
            {
                "internalType": "int256",
                "name": "_lookback",
                "type": "int256"
            },
            {
                "internalType": "uint64",
                "name": "_protocolFeeRatio",
                "type": "uint64"
            },
            {
                "internalType": "contract IERC20",
                "name": "_tokenA",
                "type": "address"
            },
            {
                "internalType": "contract IERC20",
                "name": "_tokenB",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "_tokenAScale",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "_tokenBScale",
                "type": "uint256"
            },
            {
                "internalType": "contract IPosition",
                "name": "_position",
                "type": "address"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "constructor"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "x",
                "type": "uint256"
            }
        ],
        "name": "PRBMathUD60x18__SqrtOverflow",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "prod1",
                "type": "uint256"
            }
        ],
        "name": "PRBMath__MulDivFixedPointOverflow",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "prod1",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "denominator",
                "type": "uint256"
            }
        ],
        "name": "PRBMath__MulDivOverflow",
        "type": "error"
    },
    {
        "inputs": [],
        "name": "PRBMath__MulDivSignedInputTooSmall",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "rAbs",
                "type": "uint256"
            }
        ],
        "name": "PRBMath__MulDivSignedOverflow",
        "type": "error"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "sender",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "uint256",
                "name": "tokenId",
                "type": "uint256"
            },
            {
                "components": [
                    {
                        "internalType": "uint128",
                        "name": "deltaA",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "deltaB",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint256",
                        "name": "deltaLpBalance",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint128",
                        "name": "binId",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint8",
                        "name": "kind",
                        "type": "uint8"
                    },
                    {
                        "internalType": "int32",
                        "name": "lowerTick",
                        "type": "int32"
                    },
                    {
                        "internalType": "bool",
                        "name": "isActive",
                        "type": "bool"
                    }
                ],
                "indexed": false,
                "internalType": "struct IPool.BinDelta[]",
                "name": "binDeltas",
                "type": "tuple[]"
            }
        ],
        "name": "AddLiquidity",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "uint128",
                "name": "binId",
                "type": "uint128"
            },
            {
                "indexed": false,
                "internalType": "uint128",
                "name": "reserveA",
                "type": "uint128"
            },
            {
                "indexed": false,
                "internalType": "uint128",
                "name": "reserveB",
                "type": "uint128"
            },
            {
                "indexed": false,
                "internalType": "uint128",
                "name": "mergeId",
                "type": "uint128"
            }
        ],
        "name": "BinMerged",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "uint128",
                "name": "binId",
                "type": "uint128"
            },
            {
                "indexed": false,
                "internalType": "int128",
                "name": "previousTick",
                "type": "int128"
            },
            {
                "indexed": false,
                "internalType": "int128",
                "name": "newTick",
                "type": "int128"
            }
        ],
        "name": "BinMoved",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "sender",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "uint128",
                "name": "binId",
                "type": "uint128"
            },
            {
                "indexed": false,
                "internalType": "uint32",
                "name": "maxRecursion",
                "type": "uint32"
            }
        ],
        "name": "MigrateBinsUpStack",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "protocolFee",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "bool",
                "name": "isTokenA",
                "type": "bool"
            }
        ],
        "name": "ProtocolFeeCollected",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "sender",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "recipient",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "uint256",
                "name": "tokenId",
                "type": "uint256"
            },
            {
                "components": [
                    {
                        "internalType": "uint128",
                        "name": "deltaA",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "deltaB",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint256",
                        "name": "deltaLpBalance",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint128",
                        "name": "binId",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint8",
                        "name": "kind",
                        "type": "uint8"
                    },
                    {
                        "internalType": "int32",
                        "name": "lowerTick",
                        "type": "int32"
                    },
                    {
                        "internalType": "bool",
                        "name": "isActive",
                        "type": "bool"
                    }
                ],
                "indexed": false,
                "internalType": "struct IPool.BinDelta[]",
                "name": "binDeltas",
                "type": "tuple[]"
            }
        ],
        "name": "RemoveLiquidity",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "protocolFee",
                "type": "uint256"
            }
        ],
        "name": "SetProtocolFeeRatio",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "address",
                "name": "sender",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "address",
                "name": "recipient",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "bool",
                "name": "tokenAIn",
                "type": "bool"
            },
            {
                "indexed": false,
                "internalType": "bool",
                "name": "exactOutput",
                "type": "bool"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "amountIn",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "amountOut",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "int32",
                "name": "activeTick",
                "type": "int32"
            }
        ],
        "name": "Swap",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "fromTokenId",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "toTokenId",
                "type": "uint256"
            },
            {
                "components": [
                    {
                        "internalType": "uint128",
                        "name": "binId",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "amount",
                        "type": "uint128"
                    }
                ],
                "indexed": false,
                "internalType": "struct IPool.RemoveLiquidityParams[]",
                "name": "params",
                "type": "tuple[]"
            }
        ],
        "name": "TransferLiquidity",
        "type": "event"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "tokenId",
                "type": "uint256"
            },
            {
                "components": [
                    {
                        "internalType": "uint8",
                        "name": "kind",
                        "type": "uint8"
                    },
                    {
                        "internalType": "int32",
                        "name": "pos",
                        "type": "int32"
                    },
                    {
                        "internalType": "bool",
                        "name": "isDelta",
                        "type": "bool"
                    },
                    {
                        "internalType": "uint128",
                        "name": "deltaA",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "deltaB",
                        "type": "uint128"
                    }
                ],
                "internalType": "struct IPool.AddLiquidityParams[]",
                "name": "params",
                "type": "tuple[]"
            },
            {
                "internalType": "bytes",
                "name": "data",
                "type": "bytes"
            }
        ],
        "name": "addLiquidity",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "tokenAAmount",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "tokenBAmount",
                "type": "uint256"
            },
            {
                "components": [
                    {
                        "internalType": "uint128",
                        "name": "deltaA",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "deltaB",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint256",
                        "name": "deltaLpBalance",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint128",
                        "name": "binId",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint8",
                        "name": "kind",
                        "type": "uint8"
                    },
                    {
                        "internalType": "int32",
                        "name": "lowerTick",
                        "type": "int32"
                    },
                    {
                        "internalType": "bool",
                        "name": "isActive",
                        "type": "bool"
                    }
                ],
                "internalType": "struct IPool.BinDelta[]",
                "name": "binDeltas",
                "type": "tuple[]"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "action",
                "type": "uint256"
            },
            {
                "internalType": "uint64",
                "name": "val",
                "type": "uint64"
            },
            {
                "internalType": "address",
                "name": "recipient",
                "type": "address"
            }
        ],
        "name": "adminAction",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "tokenId",
                "type": "uint256"
            },
            {
                "internalType": "uint128",
                "name": "binId",
                "type": "uint128"
            }
        ],
        "name": "balanceOf",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "lpToken",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "binBalanceA",
        "outputs": [
            {
                "internalType": "uint128",
                "name": "",
                "type": "uint128"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "binBalanceB",
        "outputs": [
            {
                "internalType": "uint128",
                "name": "",
                "type": "uint128"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "int32",
                "name": "",
                "type": "int32"
            }
        ],
        "name": "binMap",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "int32",
                "name": "",
                "type": "int32"
            },
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "name": "binPositions",
        "outputs": [
            {
                "internalType": "uint128",
                "name": "",
                "type": "uint128"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "factory",
        "outputs": [
            {
                "internalType": "contract IFactory",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "fee",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint128",
                "name": "binId",
                "type": "uint128"
            }
        ],
        "name": "getBin",
        "outputs": [
            {
                "components": [
                    {
                        "internalType": "uint128",
                        "name": "reserveA",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "reserveB",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "mergeBinBalance",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "mergeId",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "totalSupply",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint8",
                        "name": "kind",
                        "type": "uint8"
                    },
                    {
                        "internalType": "int32",
                        "name": "lowerTick",
                        "type": "int32"
                    }
                ],
                "internalType": "struct IPool.BinState",
                "name": "bin",
                "type": "tuple"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getCurrentTwa",
        "outputs": [
            {
                "internalType": "int256",
                "name": "",
                "type": "int256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getState",
        "outputs": [
            {
                "components": [
                    {
                        "internalType": "int32",
                        "name": "activeTick",
                        "type": "int32"
                    },
                    {
                        "internalType": "uint8",
                        "name": "status",
                        "type": "uint8"
                    },
                    {
                        "internalType": "uint128",
                        "name": "binCounter",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint64",
                        "name": "protocolFeeRatio",
                        "type": "uint64"
                    }
                ],
                "internalType": "struct IPool.State",
                "name": "",
                "type": "tuple"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getTwa",
        "outputs": [
            {
                "components": [
                    {
                        "internalType": "int96",
                        "name": "twa",
                        "type": "int96"
                    },
                    {
                        "internalType": "int96",
                        "name": "value",
                        "type": "int96"
                    },
                    {
                        "internalType": "uint64",
                        "name": "lastTimestamp",
                        "type": "uint64"
                    }
                ],
                "internalType": "struct IPool.TwaState",
                "name": "",
                "type": "tuple"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "lookback",
        "outputs": [
            {
                "internalType": "int256",
                "name": "",
                "type": "int256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint128",
                "name": "binId",
                "type": "uint128"
            },
            {
                "internalType": "uint32",
                "name": "maxRecursion",
                "type": "uint32"
            }
        ],
        "name": "migrateBinUpStack",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "recipient",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "tokenId",
                "type": "uint256"
            },
            {
                "components": [
                    {
                        "internalType": "uint128",
                        "name": "binId",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "amount",
                        "type": "uint128"
                    }
                ],
                "internalType": "struct IPool.RemoveLiquidityParams[]",
                "name": "params",
                "type": "tuple[]"
            }
        ],
        "name": "removeLiquidity",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "tokenAOut",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "tokenBOut",
                "type": "uint256"
            },
            {
                "components": [
                    {
                        "internalType": "uint128",
                        "name": "deltaA",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "deltaB",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint256",
                        "name": "deltaLpBalance",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint128",
                        "name": "binId",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint8",
                        "name": "kind",
                        "type": "uint8"
                    },
                    {
                        "internalType": "int32",
                        "name": "lowerTick",
                        "type": "int32"
                    },
                    {
                        "internalType": "bool",
                        "name": "isActive",
                        "type": "bool"
                    }
                ],
                "internalType": "struct IPool.BinDelta[]",
                "name": "binDeltas",
                "type": "tuple[]"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "recipient",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "amount",
                "type": "uint256"
            },
            {
                "internalType": "bool",
                "name": "tokenAIn",
                "type": "bool"
            },
            {
                "internalType": "bool",
                "name": "exactOutput",
                "type": "bool"
            },
            {
                "internalType": "uint256",
                "name": "sqrtPriceLimit",
                "type": "uint256"
            },
            {
                "internalType": "bytes",
                "name": "data",
                "type": "bytes"
            }
        ],
        "name": "swap",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "amountIn",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "amountOut",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "tickSpacing",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "tokenA",
        "outputs": [
            {
                "internalType": "contract IERC20",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "tokenAScale",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "tokenB",
        "outputs": [
            {
                "internalType": "contract IERC20",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "tokenBScale",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "fromTokenId",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "toTokenId",
                "type": "uint256"
            },
            {
                "components": [
                    {
                        "internalType": "uint128",
                        "name": "binId",
                        "type": "uint128"
                    },
                    {
                        "internalType": "uint128",
                        "name": "amount",
                        "type": "uint128"
                    }
                ],
                "internalType": "struct IPool.RemoveLiquidityParams[]",
                "name": "params",
                "type": "tuple[]"
            }
        ],
        "name": "transferLiquidity",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "twa",
        "outputs": [
            {
                "internalType": "int96",
                "name": "twa",
                "type": "int96"
            },
            {
                "internalType": "int96",
                "name": "value",
                "type": "int96"
            },
            {
                "internalType": "uint64",
                "name": "lastTimestamp",
                "type": "uint64"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    }
]
