ETH Price: $3,157.58 (+2.83%)
Gas: 2 Gwei

Contract

0x584122AbafbC5acd0Ad71796764920d205BcD4fa
 

Overview

ETH Balance

6.117155902744459435 ETH

Eth Value

$19,315.42 (@ $3,157.58/ETH)

Token Holdings

Transaction Hash
Method
Block
From
To
Buy_with_eth202927172024-07-12 20:08:5915 hrs ago1720814939IN
0x584122Ab...205BcD4fa
0.0195 ETH0.000510713.91219906
Transfer202713592024-07-09 20:35:353 days ago1720557335IN
0x584122Ab...205BcD4fa
0.2 ETH0.000423824.13483028
Buy_with_eth202534562024-07-07 8:31:236 days ago1720341083IN
0x584122Ab...205BcD4fa
0.115 ETH0.000237491.75711666
Transfer202467582024-07-06 10:05:477 days ago1720260347IN
0x584122Ab...205BcD4fa
0.199 ETH0.000324132.70417594
Buy_with_eth202466992024-07-06 9:53:597 days ago1720259639IN
0x584122Ab...205BcD4fa
0.05 ETH0.000385112.89085071
Buy_with_eth202412652024-07-05 15:41:237 days ago1720194083IN
0x584122Ab...205BcD4fa
0.03335125 ETH0.0013537111.97117586
Buy_with_eth202406622024-07-05 13:40:117 days ago1720186811IN
0x584122Ab...205BcD4fa
0.065 ETH0.001215539.14269036
Buy_with_eth202406542024-07-05 13:38:357 days ago1720186715IN
0x584122Ab...205BcD4fa
0.1 ETH0.001161718.72257646
Transfer202396502024-07-05 10:16:478 days ago1720174607IN
0x584122Ab...205BcD4fa
0.5 ETH0.0014365711.10521934
Buy_with_eth202359592024-07-04 21:54:598 days ago1720130099IN
0x584122Ab...205BcD4fa
0.00064 ETH0.000689335.14906079
Transfer202268552024-07-03 15:23:599 days ago1720020239IN
0x584122Ab...205BcD4fa
0.38 ETH0.0021371716.00864836
Buy_with_eth202266432024-07-03 14:41:119 days ago1720017671IN
0x584122Ab...205BcD4fa
0.093 ETH0.0020010915.03263191
Transfer202258842024-07-03 12:08:359 days ago1720008515IN
0x584122Ab...205BcD4fa
0.195 ETH0.001136018.72397445
Buy_with_eth202258702024-07-03 12:05:479 days ago1720008347IN
0x584122Ab...205BcD4fa
0.1 ETH0.001143828.55670681
Transfer202220652024-07-02 23:19:5910 days ago1719962399IN
0x584122Ab...205BcD4fa
0.00064369 ETH0.000290422.15437332
Transfer202213042024-07-02 20:46:4710 days ago1719953207IN
0x584122Ab...205BcD4fa
0.49847554 ETH0.000739265.67167277
Buy_with_eth202119602024-07-01 13:26:5911 days ago1719840419IN
0x584122Ab...205BcD4fa
0.135 ETH0.000824666.3188782
Transfer202119452024-07-01 13:23:5911 days ago1719840239IN
0x584122Ab...205BcD4fa
0.09521356 ETH0.000908446.81112447
Buy_with_usd202048172024-06-30 13:31:3512 days ago1719754295IN
0x584122Ab...205BcD4fa
0 ETH0.000448745.17077548
Transfer202048072024-06-30 13:29:3512 days ago1719754175IN
0x584122Ab...205BcD4fa
0.05 ETH0.000681565.06332036
Buy_with_eth202048002024-06-30 13:28:1112 days ago1719754091IN
0x584122Ab...205BcD4fa
0.095238 ETH0.000673855.04069245
Buy_with_eth202047932024-06-30 13:26:4712 days ago1719754007IN
0x584122Ab...205BcD4fa
0.11 ETH0.000646854.95264457
Transfer202047902024-06-30 13:26:1112 days ago1719753971IN
0x584122Ab...205BcD4fa
0.1 ETH0.000684515.27678452
Buy_with_usd201978582024-06-29 14:12:4713 days ago1719670367IN
0x584122Ab...205BcD4fa
0 ETH0.000391754.51470979
Buy_with_eth201978222024-06-29 14:05:3513 days ago1719669935IN
0x584122Ab...205BcD4fa
0.197 ETH0.0005424.00862918
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Presale

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 1 of 13: Presale.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
pragma abicoder v2;

import "./Ownable.sol";
import './TransferHelper.sol';
import "./IUniswapV3Pool.sol";
import "./TickMath.sol";
import "./FixedPoint96.sol";
import "./FullMath.sol";


contract Presale is Ownable {
    /*//////////////////////////////////////////////////////////////
                                 ADDRESSES
    //////////////////////////////////////////////////////////////*/
    address public immutable USDT_ADDRESS = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
    address public immutable USDC_ADDRESS = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
    address public TOKEN_ADDRESS;
    IUniswapV3Pool public WETH_USDC_V3 = IUniswapV3Pool(0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640);

    /*//////////////////////////////////////////////////////////////
                                 PRICING, started 0.2$ for token
                                 averaging ETH price for 
    //////////////////////////////////////////////////////////////*/
    uint256 public token_price = 2000;
    uint256 public token_price_denominator = 10000;
    uint256 public immutable WEI_DIFF_ETH_USDC = 1000000000000;
    uint32 public eth_price_twapInterval = 600;

    constructor(address _token_address) Ownable() {
        TOKEN_ADDRESS = _token_address;
    }

    //
    //  Get price via Uni V3 oracle
    //
    function _get_PriceX96_weth_usdc(
        uint32 twapInterval
    ) public view returns (uint256 priceX96) {
        uint32[] memory secondsAgos = new uint32[](2);
        secondsAgos[0] = twapInterval;
        secondsAgos[1] = 0;
        (int56[] memory tickCumulatives, ) = WETH_USDC_V3.observe(secondsAgos);
        uint160 sqrtPriceX96 = TickMath.getSqrtRatioAtTick(int24((tickCumulatives[1] - tickCumulatives[0]) / twapInterval));
        return FullMath.mulDiv(sqrtPriceX96, sqrtPriceX96, FixedPoint96.Q96);
    }

    //
    //  get token amount from ETH amount considering ETH price AND Token price
    //  using 'eth_price_twapInterval' for average ETH price
    //  Considering wei difference because price from oracle inherits this difference
    //
    function get_token_amount_from_eth_amount(
        uint256 eth_amount
    ) public view returns(uint256) {
        uint256 denominator = FullMath.mulDiv(token_price, _get_PriceX96_weth_usdc(eth_price_twapInterval), FixedPoint96.Q96);
        return FullMath.mulDiv(WEI_DIFF_ETH_USDC * eth_amount, token_price_denominator, denominator);
    }

    //
    //  get token amount from USD amount considering Token price
    //  Considering WEI difference here!
    //
    function get_token_amount_from_usd_amount(
        uint256 usd_amount
    ) external view returns(uint256) {
        return FullMath.mulDiv(WEI_DIFF_ETH_USDC * token_price, usd_amount, token_price_denominator);
    }

    //
    //  buy tokens with USDC / USDT
    //
    function buy_with_usd(
        address usd_address, 
        uint256 usd_amount
    ) external returns(uint256 token_amount) {
        require((usd_address == USDC_ADDRESS) || (usd_address == USDT_ADDRESS));
        TransferHelper.safeTransferFrom(usd_address, msg.sender, address(this), usd_amount);
        token_amount = FullMath.mulDiv(usd_amount * WEI_DIFF_ETH_USDC, token_price_denominator, token_price);
        TransferHelper.safeTransfer(TOKEN_ADDRESS, msg.sender, token_amount);
    }

    //
    //  buy tokens with ETH
    //
    function buy_with_eth() public payable returns (uint256 token_amount) {
        token_amount = get_token_amount_from_eth_amount(msg.value);
        TransferHelper.safeTransfer(TOKEN_ADDRESS, msg.sender, token_amount);
    }

    //
    //  it's also possible to buy tokens with ETH just sending ETH to contract
    //
    receive() external payable {
        buy_with_eth();
    }

    //
    //  withdraw ETH from contarct
    //
    function unstuck_eth(uint256 eth_amount) external onlyOwner {
        payable(owner()).transfer(eth_amount);
    }

    //
    //  withdraw ERC20 token from contract
    //
    function unstuck_token(address _token_address, uint256 token_amount) external onlyOwner {
        TransferHelper.safeTransfer(_token_address, msg.sender, token_amount);
    }

    //
    //  update price
    //
    function set_price(
        uint256 _usd_price, 
        uint256 _price_denominator
    ) external onlyOwner {
        token_price = _usd_price;
        token_price_denominator = _price_denominator;
    }

    //
    //  set 'eth_price_twapInterval'
    //  parameter needed for obtaining price through Uni v3 price oracle
    //
    function set_eth_price_twapInterval(
        uint32 _eth_price_twapInterval
    ) external onlyOwner {
        eth_price_twapInterval = _eth_price_twapInterval;
    }

}

File 2 of 13: 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;
}

File 3 of 13: FullMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.0 <0.8.0;

/// @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) {
        // 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 = -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) {
        result = mulDiv(a, b, denominator);
        if (mulmod(a, b, denominator) > 0) {
            require(result < type(uint256).max);
            result++;
        }
    }
}

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

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

}

File 5 of 13: IUniswapV3PoolActions.sol
// 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;
}

File 6 of 13: IUniswapV3PoolDerivedState.sol
// 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 7 of 13: 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);
}

File 8 of 13: IUniswapV3PoolImmutables.sol
// 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);
}

File 9 of 13: IUniswapV3PoolOwnerActions.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

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

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

File 10 of 13: IUniswapV3PoolState.sol
// 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 11 of 13: Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity =0.7.6;


/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 12 of 13: TickMath.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0 <0.8.0;

/// @title Math library for computing sqrt prices from ticks and vice versa
/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports
/// prices between 2**-128 and 2**128
library TickMath {
    /// @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) {
        uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));
        require(absTick <= uint256(MAX_TICK), '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) {
        // second inequality must be < because the price can never reach the price at the max tick
        require(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO, '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;
    }
}

File 13 of 13: TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

interface IERC20 {
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address to, uint256 value) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 value) external returns (bool);
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'STE');
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"TOKEN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDT_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WEI_DIFF_ETH_USDC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH_USDC_V3","outputs":[{"internalType":"contract IUniswapV3Pool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"twapInterval","type":"uint32"}],"name":"_get_PriceX96_weth_usdc","outputs":[{"internalType":"uint256","name":"priceX96","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buy_with_eth","outputs":[{"internalType":"uint256","name":"token_amount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"usd_address","type":"address"},{"internalType":"uint256","name":"usd_amount","type":"uint256"}],"name":"buy_with_usd","outputs":[{"internalType":"uint256","name":"token_amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eth_price_twapInterval","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth_amount","type":"uint256"}],"name":"get_token_amount_from_eth_amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"usd_amount","type":"uint256"}],"name":"get_token_amount_from_usd_amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eth_price_twapInterval","type":"uint32"}],"name":"set_eth_price_twapInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_usd_price","type":"uint256"},{"internalType":"uint256","name":"_price_denominator","type":"uint256"}],"name":"set_price","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token_price_denominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth_amount","type":"uint256"}],"name":"unstuck_eth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token_address","type":"address"},{"internalType":"uint256","name":"token_amount","type":"uint256"}],"name":"unstuck_token","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e060405273dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b81525073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff1660a09073ffffffffffffffffffffffffffffffffffffffff1660601b8152507388e6a0c2ddd26feeb64f039a2c41296fcb3f5640600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506107d060035561271060045564e8d4a5100060c090815250610258600560006101000a81548163ffffffff021916908363ffffffff1602179055503480156200013557600080fd5b5060405162001f7d38038062001f7d83398181016040528101906200015b9190620002a6565b6200017b6200016f620001c360201b60201c565b620001cb60201b60201c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000320565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620002a08162000306565b92915050565b600060208284031215620002b957600080fd5b6000620002c9848285016200028f565b91505092915050565b6000620002df82620002e6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6200031181620002d2565b81146200031d57600080fd5b50565b60805160601c60a05160601c60c051611c116200036c60003980610516528061058d52806106a55280610a415250806105e8528061096c52508061063d52806109905250611c116000f3fe6080604052600436106101235760003560e01c80637b4fd96e116100a0578063c189205811610064578063c1892058146103ce578063c31bf964146103f9578063e717c1e414610422578063f15d825c1461044b578063f2fde38b1461048857610133565b80637b4fd96e146102fb5780638da5cb5b146103265780638e3e224914610351578063abbcb0821461037a578063bb09d9b7146103a357610133565b80635ba0f3c4116100e75780635ba0f3c414610221578063612c1cfe1461025e578063685718191461029b5780636fb3acfa146102c6578063715018a6146102e457610133565b80630bdf53001461013857806317227b3b146101635780631d2b87211461018e57806325a532e1146101b95780634fc86c3a146101f657610133565b36610133576101306104b1565b50005b600080fd5b34801561014457600080fd5b5061014d6104ee565b60405161015a9190611973565b60405180910390f35b34801561016f57600080fd5b50610178610514565b60405161018591906119cb565b60405180910390f35b34801561019a57600080fd5b506101a3610538565b6040516101b091906119e6565b60405180910390f35b3480156101c557600080fd5b506101e060048036038101906101db9190611824565b61054e565b6040516101ed91906119cb565b60405180910390f35b34801561020257600080fd5b5061020b6105be565b60405161021891906119b0565b60405180910390f35b34801561022d57600080fd5b506102486004803603810190610243919061177c565b6105e4565b60405161025591906119cb565b60405180910390f35b34801561026a57600080fd5b5061028560048036038101906102809190611889565b610706565b60405161029291906119cb565b60405180910390f35b3480156102a757600080fd5b506102b06108f0565b6040516102bd91906119cb565b60405180910390f35b6102ce6104b1565b6040516102db91906119cb565b60405180910390f35b3480156102f057600080fd5b506102f96108f6565b005b34801561030757600080fd5b5061031061090a565b60405161031d91906119cb565b60405180910390f35b34801561033257600080fd5b5061033b610910565b6040516103489190611973565b60405180910390f35b34801561035d57600080fd5b506103786004803603810190610373919061177c565b610939565b005b34801561038657600080fd5b506103a1600480360381019061039c919061184d565b610950565b005b3480156103af57600080fd5b506103b861096a565b6040516103c59190611973565b60405180910390f35b3480156103da57600080fd5b506103e361098e565b6040516103f09190611973565b60405180910390f35b34801561040557600080fd5b50610420600480360381019061041b9190611889565b6109b2565b005b34801561042e57600080fd5b5061044960048036038101906104449190611824565b6109de565b005b34801561045757600080fd5b50610472600480360381019061046d9190611824565b610a37565b60405161047f91906119cb565b60405180910390f35b34801561049457600080fd5b506104af60048036038101906104aa9190611753565b610a71565b005b60006104bc3461054e565b90506104eb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163383610b0b565b90565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600560009054906101000a900463ffffffff1681565b600080610585600354610572600560009054906101000a900463ffffffff16610706565b6c01000000000000000000000000610d0c565b90506105b6837f00000000000000000000000000000000000000000000000000000000000000000260045483610d0c565b915050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061068b57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b61069457600080fd5b6106a083333085610de6565b6106d17f00000000000000000000000000000000000000000000000000000000000000008302600454600354610d0c565b9050610700600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163383610b0b565b92915050565b600080600267ffffffffffffffff8111801561072157600080fd5b506040519080825280602002602001820160405280156107505781602001602082028036833780820191505090505b509050828160008151811061076157fe5b602002602001019063ffffffff16908163ffffffff168152505060008160018151811061078a57fe5b602002602001019063ffffffff16908163ffffffff16815250506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663883bdbfd836040518263ffffffff1660e01b8152600401610801919061198e565b60006040518083038186803b15801561081957600080fd5b505afa15801561082d573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061085691906117b8565b50905060006108a08563ffffffff168360008151811061087257fe5b60200260200101518460018151811061088757fe5b60200260200101510360060b8161089a57fe5b05611006565b90506108e68173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000610d0c565b9350505050919050565b60045481565b6108fe611441565b61090860006114f2565b565b60035481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610941611441565b61094c823383610b0b565b5050565b610958611441565b81600381905550806004819055505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6109ba611441565b80600560006101000a81548163ffffffff021916908363ffffffff16021790555050565b6109e6611441565b6109ee610910565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a33573d6000803e3d6000fd5b5050565b6000610a6a6003547f00000000000000000000000000000000000000000000000000000000000000000283600454610d0c565b9050919050565b610a79611441565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611bb66026913960400191505060405180910390fd5b610b08816114f2565b50565b6000808473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b8585604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610bec5780518252602082019150602081019050602083039250610bc9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610c4e576040519150601f19603f3d011682016040523d82523d6000602084013e610c53565b606091505b5091509150818015610c935750600081511480610c925750808060200190516020811015610c8057600080fd5b81019080805190602001909291905050505b5b610d05576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f535400000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5050505050565b600080600080198587098587029250828110838203039150506000811415610d475760008411610d3b57600080fd5b83820492505050610ddf565b808411610d5357600080fd5b600084868809905082811182039150808303925060008586600003169050808604955080840493506001818260000304019050808302841793506000600287600302189050808702600203810290508087026002038102905080870260020381029050808702600203810290508087026002038102905080870260020381029050808502955050505050505b9392505050565b6000808573ffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b868686604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610ee55780518252602082019150602081019050602083039250610ec2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610f47576040519150601f19603f3d011682016040523d82523d6000602084013e610f4c565b606091505b5091509150818015610f8c5750600081511480610f8b5750808060200190516020811015610f7957600080fd5b81019080805190602001909291905050505b5b610ffe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f535446000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b505050505050565b60008060008360020b1261101d578260020b611025565b8260020b6000035b90507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2761860000360020b8111156110c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260018152602001807f540000000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806001831614156110e7577001000000000000000000000000000000006110f9565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff169050600060028316146111335760806ffff97272373d413259a46990580e213a8202901c90505b600060048316146111585760806ffff2e50f5f656932ef12357cf3c7fdcc8202901c90505b6000600883161461117d5760806fffe5caca7e10e4e61c3624eaa0941cd08202901c90505b600060108316146111a25760806fffcb9843d60f6159c9db58835c9266448202901c90505b600060208316146111c75760806fff973b41fa98c081472e6896dfb254c08202901c90505b600060408316146111ec5760806fff2ea16466c96a3843ec78b326b528618202901c90505b600060808316146112115760806ffe5dee046a99a2a811c461f1969c30538202901c90505b60006101008316146112375760806ffcbe86c7900a88aedcffc83b479aa3a48202901c90505b600061020083161461125d5760806ff987a7253ac413176f2b074cf7815e548202901c90505b60006104008316146112835760806ff3392b0822b70005940c7a398e4b70f38202901c90505b60006108008316146112a95760806fe7159475a2c29b7443b29c7fa6e889d98202901c90505b60006110008316146112cf5760806fd097f3bdfd2022b8845ad8f792aa58258202901c90505b60006120008316146112f55760806fa9f746462d870fdf8a65dc1f90e061e58202901c90505b600061400083161461131b5760806f70d869a156d2a1b890bb3df62baf32f78202901c90505b60006180008316146113415760806f31be135f97d08fd981231505542fcfa68202901c90505b6000620100008316146113685760806f09aa508b5b7a84e1c677de54f3e99bc98202901c90505b60006202000083161461138e5760806e5d6af8dedb81196699c329225ee6048202901c90505b6000620400008316146113b35760806d2216e584f5fa1ea926041bedfe988202901c90505b6000620800008316146113d65760806b048a170391f7dc42444e8fa28202901c90505b60008460020b131561140f57807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8161140b57fe5b0490505b6000640100000000828161141f57fe5b061461142c57600161142f565b60005b60ff16602082901c0192505050919050565b6114496115b6565b73ffffffffffffffffffffffffffffffffffffffff16611467610910565b73ffffffffffffffffffffffffffffffffffffffff16146114f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b60006115d16115cc84611a32565b611a01565b905080838252602082019050828560208602820111156115f057600080fd5b60005b85811015611620578161160688826116ff565b8452602084019350602083019250506001810190506115f3565b5050509392505050565b600061163d61163884611a5e565b611a01565b9050808382526020820190508285602086028201111561165c57600080fd5b60005b8581101561168c57816116728882611714565b84526020840193506020830192505060018101905061165f565b5050509392505050565b6000813590506116a581611b42565b92915050565b600082601f8301126116bc57600080fd5b81516116cc8482602086016115be565b91505092915050565b600082601f8301126116e657600080fd5b81516116f684826020860161162a565b91505092915050565b60008151905061170e81611b59565b92915050565b60008151905061172381611b70565b92915050565b60008135905061173881611b87565b92915050565b60008135905061174d81611b9e565b92915050565b60006020828403121561176557600080fd5b600061177384828501611696565b91505092915050565b6000806040838503121561178f57600080fd5b600061179d85828601611696565b92505060206117ae85828601611729565b9150509250929050565b600080604083850312156117cb57600080fd5b600083015167ffffffffffffffff8111156117e557600080fd5b6117f1858286016116ab565b925050602083015167ffffffffffffffff81111561180e57600080fd5b61181a858286016116d5565b9150509250929050565b60006020828403121561183657600080fd5b600061184484828501611729565b91505092915050565b6000806040838503121561186057600080fd5b600061186e85828601611729565b925050602061187f85828601611729565b9150509250929050565b60006020828403121561189b57600080fd5b60006118a98482850161173e565b91505092915050565b60006118be8383611955565b60208301905092915050565b6118d381611ac3565b82525050565b60006118e482611a9a565b6118ee8185611ab2565b93506118f983611a8a565b8060005b8381101561192a57815161191188826118b2565b975061191c83611aa5565b9250506001810190506118fd565b5085935050505092915050565b61194081611b1c565b82525050565b61194f81611b02565b82525050565b61195e81611b0c565b82525050565b61196d81611b0c565b82525050565b600060208201905061198860008301846118ca565b92915050565b600060208201905081810360008301526119a881846118d9565b905092915050565b60006020820190506119c56000830184611937565b92915050565b60006020820190506119e06000830184611946565b92915050565b60006020820190506119fb6000830184611964565b92915050565b6000604051905081810181811067ffffffffffffffff82111715611a2857611a27611b40565b5b8060405250919050565b600067ffffffffffffffff821115611a4d57611a4c611b40565b5b602082029050602081019050919050565b600067ffffffffffffffff821115611a7957611a78611b40565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b6000611ace82611ae2565b9050919050565b60008160060b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b6000611b2782611b2e565b9050919050565b6000611b3982611ae2565b9050919050565bfe5b611b4b81611ac3565b8114611b5657600080fd5b50565b611b6281611ad5565b8114611b6d57600080fd5b50565b611b7981611ae2565b8114611b8457600080fd5b50565b611b9081611b02565b8114611b9b57600080fd5b50565b611ba781611b0c565b8114611bb257600080fd5b5056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122050b5be0de4eb31221f1369e05c5ceba0a8e8b921f5e521e25372e22f83640f5064736f6c63430007060033000000000000000000000000bf77a7f687d143ac9d1ae625832bc2394f64752b

Deployed Bytecode

0x6080604052600436106101235760003560e01c80637b4fd96e116100a0578063c189205811610064578063c1892058146103ce578063c31bf964146103f9578063e717c1e414610422578063f15d825c1461044b578063f2fde38b1461048857610133565b80637b4fd96e146102fb5780638da5cb5b146103265780638e3e224914610351578063abbcb0821461037a578063bb09d9b7146103a357610133565b80635ba0f3c4116100e75780635ba0f3c414610221578063612c1cfe1461025e578063685718191461029b5780636fb3acfa146102c6578063715018a6146102e457610133565b80630bdf53001461013857806317227b3b146101635780631d2b87211461018e57806325a532e1146101b95780634fc86c3a146101f657610133565b36610133576101306104b1565b50005b600080fd5b34801561014457600080fd5b5061014d6104ee565b60405161015a9190611973565b60405180910390f35b34801561016f57600080fd5b50610178610514565b60405161018591906119cb565b60405180910390f35b34801561019a57600080fd5b506101a3610538565b6040516101b091906119e6565b60405180910390f35b3480156101c557600080fd5b506101e060048036038101906101db9190611824565b61054e565b6040516101ed91906119cb565b60405180910390f35b34801561020257600080fd5b5061020b6105be565b60405161021891906119b0565b60405180910390f35b34801561022d57600080fd5b506102486004803603810190610243919061177c565b6105e4565b60405161025591906119cb565b60405180910390f35b34801561026a57600080fd5b5061028560048036038101906102809190611889565b610706565b60405161029291906119cb565b60405180910390f35b3480156102a757600080fd5b506102b06108f0565b6040516102bd91906119cb565b60405180910390f35b6102ce6104b1565b6040516102db91906119cb565b60405180910390f35b3480156102f057600080fd5b506102f96108f6565b005b34801561030757600080fd5b5061031061090a565b60405161031d91906119cb565b60405180910390f35b34801561033257600080fd5b5061033b610910565b6040516103489190611973565b60405180910390f35b34801561035d57600080fd5b506103786004803603810190610373919061177c565b610939565b005b34801561038657600080fd5b506103a1600480360381019061039c919061184d565b610950565b005b3480156103af57600080fd5b506103b861096a565b6040516103c59190611973565b60405180910390f35b3480156103da57600080fd5b506103e361098e565b6040516103f09190611973565b60405180910390f35b34801561040557600080fd5b50610420600480360381019061041b9190611889565b6109b2565b005b34801561042e57600080fd5b5061044960048036038101906104449190611824565b6109de565b005b34801561045757600080fd5b50610472600480360381019061046d9190611824565b610a37565b60405161047f91906119cb565b60405180910390f35b34801561049457600080fd5b506104af60048036038101906104aa9190611753565b610a71565b005b60006104bc3461054e565b90506104eb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163383610b0b565b90565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000e8d4a5100081565b600560009054906101000a900463ffffffff1681565b600080610585600354610572600560009054906101000a900463ffffffff16610706565b6c01000000000000000000000000610d0c565b90506105b6837f000000000000000000000000000000000000000000000000000000e8d4a510000260045483610d0c565b915050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061068b57507f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b61069457600080fd5b6106a083333085610de6565b6106d17f000000000000000000000000000000000000000000000000000000e8d4a510008302600454600354610d0c565b9050610700600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163383610b0b565b92915050565b600080600267ffffffffffffffff8111801561072157600080fd5b506040519080825280602002602001820160405280156107505781602001602082028036833780820191505090505b509050828160008151811061076157fe5b602002602001019063ffffffff16908163ffffffff168152505060008160018151811061078a57fe5b602002602001019063ffffffff16908163ffffffff16815250506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663883bdbfd836040518263ffffffff1660e01b8152600401610801919061198e565b60006040518083038186803b15801561081957600080fd5b505afa15801561082d573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061085691906117b8565b50905060006108a08563ffffffff168360008151811061087257fe5b60200260200101518460018151811061088757fe5b60200260200101510360060b8161089a57fe5b05611006565b90506108e68173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000610d0c565b9350505050919050565b60045481565b6108fe611441565b61090860006114f2565b565b60035481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610941611441565b61094c823383610b0b565b5050565b610958611441565b81600381905550806004819055505050565b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b7f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781565b6109ba611441565b80600560006101000a81548163ffffffff021916908363ffffffff16021790555050565b6109e6611441565b6109ee610910565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a33573d6000803e3d6000fd5b5050565b6000610a6a6003547f000000000000000000000000000000000000000000000000000000e8d4a510000283600454610d0c565b9050919050565b610a79611441565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611bb66026913960400191505060405180910390fd5b610b08816114f2565b50565b6000808473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b8585604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610bec5780518252602082019150602081019050602083039250610bc9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610c4e576040519150601f19603f3d011682016040523d82523d6000602084013e610c53565b606091505b5091509150818015610c935750600081511480610c925750808060200190516020811015610c8057600080fd5b81019080805190602001909291905050505b5b610d05576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f535400000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5050505050565b600080600080198587098587029250828110838203039150506000811415610d475760008411610d3b57600080fd5b83820492505050610ddf565b808411610d5357600080fd5b600084868809905082811182039150808303925060008586600003169050808604955080840493506001818260000304019050808302841793506000600287600302189050808702600203810290508087026002038102905080870260020381029050808702600203810290508087026002038102905080870260020381029050808502955050505050505b9392505050565b6000808573ffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b868686604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610ee55780518252602082019150602081019050602083039250610ec2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610f47576040519150601f19603f3d011682016040523d82523d6000602084013e610f4c565b606091505b5091509150818015610f8c5750600081511480610f8b5750808060200190516020811015610f7957600080fd5b81019080805190602001909291905050505b5b610ffe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f535446000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b505050505050565b60008060008360020b1261101d578260020b611025565b8260020b6000035b90507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2761860000360020b8111156110c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260018152602001807f540000000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806001831614156110e7577001000000000000000000000000000000006110f9565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff169050600060028316146111335760806ffff97272373d413259a46990580e213a8202901c90505b600060048316146111585760806ffff2e50f5f656932ef12357cf3c7fdcc8202901c90505b6000600883161461117d5760806fffe5caca7e10e4e61c3624eaa0941cd08202901c90505b600060108316146111a25760806fffcb9843d60f6159c9db58835c9266448202901c90505b600060208316146111c75760806fff973b41fa98c081472e6896dfb254c08202901c90505b600060408316146111ec5760806fff2ea16466c96a3843ec78b326b528618202901c90505b600060808316146112115760806ffe5dee046a99a2a811c461f1969c30538202901c90505b60006101008316146112375760806ffcbe86c7900a88aedcffc83b479aa3a48202901c90505b600061020083161461125d5760806ff987a7253ac413176f2b074cf7815e548202901c90505b60006104008316146112835760806ff3392b0822b70005940c7a398e4b70f38202901c90505b60006108008316146112a95760806fe7159475a2c29b7443b29c7fa6e889d98202901c90505b60006110008316146112cf5760806fd097f3bdfd2022b8845ad8f792aa58258202901c90505b60006120008316146112f55760806fa9f746462d870fdf8a65dc1f90e061e58202901c90505b600061400083161461131b5760806f70d869a156d2a1b890bb3df62baf32f78202901c90505b60006180008316146113415760806f31be135f97d08fd981231505542fcfa68202901c90505b6000620100008316146113685760806f09aa508b5b7a84e1c677de54f3e99bc98202901c90505b60006202000083161461138e5760806e5d6af8dedb81196699c329225ee6048202901c90505b6000620400008316146113b35760806d2216e584f5fa1ea926041bedfe988202901c90505b6000620800008316146113d65760806b048a170391f7dc42444e8fa28202901c90505b60008460020b131561140f57807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8161140b57fe5b0490505b6000640100000000828161141f57fe5b061461142c57600161142f565b60005b60ff16602082901c0192505050919050565b6114496115b6565b73ffffffffffffffffffffffffffffffffffffffff16611467610910565b73ffffffffffffffffffffffffffffffffffffffff16146114f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b60006115d16115cc84611a32565b611a01565b905080838252602082019050828560208602820111156115f057600080fd5b60005b85811015611620578161160688826116ff565b8452602084019350602083019250506001810190506115f3565b5050509392505050565b600061163d61163884611a5e565b611a01565b9050808382526020820190508285602086028201111561165c57600080fd5b60005b8581101561168c57816116728882611714565b84526020840193506020830192505060018101905061165f565b5050509392505050565b6000813590506116a581611b42565b92915050565b600082601f8301126116bc57600080fd5b81516116cc8482602086016115be565b91505092915050565b600082601f8301126116e657600080fd5b81516116f684826020860161162a565b91505092915050565b60008151905061170e81611b59565b92915050565b60008151905061172381611b70565b92915050565b60008135905061173881611b87565b92915050565b60008135905061174d81611b9e565b92915050565b60006020828403121561176557600080fd5b600061177384828501611696565b91505092915050565b6000806040838503121561178f57600080fd5b600061179d85828601611696565b92505060206117ae85828601611729565b9150509250929050565b600080604083850312156117cb57600080fd5b600083015167ffffffffffffffff8111156117e557600080fd5b6117f1858286016116ab565b925050602083015167ffffffffffffffff81111561180e57600080fd5b61181a858286016116d5565b9150509250929050565b60006020828403121561183657600080fd5b600061184484828501611729565b91505092915050565b6000806040838503121561186057600080fd5b600061186e85828601611729565b925050602061187f85828601611729565b9150509250929050565b60006020828403121561189b57600080fd5b60006118a98482850161173e565b91505092915050565b60006118be8383611955565b60208301905092915050565b6118d381611ac3565b82525050565b60006118e482611a9a565b6118ee8185611ab2565b93506118f983611a8a565b8060005b8381101561192a57815161191188826118b2565b975061191c83611aa5565b9250506001810190506118fd565b5085935050505092915050565b61194081611b1c565b82525050565b61194f81611b02565b82525050565b61195e81611b0c565b82525050565b61196d81611b0c565b82525050565b600060208201905061198860008301846118ca565b92915050565b600060208201905081810360008301526119a881846118d9565b905092915050565b60006020820190506119c56000830184611937565b92915050565b60006020820190506119e06000830184611946565b92915050565b60006020820190506119fb6000830184611964565b92915050565b6000604051905081810181811067ffffffffffffffff82111715611a2857611a27611b40565b5b8060405250919050565b600067ffffffffffffffff821115611a4d57611a4c611b40565b5b602082029050602081019050919050565b600067ffffffffffffffff821115611a7957611a78611b40565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b6000611ace82611ae2565b9050919050565b60008160060b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b6000611b2782611b2e565b9050919050565b6000611b3982611ae2565b9050919050565bfe5b611b4b81611ac3565b8114611b5657600080fd5b50565b611b6281611ad5565b8114611b6d57600080fd5b50565b611b7981611ae2565b8114611b8457600080fd5b50565b611b9081611b02565b8114611b9b57600080fd5b50565b611ba781611b0c565b8114611bb257600080fd5b5056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122050b5be0de4eb31221f1369e05c5ceba0a8e8b921f5e521e25372e22f83640f5064736f6c63430007060033

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

000000000000000000000000bf77a7f687d143ac9d1ae625832bc2394f64752b

-----Decoded View---------------
Arg [0] : _token_address (address): 0xBF77A7f687d143Ac9D1aE625832BC2394f64752b

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000bf77a7f687d143ac9d1ae625832bc2394f64752b


Deployed Bytecode Sourcemap

244:4517:10:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3790:14;:12;:14::i;:::-;;244:4517;;;;;635:28;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1123:58;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1187:42;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2150:341;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;669:95;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2889:494;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1385:519;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1071:46;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3431:223;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2527:101:9;;;;;;;;;;;;;:::i;:::-;;1032:33:10;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1904:85:9;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4043:174:10;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;4258:204;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;547:82;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;459;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4592:166;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3866:114;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2617:216;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2777:198:9;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3431:223:10;3479:20;3526:43;3559:9;3526:32;:43::i;:::-;3511:58;;3579:68;3607:13;;;;;;;;;;;3622:10;3634:12;3579:27;:68::i;:::-;3431:223;:::o;635:28::-;;;;;;;;;;;;;:::o;1123:58::-;;;:::o;1187:42::-;;;;;;;;;;;;;:::o;2150:341::-;2246:7;2265:19;2287:95;2303:11;;2316:47;2340:22;;;;;;;;;;;2316:23;:47::i;:::-;349:27:0;2287:15:10;:95::i;:::-;2265:117;;2399:85;2435:10;2415:17;:30;2447:23;;2472:11;2399:15;:85::i;:::-;2392:92;;;2150:341;;;:::o;669:95::-;;;;;;;;;;;;;:::o;2889:494::-;2992:20;3048:12;3033:27;;:11;:27;;;3032:62;;;;3081:12;3066:27;;:11;:27;;;3032:62;3024:71;;;;;;3105:83;3137:11;3150:10;3170:4;3177:10;3105:31;:83::i;:::-;3213:85;3242:17;3229:10;:30;3261:23;;3286:11;;3213:15;:85::i;:::-;3198:100;;3308:68;3336:13;;;;;;;;;;;3351:10;3363:12;3308:27;:68::i;:::-;2889:494;;;;:::o;1385:519::-;1474:16;1502:27;1545:1;1532:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1502:45;;1574:12;1557:11;1569:1;1557:14;;;;;;;;;;;;;:29;;;;;;;;;;;1613:1;1596:11;1608:1;1596:14;;;;;;;;;;;;;:18;;;;;;;;;;;1625:30;1661:12;;;;;;;;;;;:20;;;1682:11;1661:33;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1624:70;;;1704:20;1727:92;1805:12;1761:56;;1783:15;1799:1;1783:18;;;;;;;;;;;;;;1762:15;1778:1;1762:18;;;;;;;;;;;;;;:39;1761:56;;;;;;;;1727:27;:92::i;:::-;1704:115;;1836:61;1852:12;1836:61;;1866:12;1836:61;;349:27:0;1836:15:10;:61::i;:::-;1829:68;;;;;1385:519;;;:::o;1071:46::-;;;;:::o;2527:101:9:-;1797:13;:11;:13::i;:::-;2591:30:::1;2618:1;2591:18;:30::i;:::-;2527:101::o:0;1032:33:10:-;;;;:::o;1904:85:9:-;1950:7;1976:6;;;;;;;;;;;1969:13;;1904:85;:::o;4043:174:10:-;1797:13:9;:11;:13::i;:::-;4141:69:10::1;4169:14;4185:10;4197:12;4141:27;:69::i;:::-;4043:174:::0;;:::o;4258:204::-;1797:13:9;:11;:13::i;:::-;4391:10:10::1;4377:11;:24;;;;4437:18;4411:23;:44;;;;4258:204:::0;;:::o;547:82::-;;;:::o;459:::-;;;:::o;4592:166::-;1797:13:9;:11;:13::i;:::-;4728:23:10::1;4703:22;;:48;;;;;;;;;;;;;;;;;;4592:166:::0;:::o;3866:114::-;1797:13:9;:11;:13::i;:::-;3944:7:10::1;:5;:7::i;:::-;3936:25;;:37;3962:10;3936:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;3866:114:::0;:::o;2617:216::-;2715:7;2741:85;2777:11;;2757:17;:31;2790:10;2802:23;;2741:15;:85::i;:::-;2734:92;;2617:216;;;:::o;2777:198:9:-;1797:13;:11;:13::i;:::-;2885:1:::1;2865:22;;:8;:22;;;;2857:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2940:28;2959:8;2940:18;:28::i;:::-;2777:198:::0;:::o;1800:309:12:-;1914:12;1928:17;1949:5;:10;;1983:24;;;2009:2;2013:5;1960:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1949:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1913:107;;;;2038:7;:57;;;;;2065:1;2050:4;:11;:16;:44;;;;2081:4;2070:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2050:44;2038:57;2030:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1800:309;;;;;:::o;749:3776:1:-;861:14;1190:13;1258;1375:1;1371:6;1368:1;1365;1358:20;1407:1;1404;1400:9;1391:18;;1458:5;1454:2;1451:13;1443:5;1439:2;1435:14;1431:34;1422:43;;1334:141;1556:1;1547:5;:10;1543:179;;;1595:1;1581:11;:15;1573:24;;;;;;1659:11;1652:5;1648:23;1638:33;;1698:13;;;;1543:179;1849:5;1835:11;:19;1827:28;;;;;;2132:17;2208:11;2205:1;2202;2195:25;2182:38;;2351:5;2340:9;2337:20;2330:5;2326:32;2317:41;;2391:9;2384:5;2380:21;2371:30;;2560:12;2590:11;2576;2575:12;;:26;2560:41;;2712:4;2699:11;2695:22;2680:37;;2834:4;2827:5;2823:16;2814:25;;3088:1;3081:4;3074;3071:1;3067:12;3063:23;3059:31;3051:39;;3126:4;3118:5;:12;3109:21;;;;3464:11;3498:1;3483:11;3479:1;:15;3478:21;3464:35;;3739:3;3725:11;:17;3721:1;:21;3714:28;;;;3797:3;3783:11;:17;3779:1;:21;3772:28;;;;3856:3;3842:11;:17;3838:1;:21;3831:28;;;;3915:3;3901:11;:17;3897:1;:21;3890:28;;;;3974:3;3960:11;:17;3956:1;:21;3949:28;;;;4034:3;4020:11;:17;4016:1;:21;4009:28;;;;4492:3;4484:5;:11;4475:20;;4505:13;;;;;749:3776;;;;;;:::o;1150:358:12:-;1290:12;1304:17;1337:5;:10;;1371:28;;;1401:4;1407:2;1411:5;1348:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1337:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1289:129;;;;1436:7;:57;;;;;1463:1;1448:4;:11;:16;:44;;;;1479:4;1468:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1448:44;1436:57;1428:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1150:358;;;;;;:::o;1362:2580:11:-;1425:20;1457:15;1482:1;1475:4;:8;;;:57;;1526:4;1519:12;;1475:57;;;1502:4;1495:12;;1494:13;;1475:57;1457:75;;484:7;644:9;;1561:17;;1550:7;:28;;1542:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1595:13;1628:1;1621:3;1611:7;:13;:18;;:93;;1669:35;1611:93;;;1632:34;1611:93;1595:109;;;;1735:1;1728:3;1718:7;:13;:18;1714:83;;1794:3;1755:34;1747:5;:42;1746:51;;1738:59;;1714:83;1828:1;1821:3;1811:7;:13;:18;1807:83;;1887:3;1848:34;1840:5;:42;1839:51;;1831:59;;1807:83;1921:1;1914:3;1904:7;:13;:18;1900:83;;1980:3;1941:34;1933:5;:42;1932:51;;1924:59;;1900:83;2015:1;2007:4;1997:7;:14;:19;1993:84;;2074:3;2035:34;2027:5;:42;2026:51;;2018:59;;1993:84;2109:1;2101:4;2091:7;:14;:19;2087:84;;2168:3;2129:34;2121:5;:42;2120:51;;2112:59;;2087:84;2203:1;2195:4;2185:7;:14;:19;2181:84;;2262:3;2223:34;2215:5;:42;2214:51;;2206:59;;2181:84;2297:1;2289:4;2279:7;:14;:19;2275:84;;2356:3;2317:34;2309:5;:42;2308:51;;2300:59;;2275:84;2392:1;2383:5;2373:7;:15;:20;2369:85;;2451:3;2412:34;2404:5;:42;2403:51;;2395:59;;2369:85;2487:1;2478:5;2468:7;:15;:20;2464:85;;2546:3;2507:34;2499:5;:42;2498:51;;2490:59;;2464:85;2582:1;2573:5;2563:7;:15;:20;2559:85;;2641:3;2602:34;2594:5;:42;2593:51;;2585:59;;2559:85;2677:1;2668:5;2658:7;:15;:20;2654:85;;2736:3;2697:34;2689:5;:42;2688:51;;2680:59;;2654:85;2773:1;2763:6;2753:7;:16;:21;2749:86;;2832:3;2793:34;2785:5;:42;2784:51;;2776:59;;2749:86;2869:1;2859:6;2849:7;:16;:21;2845:86;;2928:3;2889:34;2881:5;:42;2880:51;;2872:59;;2845:86;2965:1;2955:6;2945:7;:16;:21;2941:86;;3024:3;2985:34;2977:5;:42;2976:51;;2968:59;;2941:86;3061:1;3051:6;3041:7;:16;:21;3037:86;;3120:3;3081:34;3073:5;:42;3072:51;;3064:59;;3037:86;3158:1;3147:7;3137;:17;:22;3133:86;;3216:3;3178:33;3170:5;:41;3169:50;;3161:58;;3133:86;3254:1;3243:7;3233;:17;:22;3229:85;;3311:3;3274:32;3266:5;:40;3265:49;;3257:57;;3229:85;3349:1;3338:7;3328;:17;:22;3324:83;;3404:3;3369:30;3361:5;:38;3360:47;;3352:55;;3324:83;3442:1;3431:7;3421;:17;:22;3417:78;;3492:3;3462:25;3454:5;:33;3453:42;;3445:50;;3417:78;3517:1;3510:4;:8;;;3506:47;;;3548:5;3528:17;:25;;;;;;3520:33;;3506:47;3924:1;3912:7;3903:5;:17;;;;;;:22;:30;;3932:1;3903:30;;;3928:1;3903:30;3886:48;;3896:2;3887:5;:11;;3886:48;3863:72;;1362:2580;;;;;:::o;2062:130:9:-;2136:12;:10;:12::i;:::-;2125:23;;:7;:5;:7::i;:::-;:23;;;2117:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2062:130::o;3129:187::-;3202:16;3221:6;;;;;;;;;;;3202:25;;3246:8;3237:6;;:17;;;;;;;;;;;;;;;;;;3300:8;3269:40;;3290:8;3269:40;;;;;;;;;;;;3129:187;;:::o;657:96::-;710:7;736:10;729:17;;657:96;:::o;22:638:13:-;;152:78;167:62;222:6;167:62;:::i;:::-;152:78;:::i;:::-;143:87;;250:5;278:6;271:5;264:21;304:4;297:5;293:16;286:23;;329:6;379:3;371:4;363:6;359:17;354:3;350:27;347:36;344:2;;;396:1;393;386:12;344:2;424:1;409:245;434:6;431:1;428:13;409:245;;;501:3;529:46;571:3;559:10;529:46;:::i;:::-;524:3;517:59;605:4;600:3;596:14;589:21;;639:4;634:3;630:14;623:21;;469:185;456:1;453;449:9;444:14;;409:245;;;413:14;133:527;;;;;;;:::o;683:644::-;;815:80;830:64;887:6;830:64;:::i;:::-;815:80;:::i;:::-;806:89;;915:5;943:6;936:5;929:21;969:4;962:5;958:16;951:23;;994:6;1044:3;1036:4;1028:6;1024:17;1019:3;1015:27;1012:36;1009:2;;;1061:1;1058;1051:12;1009:2;1089:1;1074:247;1099:6;1096:1;1093:13;1074:247;;;1166:3;1194:48;1238:3;1226:10;1194:48;:::i;:::-;1189:3;1182:61;1272:4;1267:3;1263:14;1256:21;;1306:4;1301:3;1297:14;1290:21;;1134:187;1121:1;1118;1114:9;1109:14;;1074:247;;;1078:14;796:531;;;;;;;:::o;1333:139::-;;1417:6;1404:20;1395:29;;1433:33;1460:5;1433:33;:::i;:::-;1385:87;;;;:::o;1493:314::-;;1622:3;1615:4;1607:6;1603:17;1599:27;1589:2;;1640:1;1637;1630:12;1589:2;1673:6;1667:13;1698:103;1797:3;1789:6;1782:4;1774:6;1770:17;1698:103;:::i;:::-;1689:112;;1579:228;;;;;:::o;1830:318::-;;1961:3;1954:4;1946:6;1942:17;1938:27;1928:2;;1979:1;1976;1969:12;1928:2;2012:6;2006:13;2037:105;2138:3;2130:6;2123:4;2115:6;2111:17;2037:105;:::i;:::-;2028:114;;1918:230;;;;;:::o;2154:139::-;;2240:6;2234:13;2225:22;;2256:31;2281:5;2256:31;:::i;:::-;2215:78;;;;:::o;2299:143::-;;2387:6;2381:13;2372:22;;2403:33;2430:5;2403:33;:::i;:::-;2362:80;;;;:::o;2448:139::-;;2532:6;2519:20;2510:29;;2548:33;2575:5;2548:33;:::i;:::-;2500:87;;;;:::o;2593:137::-;;2676:6;2663:20;2654:29;;2692:32;2718:5;2692:32;:::i;:::-;2644:86;;;;:::o;2736:262::-;;2844:2;2832:9;2823:7;2819:23;2815:32;2812:2;;;2860:1;2857;2850:12;2812:2;2903:1;2928:53;2973:7;2964:6;2953:9;2949:22;2928:53;:::i;:::-;2918:63;;2874:117;2802:196;;;;:::o;3004:407::-;;;3129:2;3117:9;3108:7;3104:23;3100:32;3097:2;;;3145:1;3142;3135:12;3097:2;3188:1;3213:53;3258:7;3249:6;3238:9;3234:22;3213:53;:::i;:::-;3203:63;;3159:117;3315:2;3341:53;3386:7;3377:6;3366:9;3362:22;3341:53;:::i;:::-;3331:63;;3286:118;3087:324;;;;;:::o;3417:708::-;;;3601:2;3589:9;3580:7;3576:23;3572:32;3569:2;;;3617:1;3614;3607:12;3569:2;3681:1;3670:9;3666:17;3660:24;3711:18;3703:6;3700:30;3697:2;;;3743:1;3740;3733:12;3697:2;3771:87;3850:7;3841:6;3830:9;3826:22;3771:87;:::i;:::-;3761:97;;3631:237;3928:2;3917:9;3913:18;3907:25;3959:18;3951:6;3948:30;3945:2;;;3991:1;3988;3981:12;3945:2;4019:89;4100:7;4091:6;4080:9;4076:22;4019:89;:::i;:::-;4009:99;;3878:240;3559:566;;;;;:::o;4131:262::-;;4239:2;4227:9;4218:7;4214:23;4210:32;4207:2;;;4255:1;4252;4245:12;4207:2;4298:1;4323:53;4368:7;4359:6;4348:9;4344:22;4323:53;:::i;:::-;4313:63;;4269:117;4197:196;;;;:::o;4399:407::-;;;4524:2;4512:9;4503:7;4499:23;4495:32;4492:2;;;4540:1;4537;4530:12;4492:2;4583:1;4608:53;4653:7;4644:6;4633:9;4629:22;4608:53;:::i;:::-;4598:63;;4554:117;4710:2;4736:53;4781:7;4772:6;4761:9;4757:22;4736:53;:::i;:::-;4726:63;;4681:118;4482:324;;;;;:::o;4812:260::-;;4919:2;4907:9;4898:7;4894:23;4890:32;4887:2;;;4935:1;4932;4925:12;4887:2;4978:1;5003:52;5047:7;5038:6;5027:9;5023:22;5003:52;:::i;:::-;4993:62;;4949:116;4877:195;;;;:::o;5078:175::-;;5166:44;5206:3;5198:6;5166:44;:::i;:::-;5242:4;5237:3;5233:14;5219:28;;5156:97;;;;:::o;5259:118::-;5346:24;5364:5;5346:24;:::i;:::-;5341:3;5334:37;5324:53;;:::o;5411:724::-;;5557:53;5604:5;5557:53;:::i;:::-;5626:85;5704:6;5699:3;5626:85;:::i;:::-;5619:92;;5735:55;5784:5;5735:55;:::i;:::-;5813:7;5844:1;5829:281;5854:6;5851:1;5848:13;5829:281;;;5930:6;5924:13;5957:61;6014:3;5999:13;5957:61;:::i;:::-;5950:68;;6041:59;6093:6;6041:59;:::i;:::-;6031:69;;5889:221;5876:1;5873;5869:9;5864:14;;5829:281;;;5833:14;6126:3;6119:10;;5533:602;;;;;;;:::o;6141:175::-;6250:59;6303:5;6250:59;:::i;:::-;6245:3;6238:72;6228:88;;:::o;6322:118::-;6409:24;6427:5;6409:24;:::i;:::-;6404:3;6397:37;6387:53;;:::o;6446:105::-;6521:23;6538:5;6521:23;:::i;:::-;6516:3;6509:36;6499:52;;:::o;6557:115::-;6642:23;6659:5;6642:23;:::i;:::-;6637:3;6630:36;6620:52;;:::o;6678:222::-;;6809:2;6798:9;6794:18;6786:26;;6822:71;6890:1;6879:9;6875:17;6866:6;6822:71;:::i;:::-;6776:124;;;;:::o;6906:369::-;;7085:2;7074:9;7070:18;7062:26;;7134:9;7128:4;7124:20;7120:1;7109:9;7105:17;7098:47;7162:106;7263:4;7254:6;7162:106;:::i;:::-;7154:114;;7052:223;;;;:::o;7281:266::-;;7434:2;7423:9;7419:18;7411:26;;7447:93;7537:1;7526:9;7522:17;7513:6;7447:93;:::i;:::-;7401:146;;;;:::o;7553:222::-;;7684:2;7673:9;7669:18;7661:26;;7697:71;7765:1;7754:9;7750:17;7741:6;7697:71;:::i;:::-;7651:124;;;;:::o;7781:218::-;;7910:2;7899:9;7895:18;7887:26;;7923:69;7989:1;7978:9;7974:17;7965:6;7923:69;:::i;:::-;7877:122;;;;:::o;8005:278::-;;8071:2;8065:9;8055:19;;8113:4;8105:6;8101:17;8220:6;8208:10;8205:22;8184:18;8172:10;8169:34;8166:62;8163:2;;;8231:13;;:::i;:::-;8163:2;8266:10;8262:2;8255:22;8045:238;;;;:::o;8289:304::-;;8454:18;8446:6;8443:30;8440:2;;;8476:13;;:::i;:::-;8440:2;8521:4;8513:6;8509:17;8501:25;;8581:4;8575;8571:15;8563:23;;8369:224;;;:::o;8599:306::-;;8766:18;8758:6;8755:30;8752:2;;;8788:13;;:::i;:::-;8752:2;8833:4;8825:6;8821:17;8813:25;;8893:4;8887;8883:15;8875:23;;8681:224;;;:::o;8911:131::-;;9000:3;8992:11;;9030:4;9025:3;9021:14;9013:22;;8982:60;;;:::o;9048:113::-;;9148:5;9142:12;9132:22;;9121:40;;;:::o;9167:112::-;;9268:4;9263:3;9259:14;9251:22;;9241:38;;;:::o;9285:183::-;;9417:6;9412:3;9405:19;9457:4;9452:3;9448:14;9433:29;;9395:73;;;;:::o;9474:96::-;;9540:24;9558:5;9540:24;:::i;:::-;9529:35;;9519:51;;;:::o;9576:90::-;;9654:5;9651:1;9640:20;9629:31;;9619:47;;;:::o;9672:126::-;;9749:42;9742:5;9738:54;9727:65;;9717:81;;;:::o;9804:77::-;;9870:5;9859:16;;9849:32;;;:::o;9887:93::-;;9963:10;9956:5;9952:22;9941:33;;9931:49;;;:::o;9986:170::-;;10091:59;10144:5;10091:59;:::i;:::-;10078:72;;10068:88;;;:::o;10162:135::-;;10267:24;10285:5;10267:24;:::i;:::-;10254:37;;10244:53;;;:::o;10303:48::-;10336:9;10357:122;10430:24;10448:5;10430:24;:::i;:::-;10423:5;10420:35;10410:2;;10469:1;10466;10459:12;10410:2;10400:79;:::o;10485:118::-;10556:22;10572:5;10556:22;:::i;:::-;10549:5;10546:33;10536:2;;10593:1;10590;10583:12;10536:2;10526:77;:::o;10609:122::-;10682:24;10700:5;10682:24;:::i;:::-;10675:5;10672:35;10662:2;;10721:1;10718;10711:12;10662:2;10652:79;:::o;10737:122::-;10810:24;10828:5;10810:24;:::i;:::-;10803:5;10800:35;10790:2;;10849:1;10846;10839:12;10790:2;10780:79;:::o;10865:120::-;10937:23;10954:5;10937:23;:::i;:::-;10930:5;10927:34;10917:2;;10975:1;10972;10965:12;10917:2;10907:78;:::o

Swarm Source

ipfs://50b5be0de4eb31221f1369e05c5ceba0a8e8b921f5e521e25372e22f83640f50

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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