MarketMakerHook

0xfedb6e7a40716291793ef50d6d294df62cec68cc

Verification
Verified
v0.8.26+commit.8a97fa7a
Type
Contract
24,424 bytes
ABI entries
62
34 read · 7 write
License
none

Contract information

Address
0xfedb6e7a40716291793ef50d6d294df62cec68cc
Chain
Robinhood Chain (4663)
Compiler
v0.8.26+commit.8a97fa7a
Optimization
Enabled
Creation tx
0x6efc9c4f96…4860362647

Token

Not a token

This contract does not expose ERC-20 metadata.

Read contract (34)

DEPLOYER()address
DIR()int8
LAUNCH_NTICK()int24
LAUNCH_SQRT_PRICE()uint160
MANAGER()address
TOKEN()address
TOKEN_C()address
USDC_C()address
armed()bool
band()int24, int24, uint128, int24
bandBudget()uint128
bandValue()uint256
beforeAddLiquidity(address, tuple, tuple, bytes)bytes4
buckets(uint256)int24, int24, uint128, bool
burnFloorSet()bool
deployerAccrued()uint128
digesting()bool
escrow()uint128
genesisDone()bool
getHookPermissions()tuple
globalBurnFloor()int24
ladderHash()bytes32
lifetimeCapture()uint128
lotTail()uint64
lots(uint256)uint128, uint128, int24, int24, int24, uint8
pendingTokenBurn()uint128
poolKey()tuple
refTick()int24
retraceHWM()uint128
ringMax()int24
sweepCursor()uint16
trancheBudget(uint256)uint128
trancheValue(uint256)uint256
tranches(uint256)int24, int24, uint128, int24

Events (11)

AbsorbedArmedBurnedGenesisMigratedPokedRefilledRelistFilledRelistedSaturatedSwept

ABI

[
  {
    "inputs": [
      {
        "internalType": "contract IPoolManager",
        "name": "manager",
        "type": "address"
      },
      {
        "internalType": "contract MarketMakerToken",
        "name": "token",
        "type": "address"
      },
      {
        "internalType": "Currency",
        "name": "usdc",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "deployer",
        "type": "address"
      },
      {
        "components": [
          {
            "internalType": "int24",
            "name": "tickSpacing",
            "type": "int24"
          },
          {
            "internalType": "uint128",
            "name": "baseTokens",
            "type": "uint128"
          },
          {
            "internalType": "uint128",
            "name": "baseUsdc",
            "type": "uint128"
          },
          {
            "internalType": "uint128",
            "name": "dustTokens",
            "type": "uint128"
          },
          {
            "internalType": "uint128",
            "name": "humpTokens",
            "type": "uint128"
          },
          {
            "internalType": "uint16",
            "name": "bucketCount",
            "type": "uint16"
          },
          {
            "internalType": "uint256",
            "name": "launchFdv",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "maxFdv",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "dustLoFdv",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "dustHiFdv",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "dustBoostFdv",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "humpCenterFdv",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "sigmaWad",
            "type": "uint256"
          },
          {
            "internalType": "uint16",
            "name": "captureBandBps",
            "type": "uint16"
          },
          {
            "internalType": "uint128",
            "name": "armingThreshold",
            "type": "uint128"
          },
          {
            "internalType": "int24",
            "name": "bandLowerOff",
            "type": "int24"
          },
          {
            "internalType": "int24",
            "name": "bandUpperOff",
            "type": "int24"
          },
          {
            "internalType": "int24",
            "name": "relistMaxOff",
            "type": "int24"
          },
          {
            "internalType": "int24",
            "name": "relistBasisPlus",
            "type": "int24"
          },
          {
            "internalType": "int24",
            "name": "relistWidth",
            "type": "int24"
          },
          {
            "internalType": "int24[3]",
            "name": "trancheOff",
            "type": "int24[3]"
          },
          {
            "internalType": "uint32",
            "name": "twapWindow",
            "type": "uint32"
          },
          {
            "internalType": "uint16",
            "name": "ringSlots",
            "type": "uint16"
          },
          {
            "internalType": "int24",
            "name": "refDescentPerHour",
            "type": "int24"
          },
          {
            "internalType": "uint32",
            "name": "refMaxDescentDt",
            "type": "uint32"
          },
          {
            "internalType": "uint16",
            "name": "flatFeeBps",
            "type": "uint16"
          },
          {
            "internalType": "uint16",
            "name": "deployerFeeShareBps",
            "type": "uint16"
          },
          {
            "internalType": "int24",
            "name": "zoneStartOff",
            "type": "int24"
          },
          {
            "internalType": "int24",
            "name": "zoneMidOff",
            "type": "int24"
          },
          {
            "internalType": "int24",
            "name": "zoneEndOff",
            "type": "int24"
          },
          {
            "internalType": "uint16",
            "name": "zoneMidBps",
            "type": "uint16"
          },
          {
            "internalType": "uint16",
            "name": "zoneMaxBps",
            "type": "uint16"
          },
          {
            "internalType": "uint16",
            "name": "hwmDigestBps",
            "type": "uint16"
          },
          {
            "internalType": "uint16",
            "name": "hwmRefillBps",
            "type": "uint16"
          },
          {
            "internalType": "int24",
            "name": "migrationDrift",
            "type": "int24"
          },
          {
            "internalType": "uint8",
            "name": "maxSweepsPerSwap",
            "type": "uint8"
          },
          {
            "internalType": "uint16",
            "name": "pokeBountyBps",
            "type": "uint16"
          }
        ],
        "internalType": "struct Params",
        "name": "p",
        "type": "tuple"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "inputs": [],
    "name": "AlreadyInitialized",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "GenesisAlreadyDone",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "GenesisNotReady",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NoWork",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NotDynamicFee",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NotManager",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NothingToClaim",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "WrongLaunchPrice",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "WrongPool",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "tokens",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "int24",
        "name": "basisTick",
        "type": "int24"
      }
    ],
    "name": "Absorbed",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [],
    "name": "Armed",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint8",
        "name": "tranche",
        "type": "uint8"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "tokens",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "int24",
        "name": "tick",
        "type": "int24"
      }
    ],
    "name": "Burned",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "bytes32",
        "name": "ladderHash",
        "type": "bytes32"
      }
    ],
    "name": "Genesis",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "int24",
        "name": "newRefTick",
        "type": "int24"
      }
    ],
    "name": "Migrated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address",
        "name": "keeper",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "bounty",
        "type": "uint256"
      }
    ],
    "name": "Poked",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [],
    "name": "Refilled",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "lotId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "usdc",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "profit",
        "type": "uint256"
      }
    ],
    "name": "RelistFilled",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "lotId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "int24",
        "name": "tick",
        "type": "int24"
      }
    ],
    "name": "Relisted",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [],
    "name": "Saturated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint8",
        "name": "bucket",
        "type": "uint8"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "usdc",
        "type": "uint256"
      }
    ],
    "name": "Swept",
    "type": "event"
  },
  {
    "inputs": [],
    "name": "DEPLOYER",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "DIR",
    "outputs": [
      {
        "internalType": "int8",
        "name": "",
        "type": "int8"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "LAUNCH_NTICK",
    "outputs": [
      {
        "internalType": "int24",
        "name": "",
        "type": "int24"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "LAUNCH_SQRT_PRICE",
    "outputs": [
      {
        "internalType": "uint160",
        "name": "",
        "type": "uint160"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "MANAGER",
    "outputs": [
      {
        "internalType": "contract IPoolManager",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "TOKEN",
    "outputs": [
      {
        "internalType": "contract MarketMakerToken",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "TOKEN_C",
    "outputs": [
      {
        "internalType": "Currency",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "USDC_C",
    "outputs": [
      {
        "internalType": "Currency",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      },
      {
        "components": [
          {
            "internalType": "Currency",
            "name": "currency0",
            "type": "address"
          },
          {
            "internalType": "Currency",
            "name": "currency1",
            "type": "address"
          },
          {
            "internalType": "uint24",
            "name": "fee",
            "type": "uint24"
          },
          {
            "internalType": "int24",
            "name": "tickSpacing",
            "type": "int24"
          },
          {
            "internalType": "contract IHooks",
            "name": "hooks",
            "type": "address"
          }
        ],
        "internalType": "struct PoolKey",
        "name": "",
        "type": "tuple"
      },
      {
        "components": [
          {
            "internalType": "bool",
            "name": "zeroForOne",
            "type": "bool"
          },
          {
            "internalType": "int256",
            "name": "amountSpecified",
            "type": "int256"
          },
          {
            "internalType": "uint160",
            "name": "sqrtPriceLimitX96",
            "type": "uint160"
          }
        ],
        "internalType": "struct IPoolManager.SwapParams",
        "name": "params",
        "type": "tuple"
      },
      {
        "internalType": "BalanceDelta",
        "name": "delta",
        "type": "int256"
      },
      {
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }
    ],
    "name": "afterSwap",
    "outputs": [
      {
        "internalType": "bytes4",
        "name": "",
        "type": "bytes4"
      },
      {
        "internalType": "int128",
        "name": "",
        "type": "int128"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "armed",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "band",
    "outputs": [
      {
        "internalType": "int24",
        "name": "nLower",
        "type": "int24"
      },
      {
        "internalType": "int24",
        "name": "nUpper",
        "type": "int24"
      },
      {
        "internalType": "uint128",
        "name": "liquidity",
        "type": "uint128"
      },
      {
        "internalType": "int24",
        "name": "refAtPlacement",
        "type": "int24"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "bandBudget",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "",
        "type": "uint128"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "bandValue",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      },
      {
        "components": [
          {
            "internalType": "Currency",
            "name": "currency0",
            "type": "address"
          },
          {
            "internalType": "Currency",
            "name": "currency1",
            "type": "address"
          },
          {
            "internalType": "uint24",
            "name": "fee",
            "type": "uint24"
          },
          {
            "internalType": "int24",
            "name": "tickSpacing",
            "type": "int24"
          },
          {
            "internalType": "contract IHooks",
            "name": "hooks",
            "type": "address"
          }
        ],
        "internalType": "struct PoolKey",
        "name": "",
        "type": "tuple"
      },
      {
        "components": [
          {
            "internalType": "int24",
            "name": "tickLower",
            "type": "int24"
          },
          {
            "internalType": "int24",
            "name": "tickUpper",
            "type": "int24"
          },
          {
            "internalType": "int256",
            "name": "liquidityDelta",
            "type": "int256"
          },
          {
            "internalType": "bytes32",
            "name": "salt",
            "type": "bytes32"
          }
        ],
        "internalType": "struct IPoolManager.ModifyLiquidityParams",
        "name": "",
        "type": "tuple"
      },
      {
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }
    ],
    "name": "beforeAddLiquidity",
    "outputs": [
      {
        "internalType": "bytes4",
        "name": "",
        "type": "bytes4"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      },
      {
        "components": [
          {
            "internalType": "Currency",
            "name": "currency0",
            "type": "address"
          },
          {
            "internalType": "Currency",
            "name": "currency1",
            "type": "address"
          },
          {
            "internalType": "uint24",
            "name": "fee",
            "type": "uint24"
          },
          {
            "internalType": "int24",
            "name": "tickSpacing",
            "type": "int24"
          },
          {
            "internalType": "contract IHooks",
            "name": "hooks",
            "type": "address"
          }
        ],
        "internalType": "struct PoolKey",
        "name": "key",
        "type": "tuple"
      },
      {
        "internalType": "uint160",
        "name": "sqrtPriceX96",
        "type": "uint160"
      }
    ],
    "name": "beforeInitialize",
    "outputs": [
      {
        "internalType": "bytes4",
        "name": "",
        "type": "bytes4"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      },
      {
        "components": [
          {
            "internalType": "Currency",
            "name": "currency0",
            "type": "address"
          },
          {
            "internalType": "Currency",
            "name": "currency1",
            "type": "address"
          },
          {
            "internalType": "uint24",
            "name": "fee",
            "type": "uint24"
          },
          {
            "internalType": "int24",
            "name": "tickSpacing",
            "type": "int24"
          },
          {
            "internalType": "contract IHooks",
            "name": "hooks",
            "type": "address"
          }
        ],
        "internalType": "struct PoolKey",
        "name": "",
        "type": "tuple"
      },
      {
        "components": [
          {
            "internalType": "bool",
            "name": "zeroForOne",
            "type": "bool"
          },
          {
            "internalType": "int256",
            "name": "amountSpecified",
            "type": "int256"
          },
          {
            "internalType": "uint160",
            "name": "sqrtPriceLimitX96",
            "type": "uint160"
          }
        ],
        "internalType": "struct IPoolManager.SwapParams",
        "name": "params",
        "type": "tuple"
      },
      {
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }
    ],
    "name": "beforeSwap",
    "outputs": [
      {
        "internalType": "bytes4",
        "name": "",
        "type": "bytes4"
      },
      {
        "internalType": "BeforeSwapDelta",
        "name": "",
        "type": "int256"
      },
      {
        "internalType": "uint24",
        "name": "",
        "type": "uint24"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "buckets",
    "outputs": [
      {
        "internalType": "int24",
        "name": "nLower",
        "type": "int24"
      },
      {
        "internalType": "int24",
        "name": "nUpper",
        "type": "int24"
      },
      {
        "internalType": "uint128",
        "name": "liquidity",
        "type": "uint128"
      },
      {
        "internalType": "bool",
        "name": "swept",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "burnFloorSet",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "claimDeployerFees",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "deployerAccrued",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "",
        "type": "uint128"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "digesting",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "escrow",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "",
        "type": "uint128"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "genesis",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "genesisDone",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getHookPermissions",
    "outputs": [
      {
        "components": [
          {
            "internalType": "bool",
            "name": "beforeInitialize",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "afterInitialize",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "beforeAddLiquidity",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "afterAddLiquidity",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "beforeRemoveLiquidity",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "afterRemoveLiquidity",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "beforeSwap",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "afterSwap",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "beforeDonate",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "afterDonate",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "beforeSwapReturnDelta",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "afterSwapReturnDelta",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "afterAddLiquidityReturnDelta",
            "type": "bool"
          },
          {
            "internalType": "bool",
            "name": "afterRemoveLiquidityReturnDelta",
            "type": "bool"
          }
        ],
        "internalType": "struct Hooks.Permissions",
        "name": "",
        "type": "tuple"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "globalBurnFloor",
    "outputs": [
      {
        "internalType": "int24",
        "name": "",
        "type": "int24"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "ladderHash",
    "outputs": [
      {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "lifetimeCapture",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "",
        "type": "uint128"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "lotTail",
    "outputs": [
      {
        "internalType": "uint64",
        "name": "",
        "type": "uint64"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "lots",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "tokens",
        "type": "uint128"
      },
      {
        "internalType": "uint128",
        "name": "liquidity",
        "type": "uint128"
      },
      {
        "internalType": "int24",
        "name": "basisTick",
        "type": "int24"
      },
      {
        "internalType": "int24",
        "name": "nLower",
        "type": "int24"
      },
      {
        "internalType": "int24",
        "name": "refAtPlacement",
        "type": "int24"
      },
      {
        "internalType": "uint8",
        "name": "state",
        "type": "uint8"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "pendingTokenBurn",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "",
        "type": "uint128"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "poke",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "poolKey",
    "outputs": [
      {
        "components": [
          {
            "internalType": "Currency",
            "name": "currency0",
            "type": "address"
          },
          {
            "internalType": "Currency",
            "name": "currency1",
            "type": "address"
          },
          {
            "internalType": "uint24",
            "name": "fee",
            "type": "uint24"
          },
          {
            "internalType": "int24",
            "name": "tickSpacing",
            "type": "int24"
          },
          {
            "internalType": "contract IHooks",
            "name": "hooks",
            "type": "address"
          }
        ],
        "internalType": "struct PoolKey",
        "name": "",
        "type": "tuple"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "refTick",
    "outputs": [
      {
        "internalType": "int24",
        "name": "",
        "type": "int24"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "retraceHWM",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "",
        "type": "uint128"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "ringMax",
    "outputs": [
      {
        "internalType": "int24",
        "name": "",
        "type": "int24"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "sweepCursor",
    "outputs": [
      {
        "internalType": "uint16",
        "name": "",
        "type": "uint16"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "trancheBudget",
    "outputs": [
      {
        "internalType": "uint128",
        "name": "",
        "type": "uint128"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "i",
        "type": "uint256"
      }
    ],
    "name": "trancheValue",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "tranches",
    "outputs": [
      {
        "internalType": "int24",
        "name": "nLower",
        "type": "int24"
      },
      {
        "internalType": "int24",
        "name": "nUpper",
        "type": "int24"
      },
      {
        "internalType": "uint128",
        "name": "liquidity",
        "type": "uint128"
      },
      {
        "internalType": "int24",
        "name": "refAtPlacement",
        "type": "int24"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes",
        "name": "data",
        "type": "bytes"
      }
    ],
    "name": "unlockCallback",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]

Source code

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
import {TickMath} from "@uniswap/v4-core/src/libraries/TickMath.sol";
import {Currency} from "@uniswap/v4-core/src/types/Currency.sol";
import {LiquidityAmounts} from "v4-periphery/src/libraries/LiquidityAmounts.sol";
import {MarketMakerToken} from "./MarketMakerToken.sol";
import {Params} from "./base/Params.sol";
import {MarketMakerHookBase} from "./base/MarketMakerHookBase.sol";

/// @title MarketMakerHook — SEEDED launch variant.
/// @notice Genesis places a thin two-sided full-range base book (baseTokens + baseUsdc),
///         so there is a small bid at launch. See MarketMakerHookZeroSeed for the
///         no-quote-seeded variant. Everything else is identical (shared base).
contract MarketMakerHook is MarketMakerHookBase {
    constructor(
        IPoolManager manager,
        MarketMakerToken token,
        Currency usdc,
        address deployer,
        Params memory p
    ) MarketMakerHookBase(manager, token, usdc, deployer, p) {}

    /// @dev Two-sided full-range base position (tokens + quote) around launch.
    function _placeBase() internal override {
        int24 maxUsable = _maxUsableTick();
        int24 minUsable = -maxUsable;
        uint160 sp = LAUNCH_SQRT_PRICE; // pool is at launch price during genesis
        uint160 a = TickMath.getSqrtPriceAtTick(minUsable);
        uint160 b = TickMath.getSqrtPriceAtTick(maxUsable);
        (uint256 amt0, uint256 amt1) = DIR > 0
            ? (uint256(P.baseTokens), uint256(P.baseUsdc))
            : (uint256(P.baseUsdc), uint256(P.baseTokens));
        uint128 lBase = LiquidityAmounts.getLiquidityForAmounts(sp, a, b, amt0, amt1);
        _add(minUsable, maxUsable, lBase, _salt(ROLE_BASE, 0), true);
    }
}
Chain explorer4096msChain node81ms