Skip to content
Verified contractPartialUNLICENSED

Mandate

Address0x77a34cd9fb3347b4af9894e83bb395c36f2428c8
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.38

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.38+commit.1835d247
Language
solidity
Optimization
Yes, 1,000,000 runs
EVM version
cancun
License
UNLICENSED
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,484,922
Creation transaction
0xc7c54d1238…4cbbba681f
Libraries
src/libraries/Money.sol:Money0x2d60…6d5ce1src/libraries/Waits.sol:Waits0xc87e…116477src/libraries/Orders.sol:Orders0x841e…0f9a33src/libraries/Opening.sol:Opening0xe0a7…2a35c8src/libraries/Curation.sol:Curation0x2d1d…424f27src/libraries/Swapping.sol:Swapping0xe780…9c8e9d

76 files

The source code is large: one file is shown at a time. Choose a file in the list.

src/Mandate.sol

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.38;

import {BaseHook} from "@uniswap/v4-periphery/src/utils/BaseHook.sol";
import {Hooks} from "@uniswap/v4-core/src/libraries/Hooks.sol";
import {IHooks} from "@uniswap/v4-core/src/interfaces/IHooks.sol";
import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
import {BalanceDelta} from "@uniswap/v4-core/src/types/BalanceDelta.sol";
import {BeforeSwapDelta, BeforeSwapDeltaLibrary} from "@uniswap/v4-core/src/types/BeforeSwapDelta.sol";
import {ModifyLiquidityParams, SwapParams} from "@uniswap/v4-core/src/types/PoolOperation.sol";
import {PoolId} from "@uniswap/v4-core/src/types/PoolId.sol";
import {IMandate} from "./interfaces/IMandate.sol";
import {ISources} from "./interfaces/IReferencePrice.sol";
import {Store} from "./libraries/Store.sol";
import {Opening} from "./libraries/Opening.sol";
import {Money} from "./libraries/Money.sol";
import {Curation} from "./libraries/Curation.sol";
import {Swapping} from "./libraries/Swapping.sol";
import {Orders} from "./libraries/Orders.sol";
import {Waits} from "./libraries/Waits.sol";
import {Ledger} from "./libraries/Ledger.sol";
import {Standing} from "./libraries/Standing.sol";
import {Plugins} from "./libraries/Plugins.sol";

/// @title Mandate
/// @notice One Uniswap v4 hook for curated pools. The hook is thin: it answers the PoolManager's
///         callbacks and routes every rule to a library. It has no owner, no pause and no upgrade.
/// @dev The address bits are 0x28C8 (the written design plan, section 12):
///      beforeInitialize 0x2000 + beforeAddLiquidity 0x800 + beforeSwap 0x80 + afterSwap 0x40 +
///      beforeSwapReturnDelta 0x8. There is no remove-liquidity bit: nothing stands in the way of an exit.
contract Mandate is BaseHook, IMandate {
    /// @notice The add-only list of price sources a pool may name. Fixed when the hook is deployed.
    ISources public immutable sources;

    constructor(IPoolManager manager, ISources sources_) BaseHook(manager) {
        sources = sources_;
    }

    /// @dev One action of the hook at a time. Why: a token that calls back during a JOIN or an exit must
    ///      not move shares or read a value while the books are half written.
    modifier guarded() {
        assembly ("memory-safe") {
            if tload(0) {
                mstore(0, 0x0f2e5b6c) // Locked()
                revert(0x1c, 0x04)
            }
            tstore(0, 1)
        }
        _;
        assembly ("memory-safe") {
            tstore(0, 0)
        }
    }

    /// @dev Native ETH: the verb may spend only the ETH this call sent. Before: the hook's balance less
    ///      msg.value; after: refuse if the balance fell below it, and send the caller the rest by `call`.
    modifier refunds() {
        uint256 floor = address(this).balance - msg.value;
        _;
        uint256 left = address(this).balance;
        if (left < floor) revert IMandate.ShortPayment();
        if (left > floor) {
            (bool ok,) = msg.sender.call{value: left - floor}("");
            if (!ok) revert IMandate.RefundFailed();
        }
    }

    // ---- the verbs (each one line: the rule lives in a library) ----

    /// @notice OPEN: the curator opens a pool at Chainlink's price. The settings never change.
    /// @param width the width of the first range, in ticks
    function open(PoolKey calldata key, Store.Settings calldata settings, int24 width)
        external
        guarded
        returns (PoolId)
    {
        return Opening.open(poolManager, sources, key, settings, width);
    }

    /// @notice OPEN with lists: a curator-fee split and/or a swap-fee share. The lists never change.
    function openWith(PoolKey calldata key, Store.Settings calldata settings, int24 width, Store.Lists calldata lists)
        external
        guarded
        returns (PoolId)
    {
        return Opening.openWith(poolManager, sources, key, settings, width, lists);
    }

    /// @notice JOIN: pay for `shares` of a pool; at most `max0` and `max1` are taken from the caller.
    /// @param to the account that will hold the shares
    function join(PoolKey calldata key, uint256 shares, uint256 max0, uint256 max1, address to, uint256 deadline)
        external
        payable
        guarded
        refunds
        returns (uint256 paid0, uint256 paid1)
    {
        return Money.join(poolManager, key, shares, max0, max1, to, deadline);
    }

    /// @notice The exit (LEAVE): burn the caller's `shares`, pay their slice in kind to `to`.
    ///         No gate, no pause, no fee and no price is needed, in any state of the pool.
    function exit(PoolKey calldata key, uint256 shares, uint256 min0, uint256 min1, address to, uint256 deadline)
        external
        guarded
        returns (uint256 out0, uint256 out1)
    {
        return Money.exit(poolManager, key, shares, min0, min1, to, deadline);
    }

    /// @notice SWITCH: leave one pool and join another of the same pair in one call. The exit must give at least
    ///         `min0` and `min1`; what the new pool does not take comes back to the caller.
    function switchPool(
        PoolKey calldata from,
        PoolKey calldata to,
        uint256 sharesOut,
        uint256 sharesIn,
        uint256 min0,
        uint256 min1,
        uint256 deadline
    ) external guarded returns (uint256 back0, uint256 back1) {
        return Money.switchPool(poolManager, from, to, sharesOut, sharesIn, min0, min1, deadline);
    }

    /// @notice STEER by a signed range (EIP-712, used once): sent by the `sender` the curator signed in, or by
    ///         anyone when the curator signed address zero.
    function steer(
        PoolKey calldata key,
        int24 lower,
        int24 upper,
        address sender,
        uint256 deadline,
        bytes calldata signature
    ) external guarded {
        Curation.steer(poolManager, key, lower, upper, sender, deadline, signature);
    }

    /// @notice ADMIT: records an account a LIST pool's Merkle root proves; anyone may send the proof.
    function admit(PoolKey calldata key, address account, bytes32[] calldata proof) external guarded {
        Opening.admit(key, account, proof);
    }

    /// @notice RUN a provider's signed standing order: anyone may, once Chainlink's price crosses its trigger.
    ///         The caller is paid the order's tip (at most 0.2% of what it withdraws); the owner gets the rest.
    function runOrder(Standing.Order calldata order, bytes calldata signature)
        external
        guarded
        returns (uint256 out0, uint256 out1)
    {
        return Money.runOrder(poolManager, order, signature);
    }

    /// @notice CANCEL every standing order the caller has signed (their epoch goes up by one).
    function cancelOrders() external guarded {
        Standing.cancelAll(msg.sender);
    }

    /// @notice The epoch an owner's next standing order must carry.
    function orderEpochOf(address owner) external view returns (uint64) {
        return Store.store().standingEpoch[owner];
    }

    /// @notice The digest an owner signs for `order` (EIP-712, this hook's domain).
    function orderDigest(Standing.Order calldata order) external view returns (bytes32) {
        return Standing.digest(address(this), order);
    }

    /// @notice CLAIM SHARE: take what the pool's swap-fee share has credited the caller.
    function claimShare(PoolKey calldata key) external guarded returns (uint256 amount0, uint256 amount1) {
        return Curation.claimShare(poolManager, key);
    }

    /// @notice PLACE a limit order: `liquidity` one tick-spacing wide at `tick`, on the far side of the price.
    function place(PoolKey calldata key, int24 tick, bool zeroForOne, uint128 liquidity)
        external
        payable
        guarded
        refunds
    {
        Orders.place(poolManager, key, tick, zeroForOne, liquidity, msg.sender);
    }

    /// @notice PLACE a limit order that belongs to `owner`, paid for by the caller: only the owner can cancel it, and
    ///         its fees and proceeds are paid to the owner alone.
    function placeFor(PoolKey calldata key, int24 tick, bool zeroForOne, uint128 liquidity, address owner)
        external
        payable
        guarded
        refunds
    {
        Orders.place(poolManager, key, tick, zeroForOne, liquidity, owner);
    }

    /// @notice CANCEL the caller's order before it is filled.
    function cancel(PoolKey calldata key, int24 tick, bool zeroForOne) external guarded {
        Orders.cancel(poolManager, key, tick, zeroForOne);
    }

    /// @notice TAKE the proceeds of the caller's filled order (`epoch` is in its OrderPlaced event).
    function take(PoolKey calldata key, int24 tick, bool zeroForOne, uint256 epoch) external guarded {
        Orders.take(poolManager, key, tick, zeroForOne, epoch, msg.sender);
    }

    /// @notice TAKE the proceeds of `owner`'s filled order for them: anyone may call, the owner is paid.
    function takeFor(PoolKey calldata key, int24 tick, bool zeroForOne, uint256 epoch, address owner) external guarded {
        Orders.take(poolManager, key, tick, zeroForOne, epoch, owner);
    }

    /// @notice WAIT: park a token to be filled by swaps the other way at Chainlink's price, only while that price is no
    ///         worse than `limit` (sqrtPriceX96; selling token0: at or above it, selling token1: at or below it; 0: no
    ///         limit) and only until `expiry` (0: until taken back; a wait with a limit must name one within 30 days).
    function park(PoolKey calldata key, bool zeroForOne, uint128 amountIn, uint160 limit, uint40 expiry)
        external
        payable
        guarded
        refunds
        returns (uint256 number)
    {
        return Waits.park(poolManager, key, zeroForOne, amountIn, limit, expiry);
    }

    /// @notice TAKE BACK what is left of the caller's wait and what its fills gave.
    function takeBack(PoolKey calldata key, uint256 number) external guarded {
        Waits.takeBack(poolManager, key, number);
    }

    /// @notice SETTLE UP: clawback, vest, fee. Anyone may call it; it needs a live Chainlink price.
    function settle(PoolKey calldata key) external guarded {
        Curation.settleUp(poolManager, key);
    }

    /// @notice The PoolManager's one door: every money move of a verb happens inside this callback.
    function unlockCallback(bytes calldata data) external onlyPoolManager returns (bytes memory) {
        return Money.onUnlock(poolManager, data);
    }

    // ---- TRANSFER: the share ledger (ERC-6909 shapes; a pool's share id is its pool id) ----

    function transfer(address to, uint256 id, uint256 amount) external guarded returns (bool) {
        Ledger.transfer(msg.sender, to, id, amount);
        Plugins.tell(PoolId.wrap(bytes32(id)), Plugins.MOVED, msg.sender, to, amount);
        return true;
    }

    function transferFrom(address from, address to, uint256 id, uint256 amount) external guarded returns (bool) {
        Ledger.transferFrom(msg.sender, from, to, id, amount);
        Plugins.tell(PoolId.wrap(bytes32(id)), Plugins.MOVED, from, to, amount);
        return true;
    }

    function approve(address spender, uint256 id, uint256 amount) external guarded returns (bool) {
        Ledger.approve(msg.sender, spender, id, amount);
        return true;
    }

    function setOperator(address operator, bool approved) external guarded returns (bool) {
        Ledger.setOperator(msg.sender, operator, approved);
        return true;
    }

    // ---- views ----

    /// @notice A pool's value ratio at Chainlink's price (1e18 = what doing nothing would hold).
    /// @dev Refuses while an action of the hook is running, so nobody can read half-written books.
    function ratioOf(PoolKey calldata key) external view returns (bool live, uint256 ratio) {
        bool busy;
        assembly ("memory-safe") {
            busy := tload(0)
        }
        if (busy) revert Locked();
        return Curation.ratioOf(poolManager, key);
    }

    function balanceOf(address owner, uint256 id) external view returns (uint256) {
        return Store.store().balanceOf[owner][id];
    }

    function totalSupply(uint256 id) external view returns (uint256) {
        return Store.store().totalSupply[id];
    }

    function allowance(address owner, address spender, uint256 id) external view returns (uint256) {
        return Store.store().allowance[owner][spender][id];
    }

    function isOperator(address owner, address operator) external view returns (bool) {
        return Store.store().isOperator[owner][operator];
    }

    function settingsOf(PoolId id) external view returns (Store.Settings memory) {
        return Store.store().settings[id];
    }

    function splitOf(PoolId id) external view returns (Store.Split memory) {
        return Store.store().splits[id];
    }

    /// @notice A pool's swap-fee share list.
    function shareOf(PoolId id) external view returns (Store.Split memory) {
        return Store.store().shares[id];
    }

    /// @notice What the pool's swap-fee share owes `recipient`, in each currency.
    function owedOf(PoolId id, address recipient) external view returns (uint256 amount0, uint256 amount1) {
        Store.Owed storage o = Store.store().owed[id][recipient];
        return (o.amount0, o.amount1);
    }

    /// @notice Whether a LIST pool has admitted this account.
    function admittedOf(PoolId id, address account) external view returns (bool) {
        return Store.store().admitted[id][account];
    }

    function bookOf(PoolId id) external view returns (Store.Book memory) {
        return Store.store().book[id];
    }

    /// @notice The callbacks this hook implements. The constructor refuses an address whose bits differ.
    function getHookPermissions() public pure override returns (Hooks.Permissions memory) {
        return Hooks.Permissions({
            beforeInitialize: true,
            afterInitialize: false,
            beforeAddLiquidity: true,
            afterAddLiquidity: false,
            beforeRemoveLiquidity: false,
            afterRemoveLiquidity: false,
            beforeSwap: true,
            afterSwap: true,
            beforeDonate: false,
            afterDonate: false,
            beforeSwapReturnDelta: true,
            afterSwapReturnDelta: false,
            afterAddLiquidityReturnDelta: false,
            afterRemoveLiquidityReturnDelta: false
        });
    }

    /// @dev Refuses every caller. v4 does not call a hook's own callbacks (Hooks.noSelfCall), so when OPEN
    ///      starts a pool this is never asked: the refusal is what makes every pool start through OPEN.
    function _beforeInitialize(address, PoolKey calldata, uint160) internal pure override returns (bytes4) {
        revert NotThroughOpen();
    }

    /// @dev Liquidity added by anyone but the hook (v4 skips the hook's own): a gated pool and a close-only pool
    ///      refuse it (OutsideLiquidity), so JOIN is their only door; any other pool accepts it.
    function _beforeAddLiquidity(address, PoolKey calldata key, ModifyLiquidityParams calldata, bytes calldata)
        internal
        view
        override
        returns (bytes4)
    {
        Opening.outside(key);
        return IHooks.beforeAddLiquidity.selector;
    }

    /// @dev Re-centres by the rule on the first swap of a block, and for a changing-fee pool returns this
    ///      swap's fee as v4's LP-fee override. Waiting swaps the other way fill an exact-input swap first: that
    ///      is the returned delta. A swap is refused only while a hook action is under way.
    function _beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata)
        internal
        override
        returns (bytes4, BeforeSwapDelta, uint24)
    {
        // Static analysis 11-20: a swap that arrives while a hook action is under way (a pool's token calling the
        // PoolManager the hook unlocked, from inside a transfer) is refused, so no re-centre, wait match or order
        // fill ever runs in the middle of an action. The hook itself never swaps inside its own actions.
        assembly ("memory-safe") {
            if tload(0) {
                mstore(0, 0x0f2e5b6c) // Locked()
                revert(0x1c, 0x04)
            }
        }
        (BeforeSwapDelta delta, uint24 feeOverride) = Swapping.beforeSwap(poolManager, key, sender, params);
        return (IHooks.beforeSwap.selector, delta, feeOverride);
    }

    /// @dev Fills the limit orders the swap crossed. Never refuses a swap; nothing is charged after it.
    function _afterSwap(
        address sender,
        PoolKey calldata key,
        SwapParams calldata,
        BalanceDelta delta,
        bytes calldata hookData
    ) internal override returns (bytes4, int128) {
        Swapping.afterSwap(poolManager, key, sender, delta, hookData);
        return (IHooks.afterSwap.selector, 0);
    }
}
Compiler settingsShow
{
  "viaIR": false,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "none",
    "useLiteralContent": false
  },
  "libraries": {
    "src/libraries/Money.sol": {
      "Money": "0x2D60dbfB22835f61099A98Bef673221D546d5Ce1"
    },
    "src/libraries/Waits.sol": {
      "Waits": "0xC87eb1951a2902f7c4ffA8C6DA9FF89998116477"
    },
    "src/libraries/Orders.sol": {
      "Orders": "0x841e240463238662534DA0C280873fF3610f9a33"
    },
    "src/libraries/Opening.sol": {
      "Opening": "0xe0a7ca57c90D541d35E6AcC0Da68e1E9602A35C8"
    },
    "src/libraries/Curation.sol": {
      "Curation": "0x2D1d0C39Cbb0cCCb08E66E869a84Be1338424F27"
    },
    "src/libraries/Swapping.sol": {
      "Swapping": "0xE780F756834F4c167245885F0dbF9134f99C8E9D"
    }
  },
  "optimizer": {
    "runs": 1000000,
    "enabled": true
  },
  "viaSSACFG": false,
  "evmVersion": "cancun",
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "hookmate/=lib/hookmate/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@uniswap/v4-core/=lib/uniswap-hooks/lib/v4-core/",
    "@uniswap/v4-periphery/=lib/uniswap-hooks/lib/v4-periphery/",
    "solmate/=lib/uniswap-hooks/lib/v4-core/lib/solmate/",
    "@chainlink/contracts-ccip/contracts/=lib/chainlink-ccip/chains/evm/contracts/",
    "@chainlink/contracts/=lib/chainlink-evm/contracts/",
    "@openzeppelin/[email protected]/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/[email protected]/=lib/openzeppelin-contracts/contracts/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/forge-gas-snapshot/lib/forge-std/:ds-test/=lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/forge-gas-snapshot/lib/forge-std/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/forge-gas-snapshot/lib/forge-std/:ds-test/=lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/forge-gas-snapshot/lib/forge-std/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/:ds-test/=lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/:ds-test/=lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/:ds-test/=lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/:ds-test/=lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/forge-std/:ds-test/=lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/forge-std/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/forge-std/:ds-test/=lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/forge-std/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/solmate/:ds-test/=lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/solmate/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/solmate/:ds-test/=lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/solmate/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/:erc4626-tests/=lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/:erc4626-tests/=lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/solmate/:ds-test/=lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/solmate/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/solmate/:ds-test/=lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/solmate/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/:erc4626-tests/=lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/:erc4626-tests/=lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/uniswap-hooks/lib/v4-core/lib/solmate/:ds-test/=lib/uniswap-hooks/lib/v4-core/lib/solmate/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-core/lib/solmate/:ds-test/=lib/uniswap-hooks/lib/v4-core/lib/solmate/lib/ds-test/src/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/permit2/:openzeppelin-contracts/=lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/openzeppelin-contracts/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/permit2/:openzeppelin-contracts/=lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/openzeppelin-contracts/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/:openzeppelin-contracts/=lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
    "lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/:openzeppelin-contracts/=lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
    "lib/uniswap-hooks/lib/v4-core/:openzeppelin-contracts/=lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/",
    "lib/uniswap-hooks/lib/v4-core/:openzeppelin-contracts/=lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/",
    "lib/uniswap-hooks/lib/v4-periphery/:v4-core/=lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/src/",
    "lib/uniswap-hooks/lib/v4-periphery/:v4-core/=lib/uniswap-hooks/lib/v4-periphery/lib/v4-core/src/",
    "lib/uniswap-hooks/:v4-core/=lib/uniswap-hooks/lib/v4-core/src/",
    "lib/uniswap-hooks/:v4-core/=lib/uniswap-hooks/lib/v4-core/src/",
    "@ensdomains/=lib/uniswap-hooks/lib/v4-core/node_modules/@ensdomains/",
    "@openzeppelin/=lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/",
    "chainlink-ccip/=lib/chainlink-ccip/",
    "chainlink-evm/=lib/chainlink-evm/contracts/",
    "ds-test/=lib/uniswap-hooks/lib/v4-core/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/uniswap-hooks/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-gas-snapshot/=lib/uniswap-hooks/lib/v4-periphery/lib/permit2/lib/forge-gas-snapshot/src/",
    "hardhat/=lib/uniswap-hooks/lib/v4-core/node_modules/hardhat/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "permit2/=lib/uniswap-hooks/lib/v4-periphery/lib/permit2/",
    "uniswap-hooks/=lib/uniswap-hooks/src/",
    "v4-core/=lib/uniswap-hooks/lib/v4-core/src/",
    "v4-periphery/=lib/uniswap-hooks/lib/v4-periphery/"
  ],
  "experimental": false
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.