ETH Price: $1,820.70 (-4.86%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

Transaction Hash
Method
Block
From
To
Claim Creator Fe...239630352025-12-07 19:26:2378 days ago1765135583IN
0x48033c4a...68fb54229
0 ETH0.000029020.35959565
Collect Fees239630292025-12-07 19:25:1178 days ago1765135511IN
0x48033c4a...68fb54229
0 ETH0.000069140.39454305
Claim Creator Fe...238701102025-11-24 17:10:4791 days ago1764004247IN
0x48033c4a...68fb54229
0 ETH0.000027180.33686859
Collect Fees238701092025-11-24 17:10:3591 days ago1764004235IN
0x48033c4a...68fb54229
0 ETH0.000052950.30214529
Claim Creator Fe...236817612025-10-29 8:07:59118 days ago1761725279IN
0x48033c4a...68fb54229
0 ETH0.000011780.14602649
Collect Fees236817602025-10-29 8:07:47118 days ago1761725267IN
0x48033c4a...68fb54229
0 ETH0.000036080.1383908
Claim Creator Fe...236334162025-10-22 13:38:59124 days ago1761140339IN
0x48033c4a...68fb54229
0 ETH0.000021840.2706717
Collect Fees236334152025-10-22 13:38:47124 days ago1761140327IN
0x48033c4a...68fb54229
0 ETH0.000046290.26417233
Claim Creator Fe...236332382025-10-22 13:03:11124 days ago1761138191IN
0x48033c4a...68fb54229
0 ETH0.000015240.1888443
Collect Fees236332382025-10-22 13:03:11124 days ago1761138191IN
0x48033c4a...68fb54229
0 ETH0.000033090.1888443
Claim Creator Fe...236204002025-10-20 17:48:59126 days ago1760982539IN
0x48033c4a...68fb54229
0 ETH0.0000110.13632274
Collect Fees236204002025-10-20 17:48:59126 days ago1760982539IN
0x48033c4a...68fb54229
0 ETH0.000014710.13632274
Collect Fees236184602025-10-20 11:16:59126 days ago1760959019IN
0x48033c4a...68fb54229
0 ETH0.000019310.17892415
Collect Fees236184092025-10-20 11:06:47126 days ago1760958407IN
0x48033c4a...68fb54229
0 ETH0.000021260.19699175
Collect Fees236183562025-10-20 10:55:47126 days ago1760957747IN
0x48033c4a...68fb54229
0 ETH0.000044240.25249458
Claim Creator Fe...236182082025-10-20 10:25:23127 days ago1760955923IN
0x48033c4a...68fb54229
0 ETH0.000023110.28645265
Collect Fees236182082025-10-20 10:25:23127 days ago1760955923IN
0x48033c4a...68fb54229
0 ETH0.00005020.28645265
Claim Creator Fe...235911972025-10-16 15:45:11130 days ago1760629511IN
0x48033c4a...68fb54229
0 ETH0.000124971.54859277
Collect Fees235911972025-10-16 15:45:11130 days ago1760629511IN
0x48033c4a...68fb54229
0 ETH0.000271391.54859277
Launch Rainbow S...235436842025-10-10 0:13:47137 days ago1760055227IN
0x48033c4a...68fb54229
0.01 ETH0.001026140.14956635
Claim Creator Fe...235003092025-10-03 22:42:35143 days ago1759531355IN
0x48033c4a...68fb54229
0 ETH0.000014270.17694308
Collect Fees235003082025-10-03 22:42:23143 days ago1759531343IN
0x48033c4a...68fb54229
0 ETH0.000046830.17962998
Launch Rainbow S...234594692025-09-28 5:39:23149 days ago1759037963IN
0x48033c4a...68fb54229
0.0001 ETH0.000880630.13229851
Launch Rainbow S...234584132025-09-28 2:07:23149 days ago1759025243IN
0x48033c4a...68fb54229
0.00015 ETH0.000922030.13854049
Launch Rainbow S...234429042025-09-25 22:03:11151 days ago1758837791IN
0x48033c4a...68fb54229
0 ETH0.002879770.43627381
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x60e06040235436842025-10-10 0:13:47137 days ago1760055227
0x48033c4a...68fb54229
 Contract Creation0 ETH
Deposit235436842025-10-10 0:13:47137 days ago1760055227
0x48033c4a...68fb54229
0.01 ETH
0x60e06040234594692025-09-28 5:39:23149 days ago1759037963
0x48033c4a...68fb54229
 Contract Creation0 ETH
Deposit234594692025-09-28 5:39:23149 days ago1759037963
0x48033c4a...68fb54229
0.0001 ETH
0x60e06040234584132025-09-28 2:07:23149 days ago1759025243
0x48033c4a...68fb54229
 Contract Creation0 ETH
Deposit234584132025-09-28 2:07:23149 days ago1759025243
0x48033c4a...68fb54229
0.00015 ETH
0x60e06040234429042025-09-25 22:03:11151 days ago1758837791
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040234364892025-09-25 0:30:59152 days ago1758760259
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040234364122025-09-25 0:15:35152 days ago1758759335
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040234362262025-09-24 23:38:11152 days ago1758757091
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040234296582025-09-24 1:37:23153 days ago1758677843
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040234272742025-09-23 17:38:11153 days ago1758649091
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040234247162025-09-23 9:04:35154 days ago1758618275
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040233966232025-09-19 10:47:35157 days ago1758278855
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040233934042025-09-19 0:00:59158 days ago1758240059
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040233801872025-09-17 3:43:23160 days ago1758080603
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040233556092025-09-13 17:21:47163 days ago1757784107
0x48033c4a...68fb54229
 Contract Creation0 ETH
Deposit233556092025-09-13 17:21:47163 days ago1757784107
0x48033c4a...68fb54229
0.00345 ETH
0x60e06040233339312025-09-10 16:41:47166 days ago1757522507
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040233277612025-09-09 19:54:23167 days ago1757447663
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040233208162025-09-08 20:40:11168 days ago1757364011
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040233171172025-09-08 8:15:35169 days ago1757319335
0x48033c4a...68fb54229
 Contract Creation0 ETH
Deposit233171172025-09-08 8:15:35169 days ago1757319335
0x48033c4a...68fb54229
0.0001 ETH
0x60e06040233125992025-09-07 17:06:11169 days ago1757264771
0x48033c4a...68fb54229
 Contract Creation0 ETH
0x60e06040232771532025-09-02 18:16:47174 days ago1756837007
0x48033c4a...68fb54229
 Contract Creation0 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RainbowSuperTokenFactory

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 1000 runs

Other Settings:
london EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { Owned } from "lib/solmate/src/auth/Owned.sol";
import { ERC721TokenReceiver } from "solmate/tokens/ERC721.sol";
import { ERC20 } from "lib/solmate/src/tokens/ERC20.sol";
import { SafeTransferLib } from "lib/solmate/src/utils/SafeTransferLib.sol";

import { RainbowSuperToken } from "src/RainbowSuperToken.sol";

import { TickMath } from "vendor/v3-core/libraries/TickMath.sol";
import { FixedPointMathLib } from "lib/solmate/src/utils/FixedPointMathLib.sol";

import { ISwapRouter02 } from "vendor/swap-router/interfaces/ISwapRouter02.sol";

import { IWETH9 } from "vendor/v3-periphery/interfaces/external/IWETH9.sol";
import { IUniswapV3Pool } from "vendor/v3-core/interfaces/IUniswapV3Pool.sol";
import { IUniswapV3Factory } from "vendor/v3-core/interfaces/IUniswapV3Factory.sol";
import { INonfungiblePositionManager } from "vendor/v3-periphery/interfaces/INonfungiblePositionManager.sol";

/// @title RainbowSuperTokenFactory
/// @author CopyPaste - for Rainbow with love <3
/// @notice A factory contract for creating RainbowSuperTokens and managing their liquidity positions.
/// @notice Protocol fees are allocated to be sent 🌈 Over the Rainbow 🌈
contract RainbowSuperTokenFactory is Owned, ERC721TokenReceiver {
    using TickMath for int24;
    using SafeTransferLib for ERC20;
    using FixedPointMathLib for uint256;

    /*//////////////////////////////////////////////////////////////
                                 ERRORS
    //////////////////////////////////////////////////////////////*/

    error ReservedName();
    error ReservedTicker();
    error ZeroSupply();
    error BannedName();
    error BannedTicker();
    error NotUniswapPositionManager();
    error InvalidFeeSplit();
    error InvalidSupplyAllocation();
    error NoFeesToClaim();
    error Unauthorized();
    error IncorrectSalt();
    error InsufficientFunds();
    error InvalidToken();

    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    /// @param pot The address of the new Over the Rainbow Pot
    event NewPot(address indexed pot);

    /// @param recipient The address of the recipient
    /// @param token The token address to claim initial fees for
    /// @param amount The amount of tokens claimed
    event OverTheRainbowClaimed(address indexed recipient, address indexed token, uint256 amount);

    /// @param token The address of the newly created token
    /// @param owner The address of the creator of the token
    /// @param creator The address of the creator of the token
    event RainbowSuperTokenCreated(address indexed token, address indexed owner, address indexed creator, string uri);

    /// @param token The address of the token
    /// @param config The new fee configuration
    event FeeConfigUpdated(address indexed token, FeeConfig config);

    /// @param tokenId The ID of the NFT Position
    /// @param creatorFee0 The amount of token0 fees for the creator
    /// @param creatorFee1 The amount of token1 fees for the creator
    /// @param protocolFee0 The amount of token0 fees for the protocol
    /// @param protocolFee1 The amount of token1 fees for the protocol
    event FeesCollected(uint256 indexed tokenId, uint256 creatorFee0, uint256 creatorFee1, uint256 protocolFee0, uint256 protocolFee1);

    /// @param recipient The address of the recipient
    /// @param tokenId The ID of the NFT Position
    /// @param amount0 The amount of token0 fees claimed
    /// @param amount1 The amount of token1 fees claimed
    event FeesClaimed(address indexed recipient, uint256 indexed tokenId, uint256 amount0, uint256 amount1);

    /// @param token The address of the new default pair token
    event NewDefaultPairToken(address indexed token);

    /*//////////////////////////////////////////////////////////////
                              FEE CONFIG
    //////////////////////////////////////////////////////////////*/

    struct FeeConfig {
        // Creator's share of LP fees (in basis points, max 10000)
        uint16 creatorLPFeeBps;
        // Protocol's base fee from initial supply (in basis points)
        uint16 protocolBaseBps;
        // Creator's fee from initial supply (in basis points)
        uint16 creatorBaseBps;
        // Airdrop allocation from initial supply (in basis points)
        uint16 airdropBps;
        // Whether this token has airdrop enabled
        bool hasAirdrop;
        // Fee Token
        address feeToken;
        // Creator address for this token
        address creator;
    }

    struct UnclaimedFees {
        uint128 unclaimed0;
        uint128 unclaimed1;
    }

    /*//////////////////////////////////////////////////////////////
                                STORAGE
    //////////////////////////////////////////////////////////////*/

    /// @dev The canonical Uniswap V3 factory contract
    IUniswapV3Factory public immutable uniswapV3Factory;

    /// @dev The canonical WETH token contract
    IWETH9 public immutable WETH;

    /// @dev The default pair token
    ERC20 public defaultPairToken;

    /// @dev The Nonfungible Position Manager contract
    INonfungiblePositionManager public immutable nonfungiblePositionManager;

    /// @dev The Uniswap V3 SwapRouter contract
    ISwapRouter02 public immutable swapRouter;

    /// @dev The base URI for all tokens
    string public baseTokenURI;

    /// @dev The mapping of banned names
    mapping(string => bool) public bannedNames;

    /// @dev The mapping of banned tickers
    mapping(string => bool) public bannedTickers;

    /// @dev The mapping from token address to its fee configuration
    mapping(address => FeeConfig) public tokenFeeConfig;

    /// @dev The mapping from token address to its liquidity position ID
    mapping(address => uint256) public tokenPositionIds;

    /// @dev The mapping from tokenId to creator's unclaimed fees
    mapping(uint256 => UnclaimedFees) public creatorUnclaimedFees;

    /// @dev The mapping from tokenId to protocol's unclaimed fees
    mapping(uint256 => UnclaimedFees) public protocolUnclaimedFees;

    /// @dev 🌈
    address public overTheRainbowPot;

    /// @dev The Uniswap V3 Pool fee
    uint24 public POOL_FEE = 10_000;

    /// @dev The Uniswap V3 Tick spacing
    int24 public TICK_SPACING = 200;

    /// @dev Default fee configuration
    FeeConfig public defaultFeeConfig = FeeConfig({
        creatorLPFeeBps: 5000, // 50% of LP fees to creator (50% implicit Protocol LP fee)
        protocolBaseBps: 500, // 5.00% to protocol if no airdrop
        creatorBaseBps: 50, // 0.50% to creator with airdrop
        airdropBps: 50, // 0.50% to airdrop
        hasAirdrop: false,
        feeToken: address(WETH),
        creator: address(0)
    });

    bytes32 public constant RainbowSuperTokenContractCodeHash = keccak256(type(RainbowSuperToken).creationCode);

    /*//////////////////////////////////////////////////////////////
                              CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    /// @param _uniswapV3Factory The address of the Uniswap V3 factory contract
    /// @param _nonfungiblePositionManager The address of the Uniswap V3 Nonfungible Position Manager contract
    /// @param _swapRouter The address of the Uniswap V3 SwapRouter contract
    /// @param _weth The address of the WETH contract
    /// @param _baseTokenURI The base URI for all tokens
    constructor(
        address _uniswapV3Factory,
        address _overTheRainbow,
        address _nonfungiblePositionManager,
        address _swapRouter,
        address _weth,
        string memory _baseTokenURI
    )
        Owned(msg.sender)
    {
        WETH = IWETH9(payable(_weth));
        swapRouter = ISwapRouter02(_swapRouter);
        uniswapV3Factory = IUniswapV3Factory(_uniswapV3Factory);
        nonfungiblePositionManager = INonfungiblePositionManager(_nonfungiblePositionManager);
        baseTokenURI = _baseTokenURI;
        overTheRainbowPot = _overTheRainbow;

        WETH.approve(_swapRouter, type(uint256).max);
        defaultPairToken = ERC20(_weth);
    }

    /*//////////////////////////////////////////////////////////////
                             ADMIN CONTROLS
    //////////////////////////////////////////////////////////////*/

    /// @notice Set the new base token URI
    function setBaseTokenURI(string memory newBaseTokenURI) external onlyOwner {
        baseTokenURI = newBaseTokenURI;
    }

    /// @notice Set the new default pair token for all pairs
    /// @notice Only applies to new tokens
    /// @param newPairToken The new pair token to set
    function setNewPairToken(ERC20 newPairToken) public onlyOwner {
        defaultPairToken = newPairToken;
        defaultPairToken.approve(address(swapRouter), type(uint256).max);

        emit NewDefaultPairToken(address(newPairToken));
    }

    /// @notice Sets a new default fee configuration for all tokens made
    /// @param newConfig The new fee configuration to set
    function setDefaultFeeConfig(FeeConfig calldata newConfig) external onlyOwner {
        if (newConfig.creatorLPFeeBps > 10_000) revert InvalidFeeSplit();
        if (newConfig.protocolBaseBps + newConfig.creatorBaseBps + newConfig.airdropBps > 10_000) {
            revert InvalidSupplyAllocation();
        }
        defaultFeeConfig = newConfig;

        // We use address(0) as a default stand in
        emit FeeConfigUpdated(address(0), newConfig);

        if (newConfig.feeToken != address(defaultPairToken)) {
            setNewPairToken(ERC20(newConfig.feeToken));
        }
    }

    /// @notice Ban a name from being used
    /// @param name The name to ban
    /// @param status The status to set
    function banName(string memory name, bool status) external onlyOwner {
        bannedNames[name] = status;
    }

    /// @notice Ban a ticker from being used
    /// @param ticker The ticker to ban
    /// @param status The status to set
    function banTicker(string memory ticker, bool status) external onlyOwner {
        bannedTickers[ticker] = status;
    }

    /// @notice Set the new pool fee and tick spacing
    /// @param newPoolFee The new pool fee to set
    function setNewTickSpacing(uint24 newPoolFee) external onlyOwner {
        POOL_FEE = newPoolFee;
        TICK_SPACING = uniswapV3Factory.feeAmountTickSpacing(newPoolFee);
    }

    /*//////////////////////////////////////////////////////////////
                         RAINBOW TOKEN LAUNCHER
    //////////////////////////////////////////////////////////////*/

    /// @notice Launch a new RainbowSuperToken and buy initial tokens
    /// @param name The name of the token
    /// @param symbol The symbol of the token
    /// @param merkleroot The merkle root for airdrop claims
    /// @param supply The total supply of the token
    /// @param initialTick The initial tick for the liquidity position
    /// @param salt The salt for the token deployment
    /// @param creator The address to grant the initial tokens to
    ///
    /// @return The newly created RainbowSuperToken
    function launchRainbowSuperTokenAndBuy(
        string memory name,
        string memory symbol,
        bytes32 merkleroot,
        uint256 supply,
        int24 initialTick,
        bytes32 salt,
        address creator,
        uint256 amountIn
    )
        external
        payable
        returns (RainbowSuperToken)
    {
        if (address(defaultPairToken) == address(WETH)) {
            if (msg.value != amountIn) revert InsufficientFunds();
            WETH.deposit{ value: msg.value }();
        } else {
            if (msg.value != 0) revert InsufficientFunds(); // No ether should be sent if not WETH
            defaultPairToken.safeTransferFrom(msg.sender, address(this), amountIn);
        }

        RainbowSuperToken token = launchRainbowSuperToken(name, symbol, merkleroot, supply, initialTick, salt, creator);

        ISwapRouter02.ExactInputSingleParams memory swapParamsToken = ISwapRouter02.ExactInputSingleParams({
            tokenIn: address(defaultPairToken), // The token we are exchanging from
            tokenOut: address(token), // The token we are exchanging to
            fee: POOL_FEE, // The pool fee
            recipient: creator, // The recipient address
            amountIn: amountIn, // The amount of tokens to swap
            amountOutMinimum: 0, // Minimum amount to receive
            sqrtPriceLimitX96: 0 // No price limit
         });

        swapRouter.exactInputSingle(swapParamsToken);

        return token;
    }

    /// @notice Launch a new RainbowSuperToken and buy initial tokens
    /// @param name The name of the token
    /// @param symbol The symbol of the token
    /// @param merkleroot The merkle root for airdrop claims
    /// @param supply The total supply of the token
    /// @param initialTick The initial tick for the liquidity position
    /// @param salt The salt for the token deployment
    /// @param creator The address to grant the initial tokens to
    ///
    /// @return newToken The newly created RainbowSuperToken
    function launchRainbowSuperToken(
        string memory name,
        string memory symbol,
        bytes32 merkleroot,
        uint256 supply,
        int24 initialTick,
        bytes32 salt,
        address creator
    )
        public
        returns (RainbowSuperToken newToken)
    {
        if (supply == 0) revert ZeroSupply();

        // Name and ticker checks
        if (keccak256(abi.encodePacked(name)) == keccak256(abi.encodePacked("Rainbow"))) {
            revert ReservedName();
        }
        if (keccak256(abi.encodePacked(symbol)) == keccak256(abi.encodePacked("RNBW"))) {
            revert ReservedTicker();
        }
        if (bannedNames[name]) revert BannedName();
        if (bannedTickers[symbol]) revert BannedTicker();

        bool hasAirdrop = merkleroot != bytes32(0);

        (uint256 lpSupply, uint256 creatorAmount, uint256 protocolAmount, uint256 airdropAmount) = calculateSupplyAllocation(supply, hasAirdrop);

        uint256 id;
        assembly {
            id := chainid()
        }

        string memory tokenURI = string(toHexString(keccak256(abi.encode(creator, salt, name, symbol, merkleroot, supply)), 32));

        // Create token
        newToken = new RainbowSuperToken{ salt: keccak256(abi.encode(creator, salt)) }(
            name, symbol, string.concat(baseTokenURI, tokenURI), merkleroot, airdropAmount, id
        );

        address _pairToken = address(defaultPairToken);

        if (address(newToken) > address(_pairToken)) {
            revert IncorrectSalt();
        }

        newToken.mint(creator, creatorAmount);

        // 🌈 Over the Rainbow Token Supply
        newToken.mint(overTheRainbowPot, protocolAmount);

        // Set up fee configuration
        FeeConfig memory config = FeeConfig({
            creatorLPFeeBps: defaultFeeConfig.creatorLPFeeBps,
            protocolBaseBps: defaultFeeConfig.protocolBaseBps,
            creatorBaseBps: defaultFeeConfig.creatorBaseBps,
            airdropBps: defaultFeeConfig.airdropBps,
            hasAirdrop: hasAirdrop,
            feeToken: address(defaultPairToken),
            creator: msg.sender
        });
        tokenFeeConfig[address(newToken)] = config;

        IUniswapV3Pool pool = IUniswapV3Pool(uniswapV3Factory.createPool(address(newToken), address(_pairToken), POOL_FEE));

        uint160 initialSqrtRatio = initialTick.getSqrtRatioAtTick();
        pool.initialize(initialSqrtRatio);

        newToken.mint(address(this), lpSupply);

        // Provide initial liquidity
        INonfungiblePositionManager.MintParams memory params = INonfungiblePositionManager.MintParams({
            token0: address(newToken),
            token1: address(_pairToken),
            fee: POOL_FEE,
            tickLower: initialTick,
            tickUpper: maxUsableTick(TICK_SPACING),
            amount0Desired: lpSupply,
            amount1Desired: 0,
            amount0Min: 0,
            amount1Min: 0,
            recipient: address(this),
            deadline: block.timestamp
        });

        newToken.approve(address(nonfungiblePositionManager), lpSupply);
        (uint256 tokenId,,,) = nonfungiblePositionManager.mint(params);

        // Store the position ID
        tokenPositionIds[address(newToken)] = tokenId;

        emit RainbowSuperTokenCreated(address(newToken), creator, msg.sender, tokenURI);
    }

    /// @notice Launch a RainbowSuperToken at the same address as on the original chain
    /// @param name The name of the token
    /// @param symbol The symbol of the token
    /// @param merkleroot The merkle root for airdrop claims
    /// @param supply The total supply of the token
    /// @param salt The salt for the token deployment
    /// @param creator The address to grant the initial tokens to
    ///
    /// @return newToken The newly created RainbowSuperToken
    function launchFromOtherChain(
        string memory name,
        string memory symbol,
        bytes32 merkleroot,
        uint256 supply,
        bytes32 salt,
        address creator,
        uint256 originalChainId,
        uint256 airdropAmount
    )
        external
        returns (RainbowSuperToken newToken)
    {
        if (supply == 0) revert ZeroSupply();

        // Name and ticker checks
        if (keccak256(abi.encodePacked(name)) == keccak256(abi.encodePacked("Rainbow"))) {
            revert ReservedName();
        }
        if (keccak256(abi.encodePacked(symbol)) == keccak256(abi.encodePacked("RNBW"))) {
            revert ReservedTicker();
        }

        if (bannedNames[name]) revert BannedName();
        if (bannedTickers[symbol]) revert BannedTicker();
        uint256 id;
        assembly {
            id := chainid()
        }

        if (originalChainId == id) revert Unauthorized();
        if (msg.sender != creator) revert Unauthorized();

        string memory tokenURI = string(toHexString(keccak256(abi.encode(creator, salt, name, symbol, merkleroot, supply)), 32));

        newToken = new RainbowSuperToken{ salt: keccak256(abi.encode(creator, salt)) }(
            name, symbol, string.concat(baseTokenURI, tokenURI), merkleroot, airdropAmount, originalChainId
        );
    }

    /*//////////////////////////////////////////////////////////////
                            FEE MANAGEMENT
    //////////////////////////////////////////////////////////////*/

    /// @param newPot Update the address for the Over the Rainbow Pot
    function setPot(address newPot) external onlyOwner {
        overTheRainbowPot = newPot;

        emit NewPot(newPot);
    }

    /// @notice Calculate the allocation of supply for LP, creator and airdrop
    /// @param totalSupply The total supply of the token
    /// @param hasAirdrop Whether the token has airdrop enabled
    ///
    /// @return lpAmount The amount of tokens allocated to LP
    /// @return creatorAmount The amount of tokens allocated to the creator
    /// @return protocolAmount The amount of tokens allocated to Rainbow
    /// @return airdropAmount The amount of tokens allocated to airdrop
    function calculateSupplyAllocation(
        uint256 totalSupply,
        bool hasAirdrop
    )
        internal
        view
        returns (uint256 lpAmount, uint256 creatorAmount, uint256 protocolAmount, uint256 airdropAmount)
    {
        if (hasAirdrop) {
            creatorAmount = (totalSupply * defaultFeeConfig.creatorBaseBps) / 10_000;
            protocolAmount = (totalSupply * defaultFeeConfig.protocolBaseBps) / 10_000;
            airdropAmount = (totalSupply * defaultFeeConfig.airdropBps) / 10_000;
        } else {
            creatorAmount = (totalSupply * defaultFeeConfig.creatorBaseBps) / 10_000;
            protocolAmount = (totalSupply * defaultFeeConfig.protocolBaseBps) / 10_000;
            creatorAmount += (totalSupply * defaultFeeConfig.airdropBps) / 10_000; // Add airdrop amount to creator supply
            airdropAmount = 0;
        }
        lpAmount = totalSupply - creatorAmount - airdropAmount - protocolAmount;
    }

    /// @param token The token address to collect fees for
    function collectFees(address token) external {
        uint256 tokenId = tokenPositionIds[token];
        if (tokenId == 0) revert InvalidToken();

        // Get total fees
        (uint256 totalFee0, uint256 totalFee1) = nonfungiblePositionManager.collect(
            INonfungiblePositionManager.CollectParams({
                tokenId: tokenId,
                recipient: address(this),
                amount0Max: type(uint128).max,
                amount1Max: type(uint128).max
            })
        );

        // Split fees according to configuration
        FeeConfig memory config = tokenFeeConfig[token];
        uint256 creatorFee0 = (totalFee0 * config.creatorLPFeeBps) / 10_000;
        uint256 creatorFee1 = (totalFee1 * config.creatorLPFeeBps) / 10_000;
        uint256 protocolFee0 = totalFee0 - creatorFee0;
        uint256 protocolFee1 = totalFee1 - creatorFee1;

        // Store unclaimed fees
        creatorUnclaimedFees[tokenId].unclaimed0 += uint128(creatorFee0);
        creatorUnclaimedFees[tokenId].unclaimed1 += uint128(creatorFee1);
        protocolUnclaimedFees[tokenId].unclaimed0 += uint128(protocolFee0);
        protocolUnclaimedFees[tokenId].unclaimed1 += uint128(protocolFee1);

        emit FeesCollected(tokenId, creatorFee0, creatorFee1, protocolFee0, protocolFee1);
    }

    /// @param token The token address to claim fees for
    /// @param recipient The recipient of the fees
    function claimCreatorFees(address token, address recipient) external {
        if (msg.sender != tokenFeeConfig[token].creator) revert Unauthorized();
        uint256 tokenId = tokenPositionIds[token];

        UnclaimedFees memory fees = creatorUnclaimedFees[tokenId];
        if (fees.unclaimed0 == 0 && fees.unclaimed1 == 0) revert NoFeesToClaim();

        // Reset unclaimed fees before transfer
        delete creatorUnclaimedFees[tokenId];

        address feeToken = tokenFeeConfig[token].feeToken;

        // Get token addresses in correct order
        (address token0, address token1) = address(token) < address(feeToken) ? (token, address(feeToken)) : (address(feeToken), token);

        // Transfer fees
        if (fees.unclaimed0 > 0) {
            ERC20(token0).transfer(recipient, fees.unclaimed0);
        }
        if (fees.unclaimed1 > 0) {
            ERC20(token1).transfer(recipient, fees.unclaimed1);
        }

        emit FeesClaimed(recipient, tokenId, fees.unclaimed0, fees.unclaimed1);
    }

    /// @notice Claims Protocol Fees to send 🌈 Over the Rainbow 🌈
    /// @param token The token address to claim fees for
    /// @param recipient The recipient of the fees
    function claimProtocolFees(address token, address recipient) external onlyOwner {
        uint256 tokenId = tokenPositionIds[token];

        UnclaimedFees memory fees = protocolUnclaimedFees[tokenId];
        if (fees.unclaimed0 == 0 && fees.unclaimed1 == 0) revert NoFeesToClaim();

        // Reset unclaimed fees before transfer
        delete protocolUnclaimedFees[tokenId];

        // Get token addresses in correct order
        address feeToken = tokenFeeConfig[token].feeToken;

        // Get token addresses in correct order
        (address token0, address token1) = address(token) < address(feeToken) ? (token, address(feeToken)) : (address(feeToken), token);

        // Transfer fees
        if (fees.unclaimed0 > 0) {
            ERC20(token0).transfer(recipient, fees.unclaimed0);
        }
        if (fees.unclaimed1 > 0) {
            ERC20(token1).transfer(recipient, fees.unclaimed1);
        }

        emit FeesClaimed(recipient, tokenId, fees.unclaimed0, fees.unclaimed1);
    }

    /*//////////////////////////////////////////////////////////////
                          POSITION MANAGEMENT
    //////////////////////////////////////////////////////////////*/

    function onERC721Received(address, address, uint256, bytes calldata) external virtual override returns (bytes4) {
        if (msg.sender != address(nonfungiblePositionManager)) {
            revert NotUniswapPositionManager();
        }

        return ERC721TokenReceiver.onERC721Received.selector;
    }

    /*//////////////////////////////////////////////////////////////
                               TICK MATH
    //////////////////////////////////////////////////////////////*/

    /// @param tickSpacing The tick spacing to use
    /// @return The maximum tick that can be used
    function maxUsableTick(int24 tickSpacing) internal pure returns (int24) {
        return (TickMath.MAX_TICK / tickSpacing) * tickSpacing;
    }

    /*//////////////////////////////////////////////////////////////
                                 UTILS
    //////////////////////////////////////////////////////////////*/

    bytes16 private constant HEX_DIGITS = "0123456789abcdef";

    error StringsInsufficientHexLength(bytes32 value, uint256 length);

    /// @param value The value to convert to hex
    /// @param length The length of the hex string
    function toHexString(bytes32 value, uint256 length) internal pure returns (string memory) {
        uint256 localValue = uint256(value);
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = HEX_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        return string(buffer);
    }

    /// @notice Predict the address of a token, used to determine salt offchain
    /// @param creator The creator of the token (msg.sender)
    /// @param name The name of the token
    /// @param symbol The symbol of the token
    /// @param merkleroot The merkle root for airdrop claims
    /// @param supply The total supply of the token
    /// @param salt The salt for the token deployment
    function predictTokenAddress(
        address creator,
        string memory name,
        string memory symbol,
        bytes32 merkleroot,
        uint256 supply,
        bytes32 salt
    )
        external
        view
        returns (address token)
    {
        bool hasAirdrop = merkleroot != bytes32(0);
        (,,, uint256 airdropAmount) = calculateSupplyAllocation(supply, hasAirdrop);

        uint256 id;
        assembly {
            id := chainid()
        }

        string memory tokenURI = string(toHexString(keccak256(abi.encode(creator, salt, name, symbol, merkleroot, supply)), 32));

        bytes memory constructorArgs = abi.encode(name, symbol, string.concat(baseTokenURI, tokenURI), merkleroot, airdropAmount, id);
        bytes32 createSalt = keccak256(abi.encode(creator, salt));

        token = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            bytes1(0xFF), address(this), createSalt, keccak256(bytes.concat(type(RainbowSuperToken).creationCode, constructorArgs))
                        )
                    )
                )
            )
        );
    }
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event OwnershipTransferred(address indexed user, address indexed newOwner);

    /*//////////////////////////////////////////////////////////////
                            OWNERSHIP STORAGE
    //////////////////////////////////////////////////////////////*/

    address public owner;

    modifier onlyOwner() virtual {
        require(msg.sender == owner, "UNAUTHORIZED");

        _;
    }

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(address _owner) {
        owner = _owner;

        emit OwnershipTransferred(address(0), _owner);
    }

    /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

    function transferOwnership(address newOwner) public virtual onlyOwner {
        owner = newOwner;

        emit OwnershipTransferred(msg.sender, newOwner);
    }
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 indexed id);

    event Approval(address indexed owner, address indexed spender, uint256 indexed id);

    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /*//////////////////////////////////////////////////////////////
                         METADATA STORAGE/LOGIC
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    function tokenURI(uint256 id) public view virtual returns (string memory);

    /*//////////////////////////////////////////////////////////////
                      ERC721 BALANCE/OWNER STORAGE
    //////////////////////////////////////////////////////////////*/

    mapping(uint256 => address) internal _ownerOf;

    mapping(address => uint256) internal _balanceOf;

    function ownerOf(uint256 id) public view virtual returns (address owner) {
        require((owner = _ownerOf[id]) != address(0), "NOT_MINTED");
    }

    function balanceOf(address owner) public view virtual returns (uint256) {
        require(owner != address(0), "ZERO_ADDRESS");

        return _balanceOf[owner];
    }

    /*//////////////////////////////////////////////////////////////
                         ERC721 APPROVAL STORAGE
    //////////////////////////////////////////////////////////////*/

    mapping(uint256 => address) public getApproved;

    mapping(address => mapping(address => bool)) public isApprovedForAll;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(string memory _name, string memory _symbol) {
        name = _name;
        symbol = _symbol;
    }

    /*//////////////////////////////////////////////////////////////
                              ERC721 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 id) public virtual {
        address owner = _ownerOf[id];

        require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED");

        getApproved[id] = spender;

        emit Approval(owner, spender, id);
    }

    function setApprovalForAll(address operator, bool approved) public virtual {
        isApprovedForAll[msg.sender][operator] = approved;

        emit ApprovalForAll(msg.sender, operator, approved);
    }

    function transferFrom(
        address from,
        address to,
        uint256 id
    ) public virtual {
        require(from == _ownerOf[id], "WRONG_FROM");

        require(to != address(0), "INVALID_RECIPIENT");

        require(
            msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id],
            "NOT_AUTHORIZED"
        );

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        unchecked {
            _balanceOf[from]--;

            _balanceOf[to]++;
        }

        _ownerOf[id] = to;

        delete getApproved[id];

        emit Transfer(from, to, id);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 id
    ) public virtual {
        transferFrom(from, to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        bytes calldata data
    ) public virtual {
        transferFrom(from, to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    /*//////////////////////////////////////////////////////////////
                              ERC165 LOGIC
    //////////////////////////////////////////////////////////////*/

    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return
            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
            interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721
            interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 id) internal virtual {
        require(to != address(0), "INVALID_RECIPIENT");

        require(_ownerOf[id] == address(0), "ALREADY_MINTED");

        // Counter overflow is incredibly unrealistic.
        unchecked {
            _balanceOf[to]++;
        }

        _ownerOf[id] = to;

        emit Transfer(address(0), to, id);
    }

    function _burn(uint256 id) internal virtual {
        address owner = _ownerOf[id];

        require(owner != address(0), "NOT_MINTED");

        // Ownership check above ensures no underflow.
        unchecked {
            _balanceOf[owner]--;
        }

        delete _ownerOf[id];

        delete getApproved[id];

        emit Transfer(owner, address(0), id);
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL SAFE MINT LOGIC
    //////////////////////////////////////////////////////////////*/

    function _safeMint(address to, uint256 id) internal virtual {
        _mint(to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function _safeMint(
        address to,
        uint256 id,
        bytes memory data
    ) internal virtual {
        _mint(to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }
}

/// @notice A generic interface for a contract which properly accepts ERC721 tokens.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721TokenReceiver {
    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external virtual returns (bytes4) {
        return ERC721TokenReceiver.onERC721Received.selector;
    }
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
library SafeTransferLib {
    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Transfer the ETH and store if it succeeded or not.
            success := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(success, "ETH_TRANSFER_FAILED");
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument.
            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
            success := call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)

            // Set success to whether the call reverted, if not we check it either
            // returned exactly 1 (can't just be non-zero data), or had no return data and token has code.
            if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) {
                success := iszero(or(iszero(extcodesize(token)), returndatasize())) 
            }
        }

        require(success, "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
            success := call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)

            // Set success to whether the call reverted, if not we check it either
            // returned exactly 1 (can't just be non-zero data), or had no return data and token has code.
            if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) {
                success := iszero(or(iszero(extcodesize(token)), returndatasize())) 
            }
        }

        require(success, "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
            success := call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)

            // Set success to whether the call reverted, if not we check it either
            // returned exactly 1 (can't just be non-zero data), or had no return data and token has code.
            if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) {
                success := iszero(or(iszero(extcodesize(token)), returndatasize())) 
            }
        }

        require(success, "APPROVE_FAILED");
    }
}

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

// Contracts
import { Owned } from "lib/solmate/src/auth/Owned.sol";
import { ERC20 } from "lib/solmate/src/tokens/ERC20.sol";

import { MerkleProofLib } from "lib/solady/src/utils/MerkleProofLib.sol";

/// @title RainbowSuperToken
/// @author CopyPaste - for Rainbow with love <3
/// @notice An implementation of ERC20 extending with IERC7802 to allow for unified use across the
///     Superchain.
contract RainbowSuperToken is ERC20, Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    /// @notice Emitted when a crosschain transfer mints tokens.
    /// @param to       Address of the account tokens are being minted for.
    /// @param amount   Amount of tokens minted.
    /// @param sender   Address of the account that finilized the crosschain transfer.
    event CrosschainMint(address indexed to, uint256 amount, address indexed sender);

    /// @notice Emitted when a crosschain transfer burns tokens.
    /// @param from     Address of the account tokens are being burned from.
    /// @param amount   Amount of tokens burned.
    /// @param sender   Address of the account that initiated the crosschain transfer.
    event CrosschainBurn(address indexed from, uint256 amount, address indexed sender);

    /// @notice Emitted when tokens are claimed
    /// @param to The address that claimed the tokens
    /// @param amount The amount of tokens claimed
    event Claim(address indexed to, uint256 amount);
    /*//////////////////////////////////////////////////////////////
                              CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/
    /// @dev The merkle root to be used for claims

    bytes32 public merkleRoot;

    /// @dev The maximum total supply of the token that can be minted
    uint256 public maxTotalMintedSupply;

    /// @dev Original Chain the token was deployed on
    uint256 public originalChainId;

    /// @param name The name of the token
    /// @param symbol The symbol of the token
    /// @param _tokenURI A Url pointing to the metadata for the token
    /// @param _merkleRoot The merkle root to be used for claims
    /// @param _maxTotalMintedSupply The maximum total supply of the token that can be minted
    constructor(
        string memory name,
        string memory symbol,
        string memory _tokenURI,
        bytes32 _merkleRoot,
        uint256 _maxTotalMintedSupply,
        uint256 _originalChainId
    )
        ERC20(name, symbol, 18)
        Owned(msg.sender)
    {
        tokenURI = _tokenURI;
        merkleRoot = _merkleRoot;
        maxTotalMintedSupply = _maxTotalMintedSupply;
        originalChainId = _originalChainId;
    }

    modifier onlyOriginalChain() {
        uint256 id;
        assembly {
            id := chainid()
        }
        if (id != originalChainId) revert Unauthorized();
        _;
    }

    /*//////////////////////////////////////////////////////////////
                                MINTING
    //////////////////////////////////////////////////////////////*/

    /// @dev Tracks the number of tokens we have minted in claims so far
    uint256 public totalMintedSupply;

    /// @dev Tracks if a user has claimed their tokens
    mapping(address => bool) public claimed;

    /// @dev Error emitted when the proof supplied is invalid
    error InvalidProof();

    /// @dev Error emitted when a user has already claimed their tokens
    error AlreadyClaimed();

    /// @dev Error emitted when a user tries to claim 0 tokens
    error CannotClaimZero();

    /// @param proof The merkle proof to verify the claim
    /// @param recipient The address to mint the tokens to
    /// @param amount The amount of tokens to mint
    function claim(bytes32[] calldata proof, address recipient, uint256 amount) external onlyOriginalChain {
        if (claimed[recipient]) revert AlreadyClaimed();

        claimed[recipient] = true;

        bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(recipient, amount))));
        if (!MerkleProofLib.verifyCalldata(proof, merkleRoot, leaf)) {
            revert InvalidProof();
        }

        if (amount + totalMintedSupply > maxTotalMintedSupply) {
            amount = maxTotalMintedSupply - totalMintedSupply;
        }

        if (amount == 0) {
            revert CannotClaimZero();
        }

        totalMintedSupply += amount;
        totalSupply += amount;

        // Mint the points to the recipient
        unchecked {
            balanceOf[recipient] += amount;
        }

        emit Transfer(address(0), recipient, amount);
        emit Claim(recipient, amount);
    }

    /// @param recipient The address to mint the tokens to
    /// @param amount The amount of tokens to mint
    function mint(address recipient, uint256 amount) external onlyOriginalChain onlyOwner {
        _mint(recipient, amount);
    }

    /*//////////////////////////////////////////////////////////////
                            RAINBOW METADATA
    //////////////////////////////////////////////////////////////*/

    /// @dev tokenURI The URI for the token metadata.
    string public tokenURI;

    /*//////////////////////////////////////////////////////////////
                          SUPERCHAIN FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /// @dev Error emitted for unauthorized access.
    error Unauthorized();

    /// @dev The precompile for the superchain token bridge.
    address internal constant SUPERCHAIN_TOKEN_BRIDGE = 0x4200000000000000000000000000000000000028;

    /// i@notice Allows the SuperchainTokenBridge to mint tokens.
    /// @param _to     Address to mint tokens to.
    /// @param _amount Amount of tokens to mint.
    function crosschainMint(address _to, uint256 _amount) external {
        if (msg.sender != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized();

        _mint(_to, _amount);

        emit CrosschainMint(_to, _amount, msg.sender);
    }

    /// @notice Allows the SuperchainTokenBridge to burn tokens.
    /// @param _from   Address to burn tokens from.
    /// @param _amount Amount of tokens to burn.
    function crosschainBurn(address _from, uint256 _amount) external {
        if (msg.sender != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized();

        _burn(_from, _amount);

        emit CrosschainBurn(_from, _amount, msg.sender);
    }

    /// @dev ERC165 Interface Id Compatibility check
    /// @param _interfaceId Interface ID to check for support.
    /// @return True if the contract supports the given interface ID.
    function supportsInterface(bytes4 _interfaceId) public pure returns (bool) {
        return _interfaceId == 0x33331994 // ERC7802 Interface ID
            || _interfaceId == 0x36372b07 // ERC20 Interface ID
            || _interfaceId == 0x01ffc9a7; // ERC165 Interface ID
    }
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;

/// @title Math library for computing sqrt prices from ticks and vice versa
/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports
/// prices between 2**-128 and 2**128
library TickMath {
    error T();
    error R();

    /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128
    int24 internal constant MIN_TICK = -887272;
    /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128
    int24 internal constant MAX_TICK = -MIN_TICK;

    /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
    uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;

    /// @notice Calculates sqrt(1.0001^tick) * 2^96
    /// @dev Throws if |tick| > max tick
    /// @param tick The input tick for the above formula
    /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)
    /// at the given tick
    function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) {
        unchecked {
            uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));
            if (absTick > uint256(int256(MAX_TICK))) revert T();

            uint256 ratio = absTick & 0x1 != 0
                ? 0xfffcb933bd6fad37aa2d162d1a594001
                : 0x100000000000000000000000000000000;
            if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;
            if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;
            if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;
            if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;
            if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;
            if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;
            if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;
            if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;
            if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;
            if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;
            if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;
            if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;
            if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;
            if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;
            if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;
            if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;
            if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;
            if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;
            if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;

            if (tick > 0) ratio = type(uint256).max / ratio;

            // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.
            // we then downcast because we know the result always fits within 160 bits due to our tick input constraint
            // we round up in the division so getTickAtSqrtRatio of the output price is always consistent
            sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));
        }
    }

    /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio
    /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may
    /// ever return.
    /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96
    /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio
    function getTickAtSqrtRatio(uint160 sqrtPriceX96) internal pure returns (int24 tick) {
        unchecked {
            // second inequality must be < because the price can never reach the price at the max tick
            if (!(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO)) revert R();
            uint256 ratio = uint256(sqrtPriceX96) << 32;

            uint256 r = ratio;
            uint256 msb = 0;

            assembly {
                let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(5, gt(r, 0xFFFFFFFF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(4, gt(r, 0xFFFF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(3, gt(r, 0xFF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(2, gt(r, 0xF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(1, gt(r, 0x3))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := gt(r, 0x1)
                msb := or(msb, f)
            }

            if (msb >= 128) r = ratio >> (msb - 127);
            else r = ratio << (127 - msb);

            int256 log_2 = (int256(msb) - 128) << 64;

            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(63, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(62, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(61, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(60, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(59, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(58, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(57, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(56, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(55, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(54, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(53, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(52, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(51, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(50, f))
            }

            int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number

            int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128);
            int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128);

            tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow;
        }
    }
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Arithmetic library with operations for fixed-point numbers.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol)
/// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol)
library FixedPointMathLib {
    /*//////////////////////////////////////////////////////////////
                    SIMPLIFIED FIXED POINT OPERATIONS
    //////////////////////////////////////////////////////////////*/

    uint256 internal constant MAX_UINT256 = 2**256 - 1;

    uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.

    function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.
    }

    function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.
    }

    function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.
    }

    function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.
    }

    /*//////////////////////////////////////////////////////////////
                    LOW LEVEL FIXED POINT OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function mulDivDown(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y))
            if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) {
                revert(0, 0)
            }

            // Divide x * y by the denominator.
            z := div(mul(x, y), denominator)
        }
    }

    function mulDivUp(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y))
            if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) {
                revert(0, 0)
            }

            // If x * y modulo the denominator is strictly greater than 0,
            // 1 is added to round up the division of x * y by the denominator.
            z := add(gt(mod(mul(x, y), denominator), 0), div(mul(x, y), denominator))
        }
    }

    function rpow(
        uint256 x,
        uint256 n,
        uint256 scalar
    ) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            switch x
            case 0 {
                switch n
                case 0 {
                    // 0 ** 0 = 1
                    z := scalar
                }
                default {
                    // 0 ** n = 0
                    z := 0
                }
            }
            default {
                switch mod(n, 2)
                case 0 {
                    // If n is even, store scalar in z for now.
                    z := scalar
                }
                default {
                    // If n is odd, store x in z for now.
                    z := x
                }

                // Shifting right by 1 is like dividing by 2.
                let half := shr(1, scalar)

                for {
                    // Shift n right by 1 before looping to halve it.
                    n := shr(1, n)
                } n {
                    // Shift n right by 1 each iteration to halve it.
                    n := shr(1, n)
                } {
                    // Revert immediately if x ** 2 would overflow.
                    // Equivalent to iszero(eq(div(xx, x), x)) here.
                    if shr(128, x) {
                        revert(0, 0)
                    }

                    // Store x squared.
                    let xx := mul(x, x)

                    // Round to the nearest number.
                    let xxRound := add(xx, half)

                    // Revert if xx + half overflowed.
                    if lt(xxRound, xx) {
                        revert(0, 0)
                    }

                    // Set x to scaled xxRound.
                    x := div(xxRound, scalar)

                    // If n is even:
                    if mod(n, 2) {
                        // Compute z * x.
                        let zx := mul(z, x)

                        // If z * x overflowed:
                        if iszero(eq(div(zx, x), z)) {
                            // Revert if x is non-zero.
                            if iszero(iszero(x)) {
                                revert(0, 0)
                            }
                        }

                        // Round to the nearest number.
                        let zxRound := add(zx, half)

                        // Revert if zx + half overflowed.
                        if lt(zxRound, zx) {
                            revert(0, 0)
                        }

                        // Return properly scaled zxRound.
                        z := div(zxRound, scalar)
                    }
                }
            }
        }
    }

    /*//////////////////////////////////////////////////////////////
                        GENERAL NUMBER UTILITIES
    //////////////////////////////////////////////////////////////*/

    function sqrt(uint256 x) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            let y := x // We start y at x, which will help us make our initial estimate.

            z := 181 // The "correct" value is 1, but this saves a multiplication later.

            // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad
            // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.

            // We check y >= 2^(k + 8) but shift right by k bits
            // each branch to ensure that if x >= 256, then y >= 256.
            if iszero(lt(y, 0x10000000000000000000000000000000000)) {
                y := shr(128, y)
                z := shl(64, z)
            }
            if iszero(lt(y, 0x1000000000000000000)) {
                y := shr(64, y)
                z := shl(32, z)
            }
            if iszero(lt(y, 0x10000000000)) {
                y := shr(32, y)
                z := shl(16, z)
            }
            if iszero(lt(y, 0x1000000)) {
                y := shr(16, y)
                z := shl(8, z)
            }

            // Goal was to get z*z*y within a small factor of x. More iterations could
            // get y in a tighter range. Currently, we will have y in [256, 256*2^16).
            // We ensured y >= 256 so that the relative difference between y and y+1 is small.
            // That's not possible if x < 256 but we can just verify those cases exhaustively.

            // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.
            // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.
            // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.

            // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range
            // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.

            // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate
            // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.

            // There is no overflow risk here since y < 2^136 after the first branch above.
            z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.

            // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))

            // If x+1 is a perfect square, the Babylonian method cycles between
            // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.
            // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division
            // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.
            // If you don't care whether the floor or ceil square root is returned, you can remove this statement.
            z := sub(z, lt(div(x, z), z))
        }
    }

    function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            // Mod x by y. Note this will return
            // 0 instead of reverting if y is zero.
            z := mod(x, y)
        }
    }

    function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 r) {
        /// @solidity memory-safe-assembly
        assembly {
            // Divide x by y. Note this will return
            // 0 instead of reverting if y is zero.
            r := div(x, y)
        }
    }

    function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            // Add 1 to x * y if x % y > 0. Note this will
            // return 0 instead of reverting if y is zero.
            z := add(gt(mod(x, y), 0), div(x, y))
        }
    }
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3
interface ISwapRouter02 {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another token
    /// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance,
    /// and swap the entire amount, enabling contracts to send tokens before calling this function.
    /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance,
    /// and swap the entire amount, enabling contracts to send tokens before calling this function.
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 amountOut;
        uint256 amountInMaximum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another token
    /// that may remain in the router after the swap.
    /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint256 amountOut;
        uint256 amountInMaximum;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
    /// that may remain in the router after the swap.
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity =0.8.25;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';

/// @title Interface for WETH9
interface IWETH9 is IERC20 {
    /// @notice Deposit ether to get wrapped ether
    function deposit() external payable;

    /// @notice Withdraw wrapped ether to get ether
    function withdraw(uint256) external;
}

File 11 of 31 : IUniswapV3Pool.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

import {IUniswapV3PoolImmutables} from './pool/IUniswapV3PoolImmutables.sol';
import {IUniswapV3PoolState} from './pool/IUniswapV3PoolState.sol';
import {IUniswapV3PoolDerivedState} from './pool/IUniswapV3PoolDerivedState.sol';
import {IUniswapV3PoolActions} from './pool/IUniswapV3PoolActions.sol';
import {IUniswapV3PoolOwnerActions} from './pool/IUniswapV3PoolOwnerActions.sol';
import {IUniswapV3PoolErrors} from './pool/IUniswapV3PoolErrors.sol';
import {IUniswapV3PoolEvents} from './pool/IUniswapV3PoolEvents.sol';

/// @title The interface for a Uniswap V3 Pool
/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform
/// to the ERC20 specification
/// @dev The pool interface is broken up into many smaller pieces
interface IUniswapV3Pool is
    IUniswapV3PoolImmutables,
    IUniswapV3PoolState,
    IUniswapV3PoolDerivedState,
    IUniswapV3PoolActions,
    IUniswapV3PoolOwnerActions,
    IUniswapV3PoolErrors,
    IUniswapV3PoolEvents
{

}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title The interface for the Uniswap V3 Factory
/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees
interface IUniswapV3Factory {
    /// @notice Emitted when the owner of the factory is changed
    /// @param oldOwner The owner before the owner was changed
    /// @param newOwner The owner after the owner was changed
    event OwnerChanged(address indexed oldOwner, address indexed newOwner);

    /// @notice Emitted when a pool is created
    /// @param token0 The first token of the pool by address sort order
    /// @param token1 The second token of the pool by address sort order
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @param tickSpacing The minimum number of ticks between initialized ticks
    /// @param pool The address of the created pool
    event PoolCreated(
        address indexed token0,
        address indexed token1,
        uint24 indexed fee,
        int24 tickSpacing,
        address pool
    );

    /// @notice Emitted when a new fee amount is enabled for pool creation via the factory
    /// @param fee The enabled fee, denominated in hundredths of a bip
    /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee
    event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);

    /// @notice Returns the current owner of the factory
    /// @dev Can be changed by the current owner via setOwner
    /// @return The address of the factory owner
    function owner() external view returns (address);

    /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled
    /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context
    /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee
    /// @return The tick spacing
    function feeAmountTickSpacing(uint24 fee) external view returns (int24);

    /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist
    /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
    /// @param tokenA The contract address of either token0 or token1
    /// @param tokenB The contract address of the other token
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @return pool The pool address
    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external view returns (address pool);

    /// @notice Creates a pool for the given two tokens and fee
    /// @param tokenA One of the two tokens in the desired pool
    /// @param tokenB The other of the two tokens in the desired pool
    /// @param fee The desired fee for the pool
    /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved
    /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments
    /// are invalid.
    /// @return pool The address of the newly created pool
    function createPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external returns (address pool);

    /// @notice Updates the owner of the factory
    /// @dev Must be called by the current owner
    /// @param _owner The new owner of the factory
    function setOwner(address _owner) external;

    /// @notice Enables a fee amount with the given tickSpacing
    /// @dev Fee amounts may never be removed once enabled
    /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)
    /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount
    function enableFeeAmount(uint24 fee, int24 tickSpacing) external;
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
pragma abicoder v2;

import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';

import './IPoolInitializer.sol';
import './IERC721Permit.sol';
import './IPeripheryPayments.sol';
import './IPeripheryImmutableState.sol';
import '../libraries/PoolAddress.sol';

/// @title Non-fungible token for positions
/// @notice Wraps Uniswap V3 positions in a non-fungible token interface which allows for them to be transferred
/// and authorized.
interface INonfungiblePositionManager is
    IPoolInitializer,
    IPeripheryPayments,
    IPeripheryImmutableState,
    IERC721Metadata,
    IERC721Enumerable,
    IERC721Permit
{
    /// @notice Emitted when liquidity is increased for a position NFT
    /// @dev Also emitted when a token is minted
    /// @param tokenId The ID of the token for which liquidity was increased
    /// @param liquidity The amount by which liquidity for the NFT position was increased
    /// @param amount0 The amount of token0 that was paid for the increase in liquidity
    /// @param amount1 The amount of token1 that was paid for the increase in liquidity
    event IncreaseLiquidity(uint256 indexed tokenId, uint128 liquidity, uint256 amount0, uint256 amount1);
    /// @notice Emitted when liquidity is decreased for a position NFT
    /// @param tokenId The ID of the token for which liquidity was decreased
    /// @param liquidity The amount by which liquidity for the NFT position was decreased
    /// @param amount0 The amount of token0 that was accounted for the decrease in liquidity
    /// @param amount1 The amount of token1 that was accounted for the decrease in liquidity
    event DecreaseLiquidity(uint256 indexed tokenId, uint128 liquidity, uint256 amount0, uint256 amount1);
    /// @notice Emitted when tokens are collected for a position NFT
    /// @dev The amounts reported may not be exactly equivalent to the amounts transferred, due to rounding behavior
    /// @param tokenId The ID of the token for which underlying tokens were collected
    /// @param recipient The address of the account that received the collected tokens
    /// @param amount0 The amount of token0 owed to the position that was collected
    /// @param amount1 The amount of token1 owed to the position that was collected
    event Collect(uint256 indexed tokenId, address recipient, uint256 amount0, uint256 amount1);

    /// @notice Returns the position information associated with a given token ID.
    /// @dev Throws if the token ID is not valid.
    /// @param tokenId The ID of the token that represents the position
    /// @return nonce The nonce for permits
    /// @return operator The address that is approved for spending
    /// @return token0 The address of the token0 for a specific pool
    /// @return token1 The address of the token1 for a specific pool
    /// @return fee The fee associated with the pool
    /// @return tickLower The lower end of the tick range for the position
    /// @return tickUpper The higher end of the tick range for the position
    /// @return liquidity The liquidity of the position
    /// @return feeGrowthInside0LastX128 The fee growth of token0 as of the last action on the individual position
    /// @return feeGrowthInside1LastX128 The fee growth of token1 as of the last action on the individual position
    /// @return tokensOwed0 The uncollected amount of token0 owed to the position as of the last computation
    /// @return tokensOwed1 The uncollected amount of token1 owed to the position as of the last computation
    function positions(uint256 tokenId)
        external
        view
        returns (
            uint96 nonce,
            address operator,
            address token0,
            address token1,
            uint24 fee,
            int24 tickLower,
            int24 tickUpper,
            uint128 liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    struct MintParams {
        address token0;
        address token1;
        uint24 fee;
        int24 tickLower;
        int24 tickUpper;
        uint256 amount0Desired;
        uint256 amount1Desired;
        uint256 amount0Min;
        uint256 amount1Min;
        address recipient;
        uint256 deadline;
    }

    /// @notice Creates a new position wrapped in a NFT
    /// @dev Call this when the pool does exist and is initialized. Note that if the pool is created but not initialized
    /// a method does not exist, i.e. the pool is assumed to be initialized.
    /// @param params The params necessary to mint a position, encoded as `MintParams` in calldata
    /// @return tokenId The ID of the token that represents the minted position
    /// @return liquidity The amount of liquidity for this position
    /// @return amount0 The amount of token0
    /// @return amount1 The amount of token1
    function mint(MintParams calldata params)
        external
        payable
        returns (
            uint256 tokenId,
            uint128 liquidity,
            uint256 amount0,
            uint256 amount1
        );

    struct IncreaseLiquidityParams {
        uint256 tokenId;
        uint256 amount0Desired;
        uint256 amount1Desired;
        uint256 amount0Min;
        uint256 amount1Min;
        uint256 deadline;
    }

    /// @notice Increases the amount of liquidity in a position, with tokens paid by the `msg.sender`
    /// @param params tokenId The ID of the token for which liquidity is being increased,
    /// amount0Desired The desired amount of token0 to be spent,
    /// amount1Desired The desired amount of token1 to be spent,
    /// amount0Min The minimum amount of token0 to spend, which serves as a slippage check,
    /// amount1Min The minimum amount of token1 to spend, which serves as a slippage check,
    /// deadline The time by which the transaction must be included to effect the change
    /// @return liquidity The new liquidity amount as a result of the increase
    /// @return amount0 The amount of token0 to acheive resulting liquidity
    /// @return amount1 The amount of token1 to acheive resulting liquidity
    function increaseLiquidity(IncreaseLiquidityParams calldata params)
        external
        payable
        returns (
            uint128 liquidity,
            uint256 amount0,
            uint256 amount1
        );

    struct DecreaseLiquidityParams {
        uint256 tokenId;
        uint128 liquidity;
        uint256 amount0Min;
        uint256 amount1Min;
        uint256 deadline;
    }

    /// @notice Decreases the amount of liquidity in a position and accounts it to the position
    /// @param params tokenId The ID of the token for which liquidity is being decreased,
    /// amount The amount by which liquidity will be decreased,
    /// amount0Min The minimum amount of token0 that should be accounted for the burned liquidity,
    /// amount1Min The minimum amount of token1 that should be accounted for the burned liquidity,
    /// deadline The time by which the transaction must be included to effect the change
    /// @return amount0 The amount of token0 accounted to the position's tokens owed
    /// @return amount1 The amount of token1 accounted to the position's tokens owed
    function decreaseLiquidity(DecreaseLiquidityParams calldata params)
        external
        payable
        returns (uint256 amount0, uint256 amount1);

    struct CollectParams {
        uint256 tokenId;
        address recipient;
        uint128 amount0Max;
        uint128 amount1Max;
    }

    /// @notice Collects up to a maximum amount of fees owed to a specific position to the recipient
    /// @param params tokenId The ID of the NFT for which tokens are being collected,
    /// recipient The account that should receive the tokens,
    /// amount0Max The maximum amount of token0 to collect,
    /// amount1Max The maximum amount of token1 to collect
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(CollectParams calldata params) external payable returns (uint256 amount0, uint256 amount1);

    /// @notice Burns a token ID, which deletes it from the NFT contract. The token must have 0 liquidity and all tokens
    /// must be collected first.
    /// @param tokenId The ID of the token that is being burned
    function burn(uint256 tokenId) external payable;
}

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

/// @notice Gas optimized verification of proof of inclusion for a leaf in a Merkle tree.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/MerkleProofLib.sol)
/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/MerkleProofLib.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol)
library MerkleProofLib {
    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*            MERKLE PROOF VERIFICATION OPERATIONS            */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Returns whether `leaf` exists in the Merkle tree with `root`, given `proof`.
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf)
        internal
        pure
        returns (bool isValid)
    {
        /// @solidity memory-safe-assembly
        assembly {
            if mload(proof) {
                // Initialize `offset` to the offset of `proof` elements in memory.
                let offset := add(proof, 0x20)
                // Left shift by 5 is equivalent to multiplying by 0x20.
                let end := add(offset, shl(5, mload(proof)))
                // Iterate over proof elements to compute root hash.
                for {} 1 {} {
                    // Slot of `leaf` in scratch space.
                    // If the condition is true: 0x20, otherwise: 0x00.
                    let scratch := shl(5, gt(leaf, mload(offset)))
                    // Store elements to hash contiguously in scratch space.
                    // Scratch space is 64 bytes (0x00 - 0x3f) and both elements are 32 bytes.
                    mstore(scratch, leaf)
                    mstore(xor(scratch, 0x20), mload(offset))
                    // Reuse `leaf` to store the hash to reduce stack operations.
                    leaf := keccak256(0x00, 0x40)
                    offset := add(offset, 0x20)
                    if iszero(lt(offset, end)) { break }
                }
            }
            isValid := eq(leaf, root)
        }
    }

    /// @dev Returns whether `leaf` exists in the Merkle tree with `root`, given `proof`.
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf)
        internal
        pure
        returns (bool isValid)
    {
        /// @solidity memory-safe-assembly
        assembly {
            if proof.length {
                // Left shift by 5 is equivalent to multiplying by 0x20.
                let end := add(proof.offset, shl(5, proof.length))
                // Initialize `offset` to the offset of `proof` in the calldata.
                let offset := proof.offset
                // Iterate over proof elements to compute root hash.
                for {} 1 {} {
                    // Slot of `leaf` in scratch space.
                    // If the condition is true: 0x20, otherwise: 0x00.
                    let scratch := shl(5, gt(leaf, calldataload(offset)))
                    // Store elements to hash contiguously in scratch space.
                    // Scratch space is 64 bytes (0x00 - 0x3f) and both elements are 32 bytes.
                    mstore(scratch, leaf)
                    mstore(xor(scratch, 0x20), calldataload(offset))
                    // Reuse `leaf` to store the hash to reduce stack operations.
                    leaf := keccak256(0x00, 0x40)
                    offset := add(offset, 0x20)
                    if iszero(lt(offset, end)) { break }
                }
            }
            isValid := eq(leaf, root)
        }
    }

    /// @dev Returns whether all `leaves` exist in the Merkle tree with `root`,
    /// given `proof` and `flags`.
    ///
    /// Note:
    /// - Breaking the invariant `flags.length == (leaves.length - 1) + proof.length`
    ///   will always return false.
    /// - The sum of the lengths of `proof` and `leaves` must never overflow.
    /// - Any non-zero word in the `flags` array is treated as true.
    /// - The memory offset of `proof` must be non-zero
    ///   (i.e. `proof` is not pointing to the scratch space).
    function verifyMultiProof(
        bytes32[] memory proof,
        bytes32 root,
        bytes32[] memory leaves,
        bool[] memory flags
    ) internal pure returns (bool isValid) {
        // Rebuilds the root by consuming and producing values on a queue.
        // The queue starts with the `leaves` array, and goes into a `hashes` array.
        // After the process, the last element on the queue is verified
        // to be equal to the `root`.
        //
        // The `flags` array denotes whether the sibling
        // should be popped from the queue (`flag == true`), or
        // should be popped from the `proof` (`flag == false`).
        /// @solidity memory-safe-assembly
        assembly {
            // Cache the lengths of the arrays.
            let leavesLength := mload(leaves)
            let proofLength := mload(proof)
            let flagsLength := mload(flags)

            // Advance the pointers of the arrays to point to the data.
            leaves := add(0x20, leaves)
            proof := add(0x20, proof)
            flags := add(0x20, flags)

            // If the number of flags is correct.
            for {} eq(add(leavesLength, proofLength), add(flagsLength, 1)) {} {
                // For the case where `proof.length + leaves.length == 1`.
                if iszero(flagsLength) {
                    // `isValid = (proof.length == 1 ? proof[0] : leaves[0]) == root`.
                    isValid := eq(mload(xor(leaves, mul(xor(proof, leaves), proofLength))), root)
                    break
                }

                // The required final proof offset if `flagsLength` is not zero, otherwise zero.
                let proofEnd := add(proof, shl(5, proofLength))
                // We can use the free memory space for the queue.
                // We don't need to allocate, since the queue is temporary.
                let hashesFront := mload(0x40)
                // Copy the leaves into the hashes.
                // Sometimes, a little memory expansion costs less than branching.
                // Should cost less, even with a high free memory offset of 0x7d00.
                leavesLength := shl(5, leavesLength)
                for { let i := 0 } iszero(eq(i, leavesLength)) { i := add(i, 0x20) } {
                    mstore(add(hashesFront, i), mload(add(leaves, i)))
                }
                // Compute the back of the hashes.
                let hashesBack := add(hashesFront, leavesLength)
                // This is the end of the memory for the queue.
                // We recycle `flagsLength` to save on stack variables (sometimes save gas).
                flagsLength := add(hashesBack, shl(5, flagsLength))

                for {} 1 {} {
                    // Pop from `hashes`.
                    let a := mload(hashesFront)
                    // Pop from `hashes`.
                    let b := mload(add(hashesFront, 0x20))
                    hashesFront := add(hashesFront, 0x40)

                    // If the flag is false, load the next proof,
                    // else, pops from the queue.
                    if iszero(mload(flags)) {
                        // Loads the next proof.
                        b := mload(proof)
                        proof := add(proof, 0x20)
                        // Unpop from `hashes`.
                        hashesFront := sub(hashesFront, 0x20)
                    }

                    // Advance to the next flag.
                    flags := add(flags, 0x20)

                    // Slot of `a` in scratch space.
                    // If the condition is true: 0x20, otherwise: 0x00.
                    let scratch := shl(5, gt(a, b))
                    // Hash the scratch space and push the result onto the queue.
                    mstore(scratch, a)
                    mstore(xor(scratch, 0x20), b)
                    mstore(hashesBack, keccak256(0x00, 0x40))
                    hashesBack := add(hashesBack, 0x20)
                    if iszero(lt(hashesBack, flagsLength)) { break }
                }
                isValid :=
                    and(
                        // Checks if the last value in the queue is same as the root.
                        eq(mload(sub(hashesBack, 0x20)), root),
                        // And whether all the proofs are used, if required.
                        eq(proofEnd, proof)
                    )
                break
            }
        }
    }

    /// @dev Returns whether all `leaves` exist in the Merkle tree with `root`,
    /// given `proof` and `flags`.
    ///
    /// Note:
    /// - Breaking the invariant `flags.length == (leaves.length - 1) + proof.length`
    ///   will always return false.
    /// - Any non-zero word in the `flags` array is treated as true.
    /// - The calldata offset of `proof` must be non-zero
    ///   (i.e. `proof` is from a regular Solidity function with a 4-byte selector).
    function verifyMultiProofCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32[] calldata leaves,
        bool[] calldata flags
    ) internal pure returns (bool isValid) {
        // Rebuilds the root by consuming and producing values on a queue.
        // The queue starts with the `leaves` array, and goes into a `hashes` array.
        // After the process, the last element on the queue is verified
        // to be equal to the `root`.
        //
        // The `flags` array denotes whether the sibling
        // should be popped from the queue (`flag == true`), or
        // should be popped from the `proof` (`flag == false`).
        /// @solidity memory-safe-assembly
        assembly {
            // If the number of flags is correct.
            for {} eq(add(leaves.length, proof.length), add(flags.length, 1)) {} {
                // For the case where `proof.length + leaves.length == 1`.
                if iszero(flags.length) {
                    // `isValid = (proof.length == 1 ? proof[0] : leaves[0]) == root`.
                    // forgefmt: disable-next-item
                    isValid := eq(
                        calldataload(
                            xor(leaves.offset, mul(xor(proof.offset, leaves.offset), proof.length))
                        ),
                        root
                    )
                    break
                }

                // The required final proof offset if `flagsLength` is not zero, otherwise zero.
                let proofEnd := add(proof.offset, shl(5, proof.length))
                // We can use the free memory space for the queue.
                // We don't need to allocate, since the queue is temporary.
                let hashesFront := mload(0x40)
                // Copy the leaves into the hashes.
                // Sometimes, a little memory expansion costs less than branching.
                // Should cost less, even with a high free memory offset of 0x7d00.
                calldatacopy(hashesFront, leaves.offset, shl(5, leaves.length))
                // Compute the back of the hashes.
                let hashesBack := add(hashesFront, shl(5, leaves.length))
                // This is the end of the memory for the queue.
                // We recycle `flagsLength` to save on stack variables (sometimes save gas).
                flags.length := add(hashesBack, shl(5, flags.length))

                // We don't need to make a copy of `proof.offset` or `flags.offset`,
                // as they are pass-by-value (this trick may not always save gas).

                for {} 1 {} {
                    // Pop from `hashes`.
                    let a := mload(hashesFront)
                    // Pop from `hashes`.
                    let b := mload(add(hashesFront, 0x20))
                    hashesFront := add(hashesFront, 0x40)

                    // If the flag is false, load the next proof,
                    // else, pops from the queue.
                    if iszero(calldataload(flags.offset)) {
                        // Loads the next proof.
                        b := calldataload(proof.offset)
                        proof.offset := add(proof.offset, 0x20)
                        // Unpop from `hashes`.
                        hashesFront := sub(hashesFront, 0x20)
                    }

                    // Advance to the next flag offset.
                    flags.offset := add(flags.offset, 0x20)

                    // Slot of `a` in scratch space.
                    // If the condition is true: 0x20, otherwise: 0x00.
                    let scratch := shl(5, gt(a, b))
                    // Hash the scratch space and push the result onto the queue.
                    mstore(scratch, a)
                    mstore(xor(scratch, 0x20), b)
                    mstore(hashesBack, keccak256(0x00, 0x40))
                    hashesBack := add(hashesBack, 0x20)
                    if iszero(lt(hashesBack, flags.length)) { break }
                }
                isValid :=
                    and(
                        // Checks if the last value in the queue is same as the root.
                        eq(mload(sub(hashesBack, 0x20)), root),
                        // And whether all the proofs are used, if required.
                        eq(proofEnd, proof.offset)
                    )
                break
            }
        }
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                   EMPTY CALLDATA HELPERS                   */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Returns an empty calldata bytes32 array.
    function emptyProof() internal pure returns (bytes32[] calldata proof) {
        /// @solidity memory-safe-assembly
        assembly {
            proof.length := 0
        }
    }

    /// @dev Returns an empty calldata bytes32 array.
    function emptyLeaves() internal pure returns (bytes32[] calldata leaves) {
        /// @solidity memory-safe-assembly
        assembly {
            leaves.length := 0
        }
    }

    /// @dev Returns an empty calldata bool array.
    function emptyFlags() internal pure returns (bool[] calldata flags) {
        /// @solidity memory-safe-assembly
        assembly {
            flags.length := 0
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that never changes
/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values
interface IUniswapV3PoolImmutables {
    /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
    /// @return The contract address
    function factory() external view returns (address);

    /// @notice The first of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token0() external view returns (address);

    /// @notice The second of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token1() external view returns (address);

    /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
    /// @return The fee
    function fee() external view returns (uint24);

    /// @notice The pool tick spacing
    /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive
    /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...
    /// This value is an int24 to avoid casting even though it is always positive.
    /// @return The tick spacing
    function tickSpacing() external view returns (int24);

    /// @notice The maximum amount of position liquidity that can use any tick in the range
    /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and
    /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool
    /// @return The max amount of liquidity per tick
    function maxLiquidityPerTick() external view returns (uint128);
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
    /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
    /// when accessed externally.
    /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
    /// @return tick The current tick of the pool, i.e. according to the last tick transition that was run.
    /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
    /// boundary.
    /// @return observationIndex The index of the last oracle observation that was written,
    /// @return observationCardinality The current maximum number of observations stored in the pool,
    /// @return observationCardinalityNext The next maximum number of observations, to be updated when the observation.
    /// @return feeProtocol The protocol fee for both tokens of the pool.
    /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
    /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
    /// unlocked Whether the pool is currently locked to reentrancy
    function slot0()
        external
        view
        returns (
            uint160 sqrtPriceX96,
            int24 tick,
            uint16 observationIndex,
            uint16 observationCardinality,
            uint16 observationCardinalityNext,
            uint8 feeProtocol,
            bool unlocked
        );

    /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal0X128() external view returns (uint256);

    /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal1X128() external view returns (uint256);

    /// @notice The amounts of token0 and token1 that are owed to the protocol
    /// @dev Protocol fees will never exceed uint128 max in either token
    function protocolFees() external view returns (uint128 token0, uint128 token1);

    /// @notice The currently in range liquidity available to the pool
    /// @dev This value has no relationship to the total liquidity across all ticks
    /// @return The liquidity at the current price of the pool
    function liquidity() external view returns (uint128);

    /// @notice Look up information about a specific tick in the pool
    /// @param tick The tick to look up
    /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or
    /// tick upper
    /// @return liquidityNet how much liquidity changes when the pool price crosses the tick,
    /// @return feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,
    /// @return feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,
    /// @return tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick
    /// @return secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,
    /// @return secondsOutside the seconds spent on the other side of the tick from the current tick,
    /// @return initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.
    /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.
    /// In addition, these values are only relative and must be used only in comparison to previous snapshots for
    /// a specific position.
    function ticks(int24 tick)
        external
        view
        returns (
            uint128 liquidityGross,
            int128 liquidityNet,
            uint256 feeGrowthOutside0X128,
            uint256 feeGrowthOutside1X128,
            int56 tickCumulativeOutside,
            uint160 secondsPerLiquidityOutsideX128,
            uint32 secondsOutside,
            bool initialized
        );

    /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
    function tickBitmap(int16 wordPosition) external view returns (uint256);

    /// @notice Returns the information about a position by the position's key
    /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper
    /// @return liquidity The amount of liquidity in the position,
    /// @return feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
    /// @return feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
    /// @return tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,
    /// @return tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke
    function positions(bytes32 key)
        external
        view
        returns (
            uint128 liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    /// @notice Returns data about a specific observation index
    /// @param index The element of the observations array to fetch
    /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time
    /// ago, rather than at a specific index in the array.
    /// @return blockTimestamp The timestamp of the observation,
    /// @return tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
    /// @return secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
    /// @return initialized whether the observation has been initialized and the values are safe to use
    function observations(uint256 index)
        external
        view
        returns (
            uint32 blockTimestamp,
            int56 tickCumulative,
            uint160 secondsPerLiquidityCumulativeX128,
            bool initialized
        );
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that is not stored
/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the
/// blockchain. The functions here may have variable gas costs.
interface IUniswapV3PoolDerivedState {
    /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp
    /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
    /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
    /// you must call it with secondsAgos = [3600, 0].
    /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in
    /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
    /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned
    /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp
    /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block
    /// timestamp
    function observe(uint32[] calldata secondsAgos)
        external
        view
        returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);

    /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
    /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.
    /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first
    /// snapshot is taken and the second snapshot is taken.
    /// @param tickLower The lower tick of the range
    /// @param tickUpper The upper tick of the range
    /// @return tickCumulativeInside The snapshot of the tick accumulator for the range
    /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range
    /// @return secondsInside The snapshot of seconds per liquidity for the range
    function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)
        external
        view
        returns (
            int56 tickCumulativeInside,
            uint160 secondsPerLiquidityInsideX128,
            uint32 secondsInside
        );
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone
interface IUniswapV3PoolActions {
    /// @notice Sets the initial price for the pool
    /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
    /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
    function initialize(uint160 sqrtPriceX96) external;

    /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position
    /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback
    /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends
    /// on tickLower, tickUpper, the amount of liquidity, and the current price.
    /// @param recipient The address for which the liquidity will be created
    /// @param tickLower The lower tick of the position in which to add liquidity
    /// @param tickUpper The upper tick of the position in which to add liquidity
    /// @param amount The amount of liquidity to mint
    /// @param data Any data that should be passed through to the callback
    /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
    /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Collects tokens owed to a position
    /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.
    /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or
    /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the
    /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.
    /// @param recipient The address which should receive the fees collected
    /// @param tickLower The lower tick of the position for which to collect fees
    /// @param tickUpper The upper tick of the position for which to collect fees
    /// @param amount0Requested How much token0 should be withdrawn from the fees owed
    /// @param amount1Requested How much token1 should be withdrawn from the fees owed
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);

    /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position
    /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0
    /// @dev Fees must be collected separately via a call to #collect
    /// @param tickLower The lower tick of the position for which to burn liquidity
    /// @param tickUpper The upper tick of the position for which to burn liquidity
    /// @param amount How much liquidity to burn
    /// @return amount0 The amount of token0 sent to the recipient
    /// @return amount1 The amount of token1 sent to the recipient
    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Swap token0 for token1, or token1 for token0
    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
    /// @param recipient The address to receive the output of the swap
    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0
    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this
    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap
    /// @param data Any data to be passed through to the callback
    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive
    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback
    /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback
    /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling
    /// with 0 amount{0,1} and sending the donation amount(s) from the callback
    /// @param recipient The address which will receive the token0 and token1 amounts
    /// @param amount0 The amount of token0 to send
    /// @param amount1 The amount of token1 to send
    /// @param data Any data to be passed through to the callback
    function flash(
        address recipient,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;

    /// @notice Increase the maximum number of price and liquidity observations that this pool will store
    /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
    /// the input observationCardinalityNext.
    /// @param observationCardinalityNext The desired minimum number of observations for the pool to store
    function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner
interface IUniswapV3PoolOwnerActions {
    /// @notice Set the denominator of the protocol's % share of the fees
    /// @param feeProtocol0 new protocol fee for token0 of the pool
    /// @param feeProtocol1 new protocol fee for token1 of the pool
    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;

    /// @notice Collect the protocol fee accrued to the pool
    /// @param recipient The address to which collected protocol fees should be sent
    /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1
    /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0
    /// @return amount0 The protocol fee collected in token0
    /// @return amount1 The protocol fee collected in token1
    function collectProtocol(
        address recipient,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);
}

File 21 of 31 : IUniswapV3PoolErrors.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Errors emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolErrors {
    error LOK();
    error TLU();
    error TLM();
    error TUM();
    error AI();
    error M0();
    error M1();
    error AS();
    error IIA();
    error L();
    error F0();
    error F1();
}

File 22 of 31 : IUniswapV3PoolEvents.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Events emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolEvents {
    /// @notice Emitted exactly once by a pool when #initialize is first called on the pool
    /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize
    /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96
    /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
    event Initialize(uint160 sqrtPriceX96, int24 tick);

    /// @notice Emitted when liquidity is minted for a given position
    /// @param sender The address that minted the liquidity
    /// @param owner The owner of the position and recipient of any minted liquidity
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity minted to the position range
    /// @param amount0 How much token0 was required for the minted liquidity
    /// @param amount1 How much token1 was required for the minted liquidity
    event Mint(
        address sender,
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted when fees are collected by the owner of a position
    /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
    /// @param owner The owner of the position for which fees are collected
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount0 The amount of token0 fees collected
    /// @param amount1 The amount of token1 fees collected
    event Collect(
        address indexed owner,
        address recipient,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount0,
        uint128 amount1
    );

    /// @notice Emitted when a position's liquidity is removed
    /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
    /// @param owner The owner of the position for which liquidity is removed
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity to remove
    /// @param amount0 The amount of token0 withdrawn
    /// @param amount1 The amount of token1 withdrawn
    event Burn(
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted by the pool for any swaps between token0 and token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the output of the swap
    /// @param amount0 The delta of the token0 balance of the pool
    /// @param amount1 The delta of the token1 balance of the pool
    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
    /// @param liquidity The liquidity of the pool after the swap
    /// @param tick The log base 1.0001 of price of the pool after the swap
    event Swap(
        address indexed sender,
        address indexed recipient,
        int256 amount0,
        int256 amount1,
        uint160 sqrtPriceX96,
        uint128 liquidity,
        int24 tick
    );

    /// @notice Emitted by the pool for any flashes of token0/token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the tokens from flash
    /// @param amount0 The amount of token0 that was flashed
    /// @param amount1 The amount of token1 that was flashed
    /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
    /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
    event Flash(
        address indexed sender,
        address indexed recipient,
        uint256 amount0,
        uint256 amount1,
        uint256 paid0,
        uint256 paid1
    );

    /// @notice Emitted by the pool for increases to the number of observations that can be stored
    /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index
    /// just before a mint/swap/burn.
    /// @param observationCardinalityNextOld The previous value of the next observation cardinality
    /// @param observationCardinalityNextNew The updated value of the next observation cardinality
    event IncreaseObservationCardinalityNext(
        uint16 observationCardinalityNextOld,
        uint16 observationCardinalityNextNew
    );

    /// @notice Emitted when the protocol fee is changed by the pool
    /// @param feeProtocol0Old The previous value of the token0 protocol fee
    /// @param feeProtocol1Old The previous value of the token1 protocol fee
    /// @param feeProtocol0New The updated value of the token0 protocol fee
    /// @param feeProtocol1New The updated value of the token1 protocol fee
    event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);

    /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner
    /// @param sender The address that collects the protocol fees
    /// @param recipient The address that receives the collected protocol fees
    /// @param amount0 The amount of token0 protocol fees that is withdrawn
    /// @param amount0 The amount of token1 protocol fees that is withdrawn
    event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
pragma abicoder v2;

/// @title Creates and initializes V3 Pools
/// @notice Provides a method for creating and initializing a pool, if necessary, for bundling with other methods that
/// require the pool to exist.
interface IPoolInitializer {
    /// @notice Creates a new pool if it does not exist, then initializes if not initialized
    /// @dev This method can be bundled with others via IMulticall for the first action (e.g. mint) performed against a pool
    /// @param token0 The contract address of token0 of the pool
    /// @param token1 The contract address of token1 of the pool
    /// @param fee The fee amount of the v3 pool for the specified token pair
    /// @param sqrtPriceX96 The initial square root price of the pool as a Q64.96 value
    /// @return pool Returns the pool address based on the pair of tokens and fee, will return the newly created pool address if necessary
    function createAndInitializePoolIfNecessary(
        address token0,
        address token1,
        uint24 fee,
        uint160 sqrtPriceX96
    ) external payable returns (address pool);
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';

/// @title ERC721 with permit
/// @notice Extension to ERC721 that includes a permit function for signature based approvals
interface IERC721Permit is IERC721 {
    /// @notice The permit typehash used in the permit signature
    /// @return The typehash for the permit
    function PERMIT_TYPEHASH() external pure returns (bytes32);

    /// @notice The domain separator used in the permit signature
    /// @return The domain seperator used in encoding of permit signature
    function DOMAIN_SEPARATOR() external view returns (bytes32);

    /// @notice Approve of a specific token ID for spending by spender via signature
    /// @param spender The account that is being approved
    /// @param tokenId The ID of the token that is being approved for spending
    /// @param deadline The deadline timestamp by which the call must be mined for the approve to work
    /// @param v Must produce valid secp256k1 signature from the holder along with `r` and `s`
    /// @param r Must produce valid secp256k1 signature from the holder along with `v` and `s`
    /// @param s Must produce valid secp256k1 signature from the holder along with `r` and `v`
    function permit(
        address spender,
        uint256 tokenId,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable;
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;

/// @title Periphery Payments
/// @notice Functions to ease deposits and withdrawals of ETH
interface IPeripheryPayments {
    /// @notice Unwraps the contract's WETH9 balance and sends it to recipient as ETH.
    /// @dev The amountMinimum parameter prevents malicious contracts from stealing WETH9 from users.
    /// @param amountMinimum The minimum amount of WETH9 to unwrap
    /// @param recipient The address receiving ETH
    function unwrapWETH9(uint256 amountMinimum, address recipient) external payable;

    /// @notice Refunds any ETH balance held by this contract to the `msg.sender`
    /// @dev Useful for bundling with mint or increase liquidity that uses ether, or exact output swaps
    /// that use ether for the input amount
    function refundETH() external payable;

    /// @notice Transfers the full amount of a token held by this contract to recipient
    /// @dev The amountMinimum parameter prevents malicious contracts from stealing the token from users
    /// @param token The contract address of the token which will be transferred to `recipient`
    /// @param amountMinimum The minimum amount of token required for a transfer
    /// @param recipient The destination address of the token
    function sweepToken(
        address token,
        uint256 amountMinimum,
        address recipient
    ) external payable;
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Immutable state
/// @notice Functions that return immutable state of the router
interface IPeripheryImmutableState {
    /// @return Returns the address of the Uniswap V3 factory
    function factory() external view returns (address);

    /// @return Returns the address of WETH9
    function WETH9() external view returns (address);
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Provides functions for deriving a pool address from the factory, tokens, and the fee
library PoolAddress {
    //bytes32 internal constant POOL_INIT_CODE_HASH = 0xa598dd2fba360510c5a8f02f44423a4468e902df5857dbce3ca162a43a3a31ff;
    bytes32 internal constant POOL_INIT_CODE_HASH = 0xf57b9fe2636ecff8b4cf76c1474ab8209bb74f5763b806f848e42460fba441c3;

    /// @notice The identifying key of the pool
    struct PoolKey {
        address token0;
        address token1;
        uint24 fee;
    }

    /// @notice Returns PoolKey: the ordered tokens with the matched fee levels
    /// @param tokenA The first token of a pool, unsorted
    /// @param tokenB The second token of a pool, unsorted
    /// @param fee The fee level of the pool
    /// @return Poolkey The pool details with ordered token0 and token1 assignments
    function getPoolKey(
        address tokenA,
        address tokenB,
        uint24 fee
    ) internal pure returns (PoolKey memory) {
        if (tokenA > tokenB) (tokenA, tokenB) = (tokenB, tokenA);
        return PoolKey({token0: tokenA, token1: tokenB, fee: fee});
    }

    /// @notice Deterministically computes the pool address given the factory and PoolKey
    /// @param factory The Uniswap V3 factory contract address
    /// @param key The PoolKey
    /// @return pool The contract address of the V3 pool
    function computeAddress(address factory, PoolKey memory key) internal pure returns (address pool) {
        require(key.token0 < key.token1);
        pool = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            hex'ff',
                            factory,
                            keccak256(abi.encode(key.token0, key.token1, key.fee)),
                            POOL_INIT_CODE_HASH
                        )
                    )
                )
            )
        );
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@uniswap/v3-core/=lib/v3-core/",
    "@uniswap/v3-periphery/=lib/v3-periphery/",
    "ds-test/=lib/solmate/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "murky/=lib/murky/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "solady/=lib/solady/src/",
    "solmate/=lib/solmate/src/",
    "swap-router-contracts/=lib/swap-router-contracts/contracts/",
    "v3-core/=lib/v3-core/contracts/",
    "v3-periphery/=lib/v3-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_uniswapV3Factory","type":"address"},{"internalType":"address","name":"_overTheRainbow","type":"address"},{"internalType":"address","name":"_nonfungiblePositionManager","type":"address"},{"internalType":"address","name":"_swapRouter","type":"address"},{"internalType":"address","name":"_weth","type":"address"},{"internalType":"string","name":"_baseTokenURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BannedName","type":"error"},{"inputs":[],"name":"BannedTicker","type":"error"},{"inputs":[],"name":"IncorrectSalt","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidFeeSplit","type":"error"},{"inputs":[],"name":"InvalidSupplyAllocation","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"NoFeesToClaim","type":"error"},{"inputs":[],"name":"NotUniswapPositionManager","type":"error"},{"inputs":[],"name":"ReservedName","type":"error"},{"inputs":[],"name":"ReservedTicker","type":"error"},{"inputs":[{"internalType":"bytes32","name":"value","type":"bytes32"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"StringsInsufficientHexLength","type":"error"},{"inputs":[],"name":"T","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"ZeroSupply","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"components":[{"internalType":"uint16","name":"creatorLPFeeBps","type":"uint16"},{"internalType":"uint16","name":"protocolBaseBps","type":"uint16"},{"internalType":"uint16","name":"creatorBaseBps","type":"uint16"},{"internalType":"uint16","name":"airdropBps","type":"uint16"},{"internalType":"bool","name":"hasAirdrop","type":"bool"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"address","name":"creator","type":"address"}],"indexed":false,"internalType":"struct RainbowSuperTokenFactory.FeeConfig","name":"config","type":"tuple"}],"name":"FeeConfigUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"FeesClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"creatorFee0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"creatorFee1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"protocolFee0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"protocolFee1","type":"uint256"}],"name":"FeesCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"NewDefaultPairToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pot","type":"address"}],"name":"NewPot","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":"OverTheRainbowClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"RainbowSuperTokenCreated","type":"event"},{"inputs":[],"name":"POOL_FEE","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RainbowSuperTokenContractCodeHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TICK_SPACING","outputs":[{"internalType":"int24","name":"","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"contract IWETH9","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"bool","name":"status","type":"bool"}],"name":"banName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"ticker","type":"string"},{"internalType":"bool","name":"status","type":"bool"}],"name":"banTicker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"bannedNames","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"bannedTickers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"claimCreatorFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"claimProtocolFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"collectFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"creatorUnclaimedFees","outputs":[{"internalType":"uint128","name":"unclaimed0","type":"uint128"},{"internalType":"uint128","name":"unclaimed1","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultFeeConfig","outputs":[{"internalType":"uint16","name":"creatorLPFeeBps","type":"uint16"},{"internalType":"uint16","name":"protocolBaseBps","type":"uint16"},{"internalType":"uint16","name":"creatorBaseBps","type":"uint16"},{"internalType":"uint16","name":"airdropBps","type":"uint16"},{"internalType":"bool","name":"hasAirdrop","type":"bool"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"address","name":"creator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultPairToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"bytes32","name":"merkleroot","type":"bytes32"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"originalChainId","type":"uint256"},{"internalType":"uint256","name":"airdropAmount","type":"uint256"}],"name":"launchFromOtherChain","outputs":[{"internalType":"contract RainbowSuperToken","name":"newToken","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"bytes32","name":"merkleroot","type":"bytes32"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"int24","name":"initialTick","type":"int24"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"creator","type":"address"}],"name":"launchRainbowSuperToken","outputs":[{"internalType":"contract RainbowSuperToken","name":"newToken","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"bytes32","name":"merkleroot","type":"bytes32"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"int24","name":"initialTick","type":"int24"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"launchRainbowSuperTokenAndBuy","outputs":[{"internalType":"contract RainbowSuperToken","name":"","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"nonfungiblePositionManager","outputs":[{"internalType":"contract INonfungiblePositionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"overTheRainbowPot","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creator","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"bytes32","name":"merkleroot","type":"bytes32"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"predictTokenAddress","outputs":[{"internalType":"address","name":"token","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"protocolUnclaimedFees","outputs":[{"internalType":"uint128","name":"unclaimed0","type":"uint128"},{"internalType":"uint128","name":"unclaimed1","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint16","name":"creatorLPFeeBps","type":"uint16"},{"internalType":"uint16","name":"protocolBaseBps","type":"uint16"},{"internalType":"uint16","name":"creatorBaseBps","type":"uint16"},{"internalType":"uint16","name":"airdropBps","type":"uint16"},{"internalType":"bool","name":"hasAirdrop","type":"bool"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"address","name":"creator","type":"address"}],"internalType":"struct RainbowSuperTokenFactory.FeeConfig","name":"newConfig","type":"tuple"}],"name":"setDefaultFeeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"newPairToken","type":"address"}],"name":"setNewPairToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"newPoolFee","type":"uint24"}],"name":"setNewTickSpacing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPot","type":"address"}],"name":"setPot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapRouter","outputs":[{"internalType":"contract ISwapRouter02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenFeeConfig","outputs":[{"internalType":"uint16","name":"creatorLPFeeBps","type":"uint16"},{"internalType":"uint16","name":"protocolBaseBps","type":"uint16"},{"internalType":"uint16","name":"creatorBaseBps","type":"uint16"},{"internalType":"uint16","name":"airdropBps","type":"uint16"},{"internalType":"bool","name":"hasAirdrop","type":"bool"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"address","name":"creator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenPositionIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV3Factory","outputs":[{"internalType":"contract IUniswapV3Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

610100806040523461035d576152f3803803809161001d82856104a4565b833981019060c08183031261035d57610035816104c7565b610041602083016104c7565b61004d604084016104c7565b610059606085016104c7565b93610066608082016104c7565b60a082015190916001600160401b03821161035d570186601f8201121561035d578051906001600160401b03821161047957604051976100b0601f8401601f19166020018a6104a4565b8289526020838301011161035d5760005b82811061048f575050600090870160200181905280546001600160a01b031916339081178255604051917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a36009805465ffffffffffff60a01b1916630c80027160a41b17905560a0516001600160401b0360e08301908111908311176104795760e0808301604090815261138884526101f4602085015260329084018190526060840152600060808085018290526001600160a01b0384811660a08088019190915260c096870193909352600a80546001600160e81b03191660489690961b600160481b600160e81b0316959095176632003201f4138817909455600b80546001600160a01b031916905594831690819052978216908190529581169092529116905283516001600160401b03811161047957600254946001958681811c9116801561046f575b602082101461045957601f81116103f1575b50602090601f831160011461038157918060209492600096948792610376575b505081881b9186199060031b1c1916176002555b600980546001600160a01b0319166001600160a01b0392831617905560a05160405163095ea7b360e01b815260048101939093528419602484015291938492604492849291165af1801561036a5761032d575b5081546001600160a01b031916179055604051614e1790816104dc8239608051818181610325015281816117ae015261291d015260a051818181610cba01526114b1015260c051818181610c7601528181610da801528181611f8201528181612be80152612d11015260e0518181816107500152818161091c0152818161160f015261186b0152f35b6020813d602011610362575b81610346602093836104a4565b8101031261035d57518015150361035d57386102a4565b600080fd5b3d9150610339565b6040513d6000823e3d90fd5b01519050388061023d565b869291601f19831691600260005260206000209260005b8181106103d9575091600097959391856020989694106103c1575b505050811b01600255610251565b0151871960f88460031b161c191690553880806103b3565b8284015185558a969094019360209384019301610398565b60026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f840160051c8101916020851061044f575b601f0160051c019087905b82811061044357505061021d565b60008155018790610435565b909150819061042a565b634e487b7160e01b600052602260045260246000fd5b90607f169061020b565b634e487b7160e01b600052604160045260246000fd5b80602080928401015182828c010152016100c1565b601f909101601f19168101906001600160401b0382119082101761047957604052565b51906001600160a01b038216820361035d5756fe60c080604052600436101561001357600080fd5b600090813560e01c90816212c9fd14611ffc57508063150b7a0214611f1f57806325931a0d14611edd578063295a9be914611eab5780632a93335714611b7d57806330176e13146119df57806335d256851461198f5780633c0b466914611968578063437ae03f1461191857806346ca626b146118f45780634ad3addb146118145780634e0bd384146117d25780635b5491821461178e5780635c59bf13146114415780636a23e7a31461140557806377c654a3146112d65780637f6705ee146110f8578063890f7c40146110c05780638da5cb5b1461109a5780639e2877b214611024578063a480ca7914610cde578063ad5c464814610c9a578063b44a272214610c56578063b947efcb1461099f578063ba4c851f14610940578063c31c9c07146108fc578063cdc06e3e14610877578063cf91570614610850578063d0a90be41461051d578063d547cfb714610435578063dd1b9c4a1461040f578063e4bbf6ac1461026f578063ed348895146102045763f2fde38b1461019657600080fd5b34610201576020366003190112610201576001600160a01b03196101b86120a0565b8254906001600160a01b03906101d182841633146122a6565b1691829116178255337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b80fd5b50346102015760203660031901126102015761021e6120a0565b6001600160a01b03906102358284541633146122a6565b16806001600160a01b031960095416176009557f781c0d3c0890ffa959ad14cd68cd734213a14c78c8e8e8ab21722cb4c332b4388280a280f35b50346102015760203660031901126102015760043562ffffff811680820361040b576001600160a01b036102a78185541633146122a6565b602076ffffff00000000000000000000000000000000000000006009549460a01b1692837fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff8616176009556024604051809481937f22afcccb00000000000000000000000000000000000000000000000000000000835260048301527f0000000000000000000000000000000000000000000000000000000000000000165afa80156104005784906103a0575b7fffffffffffff000000000000ffffffffffffffffffffffffffffffffffffffff915060b81b79ffffff0000000000000000000000000000000000000000000000169216171760095580f35b506020813d6020116103f8575b816103ba60209383612160565b810103126103f457518060020b81036103f4577fffffffffffff000000000000ffffffffffffffffffffffffffffffffffffffff90610354565b8380fd5b3d91506103ad565b6040513d86823e3d90fd5b8280fd5b5034610201578060031936011261020157602062ffffff60095460a01c16604051908152f35b50346102015780600319360112610201576040519080826002549161045983612247565b92838352602094600191866001821691826000146104fb5750506001146104a1575b505061048992500383612160565b61049d604051928284938452830190612281565b0390f35b90859250600282527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8583106104e35750506104899350820101388061047b565b805483890185015287945086939092019181016104cb565b925093505061048994915060ff191682840152151560051b820101388061047b565b50346102015760e0366003190112610201576001600160a01b036105458183541633146122a6565b61ffff612710808261055561327a565b1611610826578161058061057861056a61328b565b61057261329c565b906132be565b6105726132ad565b16116107fc578061058f61327a565b1691600a5463ffff00006105a161328b565b60101b16936105ae61329c565b67ffff0000000000006105bf6132ad565b60301b1691608435968715158098036107f85765ffff00000000917fffffff00000000000000000000000000000000000000000000000000000000007cffffffffffffffffffffffffffffffffffffffff0000000000000000006106216132d4565b60481b16961617179160201b16171768ff00000000000000008560401b161717600a5560c435928184168094036107f3576001600160a01b03199384600b541617600b55604051906004358481168091036107f35782526024358481168091036107f35760208301526044358481168091036107f35760408301526064359384168094036107f35760e0827fc73ba6b7e36fde820dc8829147edb8ab9ebe79ddaf183b3c8ae46fed82f02a8b9288966060889601526080820152846106e46120cc565b1660a0820152846106f36120e2565b1660c0820152a26107026132d4565b6001549082808316911603610715578280f35b6044826020936107236132d4565b1680966107348388541633146122a6565b8416176001558486604051968795869463095ea7b360e01b86527f0000000000000000000000000000000000000000000000000000000000000000166004860152600019602486015216175af180156107e8576107b9575b507fa610d93bcd97dc56acf20963d1b95492bf9dc508048d33df11f6ec0fadc53c3b8280a2388181808280f35b6107da9060203d6020116107e1575b6107d28183612160565b810190612457565b503861078c565b503d6107c8565b6040513d85823e3d90fd5b600080fd5b8880fd5b60046040517f5c4f843a000000000000000000000000000000000000000000000000000000008152fd5b60046040517f0601f697000000000000000000000000000000000000000000000000000000008152fd5b503461020157806003193601126102015760206001600160a01b0360015416604051908152f35b50346102015760e03660031901126102015767ffffffffffffffff60043581811161040b576108aa903690600401612182565b916024359182116102015760206108eb846108c83660048701612182565b906108d1612237565b6108d96120e2565b9260a4359260643591604435916124c0565b6001600160a01b0360405191168152f35b503461020157806003193601126102015760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102015761099c6020610981610957366121d9565b929061096e6001600160a01b0387541633146122a6565b8160405193828580945193849201612214565b810160048152030190209060ff801983541691151516179055565b80f35b5034610201576040366003190112610201576109b96120a0565b6109c16120b6565b906001600160a01b03908181169182855260209360058552816001604088200154163303610c2c578386526006855260408620549485875260078152604087209060405191610a0f83612128565b54956001600160801b03958688169788855260801c83850198818a52159081610c23575b50610bf9578286918a8c52600782528b6040812055838c52600582528260408d205460481c16809410600014610bf3575b888651169081610b7c575b505050508587511680610ad3575b505090519451604080516001600160801b0397871688168152919095169590951660208601525016917fd49b328847f240dd41d9f8a97b5334cb8d06f55e51ce78bacd364d5c62136d7791819081015b0390a380f35b60405163a9059cbb60e01b81526001600160a01b03861660048201526001600160801b0391909116602482015291959192908690849060449082908d908a165af1908115610b71577fd49b328847f240dd41d9f8a97b5334cb8d06f55e51ce78bacd364d5c62136d7796610acd948493610b53575b505092819650610a7d565b81610b6992903d106107e1576107d28183612160565b503880610b48565b6040513d8b823e3d90fd5b60405163a9059cbb60e01b81526001600160a01b03891660048201526001600160801b039290921660248301529092839160449183918f91165af18015610be857610bcb575b82818792610a6f565b610be190833d85116107e1576107d28183612160565b5038610bc2565b6040513d8c823e3d90fd5b92610a64565b60046040517f846d8c5c000000000000000000000000000000000000000000000000000000008152fd5b90501538610a33565b60046040517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b503461020157806003193601126102015760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461020157806003193601126102015760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461020157602080600319360112611020576001600160a01b039081610d036120a0565b1690818452600681526040842054928315610ff657604051906080820182811067ffffffffffffffff821117610fe05760405284825282820192308452604083016001600160801b0394858281809452856060880193838552604051987ffc6f7865000000000000000000000000000000000000000000000000000000008a525160048a01525116602488015251166044860152511660648401526040836084818a867f0000000000000000000000000000000000000000000000000000000000000000165af1948515610fd55787938896610f97575b50875260058152604087209460405192610df38461210c565b86549061ffff9781898416938488528a8160101c16878901528a81881c1660408901528a8160301c1660608901528060401c60ff161515608089015260481c1660a0870152600101541660c0850152612710610e5081928761246f565b049687945116610e60908361246f565b04938493610e6d91612498565b93610e7791612498565b9386885260078252604088208054908280891681841690610e97916124a5565b166fffffffffffffffffffffffffffffffff198093161790558789526007835260408920828516815460801c90610ecd916124a5565b81546001600160801b031660809190911b6fffffffffffffffffffffffffffffffff191617905587895260088352604089208054909183610f128882168285166124a5565b1691161790558688526008825260408820908516815460801c90610f35916124a5565b81546001600160801b031660809190911b6fffffffffffffffffffffffffffffffff19161790556040519485528401526040830152606082015260807f60335fc6da5dde7dc66197a635e02eb0dafc452a299f77200b64358c94cdb61691a280f35b935094506040833d604011610fcd575b81610fb460409383612160565b81010312610fc9578083519301519438610dda565b8680fd5b3d9150610fa7565b6040513d89823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b60046040517fc1ab6dc1000000000000000000000000000000000000000000000000000000008152fd5b5080fd5b5034610201578060031936011261020157600a54600b546040805161ffff8085168252601085901c811660208084019190915285901c811682840152603085901c1660608201529083901c60ff161515608082015260489290921c6001600160a01b0390811660a08401521660c082015260e090f35b50346102015780600319360112610201576001600160a01b036020915416604051908152f35b50346102015760203660031901126102015760406020916001600160a01b036110e76120a0565b168152600683522054604051908152f35b50346102015760c0366003190112610201576111126120a0565b9067ffffffffffffffff9060243582811161102057611135903690600401612182565b90604435908382116102015750611150903690600401612182565b606435916084359460a4359184151561116990886133db565b979250505060405191602098838a81019161118990858a868b8b886122f1565b0393601f1994858101825261119e9082612160565b5190206111aa90613311565b6111b39061233b565b956040519788938b85019846936111ca958b61240c565b0381810186526111da9086612160565b604080516001600160a01b0390931688840190815260208101949094528290840103908101825261120b9082612160565b519020918461194992604051908285016112259083612160565b84825282820194613499863960405193849284840196879151809261124992612214565b83019051918285830161125b92612214565b01038083520161126b9082612160565b5190209060405191848301917fff0000000000000000000000000000000000000000000000000000000000000083523060601b60218501526035840152605583015260558252608082019282841090841117610fe0576001600160a01b039183604052519020168152f35b5034610201576040366003190112610201576112f06120a0565b6112f86120b6565b906001600160a01b03906113108285541633146122a6565b81811691828552602093600685526040862054948587526008815260408720906040519161133d83612128565b54956001600160801b03958688169788855260801c83850198818a521590816113fc575b50610bf9578286918a8c52600882528b6040812055838c52600582528260408d205460481c16809410600014610bf357888651169081610b7c57505050508587511680610ad357505090519451604080516001600160801b0397871688168152919095169590951660208601525016917fd49b328847f240dd41d9f8a97b5334cb8d06f55e51ce78bacd364d5c62136d779181908101610acd565b90501538611361565b5034610201578060031936011261020157602061194960405161142a83830182612160565b818152828101916134998339519020604051908152f35b506101003660031901126102015767ffffffffffffffff60043581811161040b57611470903690600401612182565b9060243590811161040b57611489903690600401612182565b90611492612237565b61149a6120e2565b926001600160a01b03600154166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016908181146000146116cb575060e43534036116a15785813b1561020157600491604051928380927fd0e30db000000000000000000000000000000000000000000000000000000000825234905af180156116965761167b575b50918391611544935b60a4359260643591604435916124c0565b906001600160a01b03806001541691600954604051936115638561210c565b84526020840191838616835262ffffff604086019260a01c16825283606086019116815283608086019160e435835262ffffff60a08801948a86528360c08a01978c8952816040519b7f04e45aaf000000000000000000000000000000000000000000000000000000008d52511660048c0152511660248a015251166044880152511660648601525160848501525160a4840152511660c482015260208160e481866001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165af180156107e857611650575b6020826001600160a01b0360405191168152f35b602090813d8311611674575b6116668183612160565b81010312611020578161163c565b503d61165c565b9161154493919561168c86946120f8565b959193509161152a565b6040513d88823e3d90fd5b60046040517f356680b7000000000000000000000000000000000000000000000000000000008152fd5b905092909192346116a15760208660646040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260e435604482015282855af19081601f3d116001895114161516611781575b501561173d57611544928492611533565b606460405162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c45440000000000000000000000006044820152fd5b3b153d171590503861172c565b503461020157806003193601126102015760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b5034610201576020366003190112610201576004358152600860209081526040918290205482516001600160801b038216815260809190911c91810191909152f35b5034610201576020366003190112610201576004356001600160a01b0380821680920361040b576118498184541633146122a6565b816001600160a01b031960015416176001556040519063095ea7b360e01b82527f0000000000000000000000000000000000000000000000000000000000000000166004820152600019602482015260208160448186865af180156107e8576118d5575b507fa610d93bcd97dc56acf20963d1b95492bf9dc508048d33df11f6ec0fadc53c3b8280a280f35b6118ed9060203d6020116107e1576107d28183612160565b50386118ad565b5034610201578060031936011261020157602060095460b81c60020b604051908152f35b5034610201576020366003190112610201576004359067ffffffffffffffff821161020157602060ff6119528261096e3660048801612182565b8101600381520301902054166040519015158152f35b503461020157806003193601126102015760206001600160a01b0360095416604051908152f35b5034610201576020366003190112610201576004359067ffffffffffffffff821161020157602060ff6119c98261096e3660048801612182565b8101600481520301902054166040519015158152f35b50346102015760209060206003193601126102015767ffffffffffffffff60043581811161040b57611a15903690600401612182565b92611a2b6001600160a01b0384541633146122a6565b8351918211611b6957611a3f600254612247565b601f8111611b06575b50602090601f8311600114611a8557508293829392611a7a575b50508160011b916000199060031b1c19161760025580f35b015190503880611a62565b60028452601f198316947f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace929185905b878210611aee575050836001959610611ad5575b505050811b0160025580f35b015160001960f88460031b161c19169055388080611ac9565b80600185968294968601518155019501930190611ab5565b600284527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f840160051c81019160208510611b5f575b601f0160051c01905b818110611b545750611a48565b848155600101611b47565b9091508190611b3e565b602483634e487b7160e01b81526041600452fd5b5034610201576101003660031901126102015767ffffffffffffffff9060043582811161102057611bb2903690600401612182565b60243583811161040b57611bca903690600401612182565b604435916064359160843595611bde6120cc565b9460c435928515611e8157604051986020998a8101875191611c178d82818c0195611c0a818789612214565b8101038084520182612160565b5190206040518c810190665261696e626f7760c81b825260078152611c3b81612128565b51902014611e57578a9060405182810190611c628651948281890196611c0a81878a612214565b5190206040518d81019063524e425760e01b825260048152611c8381612128565b51902014611e2d57611ca38c60ff92604051809381928d51928391612214565b810160038152030190205416611e0357611ccb8b60ff92604051809381928851928391612214565b810160048152030190205416611dd957468514610c2c576001600160a01b03978881163303610c2c5760405197888c810191611d0c9087878c8888886122f1565b0398601f19998a81018252611d219082612160565b519020611d2d90613311565b9760405180928d820194611d579186602090939291936001600160a01b0360408201951681520152565b039081018252611d679082612160565b51902095611d749061233b565b90604051956119498088019588871090871117611dc55791611da495939188979593613499893960e4359461240c565b039084f5918215611db9575060405191168152f35b604051903d90823e3d90fd5b60248b634e487b7160e01b81526041600452fd5b60046040517fcf1f10ca000000000000000000000000000000000000000000000000000000008152fd5b60046040517fc2e852c0000000000000000000000000000000000000000000000000000000008152fd5b60046040517f55e33956000000000000000000000000000000000000000000000000000000008152fd5b60046040517f28a8071b000000000000000000000000000000000000000000000000000000008152fd5b60046040517fc16f3a93000000000000000000000000000000000000000000000000000000008152fd5b50346102015761099c6020611ec2610957366121d9565b810160038152030190209060ff801983541691151516179055565b5034610201576020366003190112610201576004358152600760209081526040918290205482516001600160801b038216815260809190911c91810191909152f35b503461020157608036600319011261020157611f396120a0565b50611f426120b6565b5060643567ffffffffffffffff80821161040b573660238301121561040b57816004013590811161040b5736910160240111610201576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303611fd25760206040517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b60046040517f6623c520000000000000000000000000000000000000000000000000000000008152fd5b9050346110205760203660031901126110205761049d819260406001600160a01b0391826120286120a0565b16815260056020908152919020805460019091015461ffff8083168752601083901c8116878501529282901c8316604087810191909152603083901c90931660608701529181901c60ff16151560808601526001600160a01b0360489190911c8316811660a086015291161660c083015260e0820190565b600435906001600160a01b03821682036107f357565b602435906001600160a01b03821682036107f357565b60a435906001600160a01b03821682036107f357565b60c435906001600160a01b03821682036107f357565b67ffffffffffffffff8111610fe057604052565b60e0810190811067ffffffffffffffff821117610fe057604052565b6040810190811067ffffffffffffffff821117610fe057604052565b6080810190811067ffffffffffffffff821117610fe057604052565b90601f8019910116810190811067ffffffffffffffff821117610fe057604052565b81601f820112156107f35780359067ffffffffffffffff8211610fe057604051926121b7601f8401601f191660200185612160565b828452602083830101116107f357816000926020809301838601378301015290565b60406003198201126107f3576004359067ffffffffffffffff82116107f35761220491600401612182565b9060243580151581036107f35790565b60005b8381106122275750506000910152565b8181015183820152602001612217565b608435908160020b82036107f357565b90600182811c92168015612277575b602083101461226157565b634e487b7160e01b600052602260045260246000fd5b91607f1691612256565b9060209161229a81518092818552858086019101612214565b601f01601f1916010190565b156122ad57565b606460405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152fd5b9261232390612331936001600160a01b0360a097949a99989a168652602086015260c0604086015260c0850190612281565b908382036060850152612281565b9460808201520152565b9060405191826020600060025461235181612247565b906001908181169081156123ed575060011461238e575b505061237d848261238c965194859201612214565b0103601f198101845283612160565b565b60026000908152919592507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8683106123d75750505061237d8261238c958501019194612368565b80548984018601528895509184019181016123bb565b60ff19168686015250508015150283018201905061237d61238c612368565b9261243a60a0959897969361242c6124489460c0885260c0880190612281565b908682036020880152612281565b908482036040860152612281565b95606083015260808201520152565b908160209103126107f3575180151581036107f35790565b8181029291811591840414171561248257565b634e487b7160e01b600052601160045260246000fd5b9190820391821161248257565b9190916001600160801b038080941691160191821161248257565b9196959093929660a0526080526000908615611e81576040516124f06020828451611c0a81848401858901612214565b602081519101206040516020810190665261696e626f7760c81b82526007815261251981612128565b51902014611e5757604051602081019061253e6020828851611c0a8187858d01612214565b51902060405163524e425760e01b60208201526004815261255e81612128565b6020815191012014611e2d5760ff60405160208184516125818183858901612214565b810160038152030190205416611e035760ff60405160208187516125a88183858c01612214565b810160048152030190205416611dd9576125c660a0511515886133db565b9296919390996040516125f9816125eb60208201948d888860a051926080518a6122f1565b03601f198101835282612160565b51902097886040519961260b8b612144565b60428b5260208b0160603682378b511561325257603090538a516001101561326657607860218c015360415b600181116131ed57506131b55750604080516080516001600160a01b031660208201908152918101929092529061267181606081016125eb565b5190209261267e8961233b565b9260405193611949918286019286841067ffffffffffffffff8511176131a15791869593916126b895936134998839469460a0519361240c565b039084f5938415612e1c5784976001600160a01b036001541692836001600160a01b03881611613177576001600160a01b0387163b15613155576040516340c10f1960e01b81526080516001600160a01b031660048201526024810191909152848180604481010381836001600160a01b038c165af1801561316c57613159575b506001600160a01b03600954166001600160a01b0387163b15613155576040516340c10f1960e01b81526001600160a01b0390911660048201526024810191909152838180604481010381836001600160a01b038b165af1801561040057908491613141575b5050600a546001600160a01b036001818154169261ffff604051916127c38361210c565b8181168352818160101c166020840152818160201c16604084015260301c166060820152608081019060a0511515825260a0810194855260c0810194338652848b1689526005602052604089209261ffff8351169284549363ffff0000602083015160101b16907fffffff00000000000000000000000000000000000000000000000000000000007cffffffffffffffffffffffffffffffffffffffff00000000000000000068ff000000000000000067ffff000000000000606065ffff00000000604089015160201b1697015160301b169651151560401b16965160481b1696161717171717178155019151166001600160a01b031982541617905562ffffff60095460a01c16604051907fa16712950000000000000000000000000000000000000000000000000000000082526001600160a01b03871660048301528360248301526044820152602081606481876001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165af19081156104005784916130ff575b50838560020b126000146130f5578460020b8403905b620d89e882116130cb5760018216156130a25770ffffffffffffffffffffffffffffffffff6ffffcb933bd6fad37aa2d162d1a5940015b169160028116613086575b6004811661306a575b6008811661304e575b60108116613032575b60208116613016575b60408116612ffa575b60808116612fde575b6101008116612fc2575b6102008116612fa6575b6104008116612f8a575b6108008116612f6e575b6110008116612f52575b6120008116612f36575b6140008116612f1a575b6180008116612efe575b620100008116612ee2575b620200008116612ec7575b620400008116612eac575b6208000016612e94575b848660020b13612e83575b63ffffffff8216612e7b5784905b6001600160a01b0381163b15612e775760248692836001600160a01b0360ff948160405198899788967ff637731d000000000000000000000000000000000000000000000000000000008852169060201c01166004850152165af1801561040057908491612e63575b50506001600160a01b0385163b1561040b576040516340c10f1960e01b8152306004820152602481018290528381604481836001600160a01b038b165af1801561040057908491612e4f575b5050600954908160b81c60020b8015612e3b5780620d89e80560020b02808060020b03612e2757604051958661016081011067ffffffffffffffff61016089011117610fe05762ffffff602094612c27966101608a016040526001600160a01b038b168a52868a015260a01c16604088015260020b606087015260020b60808601528060a08601528360c08601528360e08601528361010086015230610120860152426101408601526040518093819263095ea7b360e01b83526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660048401602090939291936001600160a01b0360408201951681520152565b0381856001600160a01b0389165af18015612e1c57612dfd575b50610140604051927f883164560000000000000000000000000000000000000000000000000000000084526001600160a01b0381511660048501526001600160a01b03602082015116602485015262ffffff6040820151166044850152606081015160020b6064850152608081015160020b608485015260a081015160a485015260c081015160c485015260e081015160e48501526101008101516101048501526001600160a01b0361012082015116610124850152015161014483015260808261016481846001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165af1918215612df0578192612da6575b506040906001600160a01b03841681526006602052205560405191602083527f83bae67b0e1651982d0589ac2f3e6b21e631a6315ce8f369b168cb843fdffd6f339380612da16001600160a01b0380608051169616946020830190612281565b0390a4565b9091506080813d608011612de8575b81612dc260809383612160565b8101031261102057602081519101516001600160801b0381160361102057906040612d41565b3d9150612db5565b50604051903d90823e3d90fd5b612e159060203d6020116107e1576107d28183612160565b5038612c41565b6040513d84823e3d90fd5b602485634e487b7160e01b81526011600452fd5b602485634e487b7160e01b81526012600452fd5b612e58906120f8565b61040b578238612b24565b612e6c906120f8565b61040b578238612ad8565b8580fd5b600190612a6f565b908015612e3b576000190490612a61565b906b048a170391f7dc42444e8fa20260801c90612a56565b6d2216e584f5fa1ea926041bedfe9890920260801c91612a4c565b916e5d6af8dedb81196699c329225ee6040260801c91612a41565b916f09aa508b5b7a84e1c677de54f3e99bc90260801c91612a36565b916f31be135f97d08fd981231505542fcfa60260801c91612a2b565b916f70d869a156d2a1b890bb3df62baf32f70260801c91612a21565b916fa9f746462d870fdf8a65dc1f90e061e50260801c91612a17565b916fd097f3bdfd2022b8845ad8f792aa58250260801c91612a0d565b916fe7159475a2c29b7443b29c7fa6e889d90260801c91612a03565b916ff3392b0822b70005940c7a398e4b70f30260801c916129f9565b916ff987a7253ac413176f2b074cf7815e540260801c916129ef565b916ffcbe86c7900a88aedcffc83b479aa3a40260801c916129e5565b916ffe5dee046a99a2a811c461f1969c30530260801c916129db565b916fff2ea16466c96a3843ec78b326b528610260801c916129d2565b916fff973b41fa98c081472e6896dfb254c00260801c916129c9565b916fffcb9843d60f6159c9db58835c9266440260801c916129c0565b916fffe5caca7e10e4e61c3624eaa0941cd00260801c916129b7565b916ffff2e50f5f656932ef12357cf3c7fdcc0260801c916129ae565b916ffff97272373d413259a46990580e213a0260801c916129a5565b70ffffffffffffffffffffffffffffffffff70010000000000000000000000000000000061299a565b60046040517f2bc80f3a000000000000000000000000000000000000000000000000000000008152fd5b8460020b90612963565b90506020813d602011613139575b8161311a60209383612160565b810103126103f457516001600160a01b03811681036103f4573861294d565b3d915061310d565b61314a906120f8565b61040b57823861279f565b8480fd5b613165909491946120f8565b9238612739565b6040513d87823e3d90fd5b60046040517f7cc39c4d000000000000000000000000000000000000000000000000000000008152fd5b60248a634e487b7160e01b81526041600452fd5b604490604051907f72784abf000000000000000000000000000000000000000000000000000000008252600482015260206024820152fd5b906010600f82161015613252577f3031323334353637383961626364656600000000000000000000000000000000600f82161a61322a838e6132ea565b5360041c90801561323e5760001901612637565b602489634e487b7160e01b81526011600452fd5b602489634e487b7160e01b81526032600452fd5b602488634e487b7160e01b81526032600452fd5b60043561ffff811681036107f35790565b60243561ffff811681036107f35790565b60443561ffff811681036107f35790565b60643561ffff811681036107f35790565b91909161ffff8080941691160191821161248257565b60a4356001600160a01b03811681036107f35790565b9081518110156132fb570160200190565b634e487b7160e01b600052603260045260246000fd5b806040519161331f83612144565b604283526020830160603682378351156132fb57603090538251600190600110156132fb57607860218501536041905b8082116133605750506131b5575090565b9091600f811660108110156133c6577f3031323334353637383961626364656600000000000000000000000000000000901a61339c84876132ea565b5360041c9180156133b157600019019061334f565b60246000634e487b7160e01b81526011600452fd5b60246000634e487b7160e01b81526032600452fd5b901561343c5761343490600a546134396127109161343461ffff9484613406878560201c168361246f565b04968561342b899761341d8a8860101c168661246f565b0498899660301c168461246f565b04958692612498565b612498565b93565b600a546127109161ffff926134788161345a868660201c168561246f565b04948261346c828760101c168661246f565b049460301c168361246f565b04830180931161248257613439826134348593613434600095869261249856fe60e06040908082523461056657611949803803809161001e828561056b565b833981019060c0818303126105665780516001600160401b0390818111610566578361004b91840161058e565b9060209081840151818111610566578561006691860161058e565b9486850151908282116105665761007e91860161058e565b9460608501519360a0608087015196015196815184811161055057600090806100a783546105fd565b94601f95868111610504575b5088908683116001146104a1578492610496575b50508160011b916000199060031b1c19161781555b835185811161048257806001956100f387546105fd565b868111610434575b5088908683116001146103d55784926103ca575b5050600019600383901b1c191690851b1784555b60126080524660a0528951815490828161013c846105fd565b918282528a8201948b8a821691826000146103af575050600114610372575b6101679250038261056b565b5190208a51878101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528c8201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815260c081018181108882111761035e578c5251902060c052600680546001600160a01b03191633908117909155817f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a3815194851161034a57610232600c546105fd565b838111610306575b50859285116001146102a2579394508492919083610297575b50501b916000199060031b1c191617600c555b600755600855600955516113119081610638823960805181610ae9015260a05181611088015260c051816110af0152f35b015192503880610253565b600c815285812093958591601f198316915b888383106102ec57505050106102d3575b505050811b01600c55610266565b015160001960f88460031b161c191690553880806102c5565b8587015188559096019594850194879350908101906102b4565b600c82528682208480880160051c820192898910610341575b0160051c019085905b82811061033657505061023a565b838155018590610328565b9250819261031f565b634e487b7160e01b81526041600452602490fd5b634e487b7160e01b84526041600452602484fd5b505083805281898086208987915b858310610396575050610167935082010161015b565b8091929450548385880101520191018a90898593610380565b60ff1916875261016794151560051b840101915061015b9050565b01519050388061010f565b8785528985208894509190601f198416865b8c82821061041e5750508411610405575b505050811b018455610123565b015160001960f88460031b161c191690553880806103f8565b8385015186558b979095019493840193016103e7565b9091508684528884208680850160051c8201928b8610610479575b918991869594930160051c01915b82811061046b5750506100fb565b86815585945089910161045d565b9250819261044f565b634e487b7160e01b82526041600452602482fd5b0151905038806100c7565b8480528985209250601f198416855b8b8282106104ee5750509084600195949392106104d5575b505050811b0181556100dc565b015160001960f88460031b161c191690553880806104c8565b60018596829396860151815501950193016104b0565b9091508380528884208680850160051c8201928b8610610547575b9085949392910160051c01905b81811061053957506100b3565b85815584935060010161052c565b9250819261051f565b634e487b7160e01b600052604160045260246000fd5b600080fd5b601f909101601f19168101906001600160401b0382119082101761055057604052565b919080601f840112156105665782516001600160401b03811161055057602090604051926105c583601f19601f850116018561056b565b8184528282870101116105665760005b8181106105ea57508260009394955001015290565b85810183015184820184015282016105d5565b90600182811c9216801561062d575b602083101461061757565b634e487b7160e01b600052602260045260246000fd5b91607f169161060c56fe60806040908082526004918236101561001757600080fd5b600092833560e01c92836301ffc9a714610ea55750826306fdde0314610dff578263095ea7b314610d8e5782630d788c3614610d6f57826318160ddd14610d5057826318bf507714610cc657826323b872dd14610bf55782632b8c49e314610b2c5782632eb4a7ab14610b0d578263313ce56714610acf5782633644e51514610aab5782633c130d9014610a0357826340c10f19146109ab578263601e26031461098c57826370a08231146109555782637ecebe001461091e5782638da5cb5b146108f657826395d89b4114610813578263a9059cbb14610791578263c884ef8314610755578263ca21b1771461049d578263d505accf14610233578263dd62ed3e146101e557508163f236ceb4146101c2575063f2fde38b1461013a57600080fd5b346101bf5760203660031901126101bf577fffffffffffffffffffffffff000000000000000000000000000000000000000061017461102f565b600654906001600160a01b039061018e828416331461122a565b169182911617600655337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b80fd5b9050346101e157816003193601126101e1576020906008549051908152f35b5080fd5b9091503461022f578160031936011261022f57602092829161020561102f565b61020d61104a565b916001600160a01b038092168452865283832091168252845220549051908152f35b8280fd5b8382346101e15760e03660031901126101e15761024e61102f565b9061025761104a565b91604435606435926084359260ff8416809403610499574285106104565761027d611083565b956001600160a01b038092169586895260209560058752848a209889549960018b01905585519285898501957f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c987528b89870152169a8b606086015288608086015260a085015260c084015260c0835260e0830167ffffffffffffffff948482108683111761044257818852845190206101008501927f19010000000000000000000000000000000000000000000000000000000000008452610102860152610122850152604281526101608401948186109086111761042f57848752519020835261018082015260a4356101a082015260c4356101c0909101528780528490889060809060015afa1561042557865116968715158061041c575b156103db5786977f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259596975283528087208688528352818188205551908152a380f35b83606492519162461bcd60e51b8352820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152fd5b50848814610398565b81513d88823e3d90fd5b60248c60418f634e487b7160e01b835252fd5b5060248c60418f634e487b7160e01b835252fd5b606488602084519162461bcd60e51b8352820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152fd5b8680fd5b8382346101e15760603660031901126101e15782359067ffffffffffffffff90818311610751573660238401121561075157828501359082821161074d5760059260248360051b86010194368611610499576104f761104a565b9360443592600954460361073f576001600160a01b0384961697888a52602097600b895260ff878c20541661071757898b52600b8952868b2092600193600160ff198254161790558751908a8201908c8252888a84015289835260608301918383108284111761070357828b5283519020608084019081528c83529260a001908111828210176106ee5789525190206007549590948a91906106a6575b50505050500361067e57956105af96600a5497888092611275565b60085480911161066b575b5050821561064457506105f0827f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4959697611275565b600a556105ff82600254611275565b6002558486526003835280862082815401905584867fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef858451868152a351908152a280f35b90517fb4f1abd2000000000000000000000000000000000000000000000000000000008152fd5b610676929450611060565b9186886105ba565b8682517f09bde339000000000000000000000000000000000000000000000000000000008152fd5b8493929150602401935b6106bc575b8990610594565b9091929389853591828111841b90815218528880888d20950193838510156106e85780939291506106b0565b506106b5565b505060248c60418f634e487b7160e01b835252fd5b8f8f6041602492634e487b7160e01b835252fd5b8b87517f646cf558000000000000000000000000000000000000000000000000000000008152fd5b8985516282b42960e81b8152fd5b8480fd5b8380fd5b8382346101e15760203660031901126101e15760ff816020936001600160a01b0361077e61102f565b168152600b855220541690519015158152f35b8382346101e157806003193601126101e1576020916107ae61102f565b826001600160a01b0360243592338552600387528285206107d0858254611060565b90551692838152600386522081815401905582519081527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef843392a35160018152f35b5082346101bf57806003193601126101bf5781519080600180549061083782610f74565b80865292602092600181169081156108c95750600114610871575b61086d868861086382890383610fae565b5191829182610fe6565b0390f35b9350600184527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8385106108b6575050505081016020016108638261086d86610852565b8054868601840152938201938101610899565b905061086d9795508693506020925061086394915060ff191682840152151560051b820101929486610852565b8382346101e157816003193601126101e1576020906001600160a01b03600654169051908152f35b8382346101e15760203660031901126101e157806020926001600160a01b0361094561102f565b1681526005845220549051908152f35b8382346101e15760203660031901126101e157806020926001600160a01b0361097c61102f565b1681526003845220549051908152f35b8382346101e157816003193601126101e157602090600a549051908152f35b9091503461022f578160031936011261022f576109c661102f565b9160095446036109f757836109f4846109eb6001600160a01b0360065416331461122a565b60243590611282565b80f35b516282b42960e81b8152fd5b5082346101bf57806003193601126101bf5781519080600c5490610a2682610f74565b808552916020916001918281169081156108c95750600114610a535761086d868861086382890383610fae565b9350600c84527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c75b838510610a98575050505081016020016108638261086d86610852565b8054868601840152938201938101610a7b565b8382346101e157816003193601126101e157602090610ac8611083565b9051908152f35b8382346101e157816003193601126101e1576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b8382346101e157816003193601126101e1576020906007549051908152f35b91503461022f578060031936011261022f57610b4661102f565b602435927342000000000000000000000000000000000000283303610be857506001600160a01b0316908184526003602052808420610b86848254611060565b9055826002540360025583827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60208451878152a3519182527fb90795a66650155983e242cac3e1ac1a4dc26f8ed2987f3ce416a34e00111fd460203393a380f35b82516282b42960e81b8152fd5b9083346101bf5760603660031901126101bf57610c1061102f565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef610c3961104a565b94604435856001600160a01b0380951694858752602098848a958652838920338a52865283892054856000198203610ca3575b50505086885260038552828820610c84858254611060565b9055169586815260038452208181540190558551908152a35160018152f35b610cac91611060565b90888a528652838920338a528652838920558a8085610c6c565b9091503461022f578160031936011261022f57610ce161102f565b91602435917342000000000000000000000000000000000000283303610d435750610d0c8284611282565b519081527fde22baff038e3a3e08407cbdf617deed74e869a7ba517df611e33131c6e6ea0460206001600160a01b0333941692a380f35b90516282b42960e81b8152fd5b8382346101e157816003193601126101e1576020906002549051908152f35b8382346101e157816003193601126101e1576020906009549051908152f35b9091503461022f578160031936011261022f57602092610dac61102f565b918360243592839233825287526001600160a01b038282209516948582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b5082346101bf57806003193601126101bf5781519080805490610e2182610f74565b808552916020916001918281169081156108c95750600114610e4e5761086d868861086382890383610fae565b80809550527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b838510610e92575050505081016020016108638261086d86610852565b8054868601840152938201938101610e75565b84913461022f57602036600319011261022f57357fffffffff00000000000000000000000000000000000000000000000000000000811680910361022f57602092507f33331994000000000000000000000000000000000000000000000000000000008114908115610f4a575b8115610f20575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610f19565b7f36372b070000000000000000000000000000000000000000000000000000000081149150610f12565b90600182811c92168015610fa4575b6020831014610f8e57565b634e487b7160e01b600052602260045260246000fd5b91607f1691610f83565b90601f8019910116810190811067ffffffffffffffff821117610fd057604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b82811061101b57505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610ff9565b600435906001600160a01b038216820361104557565b600080fd5b602435906001600160a01b038216820361104557565b9190820391821161106d57565b634e487b7160e01b600052601160045260246000fd5b6000467f0000000000000000000000000000000000000000000000000000000000000000036110d157507f000000000000000000000000000000000000000000000000000000000000000090565b604051815482916110e182610f74565b80825281602094858201946001908760018216918260001461120c5750506001146111b3575b5061111492500382610fae565b51902091604051918201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f845260408301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a083015260a0825260c082019082821067ffffffffffffffff83111761119f575060405251902090565b80634e487b7160e01b602492526041600452fd5b87805286915087907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8583106111f4575050611114935082010138611107565b805483880185015286945088939092019181016111dd565b60ff1916885261111495151560051b85010192503891506111079050565b1561123157565b606460405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152fd5b9190820180921161106d57565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206001600160a01b036000936112bc86600254611275565b60025516938484526003825260408420818154019055604051908152a356fea2646970667358221220b138346dce953fd161a69cf876bb0f9043b87ef5bdede027dcce7fede93019ad64736f6c63430008190033a264697066735822122009a8ee87dd3242974e3e655b60e1b0641221e8bb8ee91ac12e5f34a9fa1dd25164736f6c634300081900330000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984000000000000000000000000e4aeb08ccef4b9740289d752f3677c59d7536e65000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe8800000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002668747470733a2f2f6c61756e636865722e7261696e626f772e6d652f76312f746f6b656e732f0000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60c080604052600436101561001357600080fd5b600090813560e01c90816212c9fd14611ffc57508063150b7a0214611f1f57806325931a0d14611edd578063295a9be914611eab5780632a93335714611b7d57806330176e13146119df57806335d256851461198f5780633c0b466914611968578063437ae03f1461191857806346ca626b146118f45780634ad3addb146118145780634e0bd384146117d25780635b5491821461178e5780635c59bf13146114415780636a23e7a31461140557806377c654a3146112d65780637f6705ee146110f8578063890f7c40146110c05780638da5cb5b1461109a5780639e2877b214611024578063a480ca7914610cde578063ad5c464814610c9a578063b44a272214610c56578063b947efcb1461099f578063ba4c851f14610940578063c31c9c07146108fc578063cdc06e3e14610877578063cf91570614610850578063d0a90be41461051d578063d547cfb714610435578063dd1b9c4a1461040f578063e4bbf6ac1461026f578063ed348895146102045763f2fde38b1461019657600080fd5b34610201576020366003190112610201576001600160a01b03196101b86120a0565b8254906001600160a01b03906101d182841633146122a6565b1691829116178255337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b80fd5b50346102015760203660031901126102015761021e6120a0565b6001600160a01b03906102358284541633146122a6565b16806001600160a01b031960095416176009557f781c0d3c0890ffa959ad14cd68cd734213a14c78c8e8e8ab21722cb4c332b4388280a280f35b50346102015760203660031901126102015760043562ffffff811680820361040b576001600160a01b036102a78185541633146122a6565b602076ffffff00000000000000000000000000000000000000006009549460a01b1692837fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff8616176009556024604051809481937f22afcccb00000000000000000000000000000000000000000000000000000000835260048301527f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984165afa80156104005784906103a0575b7fffffffffffff000000000000ffffffffffffffffffffffffffffffffffffffff915060b81b79ffffff0000000000000000000000000000000000000000000000169216171760095580f35b506020813d6020116103f8575b816103ba60209383612160565b810103126103f457518060020b81036103f4577fffffffffffff000000000000ffffffffffffffffffffffffffffffffffffffff90610354565b8380fd5b3d91506103ad565b6040513d86823e3d90fd5b8280fd5b5034610201578060031936011261020157602062ffffff60095460a01c16604051908152f35b50346102015780600319360112610201576040519080826002549161045983612247565b92838352602094600191866001821691826000146104fb5750506001146104a1575b505061048992500383612160565b61049d604051928284938452830190612281565b0390f35b90859250600282527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8583106104e35750506104899350820101388061047b565b805483890185015287945086939092019181016104cb565b925093505061048994915060ff191682840152151560051b820101388061047b565b50346102015760e0366003190112610201576001600160a01b036105458183541633146122a6565b61ffff612710808261055561327a565b1611610826578161058061057861056a61328b565b61057261329c565b906132be565b6105726132ad565b16116107fc578061058f61327a565b1691600a5463ffff00006105a161328b565b60101b16936105ae61329c565b67ffff0000000000006105bf6132ad565b60301b1691608435968715158098036107f85765ffff00000000917fffffff00000000000000000000000000000000000000000000000000000000007cffffffffffffffffffffffffffffffffffffffff0000000000000000006106216132d4565b60481b16961617179160201b16171768ff00000000000000008560401b161717600a5560c435928184168094036107f3576001600160a01b03199384600b541617600b55604051906004358481168091036107f35782526024358481168091036107f35760208301526044358481168091036107f35760408301526064359384168094036107f35760e0827fc73ba6b7e36fde820dc8829147edb8ab9ebe79ddaf183b3c8ae46fed82f02a8b9288966060889601526080820152846106e46120cc565b1660a0820152846106f36120e2565b1660c0820152a26107026132d4565b6001549082808316911603610715578280f35b6044826020936107236132d4565b1680966107348388541633146122a6565b8416176001558486604051968795869463095ea7b360e01b86527f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45166004860152600019602486015216175af180156107e8576107b9575b507fa610d93bcd97dc56acf20963d1b95492bf9dc508048d33df11f6ec0fadc53c3b8280a2388181808280f35b6107da9060203d6020116107e1575b6107d28183612160565b810190612457565b503861078c565b503d6107c8565b6040513d85823e3d90fd5b600080fd5b8880fd5b60046040517f5c4f843a000000000000000000000000000000000000000000000000000000008152fd5b60046040517f0601f697000000000000000000000000000000000000000000000000000000008152fd5b503461020157806003193601126102015760206001600160a01b0360015416604051908152f35b50346102015760e03660031901126102015767ffffffffffffffff60043581811161040b576108aa903690600401612182565b916024359182116102015760206108eb846108c83660048701612182565b906108d1612237565b6108d96120e2565b9260a4359260643591604435916124c0565b6001600160a01b0360405191168152f35b503461020157806003193601126102015760206040516001600160a01b037f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45168152f35b50346102015761099c6020610981610957366121d9565b929061096e6001600160a01b0387541633146122a6565b8160405193828580945193849201612214565b810160048152030190209060ff801983541691151516179055565b80f35b5034610201576040366003190112610201576109b96120a0565b6109c16120b6565b906001600160a01b03908181169182855260209360058552816001604088200154163303610c2c578386526006855260408620549485875260078152604087209060405191610a0f83612128565b54956001600160801b03958688169788855260801c83850198818a52159081610c23575b50610bf9578286918a8c52600782528b6040812055838c52600582528260408d205460481c16809410600014610bf3575b888651169081610b7c575b505050508587511680610ad3575b505090519451604080516001600160801b0397871688168152919095169590951660208601525016917fd49b328847f240dd41d9f8a97b5334cb8d06f55e51ce78bacd364d5c62136d7791819081015b0390a380f35b60405163a9059cbb60e01b81526001600160a01b03861660048201526001600160801b0391909116602482015291959192908690849060449082908d908a165af1908115610b71577fd49b328847f240dd41d9f8a97b5334cb8d06f55e51ce78bacd364d5c62136d7796610acd948493610b53575b505092819650610a7d565b81610b6992903d106107e1576107d28183612160565b503880610b48565b6040513d8b823e3d90fd5b60405163a9059cbb60e01b81526001600160a01b03891660048201526001600160801b039290921660248301529092839160449183918f91165af18015610be857610bcb575b82818792610a6f565b610be190833d85116107e1576107d28183612160565b5038610bc2565b6040513d8c823e3d90fd5b92610a64565b60046040517f846d8c5c000000000000000000000000000000000000000000000000000000008152fd5b90501538610a33565b60046040517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b503461020157806003193601126102015760206040516001600160a01b037f000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88168152f35b503461020157806003193601126102015760206040516001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168152f35b503461020157602080600319360112611020576001600160a01b039081610d036120a0565b1690818452600681526040842054928315610ff657604051906080820182811067ffffffffffffffff821117610fe05760405284825282820192308452604083016001600160801b0394858281809452856060880193838552604051987ffc6f7865000000000000000000000000000000000000000000000000000000008a525160048a01525116602488015251166044860152511660648401526040836084818a867f000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88165af1948515610fd55787938896610f97575b50875260058152604087209460405192610df38461210c565b86549061ffff9781898416938488528a8160101c16878901528a81881c1660408901528a8160301c1660608901528060401c60ff161515608089015260481c1660a0870152600101541660c0850152612710610e5081928761246f565b049687945116610e60908361246f565b04938493610e6d91612498565b93610e7791612498565b9386885260078252604088208054908280891681841690610e97916124a5565b166fffffffffffffffffffffffffffffffff198093161790558789526007835260408920828516815460801c90610ecd916124a5565b81546001600160801b031660809190911b6fffffffffffffffffffffffffffffffff191617905587895260088352604089208054909183610f128882168285166124a5565b1691161790558688526008825260408820908516815460801c90610f35916124a5565b81546001600160801b031660809190911b6fffffffffffffffffffffffffffffffff19161790556040519485528401526040830152606082015260807f60335fc6da5dde7dc66197a635e02eb0dafc452a299f77200b64358c94cdb61691a280f35b935094506040833d604011610fcd575b81610fb460409383612160565b81010312610fc9578083519301519438610dda565b8680fd5b3d9150610fa7565b6040513d89823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b60046040517fc1ab6dc1000000000000000000000000000000000000000000000000000000008152fd5b5080fd5b5034610201578060031936011261020157600a54600b546040805161ffff8085168252601085901c811660208084019190915285901c811682840152603085901c1660608201529083901c60ff161515608082015260489290921c6001600160a01b0390811660a08401521660c082015260e090f35b50346102015780600319360112610201576001600160a01b036020915416604051908152f35b50346102015760203660031901126102015760406020916001600160a01b036110e76120a0565b168152600683522054604051908152f35b50346102015760c0366003190112610201576111126120a0565b9067ffffffffffffffff9060243582811161102057611135903690600401612182565b90604435908382116102015750611150903690600401612182565b606435916084359460a4359184151561116990886133db565b979250505060405191602098838a81019161118990858a868b8b886122f1565b0393601f1994858101825261119e9082612160565b5190206111aa90613311565b6111b39061233b565b956040519788938b85019846936111ca958b61240c565b0381810186526111da9086612160565b604080516001600160a01b0390931688840190815260208101949094528290840103908101825261120b9082612160565b519020918461194992604051908285016112259083612160565b84825282820194613499863960405193849284840196879151809261124992612214565b83019051918285830161125b92612214565b01038083520161126b9082612160565b5190209060405191848301917fff0000000000000000000000000000000000000000000000000000000000000083523060601b60218501526035840152605583015260558252608082019282841090841117610fe0576001600160a01b039183604052519020168152f35b5034610201576040366003190112610201576112f06120a0565b6112f86120b6565b906001600160a01b03906113108285541633146122a6565b81811691828552602093600685526040862054948587526008815260408720906040519161133d83612128565b54956001600160801b03958688169788855260801c83850198818a521590816113fc575b50610bf9578286918a8c52600882528b6040812055838c52600582528260408d205460481c16809410600014610bf357888651169081610b7c57505050508587511680610ad357505090519451604080516001600160801b0397871688168152919095169590951660208601525016917fd49b328847f240dd41d9f8a97b5334cb8d06f55e51ce78bacd364d5c62136d779181908101610acd565b90501538611361565b5034610201578060031936011261020157602061194960405161142a83830182612160565b818152828101916134998339519020604051908152f35b506101003660031901126102015767ffffffffffffffff60043581811161040b57611470903690600401612182565b9060243590811161040b57611489903690600401612182565b90611492612237565b61149a6120e2565b926001600160a01b03600154166001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216908181146000146116cb575060e43534036116a15785813b1561020157600491604051928380927fd0e30db000000000000000000000000000000000000000000000000000000000825234905af180156116965761167b575b50918391611544935b60a4359260643591604435916124c0565b906001600160a01b03806001541691600954604051936115638561210c565b84526020840191838616835262ffffff604086019260a01c16825283606086019116815283608086019160e435835262ffffff60a08801948a86528360c08a01978c8952816040519b7f04e45aaf000000000000000000000000000000000000000000000000000000008d52511660048c0152511660248a015251166044880152511660648601525160848501525160a4840152511660c482015260208160e481866001600160a01b037f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45165af180156107e857611650575b6020826001600160a01b0360405191168152f35b602090813d8311611674575b6116668183612160565b81010312611020578161163c565b503d61165c565b9161154493919561168c86946120f8565b959193509161152a565b6040513d88823e3d90fd5b60046040517f356680b7000000000000000000000000000000000000000000000000000000008152fd5b905092909192346116a15760208660646040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260e435604482015282855af19081601f3d116001895114161516611781575b501561173d57611544928492611533565b606460405162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c45440000000000000000000000006044820152fd5b3b153d171590503861172c565b503461020157806003193601126102015760206040516001600160a01b037f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984168152f35b5034610201576020366003190112610201576004358152600860209081526040918290205482516001600160801b038216815260809190911c91810191909152f35b5034610201576020366003190112610201576004356001600160a01b0380821680920361040b576118498184541633146122a6565b816001600160a01b031960015416176001556040519063095ea7b360e01b82527f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45166004820152600019602482015260208160448186865af180156107e8576118d5575b507fa610d93bcd97dc56acf20963d1b95492bf9dc508048d33df11f6ec0fadc53c3b8280a280f35b6118ed9060203d6020116107e1576107d28183612160565b50386118ad565b5034610201578060031936011261020157602060095460b81c60020b604051908152f35b5034610201576020366003190112610201576004359067ffffffffffffffff821161020157602060ff6119528261096e3660048801612182565b8101600381520301902054166040519015158152f35b503461020157806003193601126102015760206001600160a01b0360095416604051908152f35b5034610201576020366003190112610201576004359067ffffffffffffffff821161020157602060ff6119c98261096e3660048801612182565b8101600481520301902054166040519015158152f35b50346102015760209060206003193601126102015767ffffffffffffffff60043581811161040b57611a15903690600401612182565b92611a2b6001600160a01b0384541633146122a6565b8351918211611b6957611a3f600254612247565b601f8111611b06575b50602090601f8311600114611a8557508293829392611a7a575b50508160011b916000199060031b1c19161760025580f35b015190503880611a62565b60028452601f198316947f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace929185905b878210611aee575050836001959610611ad5575b505050811b0160025580f35b015160001960f88460031b161c19169055388080611ac9565b80600185968294968601518155019501930190611ab5565b600284527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f840160051c81019160208510611b5f575b601f0160051c01905b818110611b545750611a48565b848155600101611b47565b9091508190611b3e565b602483634e487b7160e01b81526041600452fd5b5034610201576101003660031901126102015767ffffffffffffffff9060043582811161102057611bb2903690600401612182565b60243583811161040b57611bca903690600401612182565b604435916064359160843595611bde6120cc565b9460c435928515611e8157604051986020998a8101875191611c178d82818c0195611c0a818789612214565b8101038084520182612160565b5190206040518c810190665261696e626f7760c81b825260078152611c3b81612128565b51902014611e57578a9060405182810190611c628651948281890196611c0a81878a612214565b5190206040518d81019063524e425760e01b825260048152611c8381612128565b51902014611e2d57611ca38c60ff92604051809381928d51928391612214565b810160038152030190205416611e0357611ccb8b60ff92604051809381928851928391612214565b810160048152030190205416611dd957468514610c2c576001600160a01b03978881163303610c2c5760405197888c810191611d0c9087878c8888886122f1565b0398601f19998a81018252611d219082612160565b519020611d2d90613311565b9760405180928d820194611d579186602090939291936001600160a01b0360408201951681520152565b039081018252611d679082612160565b51902095611d749061233b565b90604051956119498088019588871090871117611dc55791611da495939188979593613499893960e4359461240c565b039084f5918215611db9575060405191168152f35b604051903d90823e3d90fd5b60248b634e487b7160e01b81526041600452fd5b60046040517fcf1f10ca000000000000000000000000000000000000000000000000000000008152fd5b60046040517fc2e852c0000000000000000000000000000000000000000000000000000000008152fd5b60046040517f55e33956000000000000000000000000000000000000000000000000000000008152fd5b60046040517f28a8071b000000000000000000000000000000000000000000000000000000008152fd5b60046040517fc16f3a93000000000000000000000000000000000000000000000000000000008152fd5b50346102015761099c6020611ec2610957366121d9565b810160038152030190209060ff801983541691151516179055565b5034610201576020366003190112610201576004358152600760209081526040918290205482516001600160801b038216815260809190911c91810191909152f35b503461020157608036600319011261020157611f396120a0565b50611f426120b6565b5060643567ffffffffffffffff80821161040b573660238301121561040b57816004013590811161040b5736910160240111610201576001600160a01b037f000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88163303611fd25760206040517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b60046040517f6623c520000000000000000000000000000000000000000000000000000000008152fd5b9050346110205760203660031901126110205761049d819260406001600160a01b0391826120286120a0565b16815260056020908152919020805460019091015461ffff8083168752601083901c8116878501529282901c8316604087810191909152603083901c90931660608701529181901c60ff16151560808601526001600160a01b0360489190911c8316811660a086015291161660c083015260e0820190565b600435906001600160a01b03821682036107f357565b602435906001600160a01b03821682036107f357565b60a435906001600160a01b03821682036107f357565b60c435906001600160a01b03821682036107f357565b67ffffffffffffffff8111610fe057604052565b60e0810190811067ffffffffffffffff821117610fe057604052565b6040810190811067ffffffffffffffff821117610fe057604052565b6080810190811067ffffffffffffffff821117610fe057604052565b90601f8019910116810190811067ffffffffffffffff821117610fe057604052565b81601f820112156107f35780359067ffffffffffffffff8211610fe057604051926121b7601f8401601f191660200185612160565b828452602083830101116107f357816000926020809301838601378301015290565b60406003198201126107f3576004359067ffffffffffffffff82116107f35761220491600401612182565b9060243580151581036107f35790565b60005b8381106122275750506000910152565b8181015183820152602001612217565b608435908160020b82036107f357565b90600182811c92168015612277575b602083101461226157565b634e487b7160e01b600052602260045260246000fd5b91607f1691612256565b9060209161229a81518092818552858086019101612214565b601f01601f1916010190565b156122ad57565b606460405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152fd5b9261232390612331936001600160a01b0360a097949a99989a168652602086015260c0604086015260c0850190612281565b908382036060850152612281565b9460808201520152565b9060405191826020600060025461235181612247565b906001908181169081156123ed575060011461238e575b505061237d848261238c965194859201612214565b0103601f198101845283612160565b565b60026000908152919592507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8683106123d75750505061237d8261238c958501019194612368565b80548984018601528895509184019181016123bb565b60ff19168686015250508015150283018201905061237d61238c612368565b9261243a60a0959897969361242c6124489460c0885260c0880190612281565b908682036020880152612281565b908482036040860152612281565b95606083015260808201520152565b908160209103126107f3575180151581036107f35790565b8181029291811591840414171561248257565b634e487b7160e01b600052601160045260246000fd5b9190820391821161248257565b9190916001600160801b038080941691160191821161248257565b9196959093929660a0526080526000908615611e81576040516124f06020828451611c0a81848401858901612214565b602081519101206040516020810190665261696e626f7760c81b82526007815261251981612128565b51902014611e5757604051602081019061253e6020828851611c0a8187858d01612214565b51902060405163524e425760e01b60208201526004815261255e81612128565b6020815191012014611e2d5760ff60405160208184516125818183858901612214565b810160038152030190205416611e035760ff60405160208187516125a88183858c01612214565b810160048152030190205416611dd9576125c660a0511515886133db565b9296919390996040516125f9816125eb60208201948d888860a051926080518a6122f1565b03601f198101835282612160565b51902097886040519961260b8b612144565b60428b5260208b0160603682378b511561325257603090538a516001101561326657607860218c015360415b600181116131ed57506131b55750604080516080516001600160a01b031660208201908152918101929092529061267181606081016125eb565b5190209261267e8961233b565b9260405193611949918286019286841067ffffffffffffffff8511176131a15791869593916126b895936134998839469460a0519361240c565b039084f5938415612e1c5784976001600160a01b036001541692836001600160a01b03881611613177576001600160a01b0387163b15613155576040516340c10f1960e01b81526080516001600160a01b031660048201526024810191909152848180604481010381836001600160a01b038c165af1801561316c57613159575b506001600160a01b03600954166001600160a01b0387163b15613155576040516340c10f1960e01b81526001600160a01b0390911660048201526024810191909152838180604481010381836001600160a01b038b165af1801561040057908491613141575b5050600a546001600160a01b036001818154169261ffff604051916127c38361210c565b8181168352818160101c166020840152818160201c16604084015260301c166060820152608081019060a0511515825260a0810194855260c0810194338652848b1689526005602052604089209261ffff8351169284549363ffff0000602083015160101b16907fffffff00000000000000000000000000000000000000000000000000000000007cffffffffffffffffffffffffffffffffffffffff00000000000000000068ff000000000000000067ffff000000000000606065ffff00000000604089015160201b1697015160301b169651151560401b16965160481b1696161717171717178155019151166001600160a01b031982541617905562ffffff60095460a01c16604051907fa16712950000000000000000000000000000000000000000000000000000000082526001600160a01b03871660048301528360248301526044820152602081606481876001600160a01b037f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984165af19081156104005784916130ff575b50838560020b126000146130f5578460020b8403905b620d89e882116130cb5760018216156130a25770ffffffffffffffffffffffffffffffffff6ffffcb933bd6fad37aa2d162d1a5940015b169160028116613086575b6004811661306a575b6008811661304e575b60108116613032575b60208116613016575b60408116612ffa575b60808116612fde575b6101008116612fc2575b6102008116612fa6575b6104008116612f8a575b6108008116612f6e575b6110008116612f52575b6120008116612f36575b6140008116612f1a575b6180008116612efe575b620100008116612ee2575b620200008116612ec7575b620400008116612eac575b6208000016612e94575b848660020b13612e83575b63ffffffff8216612e7b5784905b6001600160a01b0381163b15612e775760248692836001600160a01b0360ff948160405198899788967ff637731d000000000000000000000000000000000000000000000000000000008852169060201c01166004850152165af1801561040057908491612e63575b50506001600160a01b0385163b1561040b576040516340c10f1960e01b8152306004820152602481018290528381604481836001600160a01b038b165af1801561040057908491612e4f575b5050600954908160b81c60020b8015612e3b5780620d89e80560020b02808060020b03612e2757604051958661016081011067ffffffffffffffff61016089011117610fe05762ffffff602094612c27966101608a016040526001600160a01b038b168a52868a015260a01c16604088015260020b606087015260020b60808601528060a08601528360c08601528360e08601528361010086015230610120860152426101408601526040518093819263095ea7b360e01b83526001600160a01b037f000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe881660048401602090939291936001600160a01b0360408201951681520152565b0381856001600160a01b0389165af18015612e1c57612dfd575b50610140604051927f883164560000000000000000000000000000000000000000000000000000000084526001600160a01b0381511660048501526001600160a01b03602082015116602485015262ffffff6040820151166044850152606081015160020b6064850152608081015160020b608485015260a081015160a485015260c081015160c485015260e081015160e48501526101008101516101048501526001600160a01b0361012082015116610124850152015161014483015260808261016481846001600160a01b037f000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88165af1918215612df0578192612da6575b506040906001600160a01b03841681526006602052205560405191602083527f83bae67b0e1651982d0589ac2f3e6b21e631a6315ce8f369b168cb843fdffd6f339380612da16001600160a01b0380608051169616946020830190612281565b0390a4565b9091506080813d608011612de8575b81612dc260809383612160565b8101031261102057602081519101516001600160801b0381160361102057906040612d41565b3d9150612db5565b50604051903d90823e3d90fd5b612e159060203d6020116107e1576107d28183612160565b5038612c41565b6040513d84823e3d90fd5b602485634e487b7160e01b81526011600452fd5b602485634e487b7160e01b81526012600452fd5b612e58906120f8565b61040b578238612b24565b612e6c906120f8565b61040b578238612ad8565b8580fd5b600190612a6f565b908015612e3b576000190490612a61565b906b048a170391f7dc42444e8fa20260801c90612a56565b6d2216e584f5fa1ea926041bedfe9890920260801c91612a4c565b916e5d6af8dedb81196699c329225ee6040260801c91612a41565b916f09aa508b5b7a84e1c677de54f3e99bc90260801c91612a36565b916f31be135f97d08fd981231505542fcfa60260801c91612a2b565b916f70d869a156d2a1b890bb3df62baf32f70260801c91612a21565b916fa9f746462d870fdf8a65dc1f90e061e50260801c91612a17565b916fd097f3bdfd2022b8845ad8f792aa58250260801c91612a0d565b916fe7159475a2c29b7443b29c7fa6e889d90260801c91612a03565b916ff3392b0822b70005940c7a398e4b70f30260801c916129f9565b916ff987a7253ac413176f2b074cf7815e540260801c916129ef565b916ffcbe86c7900a88aedcffc83b479aa3a40260801c916129e5565b916ffe5dee046a99a2a811c461f1969c30530260801c916129db565b916fff2ea16466c96a3843ec78b326b528610260801c916129d2565b916fff973b41fa98c081472e6896dfb254c00260801c916129c9565b916fffcb9843d60f6159c9db58835c9266440260801c916129c0565b916fffe5caca7e10e4e61c3624eaa0941cd00260801c916129b7565b916ffff2e50f5f656932ef12357cf3c7fdcc0260801c916129ae565b916ffff97272373d413259a46990580e213a0260801c916129a5565b70ffffffffffffffffffffffffffffffffff70010000000000000000000000000000000061299a565b60046040517f2bc80f3a000000000000000000000000000000000000000000000000000000008152fd5b8460020b90612963565b90506020813d602011613139575b8161311a60209383612160565b810103126103f457516001600160a01b03811681036103f4573861294d565b3d915061310d565b61314a906120f8565b61040b57823861279f565b8480fd5b613165909491946120f8565b9238612739565b6040513d87823e3d90fd5b60046040517f7cc39c4d000000000000000000000000000000000000000000000000000000008152fd5b60248a634e487b7160e01b81526041600452fd5b604490604051907f72784abf000000000000000000000000000000000000000000000000000000008252600482015260206024820152fd5b906010600f82161015613252577f3031323334353637383961626364656600000000000000000000000000000000600f82161a61322a838e6132ea565b5360041c90801561323e5760001901612637565b602489634e487b7160e01b81526011600452fd5b602489634e487b7160e01b81526032600452fd5b602488634e487b7160e01b81526032600452fd5b60043561ffff811681036107f35790565b60243561ffff811681036107f35790565b60443561ffff811681036107f35790565b60643561ffff811681036107f35790565b91909161ffff8080941691160191821161248257565b60a4356001600160a01b03811681036107f35790565b9081518110156132fb570160200190565b634e487b7160e01b600052603260045260246000fd5b806040519161331f83612144565b604283526020830160603682378351156132fb57603090538251600190600110156132fb57607860218501536041905b8082116133605750506131b5575090565b9091600f811660108110156133c6577f3031323334353637383961626364656600000000000000000000000000000000901a61339c84876132ea565b5360041c9180156133b157600019019061334f565b60246000634e487b7160e01b81526011600452fd5b60246000634e487b7160e01b81526032600452fd5b901561343c5761343490600a546134396127109161343461ffff9484613406878560201c168361246f565b04968561342b899761341d8a8860101c168661246f565b0498899660301c168461246f565b04958692612498565b612498565b93565b600a546127109161ffff926134788161345a868660201c168561246f565b04948261346c828760101c168661246f565b049460301c168361246f565b04830180931161248257613439826134348593613434600095869261249856fe60e06040908082523461056657611949803803809161001e828561056b565b833981019060c0818303126105665780516001600160401b0390818111610566578361004b91840161058e565b9060209081840151818111610566578561006691860161058e565b9486850151908282116105665761007e91860161058e565b9460608501519360a0608087015196015196815184811161055057600090806100a783546105fd565b94601f95868111610504575b5088908683116001146104a1578492610496575b50508160011b916000199060031b1c19161781555b835185811161048257806001956100f387546105fd565b868111610434575b5088908683116001146103d55784926103ca575b5050600019600383901b1c191690851b1784555b60126080524660a0528951815490828161013c846105fd565b918282528a8201948b8a821691826000146103af575050600114610372575b6101679250038261056b565b5190208a51878101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528c8201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815260c081018181108882111761035e578c5251902060c052600680546001600160a01b03191633908117909155817f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a3815194851161034a57610232600c546105fd565b838111610306575b50859285116001146102a2579394508492919083610297575b50501b916000199060031b1c191617600c555b600755600855600955516113119081610638823960805181610ae9015260a05181611088015260c051816110af0152f35b015192503880610253565b600c815285812093958591601f198316915b888383106102ec57505050106102d3575b505050811b01600c55610266565b015160001960f88460031b161c191690553880806102c5565b8587015188559096019594850194879350908101906102b4565b600c82528682208480880160051c820192898910610341575b0160051c019085905b82811061033657505061023a565b838155018590610328565b9250819261031f565b634e487b7160e01b81526041600452602490fd5b634e487b7160e01b84526041600452602484fd5b505083805281898086208987915b858310610396575050610167935082010161015b565b8091929450548385880101520191018a90898593610380565b60ff1916875261016794151560051b840101915061015b9050565b01519050388061010f565b8785528985208894509190601f198416865b8c82821061041e5750508411610405575b505050811b018455610123565b015160001960f88460031b161c191690553880806103f8565b8385015186558b979095019493840193016103e7565b9091508684528884208680850160051c8201928b8610610479575b918991869594930160051c01915b82811061046b5750506100fb565b86815585945089910161045d565b9250819261044f565b634e487b7160e01b82526041600452602482fd5b0151905038806100c7565b8480528985209250601f198416855b8b8282106104ee5750509084600195949392106104d5575b505050811b0181556100dc565b015160001960f88460031b161c191690553880806104c8565b60018596829396860151815501950193016104b0565b9091508380528884208680850160051c8201928b8610610547575b9085949392910160051c01905b81811061053957506100b3565b85815584935060010161052c565b9250819261051f565b634e487b7160e01b600052604160045260246000fd5b600080fd5b601f909101601f19168101906001600160401b0382119082101761055057604052565b919080601f840112156105665782516001600160401b03811161055057602090604051926105c583601f19601f850116018561056b565b8184528282870101116105665760005b8181106105ea57508260009394955001015290565b85810183015184820184015282016105d5565b90600182811c9216801561062d575b602083101461061757565b634e487b7160e01b600052602260045260246000fd5b91607f169161060c56fe60806040908082526004918236101561001757600080fd5b600092833560e01c92836301ffc9a714610ea55750826306fdde0314610dff578263095ea7b314610d8e5782630d788c3614610d6f57826318160ddd14610d5057826318bf507714610cc657826323b872dd14610bf55782632b8c49e314610b2c5782632eb4a7ab14610b0d578263313ce56714610acf5782633644e51514610aab5782633c130d9014610a0357826340c10f19146109ab578263601e26031461098c57826370a08231146109555782637ecebe001461091e5782638da5cb5b146108f657826395d89b4114610813578263a9059cbb14610791578263c884ef8314610755578263ca21b1771461049d578263d505accf14610233578263dd62ed3e146101e557508163f236ceb4146101c2575063f2fde38b1461013a57600080fd5b346101bf5760203660031901126101bf577fffffffffffffffffffffffff000000000000000000000000000000000000000061017461102f565b600654906001600160a01b039061018e828416331461122a565b169182911617600655337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b80fd5b9050346101e157816003193601126101e1576020906008549051908152f35b5080fd5b9091503461022f578160031936011261022f57602092829161020561102f565b61020d61104a565b916001600160a01b038092168452865283832091168252845220549051908152f35b8280fd5b8382346101e15760e03660031901126101e15761024e61102f565b9061025761104a565b91604435606435926084359260ff8416809403610499574285106104565761027d611083565b956001600160a01b038092169586895260209560058752848a209889549960018b01905585519285898501957f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c987528b89870152169a8b606086015288608086015260a085015260c084015260c0835260e0830167ffffffffffffffff948482108683111761044257818852845190206101008501927f19010000000000000000000000000000000000000000000000000000000000008452610102860152610122850152604281526101608401948186109086111761042f57848752519020835261018082015260a4356101a082015260c4356101c0909101528780528490889060809060015afa1561042557865116968715158061041c575b156103db5786977f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259596975283528087208688528352818188205551908152a380f35b83606492519162461bcd60e51b8352820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152fd5b50848814610398565b81513d88823e3d90fd5b60248c60418f634e487b7160e01b835252fd5b5060248c60418f634e487b7160e01b835252fd5b606488602084519162461bcd60e51b8352820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152fd5b8680fd5b8382346101e15760603660031901126101e15782359067ffffffffffffffff90818311610751573660238401121561075157828501359082821161074d5760059260248360051b86010194368611610499576104f761104a565b9360443592600954460361073f576001600160a01b0384961697888a52602097600b895260ff878c20541661071757898b52600b8952868b2092600193600160ff198254161790558751908a8201908c8252888a84015289835260608301918383108284111761070357828b5283519020608084019081528c83529260a001908111828210176106ee5789525190206007549590948a91906106a6575b50505050500361067e57956105af96600a5497888092611275565b60085480911161066b575b5050821561064457506105f0827f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4959697611275565b600a556105ff82600254611275565b6002558486526003835280862082815401905584867fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef858451868152a351908152a280f35b90517fb4f1abd2000000000000000000000000000000000000000000000000000000008152fd5b610676929450611060565b9186886105ba565b8682517f09bde339000000000000000000000000000000000000000000000000000000008152fd5b8493929150602401935b6106bc575b8990610594565b9091929389853591828111841b90815218528880888d20950193838510156106e85780939291506106b0565b506106b5565b505060248c60418f634e487b7160e01b835252fd5b8f8f6041602492634e487b7160e01b835252fd5b8b87517f646cf558000000000000000000000000000000000000000000000000000000008152fd5b8985516282b42960e81b8152fd5b8480fd5b8380fd5b8382346101e15760203660031901126101e15760ff816020936001600160a01b0361077e61102f565b168152600b855220541690519015158152f35b8382346101e157806003193601126101e1576020916107ae61102f565b826001600160a01b0360243592338552600387528285206107d0858254611060565b90551692838152600386522081815401905582519081527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef843392a35160018152f35b5082346101bf57806003193601126101bf5781519080600180549061083782610f74565b80865292602092600181169081156108c95750600114610871575b61086d868861086382890383610fae565b5191829182610fe6565b0390f35b9350600184527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8385106108b6575050505081016020016108638261086d86610852565b8054868601840152938201938101610899565b905061086d9795508693506020925061086394915060ff191682840152151560051b820101929486610852565b8382346101e157816003193601126101e1576020906001600160a01b03600654169051908152f35b8382346101e15760203660031901126101e157806020926001600160a01b0361094561102f565b1681526005845220549051908152f35b8382346101e15760203660031901126101e157806020926001600160a01b0361097c61102f565b1681526003845220549051908152f35b8382346101e157816003193601126101e157602090600a549051908152f35b9091503461022f578160031936011261022f576109c661102f565b9160095446036109f757836109f4846109eb6001600160a01b0360065416331461122a565b60243590611282565b80f35b516282b42960e81b8152fd5b5082346101bf57806003193601126101bf5781519080600c5490610a2682610f74565b808552916020916001918281169081156108c95750600114610a535761086d868861086382890383610fae565b9350600c84527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c75b838510610a98575050505081016020016108638261086d86610852565b8054868601840152938201938101610a7b565b8382346101e157816003193601126101e157602090610ac8611083565b9051908152f35b8382346101e157816003193601126101e1576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b8382346101e157816003193601126101e1576020906007549051908152f35b91503461022f578060031936011261022f57610b4661102f565b602435927342000000000000000000000000000000000000283303610be857506001600160a01b0316908184526003602052808420610b86848254611060565b9055826002540360025583827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60208451878152a3519182527fb90795a66650155983e242cac3e1ac1a4dc26f8ed2987f3ce416a34e00111fd460203393a380f35b82516282b42960e81b8152fd5b9083346101bf5760603660031901126101bf57610c1061102f565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef610c3961104a565b94604435856001600160a01b0380951694858752602098848a958652838920338a52865283892054856000198203610ca3575b50505086885260038552828820610c84858254611060565b9055169586815260038452208181540190558551908152a35160018152f35b610cac91611060565b90888a528652838920338a528652838920558a8085610c6c565b9091503461022f578160031936011261022f57610ce161102f565b91602435917342000000000000000000000000000000000000283303610d435750610d0c8284611282565b519081527fde22baff038e3a3e08407cbdf617deed74e869a7ba517df611e33131c6e6ea0460206001600160a01b0333941692a380f35b90516282b42960e81b8152fd5b8382346101e157816003193601126101e1576020906002549051908152f35b8382346101e157816003193601126101e1576020906009549051908152f35b9091503461022f578160031936011261022f57602092610dac61102f565b918360243592839233825287526001600160a01b038282209516948582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b5082346101bf57806003193601126101bf5781519080805490610e2182610f74565b808552916020916001918281169081156108c95750600114610e4e5761086d868861086382890383610fae565b80809550527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b838510610e92575050505081016020016108638261086d86610852565b8054868601840152938201938101610e75565b84913461022f57602036600319011261022f57357fffffffff00000000000000000000000000000000000000000000000000000000811680910361022f57602092507f33331994000000000000000000000000000000000000000000000000000000008114908115610f4a575b8115610f20575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610f19565b7f36372b070000000000000000000000000000000000000000000000000000000081149150610f12565b90600182811c92168015610fa4575b6020831014610f8e57565b634e487b7160e01b600052602260045260246000fd5b91607f1691610f83565b90601f8019910116810190811067ffffffffffffffff821117610fd057604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b82811061101b57505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610ff9565b600435906001600160a01b038216820361104557565b600080fd5b602435906001600160a01b038216820361104557565b9190820391821161106d57565b634e487b7160e01b600052601160045260246000fd5b6000467f0000000000000000000000000000000000000000000000000000000000000000036110d157507f000000000000000000000000000000000000000000000000000000000000000090565b604051815482916110e182610f74565b80825281602094858201946001908760018216918260001461120c5750506001146111b3575b5061111492500382610fae565b51902091604051918201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f845260408301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a083015260a0825260c082019082821067ffffffffffffffff83111761119f575060405251902090565b80634e487b7160e01b602492526041600452fd5b87805286915087907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8583106111f4575050611114935082010138611107565b805483880185015286945088939092019181016111dd565b60ff1916885261111495151560051b85010192503891506111079050565b1561123157565b606460405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152fd5b9190820180921161106d57565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206001600160a01b036000936112bc86600254611275565b60025516938484526003825260408420818154019055604051908152a356fea2646970667358221220b138346dce953fd161a69cf876bb0f9043b87ef5bdede027dcce7fede93019ad64736f6c63430008190033a264697066735822122009a8ee87dd3242974e3e655b60e1b0641221e8bb8ee91ac12e5f34a9fa1dd25164736f6c63430008190033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984000000000000000000000000e4aeb08ccef4b9740289d752f3677c59d7536e65000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe8800000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002668747470733a2f2f6c61756e636865722e7261696e626f772e6d652f76312f746f6b656e732f0000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _uniswapV3Factory (address): 0x1F98431c8aD98523631AE4a59f267346ea31F984
Arg [1] : _overTheRainbow (address): 0xe4aEb08ccef4b9740289d752f3677c59d7536e65
Arg [2] : _nonfungiblePositionManager (address): 0xC36442b4a4522E871399CD717aBDD847Ab11FE88
Arg [3] : _swapRouter (address): 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45
Arg [4] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [5] : _baseTokenURI (string): https://launcher.rainbow.me/v1/tokens/

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984
Arg [1] : 000000000000000000000000e4aeb08ccef4b9740289d752f3677c59d7536e65
Arg [2] : 000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88
Arg [3] : 00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45
Arg [4] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [5] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000026
Arg [7] : 68747470733a2f2f6c61756e636865722e7261696e626f772e6d652f76312f74
Arg [8] : 6f6b656e732f0000000000000000000000000000000000000000000000000000


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
0x48033c4a1c834AA1aEf91ef6FBfa8fD68fb54229
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.