ETH Price: $2,070.33 (+0.48%)
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Smoke Fees421428112026-02-14 13:16:093 hrs ago1771074969IN
Hestia: Chaos Engine
0 ETH0.00000270.00650402
Smoke Fees421283202026-02-14 5:13:0711 hrs ago1771045987IN
Hestia: Chaos Engine
0 ETH0.000001240.00300292
Hestia Rage421184202026-02-13 23:43:0716 hrs ago1771026187IN
Hestia: Chaos Engine
0 ETH0.000001350.00512107
Smoke Fees421138302026-02-13 21:10:0719 hrs ago1771017007IN
Hestia: Chaos Engine
0 ETH0.00000160.00386317
Smoke Fees420993402026-02-13 13:07:0727 hrs ago1770988027IN
Hestia: Chaos Engine
0 ETH0.000002420.0058692
Smoke Fees420848502026-02-13 5:04:0735 hrs ago1770959047IN
Hestia: Chaos Engine
0 ETH0.000002020.00488717
Hestia Rage420752202026-02-12 23:43:0740 hrs ago1770939787IN
Hestia: Chaos Engine
0 ETH0.000000770.003
Smoke Fees420703612026-02-12 21:01:0943 hrs ago1770930069IN
Hestia: Chaos Engine
0 ETH0.000001570.00381198
Set Configs420691722026-02-12 20:21:3144 hrs ago1770927691IN
Hestia: Chaos Engine
0 ETH0.000000320.00487991
Smoke Fees420558702026-02-12 12:58:072 days ago1770901087IN
Hestia: Chaos Engine
0 ETH0.000001620.00387494
Smoke Fees420413802026-02-12 4:55:072 days ago1770872107IN
Hestia: Chaos Engine
0 ETH0.000001240.003
Hestia Rage420320202026-02-11 23:43:072 days ago1770853387IN
Hestia: Chaos Engine
0 ETH0.000001070.00416339
Smoke Fees420268922026-02-11 20:52:112 days ago1770843131IN
Hestia: Chaos Engine
0 ETH0.000002450.0058936
Smoke Fees420124022026-02-11 12:49:113 days ago1770814151IN
Hestia: Chaos Engine
0 ETH0.000001450.00350151
Smoke Fees419979112026-02-11 4:46:093 days ago1770785169IN
Hestia: Chaos Engine
0 ETH0.000002430.00584588
Hestia Rage419888212026-02-10 23:43:093 days ago1770766989IN
Hestia: Chaos Engine
0 ETH0.000000970.00368939
Smoke Fees419834212026-02-10 20:43:093 days ago1770756189IN
Hestia: Chaos Engine
0 ETH0.000001730.00418036
Smoke Fees419689322026-02-10 12:40:114 days ago1770727211IN
Hestia: Chaos Engine
0 ETH0.000001690.00406618
Smoke Fees419544412026-02-10 4:37:094 days ago1770698229IN
Hestia: Chaos Engine
0 ETH0.000001240.003
Hestia Rage419456222026-02-09 23:43:114 days ago1770680591IN
Hestia: Chaos Engine
0 ETH0.000000790.003
Smoke Fees419399512026-02-09 20:34:094 days ago1770669249IN
Hestia: Chaos Engine
0 ETH0.000001240.00300157
Smoke Fees419254672026-02-09 12:31:215 days ago1770640281IN
Hestia: Chaos Engine
0 ETH0.000001250.00300825
Smoke Fees419109702026-02-09 4:28:075 days ago1770611287IN
Hestia: Chaos Engine
0 ETH0.00000130.0031301
Hestia Rage419024202026-02-08 23:43:075 days ago1770594187IN
Hestia: Chaos Engine
0 ETH0.00000250.00947955
Smoke Fees418964812026-02-08 20:25:095 days ago1770582309IN
Hestia: Chaos Engine
0 ETH0.000004360.01050282
View all transactions

Latest 1 internal transaction

Parent Transaction Hash Block From To
257733862025-01-31 15:08:39379 days ago1738336119
Hestia: Chaos Engine
 Contract Creation0 ETH

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HestiaChaosEngine

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 100 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

import {Hestia} from "./Hestia.sol";
import {ReentrancyGuard} from "./ReentrancyGuard.sol";
import {IUSDC} from "./IUSDC.sol";
import {IWETH} from "./IWETH.sol";
import {ERC20} from "./ERC20.sol";
import {Owned} from "./Owned.sol";
import {TickMath} from './TickMath.sol';
import {LiquidityAmounts} from './LiquidityAmounts.sol';
import {INonfungiblePositionManager} from "./INonfungiblePositionManager.sol";
import {IUniswapV3Pool} from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import {IUniswapV3Factory} from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol";

contract HestiaChaosEngine is ReentrancyGuard, Owned {
    // contracts set for Base chain
    IWETH private constant WETH = IWETH(0x4200000000000000000000000000000000000006);
    IUSDC private constant USDC = IUSDC(0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913);
    INonfungiblePositionManager private constant POSITION_MANAGER =
        INonfungiblePositionManager(0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1);
    IUniswapV3Factory private constant FACTORY = IUniswapV3Factory(0x33128a8fC17869897dcE68Ed026d694621f6FDfD);

    // constants already set
    uint256 private constant USDC_THOUSAND = 1000000000;
    uint256 private constant USDC_5THOUSAND = 5000000000;
    uint24 private constant POOL_FEE = 10_000;
    address private constant USDC_WETH_POOL_ADDRESS = 0xb2cc224c1c9feE385f8ad6a55b4d94E92359DC59;
    address private constant CCTP = 0x87aF913718f73168D4566bBF51683792aC2680eB;
    uint160 private constant MIN_SQRT_RATIO = 4295128739;
    uint160 private constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;
    uint256 private constant HESTIA_SUPPLY = 1_000_000e18;
    uint256 private constant BPS = 10000;
    uint256 private constant MAX_DEADLINE_DURATION = 2 minutes;
    uint256 private constant CONFIG_INTERVAL = 1 hours; 
    address private constant MULTISIG = 0x507fbdE39ba40DA4Fc79426AD5E3C64944fE43d4;

    // property that can modified only by deployer intervention
    int8 private NFT_LOCKED = 0;
    address private AUTOMATOR = 0xCBe5a4103d4C7Ed5D73d9942101473C1Bc0A8020;

    // configuration variables, can be tweaked by automator

    // USDC_CAPACITY: amount of total USDC that should be kept as reserve in contract (default 5000$)
    uint256 private USDC_CAPACITY = USDC_5THOUSAND; 

    // LIQUIDITY_SLIPPAGE for swaps, increase and decrease liquidity calls on hestia-usdc pool (0:off, range is 50:0.5% to 2500:25%)
    uint256 private LIQUIDITY_SLIPPAGE = 500;

    // SMOKE_PUBLIC, whether the smokeFees function can be accessed without privileged access
    bool private SMOKE_PUBLIC = true;

    // SMOKE_INTERVAL: minimal interval between smokeFees (range is 1 to 6 hours)
    uint256 private SMOKE_INTERVAL = 1 hours; 

    // SMOKE_CHAOS_RATIO: amount of the USDC reserve that hestiaRage will use for causeChaos volume generation (range is 0 -> off, max: $5000)
    uint256 private SMOKE_CHAOS_RATIO = USDC_THOUSAND; 

    // SMOKE_CHAOS_LOOP: amount of back and forth swap to do in cause chaos (0:off, range is 1 to 5)
    int8 private SMOKE_CHAOS_LOOP = 3;

    // SMOKE_FEED: ratio of the USDC collected fees that smokeFees will attempt to use when injecting liquidity (0:off, range is 1:100% to 100:1%)
    uint256 private SMOKE_FEED = 0;

    // SMOKE_USDC_TARGET: defines the action to do with USDC in smokeFees (0 -> keep in contract, 1 -> swap to WETH and transfer to CCTP, 2 -> transfer to Multisig, 3 -> swap to Hestia)
    int8 private SMOKE_USDC_TARGET = 0;

    // SMOKE_HESTIA_TARGET: defines the action to do with Hestia in smokeFees (0 -> keep in contract, 1 -> swap to USDC, 2 -> swap to WETH and transfer to CCTP, 3 -> transfer to 0 address, 4 -> transfer to Multisig)
    int8 private SMOKE_HESTIA_TARGET = 0;
    
    // RAGE_PUBLIC, whether the hestiaRage function can be accessed without privileged access
    bool private RAGE_PUBLIC = true;

    // RAGE_INTERVAL: minimal interval between hestiaRage (range is 6 hours to 24 hours)
    uint256 private RAGE_INTERVAL = 24 hours;

    // RAGE_FEED: amount of the USDC reserve that hestiaRage will attempt to use when injecting liquidity (0:off, max $25000)
    uint256 private RAGE_FEED = USDC_THOUSAND;

    // RAGE_LIQUIDITY_RATIO: divider used to reduce liquidity from position (0:off, range is 100:1% to 10000:0.01%)
    uint128 private RAGE_LIQUIDITY_RATIO = 250;
    
    // unset property that will be set in contract
    IUniswapV3Pool private POOL;
    IUniswapV3Pool private USDC_WETH_POOL;
    Hestia private immutable HESTIA;
    uint256 private NFT_ID;
    uint256 private NEXT_RAGE_TIME;
    uint256 private NEXT_SMOKE_TIME;
    uint256 private NEXT_CONFIG_TIME;
    address private POOL_TOKEN_0;
    address private POOL_TOKEN_1;
    address private USDC_WETH_POOL_TOKEN_0;
    address private USDC_WETH_POOL_TOKEN_1;

    // struct
    struct State {
        // global
        address owner;
        address automator;
        uint256 nextConfigTime;
        address poolAddress;
        address poolToken0;
        address poolToken1;
        address usdcWethPoolAddress;
        address usdcWethPoolToken0;
        address usdcWethPoolToken1;
        uint256 liquiditySlippage;
        uint256 nftId;
        int8 nftLocked;
        // capacity
        uint256 usdcCapacity;
        uint256 usdcExcessBalance;
        uint256 usdcTotalBalance;
        uint256 usdcChaosBalance;
        uint256 hestiaTotalBalance;
        // smokeFees
        uint256 nextSmokeTime;
        bool smokePublic;
        uint256 smokeInterval;
        uint256 smokeChaosRatio;
        int8 smokeChaosLoop;
        uint256 smokeFeed;
        int8 smokeUsdcTarget;
        int8 smokeHestiaTarget;
        // rage
        uint256 nextRageTime;
        bool ragePublic;
        uint256 rageInterval;
        uint256 rageFeed;
        uint128 rageLiquidityRatio;
    }

    // events
    event SmokedFees(uint256 hestiaBurn, uint256 usdcAmount);
    event HestiaRaged(uint256 hestiaBurn, uint256 usdcAmount);
    event SetDefaultMode();
    event SetNft(uint256 nftId);
    event LockNft(uint256 nftId);
    event SetAutomator(address automator);
    event SetUsdcWethPool(address pool);
    event ConfigChanged(
        uint256 usdcCapacity,
        uint256 liquiditySlippage,
        bool smokePublic,
        uint256 smokeInterval,
        uint256 smokeChaosRatio,
        int8 smokeChaosLoop,
        uint256 smokeFeed,
        int8 smokeUsdcTarget,
        int8 smokeHestiaTarget,
        bool ragePublic,
        uint256 rageInterval,
        uint256 rageFeed,
        uint128 rageLiquidityRatio
    );
    event HestiaFeed(uint256 hestiaIncrease, uint256 usdcIncrease);
    event HestiaBleed(uint256 hestiaDecrease, uint256 usdcDecrease);
    event SwapFailed(address tokenIn, address tokenOut, uint256 amount);
    event CauseChaosFailed(int8 loop);

    // create the Hestia token and renounce ownership
    constructor() Owned(msg.sender) {
        HESTIA = new Hestia(msg.sender, HESTIA_SUPPLY);
        HESTIA.renounceOwnership();
        HESTIA.approve(address(POSITION_MANAGER), type(uint256).max);
        USDC.approve(address(POSITION_MANAGER), type(uint256).max);
    }

    // allows contract to receive usdc
    receive() external payable nonReentrant {
        USDC.deposit{value: msg.value}();
    }

    // setNft id to contract without locking, only for owner
    // load pools in state
    function setNft(uint256 _NFT_ID) external onlyOwner nonReentrant {
        require(_NFT_ID != 0, "invalidNftId");
        require(NFT_LOCKED == 0, "nftAlreadyLocked");

        (
            ,
            ,
            address nftToken0,
            address nftToken1,
            uint24 nftFee,
            ,
            ,
            ,
            ,
            ,
            ,
        ) = POSITION_MANAGER.positions(_NFT_ID);

        // check nft has correct tokens and fees
        require(
            (nftToken0 == address(USDC) && nftToken1 == address(HESTIA)) ||
            (nftToken0 == address(HESTIA) && nftToken1 == address(USDC)),
            "nftTokensDoNoMatchPoolTokens"
        );
        require(nftFee == POOL_FEE, "nftFeeTierDoesNotMatchPool");

        // initialize the usdc hestia pool
        if (address(POOL) == address(0)) {
            POOL = IUniswapV3Pool(FACTORY.getPool(address(USDC), address(HESTIA), POOL_FEE));
            require(address(POOL) != address(0),"invalidPoolAddress");
            USDC.approve(address(POOL), type(uint256).max);
            HESTIA.approve(address(POOL), type(uint256).max);
            POOL_TOKEN_0 = POOL.token0();
            POOL_TOKEN_1 = POOL.token1();

            USDC_WETH_POOL = IUniswapV3Pool(USDC_WETH_POOL_ADDRESS);
            USDC_WETH_POOL_TOKEN_0 = USDC_WETH_POOL.token0();
            USDC_WETH_POOL_TOKEN_1 = USDC_WETH_POOL.token1();
            USDC.approve(USDC_WETH_POOL_ADDRESS, type(uint256).max);
            WETH.approve(USDC_WETH_POOL_ADDRESS, type(uint256).max);
        }

        // set the nft
        NFT_ID = _NFT_ID;

        emit SetNft(NFT_ID);
    }

    // locks the nft by transferring it to controller contract, only for owner
    function lockNFT() external onlyOwner nonReentrant {
        require(NFT_ID > 0, "nftNotSet");
        require(NFT_LOCKED == 0, "nftAlreadyLocked");
        POSITION_MANAGER.transferFrom(owner, address(this), NFT_ID);
        NFT_LOCKED = 1;
        emit LockNft(NFT_ID);
    }

    // allow the deployer to change the usdc-weth pool in case it gets changed
    function setUsdcWethPool(address poolAddress) external onlyOwner nonReentrant {
        require(poolAddress != address(0), "invalidPoolAddress");
        IUniswapV3Pool newPool = IUniswapV3Pool(poolAddress);
        address token0 = newPool.token0();
        address token1 = newPool.token1();

        require(
            (token0 == address(USDC) && token1 == address(WETH)) || (token0 == address(WETH) && token1 == address(USDC)),
            "invalidPoolTokens"
        );

        USDC_WETH_POOL = IUniswapV3Pool(poolAddress);
        USDC_WETH_POOL_TOKEN_0 = token0;
        USDC_WETH_POOL_TOKEN_1 = token1;
        USDC.approve(poolAddress, type(uint256).max);
        WETH.approve(poolAddress, type(uint256).max);

        emit SetUsdcWethPool(poolAddress);
    }

    // change automator address, only for owner or automator
    // even though its not the best practice, we choose to allow automator to name a successor himself (if deployer wallet is lost for example)
    function setAutomator(address automator) external nonReentrant {
        require(msg.sender == AUTOMATOR || msg.sender == owner, "unauthorized");
        require(automator != owner, "invalidAutomatorAddress");
        AUTOMATOR = automator;
        emit SetAutomator(automator);
    }

    // set configs of the contract, only for automator
    function setConfigs(
        uint256 usdcCapacity,
        uint256 liquiditySlippage,
        bool smokePublic,
        uint256 smokeInterval,
        uint256 smokeChaosRatio,
        int8 smokeChaosLoop,
        uint256 smokeFeed,
        int8 smokeUsdcTarget,
        int8 smokeHestiaTarget,
        bool ragePublic,
        uint256 rageInterval,
        uint256 rageFeed,
        uint128 rageLiquidityRatio
    ) external nonReentrant {
        require(msg.sender == AUTOMATOR, "unauthorized");
        require(block.timestamp >= NEXT_CONFIG_TIME, "configTimeout");
        NEXT_CONFIG_TIME = block.timestamp + CONFIG_INTERVAL;

        // for security, we want to limit the amount of change the automator can deal in one call for configs who deal with reserve usage (USDC_CAPACITY, SMOKE_CHAOS_RATIO, RAGE_FEED)
        // otherwise this could indicate an error, like forgetting a decimal, and have a huge impact on market
        // it can also limit the damage done by a compromised automator until the deployer rectifies the situation

        // capacity change limited to $5000 per call, no maximum
        uint256 minUsdcCapacity = (USDC_CAPACITY > USDC_5THOUSAND) ? USDC_CAPACITY - USDC_5THOUSAND : 0;
        require(usdcCapacity >= minUsdcCapacity && usdcCapacity <= (USDC_CAPACITY + USDC_5THOUSAND), "invalidUsdcCapacity");

        // smokeChaosRatio increase limited to $1000 per call, maximum is $5000
        require(smokeChaosRatio >= 0 && smokeChaosRatio <= (SMOKE_CHAOS_RATIO + USDC_THOUSAND) && smokeChaosRatio <= USDC_5THOUSAND, "invalidSmokeChaosRatio");

        // rageFeed increase limited to $5000 per call, maximum is $25000
        require(rageFeed >= 0 && rageFeed <= (RAGE_FEED + USDC_5THOUSAND) && rageFeed <= (USDC_5THOUSAND * 5), "invalidRageFeed");

        // liquiditySlippage at 0 to shut down the feature, otherwise maximum is 25% slippage
        require(liquiditySlippage == 0 || (liquiditySlippage >= 50 && liquiditySlippage <= 2500), "invalidLiquiditySlippage" );

        require(smokeInterval >= 1 hours && smokeInterval <= 6 hours, "invalidSmokeInterval");
        require(smokeChaosLoop >= 0 && smokeChaosLoop <= 5, "invalidSmokeChaosLoop");
        require(smokeFeed >= 0 && smokeFeed <= 100, "invalidSmokeFeed");
        require(smokeUsdcTarget >= 0 && smokeUsdcTarget <= 3, "invalidSmokeUsdcTarget");
        require(smokeHestiaTarget >= 0 && smokeHestiaTarget <= 4, "invalidSmokeHestiaTarget");
        require(rageInterval >= 6 hours && rageInterval <= 24 hours, "invalidRageInterval");
        require(rageLiquidityRatio == 0 || (rageLiquidityRatio >= 100 && rageLiquidityRatio <= 10000), "invalidRageLiquidityRatio");

        USDC_CAPACITY = usdcCapacity;
        LIQUIDITY_SLIPPAGE = liquiditySlippage;
        SMOKE_PUBLIC = smokePublic;
        SMOKE_INTERVAL = smokeInterval;
        SMOKE_CHAOS_RATIO = smokeChaosRatio;
        SMOKE_CHAOS_LOOP = smokeChaosLoop;
        SMOKE_FEED = smokeFeed;
        SMOKE_USDC_TARGET = smokeUsdcTarget;
        SMOKE_HESTIA_TARGET = smokeHestiaTarget;
        RAGE_PUBLIC = ragePublic;
        RAGE_INTERVAL = rageInterval;
        RAGE_FEED = rageFeed;
        RAGE_LIQUIDITY_RATIO = rageLiquidityRatio;

        emit ConfigChanged(
            usdcCapacity,
            liquiditySlippage,
            smokePublic,
            smokeInterval,
            smokeChaosRatio,
            smokeChaosLoop,
            smokeFeed,
            smokeUsdcTarget,
            smokeHestiaTarget,
            ragePublic,
            rageInterval,
            rageFeed,
            rageLiquidityRatio
        );
    }

    // setDefaultMode 
    // returns configuration to contract default when deployed, only for deployer
    // the default mode is balanced, but has no leaks of liquidity to CCTP
    function setDefaultMode() external onlyOwner nonReentrant {
        USDC_CAPACITY = USDC_5THOUSAND;
        LIQUIDITY_SLIPPAGE = 500;
        SMOKE_PUBLIC = true;
        SMOKE_INTERVAL = 1 hours;
        SMOKE_CHAOS_RATIO = USDC_THOUSAND;
        SMOKE_CHAOS_LOOP = 3;
        SMOKE_FEED = 0;
        SMOKE_USDC_TARGET = 0;
        SMOKE_HESTIA_TARGET = 0;
        RAGE_PUBLIC = true;
        RAGE_INTERVAL = 24 hours;
        RAGE_FEED = USDC_THOUSAND;
        RAGE_LIQUIDITY_RATIO = 250;
        emit SetDefaultMode();
    }

    // getState
    // returns the full state of the contract
    function getState() external view returns (State memory) {
        return State({
            // global
            owner: owner,
            automator: AUTOMATOR,
            nextConfigTime: NEXT_CONFIG_TIME,
            poolAddress: address(POOL),
            poolToken0: POOL_TOKEN_0,
            poolToken1: POOL_TOKEN_1,
            usdcWethPoolAddress: address(USDC_WETH_POOL),
            usdcWethPoolToken0: USDC_WETH_POOL_TOKEN_0,
            usdcWethPoolToken1: USDC_WETH_POOL_TOKEN_1,
            liquiditySlippage: LIQUIDITY_SLIPPAGE,
            nftId: NFT_ID,
            nftLocked: NFT_LOCKED,
            // capacity
            usdcCapacity: USDC_CAPACITY,
            usdcExcessBalance: getUsdcExcessBalance(),
            usdcTotalBalance: getUsdcTotalBalance(),
            usdcChaosBalance: getUsdcChaosBalance(),
            hestiaTotalBalance: getHestiaTotalBalance(),
            // smokeFees
            nextSmokeTime: NEXT_SMOKE_TIME,
            smokePublic: SMOKE_PUBLIC,
            smokeInterval: SMOKE_INTERVAL,
            smokeChaosRatio: SMOKE_CHAOS_RATIO,
            smokeChaosLoop: SMOKE_CHAOS_LOOP,
            smokeFeed: SMOKE_FEED,
            smokeUsdcTarget: SMOKE_USDC_TARGET,
            smokeHestiaTarget: SMOKE_HESTIA_TARGET,
            // rage
            nextRageTime: NEXT_RAGE_TIME,
            ragePublic: RAGE_PUBLIC,
            rageInterval: RAGE_INTERVAL,
            rageFeed: RAGE_FEED,
            rageLiquidityRatio: RAGE_LIQUIDITY_RATIO
        });
    }

    // returns the total hestiaBalance in contract
    function getHestiaTotalBalance() internal view returns(uint256) {
        return HESTIA.balanceOf(address(this));
    }

    // returns the total usdcBalance in contract
    function getUsdcTotalBalance() internal view returns(uint256) {
        return USDC.balanceOf(address(this));
    }

    // returns the total wethBalance in contract
    function getWethTotalBalance() internal view returns(uint256) {
        return WETH.balanceOf(address(this));
    }

    // returns the available usdcBalance minus the usdc that should be kept in contract
    function getUsdcExcessBalance() internal view returns(uint256) {
        uint256 realUsdcBalance = getUsdcTotalBalance();
        return (realUsdcBalance > USDC_CAPACITY) ? realUsdcBalance - USDC_CAPACITY : 0;
    }

    // returns the usdcBalance available for cause chaos in smokeFees, maximum is 5K
    function getUsdcChaosBalance() internal view returns(uint256) {
        if(SMOKE_CHAOS_RATIO == 0) return 0;
        uint256 realUsdcBalance = getUsdcTotalBalance();
        return (realUsdcBalance >= SMOKE_CHAOS_RATIO)? SMOKE_CHAOS_RATIO : realUsdcBalance;
    }

    // returns the usdcBalance available for feed in rage, maximum is 25K
    function getUsdcFeedBalance() internal view returns(uint256) {
        if(RAGE_FEED == 0) return 0;
        uint256 realUsdcBalance = getUsdcTotalBalance();
        return (realUsdcBalance >= RAGE_FEED)? RAGE_FEED : realUsdcBalance;
    }

    // smoke function
    // first, cause chaos by taking the available usdc for cause chaos and swap it back-and-forth to generate fees
    // then, collect fees from the position 
    // calculate exactly the amount gained for usdc and hestia
    // finally do some actions with each tokens, depending on configuration
    function smokeFees() external nonReentrant {
        require(SMOKE_PUBLIC || msg.sender == AUTOMATOR, "unauthorized");
        require(NFT_ID > 0, "nftNotSet");
        require(block.timestamp >= NEXT_SMOKE_TIME, "smokeTimeout");
        NEXT_SMOKE_TIME = block.timestamp + SMOKE_INTERVAL;

        // causeChaos logic, can generate additional volume and fees
        if(SMOKE_CHAOS_LOOP > 0) causeChaos();
        
        // initial balance, after cause chaos
        uint256 hestiaAmountInitial = getHestiaTotalBalance();
        uint256 usdcAmountInitial = getUsdcTotalBalance();

        // collect fees
        POSITION_MANAGER.collect(
            INonfungiblePositionManager.CollectParams({
                tokenId: NFT_ID,
                recipient: address(this),
                amount0Max: type(uint128).max,
                amount1Max: type(uint128).max
            })
        );

        // calculate usdc and hestia gained
        uint256 hestiaAmountAfter = getHestiaTotalBalance();
        uint256 usdcAmountAfter = getUsdcTotalBalance();
        uint256 hestiaAmountGained = (hestiaAmountAfter >= hestiaAmountInitial)? hestiaAmountAfter - hestiaAmountInitial : 0;
        uint256 usdcAmountGained = (usdcAmountAfter >= usdcAmountInitial)? usdcAmountAfter - usdcAmountInitial: 0;
        uint256 hestiaAmountEvent = hestiaAmountGained;
        uint256 usdcAmountEvent = usdcAmountGained;

        // attempt liquidity increase from gained fees
        if(SMOKE_FEED > 0 && hestiaAmountGained > 0 && usdcAmountGained > 0) 
        {
            uint256 availableUsdcGained = usdcAmountGained / SMOKE_FEED;
            if(availableUsdcGained > 0) increaseLiquidity(hestiaAmountGained, availableUsdcGained);

            // recalculate usdc and hestia gained after liquidity increase
            hestiaAmountAfter = getHestiaTotalBalance();
            usdcAmountAfter = getUsdcTotalBalance();
            hestiaAmountGained = (hestiaAmountAfter >= hestiaAmountInitial)? hestiaAmountAfter - hestiaAmountInitial : 0;
            usdcAmountGained = (usdcAmountAfter >= usdcAmountInitial)? usdcAmountAfter - usdcAmountInitial: 0;
        }

        // swap hestia for usdc
        if (hestiaAmountGained > 0 && SMOKE_HESTIA_TARGET == 1) 
        {
            swap(address(HESTIA),address(USDC),hestiaAmountGained);
            
            // recalculate usdc and hestia gained after swap
            hestiaAmountAfter = getHestiaTotalBalance();
            usdcAmountAfter = getUsdcTotalBalance();
            hestiaAmountGained = (hestiaAmountAfter >= hestiaAmountInitial)? hestiaAmountAfter - hestiaAmountInitial : 0;
            usdcAmountGained = (usdcAmountAfter >= usdcAmountInitial)? usdcAmountAfter - usdcAmountInitial: 0;
        }
        
        // for hestia to cctp, we need to do 2 swaps (to usdc and then to weth)
        if(hestiaAmountGained > 0 && SMOKE_HESTIA_TARGET == 2)
        {
            uint256 usdcAmountBeforeSwap = getUsdcTotalBalance();
            swap(address(HESTIA),address(USDC),hestiaAmountGained);
            uint256 usdcAmountAfterSwap = getUsdcTotalBalance();
            uint256 usdcAmountGainedBySwap = (usdcAmountAfterSwap > usdcAmountBeforeSwap) ? usdcAmountAfterSwap - usdcAmountBeforeSwap: 0;

            if(usdcAmountGainedBySwap > 0)
            {
                swapUsdcForWeth(usdcAmountGainedBySwap);
                uint256 wethGained = getWethTotalBalance();
                if(wethGained > 0) WETH.transfer(CCTP, wethGained);
            }

            // recalculate usdc and hestia gained after both swaps
            hestiaAmountAfter = getHestiaTotalBalance();
            usdcAmountAfter = getUsdcTotalBalance();
            hestiaAmountGained = (hestiaAmountAfter >= hestiaAmountInitial)? hestiaAmountAfter - hestiaAmountInitial : 0;
            usdcAmountGained = (usdcAmountAfter >= usdcAmountInitial)? usdcAmountAfter - usdcAmountInitial: 0;
        }

        // for usdc to CCTP we need to swap to WETH first
        if (usdcAmountGained > 0 && SMOKE_USDC_TARGET == 1) {
            swapUsdcForWeth(usdcAmountGained);
            uint256 wethGained = getWethTotalBalance();
            if(wethGained > 0) WETH.transfer(CCTP, wethGained);
        }

        if (usdcAmountGained > 0 && SMOKE_USDC_TARGET == 2) USDC.transfer(MULTISIG, usdcAmountGained);

        // this setting could be used to acquire extra hestia to increase liquidity in rage function when reserve is large
        if (usdcAmountGained > 0 && SMOKE_USDC_TARGET == 3)
        {
            swap(address(USDC),address(HESTIA),usdcAmountGained);
            // only update hestia gained at this stage
            hestiaAmountAfter = getHestiaTotalBalance();
            hestiaAmountGained = (hestiaAmountAfter >= hestiaAmountInitial)? hestiaAmountAfter - hestiaAmountInitial : 0;
        }

        // transfer possible to do with gained hestia
        if (hestiaAmountGained > 0 && SMOKE_HESTIA_TARGET == 3) HESTIA.transfer(address(0), hestiaAmountGained);
        if (hestiaAmountGained > 0 && SMOKE_HESTIA_TARGET == 4) HESTIA.transfer(MULTISIG, hestiaAmountGained);

        emit SmokedFees(hestiaAmountEvent, usdcAmountEvent);
    }

    // rage function
    // decrease liquidity from the pool and collect the pool fees
    // ratio of decrease can be tweaked
    // the USDC is kept in contract to fill up the capacity
    // 100% of excess USDC is used to market buy HESTIA
    // send remaining HESTIA to the burn address
    function hestiaRage() external nonReentrant {
        require(RAGE_PUBLIC || msg.sender == AUTOMATOR, "unauthorized");
        require(NFT_ID > 0, "nftNotSet");
        require(block.timestamp >= NEXT_RAGE_TIME, "rageTimeout");
        NEXT_RAGE_TIME = block.timestamp + RAGE_INTERVAL;
        
        uint256 initialUsdcAmount = getUsdcTotalBalance();
        uint256 initialHestiaAmount = getHestiaTotalBalance();

        // in this mode, we will attempt to increase liquidity with whatever hestia we have in the contract and the matching reserve
        // this will mostly be used in phase 0
        if(initialUsdcAmount > 0 && initialHestiaAmount > 0) 
        {
            uint256 availableUsdcForLiquidity = getUsdcFeedBalance();
            if(availableUsdcForLiquidity > 0) 
            {
                increaseLiquidity(initialHestiaAmount, availableUsdcForLiquidity);
                // update the initial amounts for the rest of the function
                initialUsdcAmount = getUsdcTotalBalance();
                initialHestiaAmount = getHestiaTotalBalance();
            }
        }

        // decrease liquidity in pool by provided ratio
        // providing 0 as liquidity ratio would disable completely the liquidity decrease and fee collection
        if(RAGE_LIQUIDITY_RATIO >= 100)
        {
            (, , , , , , , uint128 liquidity, , , , ) = POSITION_MANAGER.positions(NFT_ID);
            uint128 liquidityToBurn = liquidity / RAGE_LIQUIDITY_RATIO;
            uint256 amount0Min = 0;
            uint256 amount1Min = 0;
            
            // calculate slippage protection, can be disabled
            if(LIQUIDITY_SLIPPAGE >= 50)
            (amount0Min, amount1Min) = calculateMinimalDecreaseAmounts(liquidityToBurn);

            POSITION_MANAGER.decreaseLiquidity(
                INonfungiblePositionManager.DecreaseLiquidityParams({
                    tokenId: NFT_ID,
                    liquidity: liquidityToBurn,
                    amount0Min: amount0Min,
                    amount1Min: amount1Min,
                    deadline: block.timestamp + MAX_DEADLINE_DURATION
                })
            );

            // decreased liquidity is collected as fees
            POSITION_MANAGER.collect(
                INonfungiblePositionManager.CollectParams({
                    tokenId: NFT_ID,
                    recipient: address(this),
                    amount0Max: type(uint128).max,
                    amount1Max: type(uint128).max
                })
            );

            uint256 usdcAmountAfter = getUsdcTotalBalance();
            uint256 hestiaAmountAfter = getHestiaTotalBalance();
            uint256 usdcAmountDiff = (usdcAmountAfter >= initialUsdcAmount)? usdcAmountAfter - initialUsdcAmount: 0;
            uint256 hestiaAmountDiff = (hestiaAmountAfter >= initialHestiaAmount)? hestiaAmountAfter - initialHestiaAmount: 0;

            emit HestiaBleed(hestiaAmountDiff, usdcAmountDiff);
        }

        // swap usdc excess balance (over capacity) to hestia
        uint256 usdcAmount = getUsdcExcessBalance();
        if (usdcAmount > 0) swap(address(USDC),address(HESTIA),usdcAmount);

        // burn all hestia still left in contract
        uint256 hestiaAmount = getHestiaTotalBalance();
        if (hestiaAmount > 0) HESTIA.transfer(address(0), hestiaAmount);

        emit HestiaRaged(hestiaAmount, usdcAmount);
    }

    // internal function to causeChaos, used in the smoke fees function
    function causeChaos() internal {
        uint256 chaosBalance = getUsdcChaosBalance();
        uint256 hestiaBalanceInitial = getHestiaTotalBalance();

        if(chaosBalance > 0 && SMOKE_CHAOS_LOOP > 0)
        {
            for(int8 i=1; i <= SMOKE_CHAOS_LOOP; i++)
            {
                // if the reserve has more than the chaos balance limit, then multiple loops of causeChaos should cause slight price increase
                uint256 usdcBalance = getUsdcChaosBalance();
                if(usdcBalance > 0) 
                {
                    swap(address(USDC),address(HESTIA),usdcBalance);
                    uint256 hestiaBalance = getHestiaTotalBalance();

                    // error if hestiaBalance is not larger than the initial, this should not happen - revert otherwise we are losing usdc reserve
                    require(hestiaBalance > hestiaBalanceInitial,'invalidHestiaBalance');

                    // we only want to swap back the hestia gained from previous swap
                    uint256 hestiaBalanceExcess = hestiaBalance - hestiaBalanceInitial;
                    swap(address(HESTIA),address(USDC),hestiaBalanceExcess);
                }

                // highly unlikely, but would mean available usdc is completely empty, we can break the loop without reverting
                else
                {
                    emit CauseChaosFailed(i);
                    break;
                }
            }
        }
    }

    // attempt to increase using the acquired fees liquidity
    function increaseLiquidity(uint256 hestiaGained, uint256 usdcGained) internal {
        bool isToken0Usdc = POOL_TOKEN_0 == address(USDC);
                
        (uint256 amount0Desired, uint256 amount1Desired, uint256 amount0Min, uint256 amount1Min) = calculateOptimalIncreaseAmounts(
            isToken0Usdc ? usdcGained : hestiaGained,
            isToken0Usdc ? hestiaGained : usdcGained
        );
            
        if(amount0Desired > 0 && amount1Desired > 0)
        {
            POSITION_MANAGER.increaseLiquidity(
                INonfungiblePositionManager.IncreaseLiquidityParams({
                    tokenId: NFT_ID,
                    amount0Desired: amount0Desired,
                    amount1Desired: amount1Desired,
                    amount0Min: amount0Min,
                    amount1Min: amount1Min,
                    deadline: block.timestamp + MAX_DEADLINE_DURATION
                })
            );

            emit HestiaFeed(
                isToken0Usdc ? amount1Desired: amount0Desired, 
                isToken0Usdc ? amount0Desired: amount1Desired
            );
        }
    }

    // swap function for using the usdc_hestia pool
    function swap(address tokenIn, address tokenOut, uint256 amount) internal {
        require(amount > 0, "swapZeroAmount");
        require(address(POOL) != address(0), "poolNotSet");
        require(tokenIn == address(USDC) || tokenIn == address(HESTIA), "invalidTokenIn");
        require(tokenOut == address(USDC) || tokenOut == address(HESTIA), "invalidTokenOut");
        require(tokenIn != tokenOut, "invalidTokens");

        bool zeroForOne = tokenIn == POOL_TOKEN_0;
        uint160 sqrtPriceLimitX96 = zeroForOne ? MIN_SQRT_RATIO + 1 : MAX_SQRT_RATIO - 1;

        // adding liquidity slippage protection for swaps
        if(LIQUIDITY_SLIPPAGE >= 50) 
        {
            (uint160 currentSqrtPriceX96,,,,,,) = POOL.slot0();
            if (zeroForOne) {
                // when selling token0 (zeroForOne = true)
                // we want to limit the price from going too low
                uint256 adjustedPrice = uint256(currentSqrtPriceX96) * swapSqrt(BPS - LIQUIDITY_SLIPPAGE);
                sqrtPriceLimitX96 = uint160(adjustedPrice / swapSqrt(BPS));
            } else {
                // when selling token1 (zeroForOne = false)
                // we want to limit the price from going too high, so we invert the slippage
                uint256 adjustedPrice = uint256(currentSqrtPriceX96) * swapSqrt(BPS);
                sqrtPriceLimitX96 = uint160(adjustedPrice / swapSqrt(BPS - LIQUIDITY_SLIPPAGE));
            }
        }

        try POOL.swap(
            address(this), 
            zeroForOne, 
            int256(amount), 
            sqrtPriceLimitX96, 
            abi.encode(tokenIn)
        ) {} catch {
            emit SwapFailed(tokenIn, tokenOut, amount);
            revert("swapFailed");
        }
    }

    // swapUsdcForWeth using the set usdc_weth_pool
    function swapUsdcForWeth(uint256 amount) internal {
        require(amount > 0, "swapZeroAmount");
        require(address(USDC_WETH_POOL) != address(0), "poolNotSet");

        bool zeroForOne = address(USDC) == USDC_WETH_POOL_TOKEN_0;

        // this swap has no slippage protection, we were unable to make it work probably due to decimal difference between both tokens
        // this will likely have minimal impact has the USDC-WETH pool has huge liquidity
        uint160 sqrtPriceLimitX96 = zeroForOne ? MIN_SQRT_RATIO + 1 : MAX_SQRT_RATIO - 1;

        try USDC_WETH_POOL.swap(
            address(this),
            zeroForOne,
            int256(amount),
            sqrtPriceLimitX96,
            abi.encode(address(USDC))
        ) {} catch {
            emit SwapFailed(address(USDC), address(WETH), amount);
            revert("swapFailed");
        }
    }

    // swap callback function
    function uniswapV3SwapCallback(int amount0, int amount1, bytes calldata data) external {
        require(
            (msg.sender == address(POOL) || msg.sender == address(USDC_WETH_POOL)) && tx.origin != address(this), 
            "swapCallbackNotAuthorized"
        );
        
        (address tokenIn) = abi.decode(data, (address));

        IUniswapV3Pool pool = IUniswapV3Pool(msg.sender);
        bool isToken0 = pool.token0() == tokenIn;
        uint256 amountToPay = uint256(isToken0 ? amount0 : amount1);
        ERC20(tokenIn).transfer(msg.sender, amountToPay);
    }

    // helper function to calculate square root for swap functions
    function swapSqrt(uint256 x) internal pure returns (uint256) {
        if (x == 0) return 0;
        
        uint256 z = (x + 1) / 2;
        uint256 y = x;
        
        while (z < y) {
            y = z;
            z = (x / z + z) / 2;
        }
        
        return y;
    }

    // function used to increaseLiquidity to NFT
    // slippage can be enable or disabled in config
    function calculateOptimalIncreaseAmounts(
        uint256 amount0Available,
        uint256 amount1Available
    ) internal view returns (uint256 amount0Desired, uint256 amount1Desired, uint256 amount0Min, uint256 amount1Min) {
        require(amount0Available > 0 && amount1Available > 0, "invalidAmounts");

        // get position details
        (
            ,
            ,
            ,
            ,
            ,
            int24 tickLower,
            int24 tickUpper,
            ,
            ,
            ,
            ,
        ) = POSITION_MANAGER.positions(NFT_ID);

        // get current sqrt price
        (uint160 sqrtPriceX96, , , , , , ) = POOL.slot0();

        uint160 sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);
        uint160 sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);

        uint128 liquidity = LiquidityAmounts.getLiquidityForAmounts(
            sqrtPriceX96,
            sqrtRatioAX96,
            sqrtRatioBX96,
            amount0Available,
            amount1Available
        );
        require(liquidity > 0, "insufficientLiquidity");

        (amount0Desired, amount1Desired) = LiquidityAmounts.getAmountsForLiquidity(
            sqrtPriceX96,
            sqrtRatioAX96,
            sqrtRatioBX96,
            liquidity
        );
        require(amount0Desired > 0 || amount1Desired > 0, "invalidDesiredAmounts");

        // calculate minimum amounts accounting for slippage
        amount0Min = (LIQUIDITY_SLIPPAGE >= 50)? (amount0Desired * (BPS - LIQUIDITY_SLIPPAGE)) / BPS: 0;
        amount1Min = (LIQUIDITY_SLIPPAGE >= 50)? (amount1Desired * (BPS - LIQUIDITY_SLIPPAGE)) / BPS: 0;
    }

    // function used to decreaseLiquidity in NFT
    // this will only be called if decrease function wants slippage calculation
    function calculateMinimalDecreaseAmounts(uint128 liquidityToRemove) internal view returns (uint256 amount0Min, uint256 amount1Min) {
        require(liquidityToRemove > 0, "invalidLiquidityAmount");

        // get position details
        (
            ,
            ,
            ,
            ,
            ,
            int24 tickLower,
            int24 tickUpper,
            ,
            ,
            ,
            ,
        ) = POSITION_MANAGER.positions(NFT_ID);

        // get current sqrt price
        (uint160 sqrtPriceX96, , , , , , ) = POOL.slot0();

        // calculate expected amounts from liquidity
        (uint256 amount0Expected, uint256 amount1Expected) = LiquidityAmounts.getAmountsForLiquidity(
            sqrtPriceX96,
            TickMath.getSqrtRatioAtTick(tickLower),
            TickMath.getSqrtRatioAtTick(tickUpper),
            liquidityToRemove
        );

        // calculate minimum amounts accounting for slippage
        amount0Min = (amount0Expected * (BPS - LIQUIDITY_SLIPPAGE)) / BPS;
        amount1Min = (amount1Expected * (BPS - LIQUIDITY_SLIPPAGE)) / BPS;
    }
}

// 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: 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.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);
}

// 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;
}

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

import './pool/IUniswapV3PoolImmutables.sol';
import './pool/IUniswapV3PoolState.sol';
import './pool/IUniswapV3PoolDerivedState.sol';
import './pool/IUniswapV3PoolActions.sol';
import './pool/IUniswapV3PoolOwnerActions.sol';
import './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,
    IUniswapV3PoolEvents
{

}

// 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 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
        );
}

File 10 of 30 : 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: 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 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);
}

// 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
    /// 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.
    /// observationIndex The index of the last oracle observation that was written,
    /// observationCardinality The current maximum number of observations stored in the pool,
    /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.
    /// 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
    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,
    /// liquidityNet how much liquidity changes when the pool price crosses the tick,
    /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,
    /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,
    /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick
    /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,
    /// secondsOutside the seconds spent on the other side of the tick from the current tick,
    /// 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,
    /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
    /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
    /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,
    /// Returns 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,
    /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
    /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
    /// Returns 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
        );
}

File 14 of 30 : FixedPoint96.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.4.0;

/// @title FixedPoint96
/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)
/// @dev Used in SqrtPriceMath.sol
library FixedPoint96 {
    uint8 internal constant RESOLUTION = 96;
    uint256 internal constant Q96 = 0x1000000000000000000000000;
}

// 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.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.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.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: 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: MIT
pragma solidity ^0.8.26;

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = a * b
            // Compute the product mod 2**256 and mod 2**256 - 1
            // then use the Chinese Remainder Theorem to reconstruct
            // the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2**256 + prod0
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(a, b, not(0))
                prod0 := mul(a, b)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division
            if (prod1 == 0) {
                require(denominator > 0);
                assembly {
                    result := div(prod0, denominator)
                }
                return result;
            }

            // Make sure the result is less than 2**256.
            // Also prevents denominator == 0
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0]
            // Compute remainder using mulmod
            uint256 remainder;
            assembly {
                remainder := mulmod(a, b, denominator)
            }
            // Subtract 256 bit number from 512 bit number
            assembly {
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator
            // Compute largest power of two divisor of denominator.
            // Always >= 1.
            uint256 twos = (0 - denominator) & denominator;
            // Divide denominator by power of two
            assembly {
                denominator := div(denominator, twos)
            }

            // Divide [prod1 prod0] by the factors of two
            assembly {
                prod0 := div(prod0, twos)
            }
            // Shift in bits from prod1 into prod0. For this we need
            // to flip `twos` such that it is 2**256 / twos.
            // If twos is zero, then it becomes one
            assembly {
                twos := add(div(sub(0, twos), twos), 1)
            }
            prod0 |= prod1 * twos;

            // Invert denominator mod 2**256
            // Now that denominator is an odd number, it has an inverse
            // modulo 2**256 such that denominator * inv = 1 mod 2**256.
            // Compute the inverse by starting with a seed that is correct
            // correct for four bits. That is, denominator * inv = 1 mod 2**4
            uint256 inv = (3 * denominator) ^ 2;
            // Now use Newton-Raphson iteration to improve the precision.
            // Thanks to Hensel's lifting lemma, this also works in modular
            // arithmetic, doubling the correct bits in each step.
            inv *= 2 - denominator * inv; // inverse mod 2**8
            inv *= 2 - denominator * inv; // inverse mod 2**16
            inv *= 2 - denominator * inv; // inverse mod 2**32
            inv *= 2 - denominator * inv; // inverse mod 2**64
            inv *= 2 - denominator * inv; // inverse mod 2**128
            inv *= 2 - denominator * inv; // inverse mod 2**256

            // Because the division is now exact we can divide by multiplying
            // with the modular inverse of denominator. This will give us the
            // correct result modulo 2**256. Since the precoditions guarantee
            // that the outcome is less than 2**256, this is the final result.
            // We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inv;
            return result;
        }
    }

    /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    function mulDivRoundingUp(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            result = mulDiv(a, b, denominator);
            if (mulmod(a, b, denominator) > 0) {
                require(result < type(uint256).max);
                result++;
            }
        }
    }
}

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

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

contract Hestia is ERC20, Owned {
    constructor(address deployer, uint256 supply) ERC20("Hestia", "HESTIA", 18) Owned(msg.sender) {
        _mint(deployer, supply);
    }

    function renounceOwnership() external onlyOwner {
        transferOwnership(address(0));
    }
}

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

pragma solidity ^0.8.26;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// 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 '@uniswap/v3-periphery/contracts/interfaces/IPoolInitializer.sol';
import '@uniswap/v3-periphery/contracts/interfaces/IERC721Permit.sol';
import '@uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments.sol';
import '@uniswap/v3-periphery/contracts/interfaces/IPeripheryImmutableState.sol';
import './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.26;

import {IERC20} from "./IERC20.sol";

interface IUSDC is IERC20 {
    function deposit() external payable;

    function withdraw(uint256) external;
}

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

import {IERC20} from "./IERC20.sol";

interface IWETH is IERC20 {
    function deposit() external payable;

    function withdraw(uint256) external;
}

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

import {FullMath} from './FullMath.sol';
import {FixedPoint96} from '@uniswap/v3-core/contracts/libraries/FixedPoint96.sol';

/// @title Liquidity amount functions
/// @notice Provides functions for computing liquidity amounts from token amounts and prices
library LiquidityAmounts {
    /// @notice Downcasts uint256 to uint128
    /// @param x The uint258 to be downcasted
    /// @return y The passed value, downcasted to uint128
    function toUint128(uint256 x) private pure returns (uint128 y) {
        require((y = uint128(x)) == x);
    }

    /// @notice Computes the amount of liquidity received for a given amount of token0 and price range
    /// @dev Calculates amount0 * (sqrt(upper) * sqrt(lower)) / (sqrt(upper) - sqrt(lower))
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param amount0 The amount0 being sent in
    /// @return liquidity The amount of returned liquidity
    function getLiquidityForAmount0(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint256 amount0
    ) internal pure returns (uint128 liquidity) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);
        uint256 intermediate = FullMath.mulDiv(sqrtRatioAX96, sqrtRatioBX96, FixedPoint96.Q96);
        return toUint128(FullMath.mulDiv(amount0, intermediate, sqrtRatioBX96 - sqrtRatioAX96));
    }

    /// @notice Computes the amount of liquidity received for a given amount of token1 and price range
    /// @dev Calculates amount1 / (sqrt(upper) - sqrt(lower)).
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param amount1 The amount1 being sent in
    /// @return liquidity The amount of returned liquidity
    function getLiquidityForAmount1(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint256 amount1
    ) internal pure returns (uint128 liquidity) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);
        return toUint128(FullMath.mulDiv(amount1, FixedPoint96.Q96, sqrtRatioBX96 - sqrtRatioAX96));
    }

    /// @notice Computes the maximum amount of liquidity received for a given amount of token0, token1, the current
    /// pool prices and the prices at the tick boundaries
    /// @param sqrtRatioX96 A sqrt price representing the current pool prices
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param amount0 The amount of token0 being sent in
    /// @param amount1 The amount of token1 being sent in
    /// @return liquidity The maximum amount of liquidity received
    function getLiquidityForAmounts(
        uint160 sqrtRatioX96,
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint256 amount0,
        uint256 amount1
    ) internal pure returns (uint128 liquidity) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        if (sqrtRatioX96 <= sqrtRatioAX96) {
            liquidity = getLiquidityForAmount0(sqrtRatioAX96, sqrtRatioBX96, amount0);
        } else if (sqrtRatioX96 < sqrtRatioBX96) {
            uint128 liquidity0 = getLiquidityForAmount0(sqrtRatioX96, sqrtRatioBX96, amount0);
            uint128 liquidity1 = getLiquidityForAmount1(sqrtRatioAX96, sqrtRatioX96, amount1);

            liquidity = liquidity0 < liquidity1 ? liquidity0 : liquidity1;
        } else {
            liquidity = getLiquidityForAmount1(sqrtRatioAX96, sqrtRatioBX96, amount1);
        }
    }

    /// @notice Computes the amount of token0 for a given amount of liquidity and a price range
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param liquidity The liquidity being valued
    /// @return amount0 The amount of token0
    function getAmount0ForLiquidity(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity
    ) internal pure returns (uint256 amount0) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        return
            FullMath.mulDiv(
                uint256(liquidity) << FixedPoint96.RESOLUTION,
                sqrtRatioBX96 - sqrtRatioAX96,
                sqrtRatioBX96
            ) / sqrtRatioAX96;
    }

    /// @notice Computes the amount of token1 for a given amount of liquidity and a price range
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param liquidity The liquidity being valued
    /// @return amount1 The amount of token1
    function getAmount1ForLiquidity(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity
    ) internal pure returns (uint256 amount1) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        return FullMath.mulDiv(liquidity, sqrtRatioBX96 - sqrtRatioAX96, FixedPoint96.Q96);
    }

    /// @notice Computes the token0 and token1 value for a given amount of liquidity, the current
    /// pool prices and the prices at the tick boundaries
    /// @param sqrtRatioX96 A sqrt price representing the current pool prices
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param liquidity The liquidity being valued
    /// @return amount0 The amount of token0
    /// @return amount1 The amount of token1
    function getAmountsForLiquidity(
        uint160 sqrtRatioX96,
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity
    ) internal pure returns (uint256 amount0, uint256 amount1) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        if (sqrtRatioX96 <= sqrtRatioAX96) {
            amount0 = getAmount0ForLiquidity(sqrtRatioAX96, sqrtRatioBX96, liquidity);
        } else if (sqrtRatioX96 < sqrtRatioBX96) {
            amount0 = getAmount0ForLiquidity(sqrtRatioX96, sqrtRatioBX96, liquidity);
            amount1 = getAmount1ForLiquidity(sqrtRatioAX96, sqrtRatioX96, liquidity);
        } else {
            amount1 = getAmount1ForLiquidity(sqrtRatioAX96, sqrtRatioBX96, liquidity);
        }
    }
}

// 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: 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 = 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54;

    /// @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 = factory;
    }
}

File 29 of 30 : ReentrancyGuard.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Gas optimized reentrancy protection for smart contracts.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ReentrancyGuard.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)
abstract contract ReentrancyGuard {
    uint256 private locked = 1;

    modifier nonReentrant() virtual {
        require(locked == 1, "REENTRANCY");

        locked = 2;

        _;

        locked = 1;
    }
}

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

/// @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;
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "viaIR": true,
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"T","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int8","name":"loop","type":"int8"}],"name":"CauseChaosFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"usdcCapacity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liquiditySlippage","type":"uint256"},{"indexed":false,"internalType":"bool","name":"smokePublic","type":"bool"},{"indexed":false,"internalType":"uint256","name":"smokeInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"smokeChaosRatio","type":"uint256"},{"indexed":false,"internalType":"int8","name":"smokeChaosLoop","type":"int8"},{"indexed":false,"internalType":"uint256","name":"smokeFeed","type":"uint256"},{"indexed":false,"internalType":"int8","name":"smokeUsdcTarget","type":"int8"},{"indexed":false,"internalType":"int8","name":"smokeHestiaTarget","type":"int8"},{"indexed":false,"internalType":"bool","name":"ragePublic","type":"bool"},{"indexed":false,"internalType":"uint256","name":"rageInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rageFeed","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"rageLiquidityRatio","type":"uint128"}],"name":"ConfigChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"hestiaDecrease","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdcDecrease","type":"uint256"}],"name":"HestiaBleed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"hestiaIncrease","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdcIncrease","type":"uint256"}],"name":"HestiaFeed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"hestiaBurn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdcAmount","type":"uint256"}],"name":"HestiaRaged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nftId","type":"uint256"}],"name":"LockNft","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":false,"internalType":"address","name":"automator","type":"address"}],"name":"SetAutomator","type":"event"},{"anonymous":false,"inputs":[],"name":"SetDefaultMode","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nftId","type":"uint256"}],"name":"SetNft","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pool","type":"address"}],"name":"SetUsdcWethPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"hestiaBurn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdcAmount","type":"uint256"}],"name":"SmokedFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SwapFailed","type":"event"},{"inputs":[],"name":"getState","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"automator","type":"address"},{"internalType":"uint256","name":"nextConfigTime","type":"uint256"},{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"address","name":"poolToken0","type":"address"},{"internalType":"address","name":"poolToken1","type":"address"},{"internalType":"address","name":"usdcWethPoolAddress","type":"address"},{"internalType":"address","name":"usdcWethPoolToken0","type":"address"},{"internalType":"address","name":"usdcWethPoolToken1","type":"address"},{"internalType":"uint256","name":"liquiditySlippage","type":"uint256"},{"internalType":"uint256","name":"nftId","type":"uint256"},{"internalType":"int8","name":"nftLocked","type":"int8"},{"internalType":"uint256","name":"usdcCapacity","type":"uint256"},{"internalType":"uint256","name":"usdcExcessBalance","type":"uint256"},{"internalType":"uint256","name":"usdcTotalBalance","type":"uint256"},{"internalType":"uint256","name":"usdcChaosBalance","type":"uint256"},{"internalType":"uint256","name":"hestiaTotalBalance","type":"uint256"},{"internalType":"uint256","name":"nextSmokeTime","type":"uint256"},{"internalType":"bool","name":"smokePublic","type":"bool"},{"internalType":"uint256","name":"smokeInterval","type":"uint256"},{"internalType":"uint256","name":"smokeChaosRatio","type":"uint256"},{"internalType":"int8","name":"smokeChaosLoop","type":"int8"},{"internalType":"uint256","name":"smokeFeed","type":"uint256"},{"internalType":"int8","name":"smokeUsdcTarget","type":"int8"},{"internalType":"int8","name":"smokeHestiaTarget","type":"int8"},{"internalType":"uint256","name":"nextRageTime","type":"uint256"},{"internalType":"bool","name":"ragePublic","type":"bool"},{"internalType":"uint256","name":"rageInterval","type":"uint256"},{"internalType":"uint256","name":"rageFeed","type":"uint256"},{"internalType":"uint128","name":"rageLiquidityRatio","type":"uint128"}],"internalType":"struct HestiaChaosEngine.State","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hestiaRage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"automator","type":"address"}],"name":"setAutomator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdcCapacity","type":"uint256"},{"internalType":"uint256","name":"liquiditySlippage","type":"uint256"},{"internalType":"bool","name":"smokePublic","type":"bool"},{"internalType":"uint256","name":"smokeInterval","type":"uint256"},{"internalType":"uint256","name":"smokeChaosRatio","type":"uint256"},{"internalType":"int8","name":"smokeChaosLoop","type":"int8"},{"internalType":"uint256","name":"smokeFeed","type":"uint256"},{"internalType":"int8","name":"smokeUsdcTarget","type":"int8"},{"internalType":"int8","name":"smokeHestiaTarget","type":"int8"},{"internalType":"bool","name":"ragePublic","type":"bool"},{"internalType":"uint256","name":"rageInterval","type":"uint256"},{"internalType":"uint256","name":"rageFeed","type":"uint256"},{"internalType":"uint128","name":"rageLiquidityRatio","type":"uint128"}],"name":"setConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setDefaultMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_NFT_ID","type":"uint256"}],"name":"setNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"}],"name":"setUsdcWethPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"smokeFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0","type":"int256"},{"internalType":"int256","name":"amount1","type":"int256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a0806040523461031c5760006001815560015433827f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a36001600160a81b0319163360ff60a01b1916176001908155600280546001600160a01b03191673cbe5a4103d4c7ed5d73d9942101473c1bc0a802017905564012a05f20060039081556101f46004556005805460ff199081169093179055610e10600655633b9aca006007819055600880549093169091179091556009829055600a805462ffffff19166201000017905562015180600b55600c55600d80546001600160801b03191660fa1790556110a982810192906001600160401b0384118285101761030857818394604092614c28833933815269d3c21bcecceda1000000602082015203019082f080156102f85760808190526001600160a01b0316803b15610305578180916004604051809581936338a80c5360e11b83525af180156102f8576102e8575b60805160405163095ea7b360e01b81527303a520b32c04bf3beef7beb72e919cf822ed34f1600482015260001960248201529250602091839160449183916001600160a01b03165af180156102dd576102c0575b5060405163095ea7b360e01b81527303a520b32c04bf3beef7beb72e919cf822ed34f160048201526000196024820152906020826044818473833589fcd6edb6e08f4c7c32d4f71b54bda029135af19081156102b45750610285575b6040516148b5908161037382396080518181816105bf0152818161068b0152818161071c015281816108ec01528181610a4c01528181610bf801528181611bbb01528181611c5c0152818161282801528181612e1901528181612e800152818161337301528181613cd30152613f4f0152f35b6102a69060203d6020116102ad575b61029e8183610321565b81019061035a565b5038610212565b503d610294565b604051903d90823e3d90fd5b6102d89060203d6020116102ad5761029e8183610321565b6101b6565b6040513d84823e3d90fd5b6102f191610321565b3881610162565b50604051903d90823e3d90fd5b50fd5b634e487b7160e01b83526041600452602483fd5b600080fd5b601f909101601f19168101906001600160401b0382119082101761034457604052565b634e487b7160e01b600052604160045260246000fd5b9081602091031261031c5751801515810361031c579056fe6103006040526004361015610097575b361561001a57600080fd5b60006100296001825414612f49565b600281556000805160206148408339815191523b1561009457604051630d0e30db60e41b8152908082600481346000805160206148408339815191525af1918215610087578160019361007b57505055005b6100849161300e565b55005b50604051903d90823e3d90fd5b80fd5b600061010052610100513560e01c806308b61958146126de5780631865c57d1461214a578063664e303014611a9857806371d2fdfd146119bb57806380a75834146112fa578063817590fd14610fa25780638da5cb5b14610f77578063bee2660914610e49578063e7c5a6e814610d49578063e9ab3aae1461039e578063f2fde38b146103205763fa461e330361000f573461025e57606036600319011261025e576044356001600160401b03811161025e573660238201121561025e5780600401356001600160401b03811161025e57810136602482011161025e57600e546001600160a01b03163314801561030c575b80610302575b156102c1576020908290031261025e576024013560018060a01b03811680910361025e57604051630dfe168160e01b8152602081600481335afa801561026d5782916101005191610285575b506001600160a01b03160361027b5760206004355b60405163a9059cbb60e01b8152336004820152602481019190915261010051909283916044918391905af1801561026d5761022d575b6101005180f35b6020813d602011610265575b816102466020938361300e565b8101031261025e576102579061315b565b5038610226565b6101005180fd5b3d9150610239565b6040513d61010051823e3d90fd5b60206024356101f0565b9150506020813d6020116102b9575b816102a16020938361300e565b8101031261025e576102b3829161302f565b386101db565b3d9150610294565b60405162461bcd60e51b81526020600482015260196024820152781cddd85c10d85b1b189858dad39bdd105d5d1a1bdc9a5e9959603a1b6044820152606490fd5b503032141561018f565b50600f546001600160a01b03163314610189565b3461025e57602036600319011261025e576004356001600160a01b0381169081900361025e57600154819061035f336001600160a01b03831614612f0e565b6001600160a01b031916176001556101005133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36101005180f35b3461025e576101005136600319011261025e576103c16001610100515414612f49565b6002610100515560ff600554168015610d35575b6103de90613168565b6103eb60105415156131a3565b6012544210610d0157610400600654426131db565b60125561010051600854810b1380610bad575b5061041c613358565b6104246132ba565b9061046f604060105481519061043982612ff3565b81523060208201526001600160801b038282018190526060820152815163fc6f786560e01b815292839182919060048301613214565b0381610100516000805160206148608339815191525af1801561026d57610b7f575b5061049a613358565b6104a26132ba565b9082808210610b73576104b491613257565b915b829184808210610b67576104c991613257565b935b849060095480151580610b5e575b80610b55575b610ade575b5083151580610aca575b610a44575b83151580610a30575b6108db575b5080151580806108ca575b610828575b8080610817575b610785575b80610774575b610713575b505080151580806106ff575b610660575b8061064c575b61057f575b7ff4ae716959421e7233114af308a5d6620dc642f0b6583d40e06b0db8600fb7796040838582519182526020820152a1610100516001815580f35b6040519063a9059cbb60e01b825273507fbde39ba40da4fc79426ad5e3c64944fe43d4600483015260248201526020816044816101005160018060a01b037f0000000000000000000000000000000000000000000000000000000000000000165af1801561026d571561054457906020823d602011610644575b816106066020938361300e565b8101031261025e577ff4ae716959421e7233114af308a5d6620dc642f0b6583d40e06b0db8600fb7799261063b60409361315b565b50925090610544565b3d91506105f9565b506004600a5460081c610100510b1461053f565b60405163a9059cbb60e01b8152600060048201526024810183905261010051602090829060449082907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1801561026d576106c6575b50610539565b6020813d6020116106f7575b816106df6020938361300e565b8101031261025e576106f09061315b565b50846106c0565b3d91506106d2565b506003600a5460081c610100510b14610534565b909150610749907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613a05565b610751613358565b908082106107695761076291613257565b8380610528565b505061010051610762565b506003600a54610100510b14610523565b60405163a9059cbb60e01b815273507fbde39ba40da4fc79426ad5e3c64944fe43d46004820152826024820152602081604481610100516000805160206148408339815191525af1801561026d576107de575b5061051d565b6020813d60201161080f575b816107f76020938361300e565b8101031261025e576108089061315b565b50866107d8565b3d91506107ea565b506002600a54610100510b14610518565b61083182613f7e565b6108396140bc565b80610845575b50610511565b6040519063a9059cbb60e01b82527387af913718f73168d4566bbf51683792ac2680eb60048301526024820152602081604481610100516006602160991b015af1801561026d571561083f576020813d6020116108c2575b816108aa6020938361300e565b8101031261025e576108bb9061315b565b508661083f565b3d915061089d565b506001600a54610100510b1461050c565b9290506109196108e96132ba565b917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613d02565b6109216132ba565b9080821115610a255761093391613257565b80610989575b50610942613358565b61094a6132ba565b908280821061097e5761095c91613257565b928082106109735761096d91613257565b85610501565b50506101005161096d565b50506101005161095c565b61099290613f7e565b61099a6140bc565b8015610939576040519063a9059cbb60e01b82527387af913718f73168d4566bbf51683792ac2680eb60048301526024820152602081604481610100516006602160991b015af1801561026d5715610939576020813d602011610a1d575b81610a056020938361300e565b8101031261025e57610a169061315b565b5084610939565b3d91506109f8565b505061010051610933565b506002600a5460081c610100510b146104fc565b92610a7991507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613d02565b610a81613358565b91610a8a6132ba565b9282808210610abf57610a9c91613257565b9281808210610ab457610aae91613257565b906104f3565b505061010051610aae565b505061010051610a9c565b506001600a5460081c610100510b146104ee565b909350610aec915085613277565b80610b45575b50610afb613358565b91610b046132ba565b9282808210610b3a57610b1691613257565b9281808210610b2f57610b2891613257565b90866104e4565b505061010051610b28565b505061010051610b16565b610b4f90846133c0565b84610af2565b508615156104df565b508515156104d9565b505061010051936104cb565b505061010051916104b6565b610ba09060403d604011610ba6575b610b98818361300e565b8101906131fe565b50610491565b503d610b8e565b610bb5613331565b90610bbe613358565b9115159081610cf9575b50156104135760015b600854610100510b81610100510b908113610cf157610bee613331565b908115610cba57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690610c2b9082613a05565b610c33613358565b9083821115610c7e57610c4984610c4f93613257565b90613d02565b610100510b607f8114610c6457600101610bd1565b634e487b7160e01b61010051526011600452602461010051fd5b60405162461bcd60e51b8152602060048201526014602482015273696e76616c696448657374696142616c616e636560601b6044820152606490fd5b90507fb0fa2f83c99bde83c76f9de20275e5114a7eb6cf5808d19c8d8bb9a078f3077f925060209150604051908152a15b80610413565b505050610ceb565b905082610bc8565b60405162461bcd60e51b815260206004820152600c60248201526b1cdb5bdad9551a5b595bdd5d60a21b6044820152606490fd5b506002546001600160a01b031633146103d5565b3461025e57602036600319011261025e576004356001600160a01b0381169081900361025e57610d7f6001610100515414612f49565b600254336001600160a01b038216148015610e35575b610d9e90613168565b6001546001600160a01b03168214610df6576001600160a01b03191681176002556040519081527f45dddb502b500da3589b6170f21484acf8c1eef1dfed2b98644b310277fdeb8190602090a1610100516001815580f35b60405162461bcd60e51b8152602060048201526017602482015276696e76616c69644175746f6d61746f724164647265737360481b6044820152606490fd5b506001546001600160a01b03163314610d95565b3461025e576101005136600319011261025e576001546001600160a01b038116610e74338214612f0e565b610e846001610100515414612f49565b60026101005155610eab60105492610e9d8415156131a3565b60a01c610100510b15612f82565b6000805160206148608339815191523b1561025e576040516323b872dd60e01b8152610100516001600160a01b03909216600482015230602482015260448101929092528180606481010381610100516000805160206148608339815191525af1801561026d57610f64575b6001805460ff60a01b1916600160a01b1790556010546040519081527fba51082b7645d1b4f632b76df55cb331092d45b3f08a77bba7f5be7f5ce95a1b90602090a1610100516001815580f35b61010051610f719161300e565b80610f17565b3461025e576101005136600319011261025e576001546040516001600160a01b039091168152602090f35b3461025e57602036600319011261025e576004356001600160a01b0381169081900361025e57610fdd60018060a01b03600154163314612f0e565b610fed6001610100515414612f49565b60026101005155610fff81151561311a565b604051630dfe168160e01b8152602081600481855afa90811561026d5761010051916112c0575b5060405163d21220a760e01b815290602082600481865afa91821561026d576101005192611284575b506001600160a01b031660008051602061484083398151915281148061126b575b801561123a575b15611201578260018060a01b0319600f541617600f5560018060a01b0319601654161760165560018060a01b031660018060a01b0319601754161760175560405163095ea7b360e01b81528160048201526000196024820152602081604481610100516000805160206148408339815191525af1801561026d576111ca575b5060405163095ea7b360e01b815260048101829052600019602482015261010051602090829060449082906006602160991b015af1801561026d5761116c575b7f5b5630f86a549e0b6085a6d10cc6cf9271c6a8a314474b7d19f1abc9d45be82b602083604051908152a1610100516001815580f35b6020813d6020116111c2575b816111856020938361300e565b8101031261025e577f5b5630f86a549e0b6085a6d10cc6cf9271c6a8a314474b7d19f1abc9d45be82b916111ba60209261315b565b509150611136565b3d9150611178565b6020813d6020116111f9575b816111e36020938361300e565b8101031261025e576111f49061315b565b6110f6565b3d91506111d6565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964506f6f6c546f6b656e7360781b6044820152606490fd5b506006602160991b018114801561107757506001600160a01b03821660008051602061484083398151915214611077565b506001600160a01b0382166006602160991b0114611070565b9091506020813d6020116112b8575b816112a06020938361300e565b8101031261025e576112b19061302f565b908361104f565b3d9150611293565b90506020813d6020116112f2575b816112db6020938361300e565b8101031261025e576112ec9061302f565b82611026565b3d91506112ce565b3461025e576101a036600319011261025e57604435801515810361025e5760a435610100510b60a4350361025e5760e435610100510b60e4350361025e5761010435610100510b610104350361025e5761012435801515810361025e5761018435916001600160801b038316830361025e5761137c6001610100515414612f49565b61139160018060a01b03600254163314613168565b601354421061198657610e1042014211610c645742610e100160135560035464012a05f20081111561197d5764012a05f1ff198101818111610c64575b60043510159081611961575b501561192657600754633b9aca008101809111610c6457608435111580611915575b156118d757600c5464012a05f2008101809111610c6457610164351115806118c5575b1561188e57602435158015611872575b1561183257610e10606435101580611824575b156117e8576101005160a435810b1215806117d6575b1561179957606460c43511611761576101005160e435810b12158061174f575b15611711576101005161010435810b1215806116fe575b156116be57615460610144351015806116ae575b15611673576001600160801b038316158015611649575b15611608577fdb98078f68bee559e511b59417d64cd9b65fc985814c12bc3306d08f8eb074a4926101a09260043560035560243560045560ff196005541660ff841515161760055560643560065560843560075560ff196008541660a43560ff161760085560c435600955600a5462ff000082151560101b169060ff60e435169062ffffff1916176101043560081b61ff00161717600a5561014435600b5561016435600c5560018060801b03821660018060801b0319600d541617600d556040519260043584526024356020850152151560408401526064356060840152608435608084015260a435610100510b60a084015260c43560c084015260e435610100510b60e084015261010435610100510b6101008401521515610120830152610144356101408301526101643561016083015260018060801b0316610180820152a1610100516001815580f35b60405162461bcd60e51b8152602060048201526019602482015278696e76616c6964526167654c6971756964697479526174696f60381b6044820152606490fd5b5060646001600160801b038416108015906114ba57506127106001600160801b03841611156114ba565b60405162461bcd60e51b81526020600482015260136024820152721a5b9d985b1a59149859d9525b9d195c9d985b606a1b6044820152606490fd5b50620151806101443511156114a3565b60405162461bcd60e51b81526020600482015260186024820152771a5b9d985b1a5914db5bdad952195cdd1a5855185c99d95d60421b6044820152606490fd5b50600461010435610100510b131561148f565b60405162461bcd60e51b81526020600482015260166024820152751a5b9d985b1a5914db5bdad9555cd918d5185c99d95d60521b6044820152606490fd5b50600360e435610100510b1315611478565b60405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a5914db5bdad95199595960821b6044820152606490fd5b60405162461bcd60e51b81526020600482015260156024820152740696e76616c6964536d6f6b654368616f734c6f6f7605c1b6044820152606490fd5b50600560a435610100510b1315611458565b60405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a5914db5bdad9525b9d195c9d985b60621b6044820152606490fd5b506154606064351115611442565b60405162461bcd60e51b8152602060048201526018602482015277696e76616c69644c6971756964697479536c69707061676560401b6044820152606490fd5b5060326024351015801561142f57506109c4602435111561142f565b60405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59149859d951995959608a1b6044820152606490fd5b506405d21dba0061016435111561141f565b60405162461bcd60e51b8152602060048201526016602482015275696e76616c6964536d6f6b654368616f73526174696f60501b6044820152606490fd5b5064012a05f20060843511156113fc565b60405162461bcd60e51b8152602060048201526013602482015272696e76616c696455736463436170616369747960681b6044820152606490fd5b905064012a05f2008101809111610c64576004351115846113da565b610100516113ce565b60405162461bcd60e51b815260206004820152600d60248201526c18dbdb999a59d51a5b595bdd5d609a1b6044820152606490fd5b3461025e576101005136600319011261025e576119e360018060a01b03600154163314612f0e565b6119f36001610100515414612f49565b64012a05f2006003556101f4600455600160ff196005541617600555610e10600655633b9aca00600755600360ff196008541617600855610100516009556201000062ffffff19600a541617600a5562015180600b55633b9aca00600c5560fa60018060801b0319600d541617600d557feefee587e0d96e6b177c1e565226d9eee21648934c285d08bd93aba5aeaf91266101005161010051a1610100516001815580f35b3461025e576101005136600319011261025e57611abb6001610100515414612f49565b6002610100515560ff600a5460101c168015612136575b611adb90613168565b611ae860105415156131a3565b601154421061210357611afd600b54426131db565b601155611b086132ba565b611b10613358565b90801515806120fa575b6120c4575b600d546001600160801b0316916064831015611c8e575b505050611b41613297565b80611c56575b611b4f613358565b80611b90575b6040907f6d9b824b5ad0353296993551c83415789c5dd8532effa85938e9de5bb350188f9282519182526020820152a1610100516001815580f35b60405163a9059cbb60e01b8152610100805160048301526024820183905251602090829060449082907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1801561026d57611bf6575b50611b55565b906020823d602011611c4e575b81611c106020938361300e565b8101031261025e577f6d9b824b5ad0353296993551c83415789c5dd8532effa85938e9de5bb350188f92611c4560409361315b565b50925090611bf0565b3d9150611c03565b611c89817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613a05565b611b47565b6010549260405163133f757160e31b8152846004820152610180816024816000805160206148608339815191525afa90811561026d576101005191612099575b50811561207f5760018060801b0316046101005161010051906004546032811015611ee9575b506078420192834211610c64576040519660a088018881106001600160401b03821117611ecf576040528752602087019060018060801b0316815260408701918252606087019283526080870193845260405196630624e65f60e11b885251600488015260018060801b03905116602487015251604486015251606485015251608484015260408360a481610100516000805160206148608339815191525af192831561026d57611dec93611eb1575b506040601054815190611db682612ff3565b81523060208201526001600160801b038282018190526060820152815163fc6f786560e01b815294859182919060048301613214565b0381610100516000805160206148608339815191525af191821561026d577f540ce1332dd4ff4c92d40c69a74e406d466ebe40be72d462f11239632e6d9ea993604093611e95575b50611e3d6132ba565b611e45613358565b91808210611e8957611e5691613257565b915b808210611e7d57611e6891613257565b905b82519182526020820152a1808080611b36565b50506101005190611e6a565b50506101005191611e58565b611eab90843d8611610ba657610b98818361300e565b50611e34565b611ec99060403d604011610ba657610b98818361300e565b50611da4565b634e487b7160e01b61010051526041600452602461010051fd5b9150506001600160801b038216156120415760405163133f757160e31b815260048101869052610180816024816000805160206148608339815191525afa801561026d5761010051918291612000575b50600e54604051633850c7bd60e01b8152919060e090839060049082906001600160a01b03165afa90811561026d57611f919386936101005193611fc1575b50611f85611f8b916140f1565b916140f1565b91614460565b9161271003906127108211610c645781612710611fb28194611fb994613264565b0493613264565b049086611cf4565b611f8b919350611feb611f859160e03d60e011611ff9575b611fe3818361300e565b810190613871565b505050505050939150611f78565b503d611fd9565b6004925061202691506101803d811161203a575b61201e818361300e565b81019061306a565b505050505096955093505050509190611f39565b503d612014565b60405162461bcd60e51b81526020600482015260166024820152751a5b9d985b1a59131a5c5d5a591a5d1e505b5bdd5b9d60521b6044820152606490fd5b634e487b7160e01b61010051526012600452602461010051fd5b6120b291506101803d811161203a5761201e818361300e565b50505050965050505050505085611cce565b6120cc6133af565b806120d8575b50611b1f565b90506120e3916133c0565b6120eb6132ba565b6120f3613358565b90826120d2565b50811515611b1a565b60405162461bcd60e51b815260206004820152600b60248201526a1c9859d9551a5b595bdd5d60aa1b6044820152606490fd5b506002546001600160a01b03163314611ad2565b3461025e576101005136600319011261025e5760405161216981612fc1565b6101005181526101005160208201526101005160408201526101005160608201526101005160808201526101005160a08201526101005160c08201526101005160e08201526101005161010082015261010051610120820152610100516101408201526101005161016082015261010051610180820152610100516101a0820152610100516101c0820152610100516101e08201526101005161020082015261010051610220820152610100516102408201526101005161026082015261010051610280820152610100516102a0820152610100516102c0820152610100516102e082015261010051610300820152610100516103208201526101005161034082015261010051610360820152610100516103808201526103a0610100519101526103c060015460018060a01b03600254166101805260135460018060a01b03600e54166101205260018060a01b03601454166101e05260018060a01b03601554166102605260018060a01b03600f54166102c05260018060a01b03601654166102e05260018060a01b03601754166004546010546003549061230a613297565b926123136132ba565b9461231c613331565b96612325613358565b60805260125460c05260055460ff16610140526006546101a05260075461020052600854610100510b610280526009546102a052600a546102405260115461022052600b546101c052600c5461016052600d546001600160801b031660e05260405160a081905261239590612fc1565b60018060a01b03891660a0515261018051602060a0510152604060a051015261012051606060a05101526101e051608060a05101526102605160a0805101526102c05160c060a05101526102e05160e060a051015261010060a051015261012060a051015261014060a05101528460a01c610100510b61016060a051015261018060a05101526101a060a05101526101c060a05101526101e060a051015260805161020060a051015260c05161022060a051015261014051151561024060a05101526101a05161026060a05101526102005161028060a0510152610280516102a060a05101526102a0516102c060a051015261024051610100510b6102e060a05101526102405160081c610100510b61030060a05101526102205161032060a051015260ff6102405160101c16151561034060a05101526101c05161036060a05101526101605161038060a051015260e0516103a060a05101526040519060018060a01b0316815260018060a01b03602060a0510151166020820152604060a0510151604082015260018060a01b03606060a051015116606082015260018060a01b03608060a051015116608082015260018060a01b0360a0805101511660a082015260018060a01b0360c060a05101511660c082015260018060a01b0360e060a05101511660e082015260018060a01b0361010060a05101511661010082015261012060a051015161012082015261014060a051015161014082015261016060a0510151610100510b61016082015261018060a05101516101808201526101a060a05101516101a08201526101c060a05101516101c08201526101e060a05101516101e082015261020060a051015161020082015261022060a051015161022082015261024060a0510151151561024082015261026060a051015161026082015261028060a05101516102808201526102a060a0510151610100510b6102a08201526102c060a05101516102c08201526102e060a0510151610100510b6102e082015261030060a0510151610100510b61030082015261032060a051015161032082015261034060a0510151151561034082015261036060a051015161036082015261038060a051015161038082015260018060801b036103a060a0510151166103a0820152f35b3461025e57602036600319011261025e576001546004359061270a336001600160a01b03831614612f0e565b61271a6001610100515414612f49565b600261010051558115612eda576127399060a01c610100510b15612f82565b60405163133f757160e31b815260048101829052610180816024816000805160206148608339815191525afa90811561026d57610100519182918291612eaa575b5060018060a01b03169060008051602061484083398151915282149182612e73575b8215612e17575b505015612dd25762ffffff612710911603612d8d57600e546001600160a01b03811615612805575b7faf9f7221fd5f390d3f4232f7e7f8e0bc86992cf4ecd950ebef4500ee00606d1060208380601055604051908152a1610100516001815580f35b604051630b4c774160e11b815260008051602061484083398151915260048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660248201819052612710604483015291906020816064817333128a8fc17869897dce68ed026d694621f6fdfd5afa90811561026d576101005191612d53575b506001600160a01b03166001600160a01b0319919091168117600e556128b681151561311a565b6040519063095ea7b360e01b825260048201526000196024820152602081604481610100516000805160206148408339815191525af1801561026d57612d1c575b50600e5460405163095ea7b360e01b81526001600160a01b0390911660048201526000196024820152610100519091602091839160449183915af1801561026d57612ce5575b50600e54604051630dfe168160e01b81526001600160a01b0390911690602081600481855afa90811561026d576101005191612ca4575b50601480546001600160a01b0319166001600160a01b0390921691909117905560405163d21220a760e01b815290602090829060049082905afa90811561026d576101005191612c6a575b5060018060a01b031660018060a01b0319601554161760155573b2cc224c1c9fee385f8ad6a55b4d94e92359dc5960018060a01b0319600f541617600f55604051630dfe168160e01b815260208160048173b2cc224c1c9fee385f8ad6a55b4d94e92359dc595afa90811561026d576101005191612c30575b50601680546001600160a01b0319166001600160a01b039290921691909117905560405163d21220a760e01b815260208160048173b2cc224c1c9fee385f8ad6a55b4d94e92359dc595afa90811561026d576101005191612bf6575b50601780546001600160a01b0319166001600160a01b039290921691909117905560405163095ea7b360e01b815273b2cc224c1c9fee385f8ad6a55b4d94e92359dc596004820152600019602482015261010051602090829060449082906000805160206148408339815191525af1801561026d57612bbf575b5060405163095ea7b360e01b815273b2cc224c1c9fee385f8ad6a55b4d94e92359dc596004820152600019602482015261010051602090829060449082906006602160991b015af1801561026d57156127cb576020813d602011612bb7575b81612b7a6020938361300e565b8101031261025e577faf9f7221fd5f390d3f4232f7e7f8e0bc86992cf4ecd950ebef4500ee00606d1091612baf60209261315b565b5091506127cb565b3d9150612b6d565b6020813d602011612bee575b81612bd86020938361300e565b8101031261025e57612be99061315b565b612b0e565b3d9150612bcb565b90506020813d602011612c28575b81612c116020938361300e565b8101031261025e57612c229061302f565b82612a94565b3d9150612c04565b90506020813d602011612c62575b81612c4b6020938361300e565b8101031261025e57612c5c9061302f565b82612a38565b3d9150612c3e565b90506020813d602011612c9c575b81612c856020938361300e565b8101031261025e57612c969061302f565b826129bf565b3d9150612c78565b90506020813d602011612cdd575b81612cbf6020938361300e565b8101031261025e57600491612cd560209261302f565b915091612974565b3d9150612cb2565b6020813d602011612d14575b81612cfe6020938361300e565b8101031261025e57612d0f9061315b565b61293d565b3d9150612cf1565b6020813d602011612d4b575b81612d356020938361300e565b8101031261025e57612d469061315b565b6128f7565b3d9150612d28565b90506020813d602011612d85575b81612d6e6020938361300e565b8101031261025e57612d7f9061302f565b8461288f565b3d9150612d61565b60405162461bcd60e51b815260206004820152601a60248201527f6e667446656554696572446f65734e6f744d61746368506f6f6c0000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527f6e6674546f6b656e73446f4e6f4d61746368506f6f6c546f6b656e73000000006044820152606490fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614915081612e52575b5083806127a3565b6001600160a01b031660008051602061484083398151915214905083612e4a565b6001600160a01b038281167f000000000000000000000000000000000000000000000000000000000000000090911614925061279c565b915050612ec691506101803d811161203a5761201e818361300e565b50505050505050925092509190918461277a565b60405162461bcd60e51b815260206004820152600c60248201526b1a5b9d985b1a5913999d125960a21b6044820152606490fd5b15612f1557565b60405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b6044820152606490fd5b15612f5057565b60405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606490fd5b15612f8957565b60405162461bcd60e51b815260206004820152601060248201526f1b999d105b1c9958591e531bd8dad95960821b6044820152606490fd5b6103c081019081106001600160401b03821117612fdd57604052565b634e487b7160e01b600052604160045260246000fd5b608081019081106001600160401b03821117612fdd57604052565b90601f801991011681019081106001600160401b03821117612fdd57604052565b51906001600160a01b038216820361304357565b600080fd5b51908160020b820361304357565b51906001600160801b038216820361304357565b9190826101809103126130435781516bffffffffffffffffffffffff81168103613043579161309b6020820161302f565b916130a86040830161302f565b916130b56060820161302f565b91608082015162ffffff8116810361304357916130d460a08201613048565b916130e160c08301613048565b916130ee60e08201613056565b9161010082015191610120810151916131176101606131106101408501613056565b9301613056565b90565b1561312157565b60405162461bcd60e51b8152602060048201526012602482015271696e76616c6964506f6f6c4164647265737360701b6044820152606490fd5b5190811515820361304357565b1561316f57565b60405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b6044820152606490fd5b156131aa57565b60405162461bcd60e51b81526020600482015260096024820152681b999d139bdd14d95d60ba1b6044820152606490fd5b919082018092116131e857565b634e487b7160e01b600052601160045260246000fd5b9190826040910312613043576020825192015190565b815181526020808301516001600160a01b0316908201526040808301516001600160801b0390811691830191909152606092830151169181019190915260800190565b919082039182116131e857565b818102929181159184041417156131e857565b8115613281570490565b634e487b7160e01b600052601260045260246000fd5b61329f6132ba565b600354808211156132b35761311791613257565b5050600090565b6040516370a0823160e01b81523060048201526020816024816000805160206148408339815191525afa908115613325576000916132f6575090565b90506020813d60201161331d575b816133116020938361300e565b81010312613043575190565b3d9150613304565b6040513d6000823e3d90fd5b6007548015613352576133426132ba565b81811061334d575090565b905090565b50600090565b6040516370a0823160e01b81523060048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115613325576000916132f6575090565b600c548015613352576133426132ba565b6014546001600160a01b03166000805160206148408339815191521490811561385b57825b82156138535750915b8015158061384a575b1561381457601054926040519163133f757160e31b8352846004840152610180836024816000805160206148608339815191525afa918215613325576004936000906000946137e5575b50600e54604051633850c7bd60e01b81529560e09187919082906001600160a01b03165afa948515613325576000956137b6575b50613482613488916140f1565b936140f1565b9182846001600160a01b03808316908216116137ad575b6001600160a01b0387811694908890831686116137515750506134c29350614669565b915b6001600160801b03831615613714576134dc93614460565b9281158015809161370b575b156136ce576004546032811080159291906136c657806127100361271081116131e8576135186127109187613264565b04925b156136bd576127100361271081116131e85761353a6127109188613264565b04905b806136b4575b613550575b505050505050565b60784201918242116131e8576040519360c085018581106001600160401b03821117612fdd576040528452602084018581526040850190888252606086019283526080860193845260a086019485526040519563219f5d1760e01b87525160048701525160248601525160448501525160648401525160848301525160a482015260608160c48160006000805160206148608339815191525af1801561332557613652575b50906040917f24aa89c4bc7aceb8018cbf2709f3079802d08813d1e593baf5c10dfed8eb4acc938260001461364b5780925b1561364457505b82519182526020820152a1388080808080613548565b905061362e565b8192613627565b91906060833d6060116136ac575b8161366d6060938361300e565b81010312613043577f24aa89c4bc7aceb8018cbf2709f3079802d08813d1e593baf5c10dfed8eb4acc936136a2604094613056565b50935090916135f5565b3d9150613660565b50851515613543565b5060009061353d565b60009261351b565b60405162461bcd60e51b8152602060048201526015602482015274696e76616c696444657369726564416d6f756e747360581b6044820152606490fd5b508415156134e8565b60405162461bcd60e51b8152602060048201526015602482015274696e73756666696369656e744c697175696469747960581b6044820152606490fd5b919490939192906001600160a01b03821611156137a15782916137789161377e9594614669565b9361461b565b6001600160801b03818116908316101561379a57505b916134c4565b9050613794565b9150506137949261461b565b5050838361349f565b6134889195506137d76134829160e03d60e011611ff957611fe3818361300e565b505050505050959150613475565b90506138019193506101803d811161203a5761201e818361300e565b5050505050979550935050505038613441565b60405162461bcd60e51b815260206004820152600e60248201526d696e76616c6964416d6f756e747360901b6044820152606490fd5b508215156133f7565b9050916133ee565b80926133e5565b519061ffff8216820361304357565b908160e09103126130435780516001600160a01b0381168103613043579161389b60208301613048565b916138a860408201613862565b916138b560608301613862565b916138c260808201613862565b9160a082015160ff811681036130435760c061311791930161315b565b156138e657565b60405162461bcd60e51b815260206004820152600e60248201526d1cddd85c16995c9bd05b5bdd5b9d60921b6044820152606490fd5b1561392357565b60405162461bcd60e51b815260206004820152600a6024820152691c1bdbdb139bdd14d95d60b21b6044820152606490fd5b6001600160a01b0391821690821603919082116131e857565b6001600160a01b039182168152911515602083015260408201929092529116606082015260a060808201819052825190820181905291929160005b8181106139ca575060c09293506000838284010152601f8019910116010190565b80602080928701015160c08286010152016139a9565b60609060208152600a6020820152691cddd85c11985a5b195960b21b60408201520190565b90613a118115156138df565b600e546001600160a01b031691613a2983151561391c565b6001600160a01b03169160008051602061484083398151915283148015613cd0575b15613c99578260008051602061484083398151915214613c64576014546001600160a01b0316600080516020614840833981519152149060008215613c4957506401000276a45b600454916032831015613b70575b60409250846000845195600080516020614840833981519152602088015260208752613acc868861300e565b613aec865197889687958694630251596160e31b8652306004870161396e565b03925af19081613b52575b50613b4e5760408051600080516020614840833981519152815260208101939093528201526000805160206148208339815191529150606090a160405162461bcd60e51b815280613b4a600482016139e0565b0390fd5b5050565b613b6a9060403d604011610ba657610b98818361300e565b50613af7565b604051633850c7bd60e01b81529290915060e083600481855afa92831561332557600093613c22575b508315613bed576127100361271081116131e857604092613bbc613bcb9261452c565b906001600160a01b0316613264565b6001600160a01b0390613be690613be06144e2565b90613277565b1690613aa0565b91613bfa90613bbc6144e2565b916127100361271081116131e8576040926001600160a01b0391613be69190613be09061452c565b613c3c91935060e03d60e011611ff957611fe3818361300e565b5050505050509138613b99565b5073fffd8963efd1fc6a506488495d951d5263988d25613a92565b60405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964546f6b656e7360981b6044820152606490fd5b60405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59151bdad95b93dd5d608a1b6044820152606490fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168314613a4b565b90613d0e8115156138df565b600e546001600160a01b031691613d2683151561391c565b6001600160a01b0316916000805160206148408339815191528314808015613f4c575b15613f1657613c64576014546001600160a01b031683149060008215613efb57506401000276a45b600454916032831015613e37575b6040925084600084519588602088015260208752613d9d868861300e565b613dbd865197889687958694630251596160e31b8652306004870161396e565b03925af19081613e19575b50613b4e576040805192835260008051602061484083398151915260208401528201526000805160206148208339815191529150606090a160405162461bcd60e51b815280613b4a600482016139e0565b613e319060403d604011610ba657610b98818361300e565b50613dc8565b604051633850c7bd60e01b81529290915060e083600481855afa92831561332557600093613ed4575b508315613e9f576127100361271081116131e857604092613bbc613e839261452c565b6001600160a01b0390613e9890613be06144e2565b1690613d7f565b91613eac90613bbc6144e2565b916127100361271081116131e8576040926001600160a01b0391613e989190613be09061452c565b613eee91935060e03d60e011611ff957611fe3818361300e565b5050505050509138613e60565b5073fffd8963efd1fc6a506488495d951d5263988d25613d71565b60405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b22a37b5b2b724b760911b6044820152606490fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168414613d49565b613f898115156138df565b600f546001600160a01b0316613fa081151561391c565b6016546001600160a01b03166000805160206148408339815191521490604090600083156140a057506401000276a4905b846000845195600080516020614840833981519152602088015260208752613ff9868861300e565b614019865197889687958694630251596160e31b8652306004870161396e565b03925af19081614082575b5061407f576040805160008051602061484083398151915281526006602160991b0160208201529081019190915260008051602061482083398151915290606090a160405162461bcd60e51b815280613b4a600482016139e0565b50565b61409a9060403d604011610ba657610b98818361300e565b50614024565b5073fffd8963efd1fc6a506488495d951d5263988d2590613fd1565b6040516370a0823160e01b81523060048201526020816024816006602160991b015afa908115613325576000916132f6575090565b60020b600081121561445a5780600003905b620d89e8821161444957600182161561443f576ffffcb933bd6fad37aa2d162d1a5940015b6001600160881b03169160028116614423575b60048116614407575b600881166143eb575b601081166143cf575b602081166143b3575b60408116614397575b6080811661437b575b610100811661435f575b6102008116614343575b6104008116614327575b610800811661430b575b61100081166142ef575b61200081166142d3575b61400081166142b7575b618000811661429b575b62010000811661427f575b620200008116614264575b620400008116614249575b6208000016614230575b600012614221575b63ffffffff8116614219576000905b60201c60ff91909116016001600160a01b031690565b600190614203565b801561328157600019046141f4565b6b048a170391f7dc42444e8fa290910260801c906141ec565b6d2216e584f5fa1ea926041bedfe9890920260801c916141e2565b916e5d6af8dedb81196699c329225ee6040260801c916141d7565b916f09aa508b5b7a84e1c677de54f3e99bc90260801c916141cc565b916f31be135f97d08fd981231505542fcfa60260801c916141c1565b916f70d869a156d2a1b890bb3df62baf32f70260801c916141b7565b916fa9f746462d870fdf8a65dc1f90e061e50260801c916141ad565b916fd097f3bdfd2022b8845ad8f792aa58250260801c916141a3565b916fe7159475a2c29b7443b29c7fa6e889d90260801c91614199565b916ff3392b0822b70005940c7a398e4b70f30260801c9161418f565b916ff987a7253ac413176f2b074cf7815e540260801c91614185565b916ffcbe86c7900a88aedcffc83b479aa3a40260801c9161417b565b916ffe5dee046a99a2a811c461f1969c30530260801c91614171565b916fff2ea16466c96a3843ec78b326b528610260801c91614168565b916fff973b41fa98c081472e6896dfb254c00260801c9161415f565b916fffcb9843d60f6159c9db58835c9266440260801c91614156565b916fffe5caca7e10e4e61c3624eaa0941cd00260801c9161414d565b916ffff2e50f5f656932ef12357cf3c7fdcc0260801c91614144565b916ffff97272373d413259a46990580e213a0260801c9161413b565b600160801b614128565b6315e4079d60e11b60005260046000fd5b80614103565b9093926000929091836001600160a01b03808416908816116144da575b6001600160a01b0382811690881681116144a25750505061449f9293946145b0565b91565b93945090926001600160a01b03831611156144ce5750906144c8836131179493836145b0565b9461456d565b9461311793925061456d565b95919561447d565b61271061138860005b8282106144f757505090565b909150818015614518578061450f91612710046131db565b60011c906144eb565b634e487b7160e01b82526012600452602482fd5b801561335257600181018082116131e85760011c815b82821061454e57505090565b9091506145648261455f8184613277565b6131db565b60011c90614542565b6131179291906001600160a01b03808316908216116145aa575b6001600160a01b039161459a9190613955565b16906001600160801b03166146b7565b90614587565b61311792909161460491906001600160a01b0380821690851611614615575b6001600160a01b036145e18583613955565b6001600160a01b039092169291169060601b600160601b600160e01b0316614797565b6001600160a01b0390911690613277565b926145cf565b61464f9291906001600160a01b0380831690821611614663575b6001600160a01b03916146489190613955565b1690614706565b6001600160801b0381169081036130435790565b90614635565b61464f92916001600160a01b03808216908316116146b1575b6146aa61469b6001600160a01b038381169085166146b7565b926001600160a01b0392613955565b1691614797565b90614682565b6000919060001982820991808202938480851094039380850394146146fc57600160601b8410156100945750600160601b910990828211900360a01b910360601c1790565b5050505060601c90565b600019600160601b8209918160601b9182808510940393808503941461478a5783821115613043578190600160601b9009818060000316809204600281600302188082026002030280820260020302808202600203028082026002030280820260020302809102600203029360018380600003040190848311900302920304170290565b5080925015613043570490565b916000198284099282810292838086109503948086039514614811578483111561304357829109818060000316809204600281600302188082026002030280820260020302808202600203028082026002030280820260020302809102600203029360018380600003040190848311900302920304170290565b50508092501561304357049056fe6930176329c33f663176f0f242132119497db425bb44d32f9ffef8683d10b0c0000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000003a520b32c04bf3beef7beb72e919cf822ed34f1a26469706673582212209685cd2dcb9265dc6c9d2eddd71c6bceb6bf0797a5157594dd634b429572fa0f64736f6c634300081a003360e080604052346104d7576040816110a9803803809161001f82856104dc565b8339810103126104d75780516001600160a01b03811691908290036104d75760200151604051916100516040846104dc565b600683526548657374696160d01b6020840152604051916100736040846104dc565b600683526548455354494160d01b602084015283516001600160401b0381116103fe576100a16000546104ff565b601f8111610485575b50602094601f821160011461041f57948192939495600092610414575b50508160011b916000199060031b1c1916176000555b82516001600160401b0381116103fe576100f86001546104ff565b601f8111610399575b506020601f82116001146103325781929394600092610327575b50508160011b916000199060031b1c1916176001555b60126080524660a052604051600090600054918161014e846104ff565b91828252602082019460018116908160001461030b57506001146102bf575b610179925003826104dc565b51902060405160208101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835260408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a081526101ed60c0826104dc565b51902060c052600680546001600160a01b03191633908117909155604051919060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a36002548181018091116102a9576000927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9260209260025585855260038352604085208181540190558152a3604051610b4f908161053a823960805181610643015260a0518161097e015260c051816109a50152f35b634e487b7160e01b600052601160045260246000fd5b50600080805290916000805160206110898339815191525b8183106102ef5750509060206101799282010161016d565b60209193508060019154838588010152019101909183926102d7565b60ff191686525061017992151560051b8201602001905061016d565b01519050388061011b565b601f198216906001600052806000209160005b81811061038157509583600195969710610368575b505050811b01600155610131565b015160001960f88460031b161c1916905538808061035a565b9192602060018192868b015181550194019201610345565b60016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6601f830160051c810191602084106103f4575b601f0160051c01905b8181106103e85750610101565b600081556001016103db565b90915081906103d2565b634e487b7160e01b600052604160045260246000fd5b0151905038806100c7565b601f1982169560008052806000209160005b88811061046d57508360019596979810610454575b505050811b016000556100dd565b015160001960f88460031b161c19169055388080610446565b91926020600181928685015181550194019201610431565b60008052600080516020611089833981519152601f830160051c810191602084106104cd575b601f0160051c01905b8181106104c157506100aa565b600081556001016104b4565b90915081906104ab565b600080fd5b601f909101601f19168101906001600160401b038211908210176103fe57604052565b90600182811c9216801561052f575b602083101461051957565b634e487b7160e01b600052602260045260246000fd5b91607f169161050e56fe6080604052600436101561001257600080fd5b60003560e01c806306fdde03146107e7578063095ea7b31461076d57806318160ddd1461074f57806323b872dd14610667578063313ce567146106295780633644e5151461060657806370a08231146105cc578063715018a6146105655780637ecebe001461052b5780638da5cb5b1461050257806395d89b4114610422578063a9059cbb14610396578063d505accf1461018b578063dd62ed3e1461013a5763f2fde38b146100c157600080fd5b34610135576020366003190112610135576100da61092a565b600654906100f2336001600160a01b03841614610ade565b6001600160a01b03166001600160a01b0319919091168117600655337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b600080fd5b346101355760403660031901126101355761015361092a565b61015b610940565b6001600160a01b039182166000908152600460209081526040808320949093168252928352819020549051908152f35b346101355760e0366003190112610135576101a461092a565b6101ac610940565b6044356064359260843560ff8116809103610135574285106103575760806000916020936101d8610979565b9060018060a01b03169687855260058652604085209889549960018b01905560405190878201927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528a604084015260018060a01b03169a8b6060840152898784015260a083015260c082015260c0815261025560e0826108a9565b519020604051908682019261190160f01b845260228301526042820152604281526102816062826108a9565b519020906040519182528482015260a435604082015260c435606082015282805260015afa1561034b576000516001600160a01b031680151580610342575b1561030c577f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259160209160005260048252604060002085600052825280604060002055604051908152a3005b60405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152606490fd5b508281146102c0565b6040513d6000823e3d90fd5b60405162461bcd60e51b815260206004820152601760248201527614115493525517d11150511312539157d1561412549151604a1b6044820152606490fd5b34610135576040366003190112610135576103af61092a565b6024359033600052600360205260406000206103cc838254610956565b905560018060a01b03169081600052600360205260406000208181540190556040519081527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60203392a3602060405160018152f35b3461013557600036600319011261013557604051600154600090816104468261086f565b80855291600181169081156104db575060011461047e575b61047a8461046e818603826108a9565b604051918291826108e1565b0390f35b600181527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b8082106104c15750909150810160200161046e8261045e565b9192600181602092548385880101520191019092916104a8565b60ff191660208087019190915292151560051b8501909201925061046e915083905061045e565b34610135576000366003190112610135576006546040516001600160a01b039091168152602090f35b34610135576020366003190112610135576001600160a01b0361054c61092a565b1660005260056020526020604060002054604051908152f35b3461013557600036600319011261013557600654610596336001600160a01b0383161461059181610ade565b610ade565b6001600160a01b0319166006556000337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610135576020366003190112610135576001600160a01b036105ed61092a565b1660005260036020526020604060002054604051908152f35b34610135576000366003190112610135576020610621610979565b604051908152f35b3461013557600036600319011261013557602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101355760603660031901126101355761068061092a565b610688610940565b6001600160a01b039091166000818152600460209081526040808320338452825290912054604435937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918560018201610729575b5050836000526003825260406000206106f8868254610956565b90556001600160a01b03166000818152600383526040908190208054870190555194855293a3602060405160018152f35b61073291610956565b6000858152600484526040808220338352855290205585856106de565b34610135576000366003190112610135576020600254604051908152f35b346101355760403660031901126101355761078661092a565b3360008181526004602090815260408083206001600160a01b03909516808452948252918290206024359081905591519182527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a3602060405160018152f35b346101355760003660031901126101355760405160008054816108098261086f565b80855291600181169081156104db57506001146108305761047a8461046e818603826108a9565b80805260208120939250905b8082106108555750909150810160200161046e8261045e565b91926001816020925483858801015201910190929161083c565b90600182811c9216801561089f575b602083101461088957565b634e487b7160e01b600052602260045260246000fd5b91607f169161087e565b90601f8019910116810190811067ffffffffffffffff8211176108cb57604052565b634e487b7160e01b600052604160045260246000fd5b91909160208152825180602083015260005b818110610914575060409293506000838284010152601f8019910116010190565b80602080928701015160408286010152016108f3565b600435906001600160a01b038216820361013557565b602435906001600160a01b038216820361013557565b9190820391821161096357565b634e487b7160e01b600052601160045260246000fd5b6000467f0000000000000000000000000000000000000000000000000000000000000000036109c757507f000000000000000000000000000000000000000000000000000000000000000090565b60405181818154936109d88561086f565b928383526020830195600181169081600014610abf5750600114610a7e575b50610a04925003826108a9565b51902060405160208101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835260408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a08152610a7860c0826108a9565b51902090565b80809394925052602082205b818310610aa3575050906020610a0492820101386109f7565b6020919350806001915483858801015201910190918392610a8a565b60ff1916875250610a0493151560051b830160200191503890506109f7565b15610ae557565b60405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b6044820152606490fdfea2646970667358221220972484e4998e763480555a1c317c7275d6f263f1b9273726ce155caf01ea6eda64736f6c634300081a0033290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563

Deployed Bytecode

0x6103006040526004361015610097575b361561001a57600080fd5b60006100296001825414612f49565b600281556000805160206148408339815191523b1561009457604051630d0e30db60e41b8152908082600481346000805160206148408339815191525af1918215610087578160019361007b57505055005b6100849161300e565b55005b50604051903d90823e3d90fd5b80fd5b600061010052610100513560e01c806308b61958146126de5780631865c57d1461214a578063664e303014611a9857806371d2fdfd146119bb57806380a75834146112fa578063817590fd14610fa25780638da5cb5b14610f77578063bee2660914610e49578063e7c5a6e814610d49578063e9ab3aae1461039e578063f2fde38b146103205763fa461e330361000f573461025e57606036600319011261025e576044356001600160401b03811161025e573660238201121561025e5780600401356001600160401b03811161025e57810136602482011161025e57600e546001600160a01b03163314801561030c575b80610302575b156102c1576020908290031261025e576024013560018060a01b03811680910361025e57604051630dfe168160e01b8152602081600481335afa801561026d5782916101005191610285575b506001600160a01b03160361027b5760206004355b60405163a9059cbb60e01b8152336004820152602481019190915261010051909283916044918391905af1801561026d5761022d575b6101005180f35b6020813d602011610265575b816102466020938361300e565b8101031261025e576102579061315b565b5038610226565b6101005180fd5b3d9150610239565b6040513d61010051823e3d90fd5b60206024356101f0565b9150506020813d6020116102b9575b816102a16020938361300e565b8101031261025e576102b3829161302f565b386101db565b3d9150610294565b60405162461bcd60e51b81526020600482015260196024820152781cddd85c10d85b1b189858dad39bdd105d5d1a1bdc9a5e9959603a1b6044820152606490fd5b503032141561018f565b50600f546001600160a01b03163314610189565b3461025e57602036600319011261025e576004356001600160a01b0381169081900361025e57600154819061035f336001600160a01b03831614612f0e565b6001600160a01b031916176001556101005133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36101005180f35b3461025e576101005136600319011261025e576103c16001610100515414612f49565b6002610100515560ff600554168015610d35575b6103de90613168565b6103eb60105415156131a3565b6012544210610d0157610400600654426131db565b60125561010051600854810b1380610bad575b5061041c613358565b6104246132ba565b9061046f604060105481519061043982612ff3565b81523060208201526001600160801b038282018190526060820152815163fc6f786560e01b815292839182919060048301613214565b0381610100516000805160206148608339815191525af1801561026d57610b7f575b5061049a613358565b6104a26132ba565b9082808210610b73576104b491613257565b915b829184808210610b67576104c991613257565b935b849060095480151580610b5e575b80610b55575b610ade575b5083151580610aca575b610a44575b83151580610a30575b6108db575b5080151580806108ca575b610828575b8080610817575b610785575b80610774575b610713575b505080151580806106ff575b610660575b8061064c575b61057f575b7ff4ae716959421e7233114af308a5d6620dc642f0b6583d40e06b0db8600fb7796040838582519182526020820152a1610100516001815580f35b6040519063a9059cbb60e01b825273507fbde39ba40da4fc79426ad5e3c64944fe43d4600483015260248201526020816044816101005160018060a01b037f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d8165af1801561026d571561054457906020823d602011610644575b816106066020938361300e565b8101031261025e577ff4ae716959421e7233114af308a5d6620dc642f0b6583d40e06b0db8600fb7799261063b60409361315b565b50925090610544565b3d91506105f9565b506004600a5460081c610100510b1461053f565b60405163a9059cbb60e01b8152600060048201526024810183905261010051602090829060449082907f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b03165af1801561026d576106c6575b50610539565b6020813d6020116106f7575b816106df6020938361300e565b8101031261025e576106f09061315b565b50846106c0565b3d91506106d2565b506003600a5460081c610100510b14610534565b909150610749907f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b0316613a05565b610751613358565b908082106107695761076291613257565b8380610528565b505061010051610762565b506003600a54610100510b14610523565b60405163a9059cbb60e01b815273507fbde39ba40da4fc79426ad5e3c64944fe43d46004820152826024820152602081604481610100516000805160206148408339815191525af1801561026d576107de575b5061051d565b6020813d60201161080f575b816107f76020938361300e565b8101031261025e576108089061315b565b50866107d8565b3d91506107ea565b506002600a54610100510b14610518565b61083182613f7e565b6108396140bc565b80610845575b50610511565b6040519063a9059cbb60e01b82527387af913718f73168d4566bbf51683792ac2680eb60048301526024820152602081604481610100516006602160991b015af1801561026d571561083f576020813d6020116108c2575b816108aa6020938361300e565b8101031261025e576108bb9061315b565b508661083f565b3d915061089d565b506001600a54610100510b1461050c565b9290506109196108e96132ba565b917f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b0316613d02565b6109216132ba565b9080821115610a255761093391613257565b80610989575b50610942613358565b61094a6132ba565b908280821061097e5761095c91613257565b928082106109735761096d91613257565b85610501565b50506101005161096d565b50506101005161095c565b61099290613f7e565b61099a6140bc565b8015610939576040519063a9059cbb60e01b82527387af913718f73168d4566bbf51683792ac2680eb60048301526024820152602081604481610100516006602160991b015af1801561026d5715610939576020813d602011610a1d575b81610a056020938361300e565b8101031261025e57610a169061315b565b5084610939565b3d91506109f8565b505061010051610933565b506002600a5460081c610100510b146104fc565b92610a7991507f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b0316613d02565b610a81613358565b91610a8a6132ba565b9282808210610abf57610a9c91613257565b9281808210610ab457610aae91613257565b906104f3565b505061010051610aae565b505061010051610a9c565b506001600a5460081c610100510b146104ee565b909350610aec915085613277565b80610b45575b50610afb613358565b91610b046132ba565b9282808210610b3a57610b1691613257565b9281808210610b2f57610b2891613257565b90866104e4565b505061010051610b28565b505061010051610b16565b610b4f90846133c0565b84610af2565b508615156104df565b508515156104d9565b505061010051936104cb565b505061010051916104b6565b610ba09060403d604011610ba6575b610b98818361300e565b8101906131fe565b50610491565b503d610b8e565b610bb5613331565b90610bbe613358565b9115159081610cf9575b50156104135760015b600854610100510b81610100510b908113610cf157610bee613331565b908115610cba57507f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b031690610c2b9082613a05565b610c33613358565b9083821115610c7e57610c4984610c4f93613257565b90613d02565b610100510b607f8114610c6457600101610bd1565b634e487b7160e01b61010051526011600452602461010051fd5b60405162461bcd60e51b8152602060048201526014602482015273696e76616c696448657374696142616c616e636560601b6044820152606490fd5b90507fb0fa2f83c99bde83c76f9de20275e5114a7eb6cf5808d19c8d8bb9a078f3077f925060209150604051908152a15b80610413565b505050610ceb565b905082610bc8565b60405162461bcd60e51b815260206004820152600c60248201526b1cdb5bdad9551a5b595bdd5d60a21b6044820152606490fd5b506002546001600160a01b031633146103d5565b3461025e57602036600319011261025e576004356001600160a01b0381169081900361025e57610d7f6001610100515414612f49565b600254336001600160a01b038216148015610e35575b610d9e90613168565b6001546001600160a01b03168214610df6576001600160a01b03191681176002556040519081527f45dddb502b500da3589b6170f21484acf8c1eef1dfed2b98644b310277fdeb8190602090a1610100516001815580f35b60405162461bcd60e51b8152602060048201526017602482015276696e76616c69644175746f6d61746f724164647265737360481b6044820152606490fd5b506001546001600160a01b03163314610d95565b3461025e576101005136600319011261025e576001546001600160a01b038116610e74338214612f0e565b610e846001610100515414612f49565b60026101005155610eab60105492610e9d8415156131a3565b60a01c610100510b15612f82565b6000805160206148608339815191523b1561025e576040516323b872dd60e01b8152610100516001600160a01b03909216600482015230602482015260448101929092528180606481010381610100516000805160206148608339815191525af1801561026d57610f64575b6001805460ff60a01b1916600160a01b1790556010546040519081527fba51082b7645d1b4f632b76df55cb331092d45b3f08a77bba7f5be7f5ce95a1b90602090a1610100516001815580f35b61010051610f719161300e565b80610f17565b3461025e576101005136600319011261025e576001546040516001600160a01b039091168152602090f35b3461025e57602036600319011261025e576004356001600160a01b0381169081900361025e57610fdd60018060a01b03600154163314612f0e565b610fed6001610100515414612f49565b60026101005155610fff81151561311a565b604051630dfe168160e01b8152602081600481855afa90811561026d5761010051916112c0575b5060405163d21220a760e01b815290602082600481865afa91821561026d576101005192611284575b506001600160a01b031660008051602061484083398151915281148061126b575b801561123a575b15611201578260018060a01b0319600f541617600f5560018060a01b0319601654161760165560018060a01b031660018060a01b0319601754161760175560405163095ea7b360e01b81528160048201526000196024820152602081604481610100516000805160206148408339815191525af1801561026d576111ca575b5060405163095ea7b360e01b815260048101829052600019602482015261010051602090829060449082906006602160991b015af1801561026d5761116c575b7f5b5630f86a549e0b6085a6d10cc6cf9271c6a8a314474b7d19f1abc9d45be82b602083604051908152a1610100516001815580f35b6020813d6020116111c2575b816111856020938361300e565b8101031261025e577f5b5630f86a549e0b6085a6d10cc6cf9271c6a8a314474b7d19f1abc9d45be82b916111ba60209261315b565b509150611136565b3d9150611178565b6020813d6020116111f9575b816111e36020938361300e565b8101031261025e576111f49061315b565b6110f6565b3d91506111d6565b60405162461bcd60e51b8152602060048201526011602482015270696e76616c6964506f6f6c546f6b656e7360781b6044820152606490fd5b506006602160991b018114801561107757506001600160a01b03821660008051602061484083398151915214611077565b506001600160a01b0382166006602160991b0114611070565b9091506020813d6020116112b8575b816112a06020938361300e565b8101031261025e576112b19061302f565b908361104f565b3d9150611293565b90506020813d6020116112f2575b816112db6020938361300e565b8101031261025e576112ec9061302f565b82611026565b3d91506112ce565b3461025e576101a036600319011261025e57604435801515810361025e5760a435610100510b60a4350361025e5760e435610100510b60e4350361025e5761010435610100510b610104350361025e5761012435801515810361025e5761018435916001600160801b038316830361025e5761137c6001610100515414612f49565b61139160018060a01b03600254163314613168565b601354421061198657610e1042014211610c645742610e100160135560035464012a05f20081111561197d5764012a05f1ff198101818111610c64575b60043510159081611961575b501561192657600754633b9aca008101809111610c6457608435111580611915575b156118d757600c5464012a05f2008101809111610c6457610164351115806118c5575b1561188e57602435158015611872575b1561183257610e10606435101580611824575b156117e8576101005160a435810b1215806117d6575b1561179957606460c43511611761576101005160e435810b12158061174f575b15611711576101005161010435810b1215806116fe575b156116be57615460610144351015806116ae575b15611673576001600160801b038316158015611649575b15611608577fdb98078f68bee559e511b59417d64cd9b65fc985814c12bc3306d08f8eb074a4926101a09260043560035560243560045560ff196005541660ff841515161760055560643560065560843560075560ff196008541660a43560ff161760085560c435600955600a5462ff000082151560101b169060ff60e435169062ffffff1916176101043560081b61ff00161717600a5561014435600b5561016435600c5560018060801b03821660018060801b0319600d541617600d556040519260043584526024356020850152151560408401526064356060840152608435608084015260a435610100510b60a084015260c43560c084015260e435610100510b60e084015261010435610100510b6101008401521515610120830152610144356101408301526101643561016083015260018060801b0316610180820152a1610100516001815580f35b60405162461bcd60e51b8152602060048201526019602482015278696e76616c6964526167654c6971756964697479526174696f60381b6044820152606490fd5b5060646001600160801b038416108015906114ba57506127106001600160801b03841611156114ba565b60405162461bcd60e51b81526020600482015260136024820152721a5b9d985b1a59149859d9525b9d195c9d985b606a1b6044820152606490fd5b50620151806101443511156114a3565b60405162461bcd60e51b81526020600482015260186024820152771a5b9d985b1a5914db5bdad952195cdd1a5855185c99d95d60421b6044820152606490fd5b50600461010435610100510b131561148f565b60405162461bcd60e51b81526020600482015260166024820152751a5b9d985b1a5914db5bdad9555cd918d5185c99d95d60521b6044820152606490fd5b50600360e435610100510b1315611478565b60405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a5914db5bdad95199595960821b6044820152606490fd5b60405162461bcd60e51b81526020600482015260156024820152740696e76616c6964536d6f6b654368616f734c6f6f7605c1b6044820152606490fd5b50600560a435610100510b1315611458565b60405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a5914db5bdad9525b9d195c9d985b60621b6044820152606490fd5b506154606064351115611442565b60405162461bcd60e51b8152602060048201526018602482015277696e76616c69644c6971756964697479536c69707061676560401b6044820152606490fd5b5060326024351015801561142f57506109c4602435111561142f565b60405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59149859d951995959608a1b6044820152606490fd5b506405d21dba0061016435111561141f565b60405162461bcd60e51b8152602060048201526016602482015275696e76616c6964536d6f6b654368616f73526174696f60501b6044820152606490fd5b5064012a05f20060843511156113fc565b60405162461bcd60e51b8152602060048201526013602482015272696e76616c696455736463436170616369747960681b6044820152606490fd5b905064012a05f2008101809111610c64576004351115846113da565b610100516113ce565b60405162461bcd60e51b815260206004820152600d60248201526c18dbdb999a59d51a5b595bdd5d609a1b6044820152606490fd5b3461025e576101005136600319011261025e576119e360018060a01b03600154163314612f0e565b6119f36001610100515414612f49565b64012a05f2006003556101f4600455600160ff196005541617600555610e10600655633b9aca00600755600360ff196008541617600855610100516009556201000062ffffff19600a541617600a5562015180600b55633b9aca00600c5560fa60018060801b0319600d541617600d557feefee587e0d96e6b177c1e565226d9eee21648934c285d08bd93aba5aeaf91266101005161010051a1610100516001815580f35b3461025e576101005136600319011261025e57611abb6001610100515414612f49565b6002610100515560ff600a5460101c168015612136575b611adb90613168565b611ae860105415156131a3565b601154421061210357611afd600b54426131db565b601155611b086132ba565b611b10613358565b90801515806120fa575b6120c4575b600d546001600160801b0316916064831015611c8e575b505050611b41613297565b80611c56575b611b4f613358565b80611b90575b6040907f6d9b824b5ad0353296993551c83415789c5dd8532effa85938e9de5bb350188f9282519182526020820152a1610100516001815580f35b60405163a9059cbb60e01b8152610100805160048301526024820183905251602090829060449082907f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b03165af1801561026d57611bf6575b50611b55565b906020823d602011611c4e575b81611c106020938361300e565b8101031261025e577f6d9b824b5ad0353296993551c83415789c5dd8532effa85938e9de5bb350188f92611c4560409361315b565b50925090611bf0565b3d9150611c03565b611c89817f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b0316613a05565b611b47565b6010549260405163133f757160e31b8152846004820152610180816024816000805160206148608339815191525afa90811561026d576101005191612099575b50811561207f5760018060801b0316046101005161010051906004546032811015611ee9575b506078420192834211610c64576040519660a088018881106001600160401b03821117611ecf576040528752602087019060018060801b0316815260408701918252606087019283526080870193845260405196630624e65f60e11b885251600488015260018060801b03905116602487015251604486015251606485015251608484015260408360a481610100516000805160206148608339815191525af192831561026d57611dec93611eb1575b506040601054815190611db682612ff3565b81523060208201526001600160801b038282018190526060820152815163fc6f786560e01b815294859182919060048301613214565b0381610100516000805160206148608339815191525af191821561026d577f540ce1332dd4ff4c92d40c69a74e406d466ebe40be72d462f11239632e6d9ea993604093611e95575b50611e3d6132ba565b611e45613358565b91808210611e8957611e5691613257565b915b808210611e7d57611e6891613257565b905b82519182526020820152a1808080611b36565b50506101005190611e6a565b50506101005191611e58565b611eab90843d8611610ba657610b98818361300e565b50611e34565b611ec99060403d604011610ba657610b98818361300e565b50611da4565b634e487b7160e01b61010051526041600452602461010051fd5b9150506001600160801b038216156120415760405163133f757160e31b815260048101869052610180816024816000805160206148608339815191525afa801561026d5761010051918291612000575b50600e54604051633850c7bd60e01b8152919060e090839060049082906001600160a01b03165afa90811561026d57611f919386936101005193611fc1575b50611f85611f8b916140f1565b916140f1565b91614460565b9161271003906127108211610c645781612710611fb28194611fb994613264565b0493613264565b049086611cf4565b611f8b919350611feb611f859160e03d60e011611ff9575b611fe3818361300e565b810190613871565b505050505050939150611f78565b503d611fd9565b6004925061202691506101803d811161203a575b61201e818361300e565b81019061306a565b505050505096955093505050509190611f39565b503d612014565b60405162461bcd60e51b81526020600482015260166024820152751a5b9d985b1a59131a5c5d5a591a5d1e505b5bdd5b9d60521b6044820152606490fd5b634e487b7160e01b61010051526012600452602461010051fd5b6120b291506101803d811161203a5761201e818361300e565b50505050965050505050505085611cce565b6120cc6133af565b806120d8575b50611b1f565b90506120e3916133c0565b6120eb6132ba565b6120f3613358565b90826120d2565b50811515611b1a565b60405162461bcd60e51b815260206004820152600b60248201526a1c9859d9551a5b595bdd5d60aa1b6044820152606490fd5b506002546001600160a01b03163314611ad2565b3461025e576101005136600319011261025e5760405161216981612fc1565b6101005181526101005160208201526101005160408201526101005160608201526101005160808201526101005160a08201526101005160c08201526101005160e08201526101005161010082015261010051610120820152610100516101408201526101005161016082015261010051610180820152610100516101a0820152610100516101c0820152610100516101e08201526101005161020082015261010051610220820152610100516102408201526101005161026082015261010051610280820152610100516102a0820152610100516102c0820152610100516102e082015261010051610300820152610100516103208201526101005161034082015261010051610360820152610100516103808201526103a0610100519101526103c060015460018060a01b03600254166101805260135460018060a01b03600e54166101205260018060a01b03601454166101e05260018060a01b03601554166102605260018060a01b03600f54166102c05260018060a01b03601654166102e05260018060a01b03601754166004546010546003549061230a613297565b926123136132ba565b9461231c613331565b96612325613358565b60805260125460c05260055460ff16610140526006546101a05260075461020052600854610100510b610280526009546102a052600a546102405260115461022052600b546101c052600c5461016052600d546001600160801b031660e05260405160a081905261239590612fc1565b60018060a01b03891660a0515261018051602060a0510152604060a051015261012051606060a05101526101e051608060a05101526102605160a0805101526102c05160c060a05101526102e05160e060a051015261010060a051015261012060a051015261014060a05101528460a01c610100510b61016060a051015261018060a05101526101a060a05101526101c060a05101526101e060a051015260805161020060a051015260c05161022060a051015261014051151561024060a05101526101a05161026060a05101526102005161028060a0510152610280516102a060a05101526102a0516102c060a051015261024051610100510b6102e060a05101526102405160081c610100510b61030060a05101526102205161032060a051015260ff6102405160101c16151561034060a05101526101c05161036060a05101526101605161038060a051015260e0516103a060a05101526040519060018060a01b0316815260018060a01b03602060a0510151166020820152604060a0510151604082015260018060a01b03606060a051015116606082015260018060a01b03608060a051015116608082015260018060a01b0360a0805101511660a082015260018060a01b0360c060a05101511660c082015260018060a01b0360e060a05101511660e082015260018060a01b0361010060a05101511661010082015261012060a051015161012082015261014060a051015161014082015261016060a0510151610100510b61016082015261018060a05101516101808201526101a060a05101516101a08201526101c060a05101516101c08201526101e060a05101516101e082015261020060a051015161020082015261022060a051015161022082015261024060a0510151151561024082015261026060a051015161026082015261028060a05101516102808201526102a060a0510151610100510b6102a08201526102c060a05101516102c08201526102e060a0510151610100510b6102e082015261030060a0510151610100510b61030082015261032060a051015161032082015261034060a0510151151561034082015261036060a051015161036082015261038060a051015161038082015260018060801b036103a060a0510151166103a0820152f35b3461025e57602036600319011261025e576001546004359061270a336001600160a01b03831614612f0e565b61271a6001610100515414612f49565b600261010051558115612eda576127399060a01c610100510b15612f82565b60405163133f757160e31b815260048101829052610180816024816000805160206148608339815191525afa90811561026d57610100519182918291612eaa575b5060018060a01b03169060008051602061484083398151915282149182612e73575b8215612e17575b505015612dd25762ffffff612710911603612d8d57600e546001600160a01b03811615612805575b7faf9f7221fd5f390d3f4232f7e7f8e0bc86992cf4ecd950ebef4500ee00606d1060208380601055604051908152a1610100516001815580f35b604051630b4c774160e11b815260008051602061484083398151915260048201527f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b031660248201819052612710604483015291906020816064817333128a8fc17869897dce68ed026d694621f6fdfd5afa90811561026d576101005191612d53575b506001600160a01b03166001600160a01b0319919091168117600e556128b681151561311a565b6040519063095ea7b360e01b825260048201526000196024820152602081604481610100516000805160206148408339815191525af1801561026d57612d1c575b50600e5460405163095ea7b360e01b81526001600160a01b0390911660048201526000196024820152610100519091602091839160449183915af1801561026d57612ce5575b50600e54604051630dfe168160e01b81526001600160a01b0390911690602081600481855afa90811561026d576101005191612ca4575b50601480546001600160a01b0319166001600160a01b0390921691909117905560405163d21220a760e01b815290602090829060049082905afa90811561026d576101005191612c6a575b5060018060a01b031660018060a01b0319601554161760155573b2cc224c1c9fee385f8ad6a55b4d94e92359dc5960018060a01b0319600f541617600f55604051630dfe168160e01b815260208160048173b2cc224c1c9fee385f8ad6a55b4d94e92359dc595afa90811561026d576101005191612c30575b50601680546001600160a01b0319166001600160a01b039290921691909117905560405163d21220a760e01b815260208160048173b2cc224c1c9fee385f8ad6a55b4d94e92359dc595afa90811561026d576101005191612bf6575b50601780546001600160a01b0319166001600160a01b039290921691909117905560405163095ea7b360e01b815273b2cc224c1c9fee385f8ad6a55b4d94e92359dc596004820152600019602482015261010051602090829060449082906000805160206148408339815191525af1801561026d57612bbf575b5060405163095ea7b360e01b815273b2cc224c1c9fee385f8ad6a55b4d94e92359dc596004820152600019602482015261010051602090829060449082906006602160991b015af1801561026d57156127cb576020813d602011612bb7575b81612b7a6020938361300e565b8101031261025e577faf9f7221fd5f390d3f4232f7e7f8e0bc86992cf4ecd950ebef4500ee00606d1091612baf60209261315b565b5091506127cb565b3d9150612b6d565b6020813d602011612bee575b81612bd86020938361300e565b8101031261025e57612be99061315b565b612b0e565b3d9150612bcb565b90506020813d602011612c28575b81612c116020938361300e565b8101031261025e57612c229061302f565b82612a94565b3d9150612c04565b90506020813d602011612c62575b81612c4b6020938361300e565b8101031261025e57612c5c9061302f565b82612a38565b3d9150612c3e565b90506020813d602011612c9c575b81612c856020938361300e565b8101031261025e57612c969061302f565b826129bf565b3d9150612c78565b90506020813d602011612cdd575b81612cbf6020938361300e565b8101031261025e57600491612cd560209261302f565b915091612974565b3d9150612cb2565b6020813d602011612d14575b81612cfe6020938361300e565b8101031261025e57612d0f9061315b565b61293d565b3d9150612cf1565b6020813d602011612d4b575b81612d356020938361300e565b8101031261025e57612d469061315b565b6128f7565b3d9150612d28565b90506020813d602011612d85575b81612d6e6020938361300e565b8101031261025e57612d7f9061302f565b8461288f565b3d9150612d61565b60405162461bcd60e51b815260206004820152601a60248201527f6e667446656554696572446f65734e6f744d61746368506f6f6c0000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527f6e6674546f6b656e73446f4e6f4d61746368506f6f6c546f6b656e73000000006044820152606490fd5b7f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b031614915081612e52575b5083806127a3565b6001600160a01b031660008051602061484083398151915214905083612e4a565b6001600160a01b038281167f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d890911614925061279c565b915050612ec691506101803d811161203a5761201e818361300e565b50505050505050925092509190918461277a565b60405162461bcd60e51b815260206004820152600c60248201526b1a5b9d985b1a5913999d125960a21b6044820152606490fd5b15612f1557565b60405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b6044820152606490fd5b15612f5057565b60405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606490fd5b15612f8957565b60405162461bcd60e51b815260206004820152601060248201526f1b999d105b1c9958591e531bd8dad95960821b6044820152606490fd5b6103c081019081106001600160401b03821117612fdd57604052565b634e487b7160e01b600052604160045260246000fd5b608081019081106001600160401b03821117612fdd57604052565b90601f801991011681019081106001600160401b03821117612fdd57604052565b51906001600160a01b038216820361304357565b600080fd5b51908160020b820361304357565b51906001600160801b038216820361304357565b9190826101809103126130435781516bffffffffffffffffffffffff81168103613043579161309b6020820161302f565b916130a86040830161302f565b916130b56060820161302f565b91608082015162ffffff8116810361304357916130d460a08201613048565b916130e160c08301613048565b916130ee60e08201613056565b9161010082015191610120810151916131176101606131106101408501613056565b9301613056565b90565b1561312157565b60405162461bcd60e51b8152602060048201526012602482015271696e76616c6964506f6f6c4164647265737360701b6044820152606490fd5b5190811515820361304357565b1561316f57565b60405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b6044820152606490fd5b156131aa57565b60405162461bcd60e51b81526020600482015260096024820152681b999d139bdd14d95d60ba1b6044820152606490fd5b919082018092116131e857565b634e487b7160e01b600052601160045260246000fd5b9190826040910312613043576020825192015190565b815181526020808301516001600160a01b0316908201526040808301516001600160801b0390811691830191909152606092830151169181019190915260800190565b919082039182116131e857565b818102929181159184041417156131e857565b8115613281570490565b634e487b7160e01b600052601260045260246000fd5b61329f6132ba565b600354808211156132b35761311791613257565b5050600090565b6040516370a0823160e01b81523060048201526020816024816000805160206148408339815191525afa908115613325576000916132f6575090565b90506020813d60201161331d575b816133116020938361300e565b81010312613043575190565b3d9150613304565b6040513d6000823e3d90fd5b6007548015613352576133426132ba565b81811061334d575090565b905090565b50600090565b6040516370a0823160e01b81523060048201526020816024817f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b03165afa908115613325576000916132f6575090565b600c548015613352576133426132ba565b6014546001600160a01b03166000805160206148408339815191521490811561385b57825b82156138535750915b8015158061384a575b1561381457601054926040519163133f757160e31b8352846004840152610180836024816000805160206148608339815191525afa918215613325576004936000906000946137e5575b50600e54604051633850c7bd60e01b81529560e09187919082906001600160a01b03165afa948515613325576000956137b6575b50613482613488916140f1565b936140f1565b9182846001600160a01b03808316908216116137ad575b6001600160a01b0387811694908890831686116137515750506134c29350614669565b915b6001600160801b03831615613714576134dc93614460565b9281158015809161370b575b156136ce576004546032811080159291906136c657806127100361271081116131e8576135186127109187613264565b04925b156136bd576127100361271081116131e85761353a6127109188613264565b04905b806136b4575b613550575b505050505050565b60784201918242116131e8576040519360c085018581106001600160401b03821117612fdd576040528452602084018581526040850190888252606086019283526080860193845260a086019485526040519563219f5d1760e01b87525160048701525160248601525160448501525160648401525160848301525160a482015260608160c48160006000805160206148608339815191525af1801561332557613652575b50906040917f24aa89c4bc7aceb8018cbf2709f3079802d08813d1e593baf5c10dfed8eb4acc938260001461364b5780925b1561364457505b82519182526020820152a1388080808080613548565b905061362e565b8192613627565b91906060833d6060116136ac575b8161366d6060938361300e565b81010312613043577f24aa89c4bc7aceb8018cbf2709f3079802d08813d1e593baf5c10dfed8eb4acc936136a2604094613056565b50935090916135f5565b3d9150613660565b50851515613543565b5060009061353d565b60009261351b565b60405162461bcd60e51b8152602060048201526015602482015274696e76616c696444657369726564416d6f756e747360581b6044820152606490fd5b508415156134e8565b60405162461bcd60e51b8152602060048201526015602482015274696e73756666696369656e744c697175696469747960581b6044820152606490fd5b919490939192906001600160a01b03821611156137a15782916137789161377e9594614669565b9361461b565b6001600160801b03818116908316101561379a57505b916134c4565b9050613794565b9150506137949261461b565b5050838361349f565b6134889195506137d76134829160e03d60e011611ff957611fe3818361300e565b505050505050959150613475565b90506138019193506101803d811161203a5761201e818361300e565b5050505050979550935050505038613441565b60405162461bcd60e51b815260206004820152600e60248201526d696e76616c6964416d6f756e747360901b6044820152606490fd5b508215156133f7565b9050916133ee565b80926133e5565b519061ffff8216820361304357565b908160e09103126130435780516001600160a01b0381168103613043579161389b60208301613048565b916138a860408201613862565b916138b560608301613862565b916138c260808201613862565b9160a082015160ff811681036130435760c061311791930161315b565b156138e657565b60405162461bcd60e51b815260206004820152600e60248201526d1cddd85c16995c9bd05b5bdd5b9d60921b6044820152606490fd5b1561392357565b60405162461bcd60e51b815260206004820152600a6024820152691c1bdbdb139bdd14d95d60b21b6044820152606490fd5b6001600160a01b0391821690821603919082116131e857565b6001600160a01b039182168152911515602083015260408201929092529116606082015260a060808201819052825190820181905291929160005b8181106139ca575060c09293506000838284010152601f8019910116010190565b80602080928701015160c08286010152016139a9565b60609060208152600a6020820152691cddd85c11985a5b195960b21b60408201520190565b90613a118115156138df565b600e546001600160a01b031691613a2983151561391c565b6001600160a01b03169160008051602061484083398151915283148015613cd0575b15613c99578260008051602061484083398151915214613c64576014546001600160a01b0316600080516020614840833981519152149060008215613c4957506401000276a45b600454916032831015613b70575b60409250846000845195600080516020614840833981519152602088015260208752613acc868861300e565b613aec865197889687958694630251596160e31b8652306004870161396e565b03925af19081613b52575b50613b4e5760408051600080516020614840833981519152815260208101939093528201526000805160206148208339815191529150606090a160405162461bcd60e51b815280613b4a600482016139e0565b0390fd5b5050565b613b6a9060403d604011610ba657610b98818361300e565b50613af7565b604051633850c7bd60e01b81529290915060e083600481855afa92831561332557600093613c22575b508315613bed576127100361271081116131e857604092613bbc613bcb9261452c565b906001600160a01b0316613264565b6001600160a01b0390613be690613be06144e2565b90613277565b1690613aa0565b91613bfa90613bbc6144e2565b916127100361271081116131e8576040926001600160a01b0391613be69190613be09061452c565b613c3c91935060e03d60e011611ff957611fe3818361300e565b5050505050509138613b99565b5073fffd8963efd1fc6a506488495d951d5263988d25613a92565b60405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964546f6b656e7360981b6044820152606490fd5b60405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59151bdad95b93dd5d608a1b6044820152606490fd5b507f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b03168314613a4b565b90613d0e8115156138df565b600e546001600160a01b031691613d2683151561391c565b6001600160a01b0316916000805160206148408339815191528314808015613f4c575b15613f1657613c64576014546001600160a01b031683149060008215613efb57506401000276a45b600454916032831015613e37575b6040925084600084519588602088015260208752613d9d868861300e565b613dbd865197889687958694630251596160e31b8652306004870161396e565b03925af19081613e19575b50613b4e576040805192835260008051602061484083398151915260208401528201526000805160206148208339815191529150606090a160405162461bcd60e51b815280613b4a600482016139e0565b613e319060403d604011610ba657610b98818361300e565b50613dc8565b604051633850c7bd60e01b81529290915060e083600481855afa92831561332557600093613ed4575b508315613e9f576127100361271081116131e857604092613bbc613e839261452c565b6001600160a01b0390613e9890613be06144e2565b1690613d7f565b91613eac90613bbc6144e2565b916127100361271081116131e8576040926001600160a01b0391613e989190613be09061452c565b613eee91935060e03d60e011611ff957611fe3818361300e565b5050505050509138613e60565b5073fffd8963efd1fc6a506488495d951d5263988d25613d71565b60405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b22a37b5b2b724b760911b6044820152606490fd5b507f000000000000000000000000bc7755a153e852cf76cccddb4c2e7c368f6259d86001600160a01b03168414613d49565b613f898115156138df565b600f546001600160a01b0316613fa081151561391c565b6016546001600160a01b03166000805160206148408339815191521490604090600083156140a057506401000276a4905b846000845195600080516020614840833981519152602088015260208752613ff9868861300e565b614019865197889687958694630251596160e31b8652306004870161396e565b03925af19081614082575b5061407f576040805160008051602061484083398151915281526006602160991b0160208201529081019190915260008051602061482083398151915290606090a160405162461bcd60e51b815280613b4a600482016139e0565b50565b61409a9060403d604011610ba657610b98818361300e565b50614024565b5073fffd8963efd1fc6a506488495d951d5263988d2590613fd1565b6040516370a0823160e01b81523060048201526020816024816006602160991b015afa908115613325576000916132f6575090565b60020b600081121561445a5780600003905b620d89e8821161444957600182161561443f576ffffcb933bd6fad37aa2d162d1a5940015b6001600160881b03169160028116614423575b60048116614407575b600881166143eb575b601081166143cf575b602081166143b3575b60408116614397575b6080811661437b575b610100811661435f575b6102008116614343575b6104008116614327575b610800811661430b575b61100081166142ef575b61200081166142d3575b61400081166142b7575b618000811661429b575b62010000811661427f575b620200008116614264575b620400008116614249575b6208000016614230575b600012614221575b63ffffffff8116614219576000905b60201c60ff91909116016001600160a01b031690565b600190614203565b801561328157600019046141f4565b6b048a170391f7dc42444e8fa290910260801c906141ec565b6d2216e584f5fa1ea926041bedfe9890920260801c916141e2565b916e5d6af8dedb81196699c329225ee6040260801c916141d7565b916f09aa508b5b7a84e1c677de54f3e99bc90260801c916141cc565b916f31be135f97d08fd981231505542fcfa60260801c916141c1565b916f70d869a156d2a1b890bb3df62baf32f70260801c916141b7565b916fa9f746462d870fdf8a65dc1f90e061e50260801c916141ad565b916fd097f3bdfd2022b8845ad8f792aa58250260801c916141a3565b916fe7159475a2c29b7443b29c7fa6e889d90260801c91614199565b916ff3392b0822b70005940c7a398e4b70f30260801c9161418f565b916ff987a7253ac413176f2b074cf7815e540260801c91614185565b916ffcbe86c7900a88aedcffc83b479aa3a40260801c9161417b565b916ffe5dee046a99a2a811c461f1969c30530260801c91614171565b916fff2ea16466c96a3843ec78b326b528610260801c91614168565b916fff973b41fa98c081472e6896dfb254c00260801c9161415f565b916fffcb9843d60f6159c9db58835c9266440260801c91614156565b916fffe5caca7e10e4e61c3624eaa0941cd00260801c9161414d565b916ffff2e50f5f656932ef12357cf3c7fdcc0260801c91614144565b916ffff97272373d413259a46990580e213a0260801c9161413b565b600160801b614128565b6315e4079d60e11b60005260046000fd5b80614103565b9093926000929091836001600160a01b03808416908816116144da575b6001600160a01b0382811690881681116144a25750505061449f9293946145b0565b91565b93945090926001600160a01b03831611156144ce5750906144c8836131179493836145b0565b9461456d565b9461311793925061456d565b95919561447d565b61271061138860005b8282106144f757505090565b909150818015614518578061450f91612710046131db565b60011c906144eb565b634e487b7160e01b82526012600452602482fd5b801561335257600181018082116131e85760011c815b82821061454e57505090565b9091506145648261455f8184613277565b6131db565b60011c90614542565b6131179291906001600160a01b03808316908216116145aa575b6001600160a01b039161459a9190613955565b16906001600160801b03166146b7565b90614587565b61311792909161460491906001600160a01b0380821690851611614615575b6001600160a01b036145e18583613955565b6001600160a01b039092169291169060601b600160601b600160e01b0316614797565b6001600160a01b0390911690613277565b926145cf565b61464f9291906001600160a01b0380831690821611614663575b6001600160a01b03916146489190613955565b1690614706565b6001600160801b0381169081036130435790565b90614635565b61464f92916001600160a01b03808216908316116146b1575b6146aa61469b6001600160a01b038381169085166146b7565b926001600160a01b0392613955565b1691614797565b90614682565b6000919060001982820991808202938480851094039380850394146146fc57600160601b8410156100945750600160601b910990828211900360a01b910360601c1790565b5050505060601c90565b600019600160601b8209918160601b9182808510940393808503941461478a5783821115613043578190600160601b9009818060000316809204600281600302188082026002030280820260020302808202600203028082026002030280820260020302809102600203029360018380600003040190848311900302920304170290565b5080925015613043570490565b916000198284099282810292838086109503948086039514614811578483111561304357829109818060000316809204600281600302188082026002030280820260020302808202600203028082026002030280820260020302809102600203029360018380600003040190848311900302920304170290565b50508092501561304357049056fe6930176329c33f663176f0f242132119497db425bb44d32f9ffef8683d10b0c0000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000003a520b32c04bf3beef7beb72e919cf822ed34f1a26469706673582212209685cd2dcb9265dc6c9d2eddd71c6bceb6bf0797a5157594dd634b429572fa0f64736f6c634300081a0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

HESTIA: A deflationary store of value on Base chain, powered by the Hestia Chaos Engine for automated liquidity and supply management.

Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.