@muffinfi/muffin-contracts
Version:
Smart contracts of Muffin Protocol
1,540 lines • 117 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "MuffinHubPositions",
"sourceName": "contracts/MuffinHubPositions.sol",
"abi": [
{
"inputs": [],
"name": "FailedBalanceOf",
"type": "error"
},
{
"inputs": [],
"name": "FailedTransfer",
"type": "error"
},
{
"inputs": [],
"name": "InvalidTick",
"type": "error"
},
{
"inputs": [],
"name": "InvalidTickRangeForLimitOrder",
"type": "error"
},
{
"inputs": [],
"name": "NoLiquidityForLimitOrder",
"type": "error"
},
{
"inputs": [],
"name": "NotEnoughTokenInput",
"type": "error"
},
{
"inputs": [],
"name": "PositionAlreadySettled",
"type": "error"
},
{
"inputs": [],
"name": "PositionNotSettled",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "positionRefId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"indexed": false,
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"indexed": false,
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"indexed": false,
"internalType": "uint256",
"name": "ownerAccRefId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint96",
"name": "liquidityD8",
"type": "uint96"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "feeAmount0",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "feeAmount1",
"type": "uint256"
}
],
"name": "Burn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "CollectProtocol",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "positionRefId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"indexed": false,
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"indexed": false,
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"indexed": false,
"internalType": "uint256",
"name": "ownerAccRefId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint96",
"name": "liquidityD8",
"type": "uint96"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "feeAmount0",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "feeAmount1",
"type": "uint256"
}
],
"name": "CollectSettled",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "recipientAccRefId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "Deposit",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "governance",
"type": "address"
}
],
"name": "GovernanceUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "positionRefId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"indexed": false,
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"indexed": false,
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"indexed": false,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "senderAccRefId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint96",
"name": "liquidityD8",
"type": "uint96"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
}
],
"name": "Mint",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token0",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "token1",
"type": "address"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
}
],
"name": "PoolCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "positionRefId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"indexed": false,
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"indexed": false,
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"indexed": false,
"internalType": "uint8",
"name": "limitOrderType",
"type": "uint8"
}
],
"name": "SetLimitOrderType",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"indexed": true,
"internalType": "int24",
"name": "tickEnd",
"type": "int24"
},
{
"indexed": false,
"internalType": "int24",
"name": "tickStart",
"type": "int24"
},
{
"indexed": false,
"internalType": "uint96",
"name": "liquidityD8",
"type": "uint96"
}
],
"name": "Settle",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "senderAccRefId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "recipientAccRefId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "int256",
"name": "amount0",
"type": "int256"
},
{
"indexed": false,
"internalType": "int256",
"name": "amount1",
"type": "int256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountInDistribution",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountOutDistribution",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "tierData",
"type": "uint256[]"
}
],
"name": "Swap",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "tickSpacing",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint8",
"name": "protocolFee",
"type": "uint8"
}
],
"name": "UpdateDefaultParameters",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint8",
"name": "tickSpacing",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint8",
"name": "protocolFee",
"type": "uint8"
}
],
"name": "UpdatePool",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"indexed": true,
"internalType": "uint24",
"name": "sqrtGamma",
"type": "uint24"
},
{
"indexed": false,
"internalType": "uint128",
"name": "sqrtPrice",
"type": "uint128"
},
{
"indexed": false,
"internalType": "uint8",
"name": "limitOrderTickSpacingMultiplier",
"type": "uint8"
}
],
"name": "UpdateTier",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "senderAccRefId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "recipient",
"type": "address"
}
],
"name": "Withdraw",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "accounts",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "token0",
"type": "address"
},
{
"internalType": "address",
"name": "token1",
"type": "address"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"internalType": "uint96",
"name": "liquidityD8",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "positionRefId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "accRefId",
"type": "uint256"
},
{
"internalType": "bool",
"name": "collectAllFees",
"type": "bool"
}
],
"internalType": "struct IMuffinHubPositionsActions.BurnParams",
"name": "params",
"type": "tuple"
}
],
"name": "burn",
"outputs": [
{
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "feeAmount0",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "feeAmount1",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
}
],
"name": "collectProtocolFee",
"outputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "token0",
"type": "address"
},
{
"internalType": "address",
"name": "token1",
"type": "address"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"internalType": "uint96",
"name": "liquidityD8",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "positionRefId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "accRefId",
"type": "uint256"
},
{
"internalType": "bool",
"name": "collectAllFees",
"type": "bool"
}
],
"internalType": "struct IMuffinHubPositionsActions.BurnParams",
"name": "params",
"type": "tuple"
}
],
"name": "collectSettled",
"outputs": [
{
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "feeAmount0",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "feeAmount1",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
}
],
"name": "getAllTiers",
"outputs": [
{
"components": [
{
"internalType": "uint128",
"name": "liquidity",
"type": "uint128"
},
{
"internalType": "uint128",
"name": "sqrtPrice",
"type": "uint128"
},
{
"internalType": "uint24",
"name": "sqrtGamma",
"type": "uint24"
},
{
"internalType": "int24",
"name": "tick",
"type": "int24"
},
{
"internalType": "int24",
"name": "nextTickBelow",
"type": "int24"
},
{
"internalType": "int24",
"name": "nextTickAbove",
"type": "int24"
},
{
"internalType": "uint80",
"name": "feeGrowthGlobal0",
"type": "uint80"
},
{
"internalType": "uint80",
"name": "feeGrowthGlobal1",
"type": "uint80"
}
],
"internalType": "struct Tiers.Tier[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getDefaultAllowedSqrtGammas",
"outputs": [
{
"internalType": "uint24[]",
"name": "",
"type": "uint24[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
}
],
"name": "getLimitOrderTickSpacingMultipliers",
"outputs": [
{
"internalType": "uint8[]",
"name": "",
"type": "uint8[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
}
],
"name": "getPoolAllowedSqrtGammas",
"outputs": [
{
"internalType": "uint24[]",
"name": "",
"type": "uint24[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
}
],
"name": "getPoolDefaultTickSpacing",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "positionRefId",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
}
],
"name": "getPositionFeeGrowthInside",
"outputs": [
{
"internalType": "uint80",
"name": "feeGrowthInside0",
"type": "uint80"
},
{
"internalType": "uint80",
"name": "feeGrowthInside1",
"type": "uint80"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"internalType": "int24",
"name": "tick",
"type": "int24"
},
{
"internalType": "bool",
"name": "zeroForOne",
"type": "bool"
}
],
"name": "getSettlement",
"outputs": [
{
"internalType": "uint96",
"name": "liquidityD8",
"type": "uint96"
},
{
"internalType": "uint16",
"name": "tickSpacing",
"type": "uint16"
},
{
"internalType": "uint32",
"name": "nextSnapshotId",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"internalType": "int24",
"name": "tick",
"type": "int24"
},
{
"internalType": "bool",
"name": "zeroForOne",
"type": "bool"
},
{
"internalType": "uint32",
"name": "snapshotId",
"type": "uint32"
}
],
"name": "getSettlementSnapshot",
"outputs": [
{
"components": [
{
"internalType": "uint80",
"name": "feeGrowthInside0",
"type": "uint80"
},
{
"internalType": "uint80",
"name": "feeGrowthInside1",
"type": "uint80"
}
],
"internalType": "struct Settlement.Snapshot",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "blockIdx",
"type": "uint256"
}
],
"name": "getTickMapBlock",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
}
],
"name": "getTickMapBlockMap",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "wordIdx",
"type": "uint256"
}
],
"name": "getTickMapWord",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "governance",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxNumOfTiers",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "token0",
"type": "address"
},
{
"internalType": "address",
"name": "token1",
"type": "address"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"internalType": "uint96",
"name": "liquidityD8",
"type": "uint96"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "positionRefId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "senderAccRefId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"internalType": "struct IMuffinHubPositionsActions.MintParams",
"name": "params",
"type": "tuple"
}
],
"name": "mint",
"outputs": [
{
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint24[]",
"name": "sqrtGammas",
"type": "uint24[]"
}
],
"name": "setDefaultAllowedSqrtGammas",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "tickSpacing",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "protocolFee",
"type": "uint8"
}
],
"name": "setDefaultParameters",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_governance",
"type": "address"
}
],
"name": "setGovernance",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token0",
"type": "address"
},
{
"internalType": "address",
"name": "token1",
"type": "address"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"internalType": "int24",
"name": "tickLower",
"type": "int24"
},
{
"internalType": "int24",
"name": "tickUpper",
"type": "int24"
},
{
"internalType": "uint256",
"name": "positionRefId",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "limitOrderType",
"type": "uint8"
}
],
"name": "setLimitOrderType",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint24[]",
"name": "sqrtGammas",
"type": "uint24[]"
}
],
"name": "setPoolAllowedSqrtGammas",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "tickSpacing",
"type": "uint8"
}
],
"name": "setPoolDefaultTickSpacing",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "tickSpacing",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "protocolFee",
"type": "uint8"
}
],
"name": "setPoolParameters",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "tierId",
"type": "uint8"
},
{
"internalType": "uint24",
"name": "sqrtGamma",
"type": "uint24"
},
{
"internalType": "uint8",
"name": "limitOrderTickSpacingMultiplier",
"type": "uint8"
}
],
"name": "setTierParameters",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "tokens",
"outputs": [
{
"internalType": "uint8",
"name": "locked",
"type": "uint8"
},
{
"internalType": "uint248",
"name": "protocolFeeAmt",
"type": "uint248"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "underlyings",
"outputs": [
{
"internalType": "address",
"name": "token0",
"type": "address"
},
{
"internalType": "address",
"name": "token1",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x6000805461ffff60a01b1916601960a21b1790556101206040526201863c6080908152620185d860a0526201857460c0526201851060e052620184ab610100526200004f90600190600562000064565b503480156200005d57600080fd5b506200012e565b82805482825590600052602060002090600901600a90048101928215620001055791602002820160005b83821115620000d257835183826101000a81548162ffffff021916908362ffffff16021790555092602001926003016020816002010492830192600103026200008e565b8015620001035782816101000a81549062ffffff0219169055600301602081600201049283019260010302620000d2565b505b506200011392915062000117565b5090565b5b8082111562000113576000815560010162000118565b614fdb806200013e6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806376f0920f116100f9578063ab033ea911610097578063dec980ec11610071578063dec980ec1461055a578063e48603391461056d578063f212d1c5146105f1578063ff23188c1461062657600080fd5b8063ab033ea914610501578063adcef36814610514578063cbdc36cb1461054757600080fd5b80638e9059d6116100d35780638e9059d61461046757806394eff6e31461047a57806399fb8529146104ba5780639f24b6b1146104cd57600080fd5b806376f0920f146103d357806378029b65146103e657806384ec1e15146103f957600080fd5b806352b7e2cb116101665780635f8f9e1f116101405780635f8f9e1f1461036d57806363af8161146103805780636dd705ee146103955780637266a0e4146103a857600080fd5b806352b7e2cb146102c2578063555ed4ad146102e25780635aa6e6751461032857600080fd5b80632fb07eac116101a25780632fb07eac1461023157806335d603f51461025957806343751ee0146102795780634a3b0d34146102af57600080fd5b806312a85dd2146101c957806313fd4c80146101de5780631bf1a607146101f4575b600080fd5b6101dc6101d73660046144fd565b610639565b005b60065b6040519081526020015b60405180910390f35b610207610202366004614552565b610736565b60408051825169ffffffffffffffffffff90811682526020938401511692810192909252016101eb565b61024461023f3660046145bd565b6107f1565b604080519283526020830191909152016101eb565b61026c6102673660046145f9565b610c0d565b6040516101eb9190614612565b61028c610287366004614713565b610d40565b6040805169ffffffffffffffffffff9384168152929091166020830152016101eb565b6101dc6102bd366004614779565b610d6e565b6102d56102d03660046145f9565b610dd2565b6040516101eb919061479c565b6102f56102f03660046147e3565b610df2565b604080516bffffffffffffffffffffffff909416845261ffff909216602084015263ffffffff16908201526060016101eb565b6000546103489073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101eb565b6101dc61037b366004614875565b610e93565b610388610ec8565b6040516101eb91906148b7565b6101dc6103a33660046148f4565b610f4a565b6101e16103b6366004614940565b600560209081526000928352604080842090915290825290205481565b6101e16103e136600461496a565b611026565b6101dc6103f436600461499f565b611059565b61043a6104073660046145f9565b6007602052600090815260409020805460019091015473ffffffffffffffffffffffffffffffffffffffff918216911682565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152016101eb565b6101dc6104753660046149db565b6110da565b6101e161048836600461496a565b600083815260046020908152604080832060ff8616845260020182528083208484526001019091529020549392505050565b6103886104c83660046145f9565b61115e565b6101e16104db366004614779565b600082815260046020908152604080832060ff8516845260020190915290205492915050565b6101dc61050f366004614a5a565b6111ea565b610527610522366004614a75565b61127b565b6040805194855260208501939093529183015260608201526080016101eb565b6101dc610555366004614a88565b611532565b610527610568366004614a75565b611575565b6105b861057b366004614a5a565b60066020526000908152604090205460ff81169061010090047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1682565b6040805160ff90931683527effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091166020830152016101eb565b6106146105ff3660046145f9565b60009081526002602052604090205460ff1690565b60405160ff90911681526020016101eb565b6101e1610634366004614ad4565b611756565b60005473ffffffffffffffffffffffffffffffffffffffff16331461065d57600080fd5b60008260ff161161066d57600080fd5b600080547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000060ff8581169182027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16929092177501000000000000000000000000000000000000000000928516928302179092556040805192835260208301919091527f35096a66abfbffecdb17659874bfe9c9c46458e61abf336a4607441a2bc532e9910160405180910390a15050565b6040805180820190915260008082526020820152600086815260046020818152604080842060ff8a1685529092018152818320600288900b84529052812084610780576000610783565b60015b60ff166002811061079657610796614afe565b63ffffffff94909416600090815260029490940201600101602090815260409384902084518086019095525469ffffffffffffffffffff80821686526a01000000000000000000009091041690840152509095945050505050565b600080808061081f6108066020870187614a5a565b6108166040880160208901614a5a565b60049190611848565b90925090506108a061083760e0870160c08801614a5a565b60e087013561084c6060890160408a01614b2d565b61085c60808a0160608b01614b48565b61086c60a08b0160808c01614b48565b61089261087f60c08d0160a08e01614b63565b6bffffffffffffffffffffffff166118ca565b8895949392919060006118fa565b50919550935084905083610100870135156109c65760006108c633896101000135611cd3565b905061091783600560006108dd60208d018d614a5a565b73ffffffffffffffffffffffffffffffffffffffff1681526020808201929092526040908101600090812086825290925290205490611d26565b6005600061092860208d018d614a5a565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604090810160009081208682528352818120949094559195506109799285926005926108dd918e01908e01614a5a565b6005600061098d60408d0160208e01614a5a565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081016000908120958152949091529092205590505b811515806109d357508015155b15610ad25760006109ef6109ea60208a018a614a5a565b611d46565b90506000610a066109ea60408b0160208c01614a5a565b905033633d705707610a1b60208c018c614a5a565b610a2b60408d0160208e01614a5a565b87878e806101200190610a3e9190614b91565b6040518763ffffffff1660e01b8152600401610a5f96959493929190614bf6565b600060405180830381600087803b158015610a7957600080fd5b505af1158015610a8d573d6000803e3d6000fd5b50610ab29250610aa391505060208b018b614a5a565b610aad8685614cab565b611de8565b610acf610ac560408b0160208c01614a5a565b610aad8584614cab565b50505b60e08701803590610ae69060c08a01614a5a565b73ffffffffffffffffffffffffffffffffffffffff16847fc53ff5211237355d20d63b638bcbf8125b8d938df83b6e65674435942aaa6124610b2e60608c0160408d01614b2d565b610b3e60808d0160608e01614b48565b610b4e60a08e0160808f01614b48565b338e61010001358f60a0016020810190610b689190614b63565b6040805160ff9097168752600295860b60208801529390940b9285019290925273ffffffffffffffffffffffffffffffffffffffff16606084015260808301526bffffffffffffffffffffffff1660a082015260c081018b905260e081018a90526101000160405180910390a4610c048480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b50505050915091565b606060046000838152602001908152602001600020600101805480602002602001604051908101604052809291908181526020016000905b82821015610d355760008481526020908190206040805161010081018252600280870290930180546fffffffffffffffffffffffffffffffff8082168452700100000000000000000000000000000000909104168286015260019081015462ffffff81169383019390935263010000008304840b606083015266010000000000008304840b60808301526901000000000000000000830490930b60a082015269ffffffffffffffffffff6c010000000000000000000000008304811660c083015276010000000000000000000000000000000000000000000090920490911660e082015283529092019101610c45565b505050509050919050565b60008681526004602052604081208190610d5e908888888888611e7a565b915091505b965096945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d9257600080fd5b60009182526002602052604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055565b6000818152600460205260409020606090610dec90611f80565b92915050565b600084815260046020818152604080842060ff881685529092018152818320600286900b84529052812081908190819085610e2e576000610e31565b60015b60ff1660028110610e4457610e44614afe565b60020201546bffffffffffffffffffffffff8116996c01000000000000000000000000820461ffff1699506e01000000000000000000000000000090910463ffffffff16975095505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610eb757600080fd5b610ec36001838361442f565b505050565b60606001805480602002602001604051908101604052809291908181526020018280548015610f4057602002820191906000526020600020906000905b82829054906101000a900462ffffff1662ffffff1681526020019060030190602082600201049283019260010382029150808411610f055790505b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f6e57600080fd5b6000848152600460205260409020610f8881858585612071565b8262ffffff168460ff16867f8ba9b3074e943a040d7cc32a0a69db4cada877568ff71021a69579a1f004e440846001018860ff1681548110610fcc57610fcc614afe565b600091825260209182902060029091020154604080517001000000000000000000000000000000009092046fffffffffffffffffffffffffffffffff16825260ff8916928201929092520160405180910390a45050505050565b600083815260046020908152604080832060ff8616845260029081018352818420858552019091529020545b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461107d57600080fd5b600083815260046020526040902061109690838361212c565b6040805160ff80851682528316602082015284917f9580ff8b575ec2cb80ff564eac7c041dcd3e5b60869932d1b87dfff585a1b2e9910160405180910390a2505050565b6000806110e960048a8a611848565b90925090506110fd8233868a8a8a896121a8565b6040805160ff8981168252600289810b602084015288900b828401528516606082015290518591339184917f6aeb822cd244fd07ac151aa36b7e0446b826e45afbc63e7449ff9d8810b94d50919081900360800190a4505050505050505050565b6000818152600360209081526040918290208054835181840281018401909452808452606093928301828280156111de57602002820191906000526020600020906000905b82829054906101000a900462ffffff1662ffffff16815260200190600301906020826002010492830192600103820291508084116111a35790505b50505050509050919050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461120e57600080fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f9d3e522e1e47a2f6009739342b9cc7b252a1888154e843ab55ee1c81745795ab91a250565b600080808080806112a26112926020890189614a5a565b61081660408a0160208b01614a5a565b90925090506113113360c08901356112c060608b0160408c01614b2d565b6112d060808c0160608d01614b48565b6112e060a08d0160808e01614b48565b6112f060c08e0160a08f01614b63565b8d6101000160208101906113049190614cc3565b89969594939291906124c1565b92985090965094509250600061132b3360e08a0135611cd3565b90506113378588614cab565b6005600061134860208c018c614a5a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060008282546113a29190614cab565b909155506113b290508487614cab565b600560006113c660408c0160208d01614a5a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060008282546114209190614cab565b909155505060c088013533837f47620c9edb42fa2078ca7272fd369516dfd3a7008f7f8ac55e63618d1c88e0cb61145d60608d0160408e01614b2d565b61146d60808e0160608f01614b48565b8d60800160208101906114809190614b48565b8e60e001358f60a00160208101906114989190614b63565b6040805160ff9096168652600294850b60208701529290930b9184019190915260608301526bffffffffffffffffffffffff16608082015260a081018c905260c081018b905260e081018a905261010081018990526101200160405180910390a46115288380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b5050509193509193565b60005473ffffffffffffffffffffffffffffffffffffffff16331461155657600080fd5b600083815260036020526040902061156f90838361442f565b50505050565b6000808080808061158c6112926020890189614a5a565b909250905061160a3360c08901356115aa60608b0160408c01614b2d565b6115ba60808c0160608d01614b48565b6115ca60a08d0160808e01614b48565b6115e08d60a001602081019061087f9190614b63565b6115e990614cde565b8d6101000160208101906115fd9190614cc3565b89969594939291906118fa565b9298509096509450925060006116243360e08a0135611cd3565b90506116308588614cab565b6005600061164160208c018c614a5a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600082825461169b9190614cab565b909155506116ab90508487614cab565b600560006116bf60408c0160208d01614a5a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060008282546117199190614cab565b909155505060c088013533837f25e512703cb4707dd00bf7ff8e3274a018a1a1e8aa39351a4f711c16033d036661145d60608d0160408e01614b2d565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461177b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff82166000908152600660205260409020805460ff811690915561010090047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff166117db8383836126cf565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a18654a5039b989ca382f52bbf82bcdde698ffc4c11fe6c59652a4d1fe70f488360405161183a91815260200190565b60405180910390a392915050565b600080838360405160200161188092919073ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181528151602092830120600081815297909252909520959350505050565b60006b7fffffffffffffffffffffff6bffffffffffffffffffffffff831611156118f6576118f6614d1d565b5090565b6000806000806119098c612766565b611913888861279c565b600086600b0b13156119bb578b5461193390610100900460ff1689614d7b565b60020b1561196d576040517fce8ef7fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8b5461198190610100900460ff1688614d7b565b60020b156119bb576040517fce8ef7fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008c6001018a60ff16815481106119d5576119d5614afe565b906000526020600020906002020190508060010160039054906101000a900460020b60020b8960020b13158015611a1d57506001810154600289810b6301000000909204900b125b15611a84578054611a47906fffffffffffffffffffffffffffffffff16600889901b600c0b612820565b81547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff919091161781555b506000611a958d8b8b8a600161284c565b9050611aa58d8b8a8a600061284c565b80611aad5750805b90508015611afe5760008d6001018b60ff1681548110611acf57611acf614afe565b90600052602060002090600202019050611af28a82612bb590919063ffffffff16565b611afc818a612bb5565b505b50611b0f8c8c8c8c8c8c8c8c612c8f565b90925090506000600b87900b1215611c49576000611b2e8d8b8b612e59565b9050611b3b8d8b8a612e59565b80611b435750805b90508015611c475760008d6001018b60ff1681548110611b6557611b65614afe565b906000526020600020906002020190506000611bb58f60020160008e60ff1681526020019081526020016000208360010160039054906101000a900460020b6001611bb09190614dc4565b613024565b905060008f60030160008e60ff16815260200190815260200160002060008360020b60020b8152602001908152602001600020600001601b9054906101000a900460020b9050818360010160066101000a81548162ffffff021916908360020b62ffffff160217905550808360010160096101000a81548162ffffff021916908360020b62ffffff1602179055505050505b505b85600b0b600014611cc457611cbe8c6001018a60ff1681548110611c6f57611c6f614afe565b600091825260209091206002909102015470010000000000000000000000