ETH Price: $1,992.62 (+0.11%)

Contract

0xBB3f2b38295c4a5671c0d6EA0bDBE89cBC79Fc0C
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Distribute Rewar...246941162026-03-19 21:06:238 days ago1773954383IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000006730.06
Claim246941122026-03-19 21:05:358 days ago1773954335IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.00000570.06
Distribute Rewar...245761822026-03-03 9:57:2325 days ago1772531843IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000013320.14
Claim245761782026-03-03 9:56:3525 days ago1772531795IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000014760.14
Distribute Rewar...244621662026-02-15 12:20:4740 days ago1771158047IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000005610.05
Claim244621632026-02-15 12:20:1140 days ago1771158011IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000004380.05
Distribute Rewar...244160822026-02-09 1:58:4747 days ago1770602327IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000006460.05
Claim244160782026-02-09 1:57:5947 days ago1770602279IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000004750.05
Distribute Rewar...242895172026-01-22 9:45:3565 days ago1769075135IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000007850.07
Claim242895122026-01-22 9:44:3565 days ago1769075075IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000006870.07
Distribute Rewar...242362902026-01-14 23:40:3572 days ago1768434035IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000006730.06
Claim242355292026-01-14 21:07:4772 days ago1768424867IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000008740.09965563
Distribute Rewar...241752972026-01-06 11:20:2380 days ago1767698423IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000006730.06
Claim241752942026-01-06 11:19:4780 days ago1767698387IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000005260.06
Distribute Rewar...241198232025-12-29 17:34:3588 days ago1767029675IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000011220.1
Claim241198182025-12-29 17:33:3588 days ago1767029615IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000008770.1
Distribute Rewar...240606822025-12-21 11:28:3596 days ago1766316515IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000004480.04
Claim240606792025-12-21 11:27:5996 days ago1766316479IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.00000350.04
Distribute Rewar...240048042025-12-13 16:13:59104 days ago1765642439IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000006730.06
Claim240043212025-12-13 14:36:59104 days ago1765636619IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.00000310.03539928
Distribute Rewar...239459582025-12-05 9:47:59113 days ago1764928079IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000001330.05
Distribute Rewar...239459582025-12-05 9:47:59113 days ago1764928079IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000007850.07
Claim239459562025-12-05 9:47:23113 days ago1764928043IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000006870.07
Distribute Rewar...238903512025-11-27 13:29:11120 days ago1764250151IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000117871.05015904
Claim238902452025-11-27 13:07:59120 days ago1764248879IN
0xBB3f2b38...cBC79Fc0C
0 ETH0.000053610.61097093
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer246941162026-03-19 21:06:238 days ago1773954383
0xBB3f2b38...cBC79Fc0C
0.00001468 ETH
Transfer246941162026-03-19 21:06:238 days ago1773954383
0xBB3f2b38...cBC79Fc0C
0.00078076 ETH
Transfer246941162026-03-19 21:06:238 days ago1773954383
0xBB3f2b38...cBC79Fc0C
0.00204951 ETH
Transfer246941162026-03-19 21:06:238 days ago1773954383
0xBB3f2b38...cBC79Fc0C
0.00204951 ETH
Transfer246941122026-03-19 21:05:358 days ago1773954335
0xBB3f2b38...cBC79Fc0C
0.00001472 ETH
Transfer246941122026-03-19 21:05:358 days ago1773954335
0xBB3f2b38...cBC79Fc0C
0.0049092 ETH
Transfer245761822026-03-03 9:57:2325 days ago1772531843
0xBB3f2b38...cBC79Fc0C
0.00012366 ETH
Transfer245761822026-03-03 9:57:2325 days ago1772531843
0xBB3f2b38...cBC79Fc0C
0.00657546 ETH
Transfer245761822026-03-03 9:57:2325 days ago1772531843
0xBB3f2b38...cBC79Fc0C
0.01726058 ETH
Transfer245761822026-03-03 9:57:2325 days ago1772531843
0xBB3f2b38...cBC79Fc0C
0.01726058 ETH
Transfer245761782026-03-03 9:56:3525 days ago1772531795
0xBB3f2b38...cBC79Fc0C
0.00012403 ETH
Transfer245761782026-03-03 9:56:3525 days ago1772531795
0xBB3f2b38...cBC79Fc0C
0.04134432 ETH
Transfer244621662026-02-15 12:20:4740 days ago1771158047
0xBB3f2b38...cBC79Fc0C
0.0000127 ETH
Transfer244621662026-02-15 12:20:4740 days ago1771158047
0xBB3f2b38...cBC79Fc0C
0.00067574 ETH
Transfer244621662026-02-15 12:20:4740 days ago1771158047
0xBB3f2b38...cBC79Fc0C
0.00177381 ETH
Transfer244621662026-02-15 12:20:4740 days ago1771158047
0xBB3f2b38...cBC79Fc0C
0.00177381 ETH
Transfer244621632026-02-15 12:20:1140 days ago1771158011
0xBB3f2b38...cBC79Fc0C
0.00001274 ETH
Transfer244621632026-02-15 12:20:1140 days ago1771158011
0xBB3f2b38...cBC79Fc0C
0.00424883 ETH
Transfer244160822026-02-09 1:58:4747 days ago1770602327
0xBB3f2b38...cBC79Fc0C
0.00002343 ETH
Transfer244160822026-02-09 1:58:4747 days ago1770602327
0xBB3f2b38...cBC79Fc0C
0.00124589 ETH
Transfer244160822026-02-09 1:58:4747 days ago1770602327
0xBB3f2b38...cBC79Fc0C
0.00327047 ETH
Transfer244160822026-02-09 1:58:4747 days ago1770602327
0xBB3f2b38...cBC79Fc0C
0.00327047 ETH
Transfer244160782026-02-09 1:57:5947 days ago1770602279
0xBB3f2b38...cBC79Fc0C
0.0000235 ETH
Transfer244160782026-02-09 1:57:5947 days ago1770602279
0xBB3f2b38...cBC79Fc0C
0.00783377 ETH
Transfer242895172026-01-22 9:45:3565 days ago1769075135
0xBB3f2b38...cBC79Fc0C
0.00049724 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
HLXBlazeStake

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 200 runs

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

import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "./interfaces/IBlazeStaking.sol";
import "./interfaces/IBlazeDiamondHand.sol";
import "./lib/constants.sol";

/// @title HLX DAO Staking contract for Blaze
contract HLXBlazeStake is Ownable2Step, ReentrancyGuard {
    using SafeERC20 for IERC20;

    // -------------------------- STATE VARIABLES -------------------------- //

    uint256 constant STAKE_DURATION = 2888;
    IBlazeStaking constant BlazeStaking = IBlazeStaking(BLAZE_STAKING);

     /// @notice Helios buy & burn address.
    address public heliosBuyBurn;
     /// @notice Helios treasury address.
    address public heliosTreasury;
    /// @notice Address of the Blaze Diamnond Hand Pool.
    IBlazeDiamondHand public blazeDiamondHand = IBlazeDiamondHand(0xe249C7a82573F55EB2B215CD6695800cfdfa4AcC);

    /// @notice Timestamp of the last swap.
    uint256 public lastSwapTime;
    /// @notice Timestamp of the last stake.
    uint256 public lastStakeTime;
    /// @notice Maximum amount per 1 swap in TitanX.
    uint256 public maxSwapAmount = 2_000_000_000 ether;
    /// @notice Minimum amount of Blaze stake pool to omit cooldown restriction.
    uint256 public constant intervalOverride = 4_000 ether;
    /// @notice Minimum amount per 1 stake in Blaze.
    uint256 public minStakeAmount = 4_000 ether;
    /// @notice Cooldown time between swaps in seconds.
    uint64 public swapInterval = 6 hours;
    /// @notice Cooldown time between stakes in seconds.
    uint64 public stakeInterval = 7 days;
    /// @notice Basis point incentive fee paid out for swapping.
    uint16 public swapIncentiveFeeBPS = 30;
    /// @notice Basis point incentive fee paid out for staking.
    uint16 public stakeIncentiveFeeBPS = 30;
    /// @notice Basis point incentive fee paid out for claiming.
    uint16 public claimIncentiveFeeBPS = 30;
    /// @notice Basis point incentive fee paid out for distributing.
    uint16 public distributeIncentiveFeeBPS = 30;
    /// @notice Whitelisted wallets for TitanX/Blaze swaps.
    mapping(address account => bool) public whitelisted;

    // ------------------------------- EVENTS ------------------------------ //

    event Swap();
    event Stake();
    event Claim();
    event ClaimDiamondHand();
    event Distribution();

    // ------------------------------- ERRORS ------------------------------ //

    error Cooldown();
    error InsufficientBalance();
    error NothingToClaim();
    error Prohibited();
    error Unauthorized();
    error ZeroAddress();
    error ZeroInput();

    // ------------------------------ MODIFIERS ---------------------------- //

    modifier originCheck() {
        if (address(msg.sender).code.length != 0 || msg.sender != tx.origin) revert Unauthorized();
        _;
    }

    // ----------------------------- CONSTRUCTOR --------------------------- //

    constructor(address _owner, address _heliosBuyBurn, address _heliosTreasury) Ownable(_owner) {
        if (_heliosBuyBurn == address(0)) revert ZeroAddress();
        if (_heliosTreasury == address(0)) revert ZeroAddress();
        heliosBuyBurn = _heliosBuyBurn;
        heliosTreasury = _heliosTreasury;
    }

    // --------------------------- PUBLIC FUNCTIONS ------------------------ //

    receive() external payable {}

    fallback() external payable {}

    /// @notice Swaps available TitanX to Blaze for future stakes
    /// @param minAmountOut Minimum Blaze amount to receive in TitanX/Blaze swap.
    /// @param deadline Deadline timestamp to perform the swap.
    function swap(uint256 minAmountOut, uint256 deadline) external originCheck {
        if (!whitelisted[msg.sender]) revert Unauthorized();
        (uint256 time, uint256 amount) = getNextSwapInfo();
        if (time > block.timestamp) revert Cooldown();
        if (amount == 0) revert InsufficientBalance();
        lastSwapTime = block.timestamp;
        uint256 incentive = _calculateBpsPercentage(amount, swapIncentiveFeeBPS);
        IERC20(TITANX).safeTransfer(msg.sender, incentive);
        _swapTitanXToBlaze(amount - incentive, minAmountOut, deadline);
        emit Swap();
    }

    /// @notice Stakes all available Blaze.
    function stake() external originCheck {
        (uint256 time, uint256 amount) = getNextStakeInfo();
        if (amount < intervalOverride) {
            if (time > block.timestamp) revert Cooldown();
            if (amount < minStakeAmount) revert InsufficientBalance();
        }
        lastStakeTime = block.timestamp;
        uint256 incentive = _calculateBpsPercentage(amount, stakeIncentiveFeeBPS);
        uint256 stakeAmount = amount - incentive;
        IERC20 blaze = IERC20(BLAZE);
        blaze.safeTransfer(msg.sender, incentive);
        blaze.safeIncreaseAllowance(BLAZE_STAKING, stakeAmount);
        BlazeStaking.stakeBlaze(stakeAmount, STAKE_DURATION);
        emit Stake();
    }

    /// @notice Claims rewards for all available stakes.
    function claim() external nonReentrant originCheck {
        uint256 claimAmount = BlazeStaking.getAvailableRewardsForClaim(address(this));
        if (claimAmount == 0) revert NothingToClaim();
        BlazeStaking.claimFeeRewards();
        uint256 incentive = _calculateBpsPercentage(claimAmount, claimIncentiveFeeBPS);
        Address.sendValue(payable(msg.sender), incentive);
        emit Claim();
    }

    /// @notice Claims diamond hand rewards.
    function claimDiamondHandRewards() external nonReentrant originCheck {
        uint256 claimAmount = blazeDiamondHand.getClaimableRewards(address(this));
        if (claimAmount == 0) revert NothingToClaim();
        blazeDiamondHand.claimRewards();
        uint256 incentive = _calculateBpsPercentage(claimAmount, claimIncentiveFeeBPS);
        Address.sendValue(payable(msg.sender), incentive);
        emit ClaimDiamondHand();
    }

    /// @notice Distributes accumulated rewards.
    function distributeRewards() external nonReentrant originCheck {
        uint256 amount = address(this).balance;
        if (amount == 0) revert InsufficientBalance();
        uint256 incentiveAmount = _calculateBpsPercentage(amount, distributeIncentiveFeeBPS);
        uint256 heliosStakeAmount = _calculateBpsPercentage(amount - incentiveAmount, HELIOS_STAKE_BPS);
        uint256 heliosBuyBurnAmount = _calculateBpsPercentage(amount - incentiveAmount, HELIOS_BUYBURN_BPS);
        Address.sendValue(payable(HELIOS_STAKE), heliosStakeAmount);
        Address.sendValue(payable(heliosBuyBurn), heliosBuyBurnAmount);
        Address.sendValue(payable(heliosTreasury), amount - incentiveAmount - heliosStakeAmount - heliosBuyBurnAmount);
        Address.sendValue(payable(msg.sender), incentiveAmount);
        emit Distribution();
    }

    /// @notice Ends stake after its maturity.
    /// @param id ID of the stake to end.
    function endStakeAfterMaturity(uint256 id) external originCheck {
        BlazeStaking.distributeFeeRewardsForAll();
        BlazeStaking.unstakeBlaze(address(this), id);
    }

    /// @notice Claims tickets for the Blaze Diamond Hand Pool.
    function claimDiamondTickets() external {
        blazeDiamondHand.participate();
    }

    // ----------------------- ADMINISTRATIVE FUNCTIONS -------------------- //

    /// @notice Sets the whitelist status for provided addresses for TitanX/Blaze swaps.
    /// @param accounts List of wallets which status will be changed.
    /// @param isAllowed Status to be set.
    function setSwapWhitelist(address[] calldata accounts, bool isAllowed) external onlyOwner {
        for (uint256 i = 0; i < accounts.length; i++) {
            whitelisted[accounts[i]] = isAllowed;
        }
    }

    /// @notice Sets a new maximum amount of TitanX per swap.
    /// @param limit Amount in WEI.
    function setMaxSwapAmount(uint256 limit) external onlyOwner {
        if (limit == 0) revert ZeroInput();
        maxSwapAmount = limit;
    }

    /// @notice Sets a new minimum amount of Blaze per stake.
    /// @param limit Amount in WEI.
    function setMinStakeAmount(uint256 limit) external onlyOwner {
        minStakeAmount = limit;
    }

    /// @notice Sets a new cooldown time per TitanX/Blaze swap.
    /// @param limit Cooldown time in seconds.
    function setSwapInterval(uint64 limit) external onlyOwner {
        if (limit == 0) revert ZeroInput();
        swapInterval = limit;
    }

    /// @notice Sets a new cooldown time per staking.
    /// @param limit Cooldown time in seconds.
    function setStakeInterval(uint64 limit) external onlyOwner {
        if (limit == 0) revert ZeroInput();
        stakeInterval = limit;
    }

    /// @notice Sets a new swap incentive fee basis points.
    /// @param bps Incentive fee in basis points (1% = 100 bps).
    function setSwapIncentiveFee(uint16 bps) external onlyOwner {
        if (bps == 0 || bps > 1000) revert Prohibited();
        swapIncentiveFeeBPS = bps;
    }

    /// @notice Sets a new stake incentive fee basis points.
    /// @param bps Incentive fee in basis points (1% = 100 bps).
    function setStakeIncentiveFee(uint16 bps) external onlyOwner {
        if (bps == 0 || bps > 1000) revert Prohibited();
        stakeIncentiveFeeBPS = bps;
    }

    /// @notice Sets a new claim incentive fee basis points.
    /// @param bps Incentive fee in basis points (1% = 100 bps).
    function setClaimIncentiveFee(uint16 bps) external onlyOwner {
        if (bps == 0 || bps > 1000) revert Prohibited();
        claimIncentiveFeeBPS = bps;
    }

    /// @notice Sets a new distribute incentive fee basis points.
    /// @param bps Incentive fee in basis points (1% = 100 bps).
    function setDistributeIncentiveFee(uint16 bps) external onlyOwner {
        if (bps == 0 || bps > 1000) revert Prohibited();
        distributeIncentiveFeeBPS = bps;
    }

    function setBlazeDiamondHand(address _diamondHand) external onlyOwner {
        if (_diamondHand == address(0)) revert ZeroAddress();
        blazeDiamondHand = IBlazeDiamondHand(_diamondHand);
    }

    /// @notice Sets the Helios Buy & Burn address.
    /// @param _address The address of the Helios Buy & Burn contract.
    function setHeliosBuyBurnAddress(address _address) external onlyOwner {
        if (_address == address(0)) revert ZeroAddress();
        heliosBuyBurn = _address;
    }

    /// @notice Sets the Helios Treasury address.
    /// @param _address The address of the Helios Treasury.
    function setHeliosTreasuryAddress(address _address) external onlyOwner {
        if (_address == address(0)) revert ZeroAddress();
        heliosTreasury = _address;
    }

    // ---------------------------- VIEW FUNCTIONS ------------------------- //

    /// @notice Returns the information for the next swap.
    /// @return time The time next swap will be available.
    /// @return amount TitanX available for the next swap.
    function getNextSwapInfo() public view returns (uint256 time, uint256 amount) {
        uint256 balance = IERC20(TITANX).balanceOf(address(this));
        amount = balance > maxSwapAmount ? maxSwapAmount : balance;
        time = lastSwapTime + swapInterval;
    }

    /// @notice Returns the information for the next stake.
    /// @return time The time next stake will be available.
    /// @return amount Blaze available for the next stake.
    function getNextStakeInfo() public view returns (uint256 time, uint256 amount) {
        amount = IERC20(BLAZE).balanceOf(address(this));
        time = lastStakeTime + stakeInterval;
    }

    /// @notice Returns total current unclaimed rewards.
    function getTotalUnclaimedRewards() external view returns (uint256) {
        return BlazeStaking.getAvailableRewardsForClaim(address(this));
    }

    // -------------------------- INTERNAL FUNCTIONS ----------------------- //

   function _calculateBpsPercentage(uint256 amount, uint16 bps) internal pure returns (uint256) {
        return amount * bps / BPS_BASE;
    }

    function _swapTitanXToBlaze(uint256 amountIn, uint256 minAmountOut, uint256 deadline) internal {
        IERC20(TITANX).safeIncreaseAllowance(UNISWAP_V2_ROUTER, amountIn);
        address[] memory path = new address[](2);
        path[0] = TITANX;
        path[1] = BLAZE;

        IUniswapV2Router02(UNISWAP_V2_ROUTER).swapExactTokensForTokens(
            amountIn, minAmountOut, path, address(this), deadline
        );
    }

}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

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

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

File 4 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;

interface IBlazeDiamondHand {
    function accCycleAllTickets(address, uint256) external view returns (uint256);
    function participate() external;
    function claimRewards() external;
    function getClaimableRewards(address user) external view returns (uint256 totalClaimableRewards);
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;

interface IBlazeStaking {
    enum StakeStatus {
        ACTIVE,
        COMPLETED
    }

    struct CompleteStakeInfo {
        uint256 userStakeId;
        uint256 globalStakeId;
        StakeInfo stakeInfo;
    }

    struct StakeInfo {
        uint256 amount;
        uint256 shares;
        uint16 stakeDurationInDays;
        uint32 startTimestamp;
        uint32 maturityTimestamp;
        StakeStatus status;
    }

    function getAvailableRewardsForClaim(address __user) external view returns (uint256 __totalRewards);
    function getStakeInfoByUserStakeId(address __user, uint256 __userStakeId)
        external
        view
        returns (StakeInfo memory);
    function claimFeeRewards() external;
    function distributeFeeRewardsForAll() external;
    function stakeBlaze(uint256 __blazeAmount, uint256 __durationInDays) external;
    function unstakeBlaze(address __user, uint256 __id) external;

    function getNextCycleDistributionDay(uint16) external view returns (uint256);
    function getUser2888BlazeToken(address user, uint256 cycle) external view returns (uint256 blazeTokenStaked);
    function getStakes(address __user, uint256 __cursor, uint256 __size)
        external
        view
        returns (CompleteStakeInfo[] memory __stakes, uint256 __counter);
}

File 15 of 15 : constants.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.26;

// ===================== Contract Addresses =====================================

address constant TITANX = 0xF19308F923582A6f7c465e5CE7a9Dc1BEC6665B1;
address constant HELIOS_STAKE = 0x2614f29C39dE46468A921Fd0b41fdd99A01f2EDf;
address constant BLAZE = 0xfcd7cceE4071aA4ecFAC1683b7CC0aFeCAF42A36;
address constant BLAZE_STAKING = 0xBc0043bc5b0c394D9d05d49768f9548F8CF9587b;

// ===================== Distribution ==================================================

uint16 constant HELIOS_STAKE_BPS = 42_00;
uint16 constant HELIOS_BUYBURN_BPS = 42_00;
uint16 constant HELIOS_TREASURY_BPS = 16_00;
uint16 constant BPS_BASE = 100_00;

// ===================== UNISWAP Interface ======================================

address constant UNISWAP_V2_ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_heliosBuyBurn","type":"address"},{"internalType":"address","name":"_heliosTreasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"Cooldown","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"NothingToClaim","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"Prohibited","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroInput","type":"error"},{"anonymous":false,"inputs":[],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[],"name":"ClaimDiamondHand","type":"event"},{"anonymous":false,"inputs":[],"name":"Distribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[],"name":"Swap","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blazeDiamondHand","outputs":[{"internalType":"contract IBlazeDiamondHand","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimDiamondHandRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimDiamondTickets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimIncentiveFeeBPS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeIncentiveFeeBPS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"endStakeAfterMaturity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getNextStakeInfo","outputs":[{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextSwapInfo","outputs":[{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalUnclaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"heliosBuyBurn","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"heliosTreasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"intervalOverride","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastStakeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastSwapTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSwapAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minStakeAmount","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":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_diamondHand","type":"address"}],"name":"setBlazeDiamondHand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"bps","type":"uint16"}],"name":"setClaimIncentiveFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"bps","type":"uint16"}],"name":"setDistributeIncentiveFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setHeliosBuyBurnAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setHeliosTreasuryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"setMaxSwapAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"setMinStakeAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"bps","type":"uint16"}],"name":"setStakeIncentiveFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"limit","type":"uint64"}],"name":"setStakeInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"bps","type":"uint16"}],"name":"setSwapIncentiveFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"limit","type":"uint64"}],"name":"setSwapInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"bool","name":"isAllowed","type":"bool"}],"name":"setSwapWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeIncentiveFeeBPS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakeInterval","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapIncentiveFeeBPS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapInterval","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"whitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080346101a857601f611d5938819003918201601f19168301916001600160401b038311848410176101ad578084926060946040528339810103126101a857610047816101c3565b61005f6040610058602085016101c3565b93016101c3565b6001600160a01b0390911691821561019257600180546001600160a01b0319908116909155600080549182168517815560405194916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600255600580546001600160a01b03191673e249c7a82573f55eb2b215cd6695800cfdfa4acc1790556b06765c793fa10079d000000060085568d8d726b7177a800000600955600a8054761e001e001e001e0000000000093a8000000000000054606001600160c01b03199091161790556001600160a01b0316908115610181576001600160a01b03169081156101815760018060a01b0319600354161760035560018060a01b03196004541617600455611b8190816101d88239f35b63d92e233d60e01b60005260046000fd5b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101a85756fe608080604052600436101561001a575b50361561001857005b005b600090813560e01c908163086fff661461177a575080630dd871571461175c578063294a4411146116f6578063294cb224146116ab5780632ace03ad1461164e5780632d6e1408146116335780632f84cbf51461160c5780633a4b66f1146113145780634b4b66ee146112eb5780634c6f1e0f146112a05780634e71d92d1461114f5780635e3ea2e51461101757806364d4db1014610ff9578063664d4e9814610fd45780636f4a2cd014610ea0578063715018a614610e3b5780637319922814610dd557806379ba509714610d505780638166b31614610cea5780638da5cb5b14610cc3578063a5f7f99d14610c9a578063ae9278fe14610c71578063af1a3d0414610bfc578063af83a81c14610b1c578063b1283c1c14610af5578063b8bc33e814610a9b578063c0794e7114610a77578063c17205c9146109bb578063cce987d41461099d578063d345f4a11461093e578063d43b51b614610919578063d65a5623146108ef578063d936547e146108ad578063d96073cf1461040d578063d9ad02e1146103b6578063db4d08521461031e578063e12ae00e146102f9578063e30c3978146102d0578063eb4af045146102ad578063f18876841461028f578063f2fde38b146102185763f3cdb3510361000f5734610215578060031936011261021557602061ffff600a5460801c16604051908152f35b80fd5b5034610215576020366003190112610215576004356001600160a01b0381169081900361028b57610247611941565b600180546001600160a01b0319168217905581546001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227008380a380f35b5080fd5b50346102155780600319360112610215576020600954604051908152f35b5034610215576020366003190112610215576102c7611941565b60043560095580f35b50346102155780600319360112610215576001546040516001600160a01b039091168152602090f35b5034610215578060031936011261021557602061ffff600a5460b01c16604051908152f35b503461021557806003193601126102155760405163cf9a336160e01b815230600482015290602082602481600080516020611b2c8339815191525afa9081156103aa5790610372575b602090604051908152f35b506020813d6020116103a2575b8161038c6020938361179f565b8101031261039d5760209051610367565b600080fd5b3d915061037f565b604051903d90823e3d90fd5b5034610215576020366003190112610215576004356001600160401b03811680910361028b576103e4611941565b80156103fe576001600160401b0319600a541617600a5580f35b63af458c0760e01b8252600482fd5b503461021557604036600319011261021557333b158015906108a3575b61089557338152600b60205260ff604082205416156108955761044b611895565b904210610886578015610877576104cd904260065561047361ffff600a5460801c1682611987565b60405163a9059cbb60e01b6020820152336024820152604481018290529091906104c8906104ae81606481015b03601f19810183528261179f565b73f19308f923582a6f7c465e5ce7a9dc1bec6665b1611a6d565b611934565b604051636eb1769f60e11b8152306004820152737a250d5630b4cf539739df2c5dacb4c659f2488d602482015260208160448173f19308f923582a6f7c465e5ce7a9dc1bec6665b15afa801561086c5782908490610836575b61053092506117d6565b828060405192602084019063095ea7b360e01b8252737a250d5630b4cf539739df2c5dacb4c659f2488d602486015260448501526044845261057360648561179f565b8351908273f19308f923582a6f7c465e5ce7a9dc1bec6665b15af16105966119c5565b81610807575b50806107e9575b1561079d575b50604051906105b960608361179f565b60028252602082019060403683378251156107895773f19308f923582a6f7c465e5ce7a9dc1bec6665b1825282516001101561078957838373fcd7ccee4071aa4ecfac1683b7cc0afecaf42a366040839601526040519384916338ed173960e01b835260a48301946004840152600435602484015260a060448401525180945260c482019093835b818110610764575050819293503060648301526024356084830152038183737a250d5630b4cf539739df2c5dacb4c659f2488d5af18015610759576106a9575b507f3ebfdaaf4031bec9a2b7b0a1c594d2d03f3d0b8d68531c9164c2829bac00fefa8180a180f35b3d8083833e6106b8818361179f565b810190602081830312610755578051906001600160401b03821161073d570181601f82011215610755578051906001600160401b038211610741576020808360051b938185019061070c604051928361179f565b8152019282010192831161073d57602001905b82821061072d575050610681565b815181526020918201910161071f565b8380fd5b634e487b7160e01b84526041600452602484fd5b8280fd5b6040513d84823e3d90fd5b85516001600160a01b0316835260209586019588955087945090920191600101610641565b634e487b7160e01b84526032600452602484fd5b6107e3906104ae60405163095ea7b360e01b6020820152737a250d5630b4cf539739df2c5dacb4c659f2488d6024820152856044820152604481526104ae60648261179f565b386105a9565b5073f19308f923582a6f7c465e5ce7a9dc1bec6665b13b15156105a3565b805180159250821561081c575b50503861059c565b61082f9250602080918301019101611a55565b3880610814565b50506020813d602011610864575b816108516020938361179f565b8101031261039d57816105309151610526565b3d9150610844565b6040513d85823e3d90fd5b631e9acf1760e31b8252600482fd5b63b0782df760e01b8252600482fd5b6282b42960e81b8152600490fd5b503233141561042a565b5034610215576020366003190112610215576004356001600160a01b0381169081900361028b5760408260ff9260209452600b84522054166040519015158152f35b503461021557806003193601126102155760206001600160401b03600a5460401c16604051908152f35b5034610215578060031936011261021557602061ffff600a5460901c16604051908152f35b503461021557806003193601126102155760055481906001600160a01b0316803b1561099a5781809160046040518094819363688b88d160e11b83525af18015610759576109895750f35b816109939161179f565b6102155780f35b50fd5b50346102155780600319360112610215576020600854604051908152f35b5034610215576040366003190112610215576004356001600160401b03811161028b573660238201121561028b5780600401356001600160401b038111610755573660248260051b84010111610755576024359182151580930361073d57610a24929192611941565b60ff849216915b83811015610a73576024600582901b830101356001600160a01b0381169190829003610a6f57908552600b60205260408520805460ff191684179055600101610a2b565b8580fd5b8480f35b5034610215578060031936011261021557602060405168d8d726b7177a8000008152f35b5034610215576020366003190112610215576004356001600160a01b0381169081900361028b57610aca611941565b8015610ae6576001600160601b0360a01b600554161760055580f35b63d92e233d60e01b8252600482fd5b503461021557806003193601126102155760206001600160401b03600a5416604051908152f35b503461021557602036600319011261021557333b15801590610bf2575b61089557600080516020611b2c8339815191523b156102155760405163c36e60a960e01b81528190818160048183600080516020611b2c8339815191525af1801561075957610bdd575b5050600080516020611b2c8339815191523b156102155760405163260270c760e01b8152306004808301919091523560248201528190818160448183600080516020611b2c8339815191525af18015610759576109895750f35b81610be79161179f565b610215578038610b83565b5032331415610b39565b50346102155760203660031901126102155760043561ffff811680820361075557610c25611941565b8015908115610c65575b50610c5657600a805461ffff60901b191660909290921b61ffff60901b1691909117905580f35b632b0039c760e21b8252600482fd5b6103e891501138610c2f565b50346102155780600319360112610215576004546040516001600160a01b039091168152602090f35b503461021557602036600319011261021557600435610cb7611941565b80156103fe5760085580f35b5034610215578060031936011261021557546040516001600160a01b039091168152602090f35b50346102155760203660031901126102155760043561ffff811680820361075557610d13611941565b8015908115610d44575b50610c5657600a805461ffff60a01b191660a09290921b61ffff60a01b1691909117905580f35b6103e891501138610d1d565b5034610215578060031936011261021557600154336001600160a01b0390911603610dc257600180546001600160a01b0319908116909155815433918116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b63118cdaa760e01b815233600452602490fd5b50346102155760203660031901126102155760043561ffff811680820361075557610dfe611941565b8015908115610e2f575b50610c5657600a805461ffff60801b191660809290921b61ffff60801b1691909117905580f35b6103e891501138610e08565b5034610215578060031936011261021557610e54611941565b600180546001600160a01b03199081169091558154908116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5034610215578060031936011261021557610eb96119a5565b333b15801590610fca575b6108955747801561087757610ee261ffff600a5460b01c1682611987565b90610ef5610ef08383611934565b61196a565b610f02610ef08484611934565b90804710610fb7578480808084732614f29c39de46468a921fd0b41fdd99a01f2edf5af1610f2e6119c5565b5015610fa85791610f70826104c8610f7c9695610f58610f769660018060a01b0360035416611a04565b6004546001600160a01b0316946104c8908890611934565b90611a04565b33611a04565b7f5da5f5ab15b3f7ce29e57210ae89068218f2196e9df956cf8b0586b0d65205528180a1600160025580f35b630a12f52160e11b8552600485fd5b63cd78605960e01b855230600452602485fd5b5032331415610ec4565b5034610215578060031936011261021557602061ffff600a5460a01c16604051908152f35b50346102155780600319360112610215576020600754604051908152f35b50346102155780600319360112610215576110306119a5565b333b15801590611145575b61089557600554604051631847200f60e11b8152306004820152906001600160a01b0316602082602481845afa91821561086c578392611111575b508115611102578083913b1561028b5781809160046040518094819363372500ab60e01b83525af18015610759576110ed575b506110c1610f768361ffff600a5460a01c1690611987565b7ffed0941ce691f3fb8248f283008cdad08fc01c94049d909957afe080b19e60408180a1600160025580f35b816110f79161179f565b61028b5781386110a9565b6312d37ee560e31b8352600483fd5b9091506020813d60201161113d575b8161112d6020938361179f565b8101031261039d57519038611076565b3d9150611120565b503233141561103b565b50346102155780600319360112610215576111686119a5565b333b15801590611296575b6108955760405163cf9a336160e01b8152306004820152602081602481600080516020611b2c8339815191525afa908115610759578291611264575b50801561125557600080516020611b2c8339815191523b1561028b576040516360484f1b60e01b81528290818160048183600080516020611b2c8339815191525af1801561075957611240575b50611214610f768361ffff600a5460a01c1690611987565b7f3158952e7c791deb52750003dbcb0fb942106f2bcd1005fb946a83cd6646fdc48180a1600160025580f35b8161124a9161179f565b61028b5781386111fc565b6312d37ee560e31b8252600482fd5b90506020813d60201161128e575b8161127f6020938361179f565b8101031261039d5751386111af565b3d9150611272565b5032331415611173565b5034610215576020366003190112610215576004356001600160a01b0381169081900361028b576112cf611941565b8015610ae6576001600160601b0360a01b600354161760035580f35b50346102155780600319360112610215576005546040516001600160a01b039091168152602090f35b5034610215578060031936011261021557333b15801590611602575b6108955761133c6117f9565b9068d8d726b7177a80000082106115ed575b50426007556113bc6104a06113a261137961137261ffff600a5460901c1686611987565b8095611934565b60405163a9059cbb60e01b60208201523360248201526044810195909552939182906064820190565b73fcd7ccee4071aa4ecfac1683b7cc0afecaf42a36611a6d565b604051636eb1769f60e11b8152306004820152600080516020611b2c833981519152602482015260208160448173fcd7ccee4071aa4ecfac1683b7cc0afecaf42a365afa801561086c57829084906115b7575b61141992506117d6565b828060405192602084019063095ea7b360e01b8252600080516020611b2c833981519152602486015260448501526044845261145660648561179f565b8351908273fcd7ccee4071aa4ecfac1683b7cc0afecaf42a365af16114796119c5565b81611588575b508061156a575b15611524575b50600080516020611b2c8339815191523b1561028b57604051906304010c0360e01b82526004820152610b48602482015281808260448183600080516020611b2c8339815191525af1801561151757611507575b7fde20bc92f9195457f9ba0ec9258c42c0814617c756a597287307a20494e839928180a180f35b6115109161179f565b38816114e0565b50604051903d90823e3d90fd5b611564906113a260405163095ea7b360e01b6020820152600080516020611b2c8339815191526024820152856044820152604481526113a260648261179f565b3861148c565b5073fcd7ccee4071aa4ecfac1683b7cc0afecaf42a363b1515611486565b805180159250821561159d575b50503861147f565b6115b09250602080918301019101611a55565b3880611595565b50506020813d6020116115e5575b816115d26020938361179f565b810103126107555781611419915161140f565b3d91506115c5565b4210610886576009548110610877573861134e565b5032331415611330565b50346102155780600319360112610215576040611627611895565b82519182526020820152f35b503461021557806003193601126102155760406116276117f9565b5034610215576020366003190112610215576004356001600160401b0381168082036107555761167c611941565b156103fe5767ffffffffffffffff60401b600a549160401b169067ffffffffffffffff60401b191617600a5580f35b5034610215576020366003190112610215576004356001600160a01b0381169081900361028b576116da611941565b8015610ae6576001600160601b0360a01b600454161760045580f35b50346102155760203660031901126102155760043561ffff81168082036107555761171f611941565b8015908115611750575b50610c5657600a805461ffff60b01b191660b09290921b61ffff60b01b1691909117905580f35b6103e891501138611729565b50346102155780600319360112610215576020600654604051908152f35b90503461028b578160031936011261028b576003546001600160a01b03168152602090f35b90601f801991011681019081106001600160401b038211176117c057604052565b634e487b7160e01b600052604160045260246000fd5b919082018092116117e357565b634e487b7160e01b600052601160045260246000fd5b6040516370a0823160e01b815230600482015260208160248173fcd7ccee4071aa4ecfac1683b7cc0afecaf42a365afa90811561188957600091611857575b506118546007546001600160401b03600a5460401c16906117d6565b91565b90506020813d602011611881575b816118726020938361179f565b8101031261039d575138611838565b3d9150611865565b6040513d6000823e3d90fd5b6040516370a0823160e01b815230600482015260208160248173f19308f923582a6f7c465e5ce7a9dc1bec6665b15afa90811561188957600091611902575b5060085490818111156118fb57505b6118546006546001600160401b03600a5416906117d6565b90506118e3565b906020823d60201161192c575b8161191c6020938361179f565b81010312610215575051386118d4565b3d915061190f565b919082039182116117e357565b6000546001600160a01b0316330361195557565b63118cdaa760e01b6000523360045260246000fd5b61106881029080820461106814901517156117e357612710900490565b9061ffff16908181029181830414901517156117e357612710900490565b60028054146119b45760028055565b633ee5aeb560e01b60005260046000fd5b3d156119ff573d906001600160401b0382116117c057604051916119f3601f8201601f19166020018461179f565b82523d6000602084013e565b606090565b814710611a40576000918291829182916001600160a01b03165af1611a276119c5565b5015611a2f57565b630a12f52160e11b60005260046000fd5b63cd78605960e01b6000523060045260246000fd5b9081602091031261039d5751801515810361039d5790565b600080611a969260018060a01b03169360208151910182865af1611a8f6119c5565b9083611adb565b8051908115159182611ac0575b5050611aac5750565b635274afe760e01b60005260045260246000fd5b611ad39250602080918301019101611a55565b153880611aa3565b90611af05750805115611a2f57805190602001fd5b81511580611b22575b611b01575090565b639996b31560e01b60009081526001600160a01b0391909116600452602490fd5b50803b15611af956fe000000000000000000000000bc0043bc5b0c394d9d05d49768f9548f8cf9587ba26469706673582212209f188ca5ad499cc421ee237e4d215d19915da5ddfcfda3a79f5b77ba186171ca64736f6c634300081a00330000000000000000000000007e7061905e6105eb6b2c8bac5bb44733d5a02d1a0000000000000000000000003d5f85548419f784c67903301cc59111681c042600000000000000000000000015e5b9b9adf208cc7ca3ae1e6a49506eb5f397dd

Deployed Bytecode

0x608080604052600436101561001a575b50361561001857005b005b600090813560e01c908163086fff661461177a575080630dd871571461175c578063294a4411146116f6578063294cb224146116ab5780632ace03ad1461164e5780632d6e1408146116335780632f84cbf51461160c5780633a4b66f1146113145780634b4b66ee146112eb5780634c6f1e0f146112a05780634e71d92d1461114f5780635e3ea2e51461101757806364d4db1014610ff9578063664d4e9814610fd45780636f4a2cd014610ea0578063715018a614610e3b5780637319922814610dd557806379ba509714610d505780638166b31614610cea5780638da5cb5b14610cc3578063a5f7f99d14610c9a578063ae9278fe14610c71578063af1a3d0414610bfc578063af83a81c14610b1c578063b1283c1c14610af5578063b8bc33e814610a9b578063c0794e7114610a77578063c17205c9146109bb578063cce987d41461099d578063d345f4a11461093e578063d43b51b614610919578063d65a5623146108ef578063d936547e146108ad578063d96073cf1461040d578063d9ad02e1146103b6578063db4d08521461031e578063e12ae00e146102f9578063e30c3978146102d0578063eb4af045146102ad578063f18876841461028f578063f2fde38b146102185763f3cdb3510361000f5734610215578060031936011261021557602061ffff600a5460801c16604051908152f35b80fd5b5034610215576020366003190112610215576004356001600160a01b0381169081900361028b57610247611941565b600180546001600160a01b0319168217905581546001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227008380a380f35b5080fd5b50346102155780600319360112610215576020600954604051908152f35b5034610215576020366003190112610215576102c7611941565b60043560095580f35b50346102155780600319360112610215576001546040516001600160a01b039091168152602090f35b5034610215578060031936011261021557602061ffff600a5460b01c16604051908152f35b503461021557806003193601126102155760405163cf9a336160e01b815230600482015290602082602481600080516020611b2c8339815191525afa9081156103aa5790610372575b602090604051908152f35b506020813d6020116103a2575b8161038c6020938361179f565b8101031261039d5760209051610367565b600080fd5b3d915061037f565b604051903d90823e3d90fd5b5034610215576020366003190112610215576004356001600160401b03811680910361028b576103e4611941565b80156103fe576001600160401b0319600a541617600a5580f35b63af458c0760e01b8252600482fd5b503461021557604036600319011261021557333b158015906108a3575b61089557338152600b60205260ff604082205416156108955761044b611895565b904210610886578015610877576104cd904260065561047361ffff600a5460801c1682611987565b60405163a9059cbb60e01b6020820152336024820152604481018290529091906104c8906104ae81606481015b03601f19810183528261179f565b73f19308f923582a6f7c465e5ce7a9dc1bec6665b1611a6d565b611934565b604051636eb1769f60e11b8152306004820152737a250d5630b4cf539739df2c5dacb4c659f2488d602482015260208160448173f19308f923582a6f7c465e5ce7a9dc1bec6665b15afa801561086c5782908490610836575b61053092506117d6565b828060405192602084019063095ea7b360e01b8252737a250d5630b4cf539739df2c5dacb4c659f2488d602486015260448501526044845261057360648561179f565b8351908273f19308f923582a6f7c465e5ce7a9dc1bec6665b15af16105966119c5565b81610807575b50806107e9575b1561079d575b50604051906105b960608361179f565b60028252602082019060403683378251156107895773f19308f923582a6f7c465e5ce7a9dc1bec6665b1825282516001101561078957838373fcd7ccee4071aa4ecfac1683b7cc0afecaf42a366040839601526040519384916338ed173960e01b835260a48301946004840152600435602484015260a060448401525180945260c482019093835b818110610764575050819293503060648301526024356084830152038183737a250d5630b4cf539739df2c5dacb4c659f2488d5af18015610759576106a9575b507f3ebfdaaf4031bec9a2b7b0a1c594d2d03f3d0b8d68531c9164c2829bac00fefa8180a180f35b3d8083833e6106b8818361179f565b810190602081830312610755578051906001600160401b03821161073d570181601f82011215610755578051906001600160401b038211610741576020808360051b938185019061070c604051928361179f565b8152019282010192831161073d57602001905b82821061072d575050610681565b815181526020918201910161071f565b8380fd5b634e487b7160e01b84526041600452602484fd5b8280fd5b6040513d84823e3d90fd5b85516001600160a01b0316835260209586019588955087945090920191600101610641565b634e487b7160e01b84526032600452602484fd5b6107e3906104ae60405163095ea7b360e01b6020820152737a250d5630b4cf539739df2c5dacb4c659f2488d6024820152856044820152604481526104ae60648261179f565b386105a9565b5073f19308f923582a6f7c465e5ce7a9dc1bec6665b13b15156105a3565b805180159250821561081c575b50503861059c565b61082f9250602080918301019101611a55565b3880610814565b50506020813d602011610864575b816108516020938361179f565b8101031261039d57816105309151610526565b3d9150610844565b6040513d85823e3d90fd5b631e9acf1760e31b8252600482fd5b63b0782df760e01b8252600482fd5b6282b42960e81b8152600490fd5b503233141561042a565b5034610215576020366003190112610215576004356001600160a01b0381169081900361028b5760408260ff9260209452600b84522054166040519015158152f35b503461021557806003193601126102155760206001600160401b03600a5460401c16604051908152f35b5034610215578060031936011261021557602061ffff600a5460901c16604051908152f35b503461021557806003193601126102155760055481906001600160a01b0316803b1561099a5781809160046040518094819363688b88d160e11b83525af18015610759576109895750f35b816109939161179f565b6102155780f35b50fd5b50346102155780600319360112610215576020600854604051908152f35b5034610215576040366003190112610215576004356001600160401b03811161028b573660238201121561028b5780600401356001600160401b038111610755573660248260051b84010111610755576024359182151580930361073d57610a24929192611941565b60ff849216915b83811015610a73576024600582901b830101356001600160a01b0381169190829003610a6f57908552600b60205260408520805460ff191684179055600101610a2b565b8580fd5b8480f35b5034610215578060031936011261021557602060405168d8d726b7177a8000008152f35b5034610215576020366003190112610215576004356001600160a01b0381169081900361028b57610aca611941565b8015610ae6576001600160601b0360a01b600554161760055580f35b63d92e233d60e01b8252600482fd5b503461021557806003193601126102155760206001600160401b03600a5416604051908152f35b503461021557602036600319011261021557333b15801590610bf2575b61089557600080516020611b2c8339815191523b156102155760405163c36e60a960e01b81528190818160048183600080516020611b2c8339815191525af1801561075957610bdd575b5050600080516020611b2c8339815191523b156102155760405163260270c760e01b8152306004808301919091523560248201528190818160448183600080516020611b2c8339815191525af18015610759576109895750f35b81610be79161179f565b610215578038610b83565b5032331415610b39565b50346102155760203660031901126102155760043561ffff811680820361075557610c25611941565b8015908115610c65575b50610c5657600a805461ffff60901b191660909290921b61ffff60901b1691909117905580f35b632b0039c760e21b8252600482fd5b6103e891501138610c2f565b50346102155780600319360112610215576004546040516001600160a01b039091168152602090f35b503461021557602036600319011261021557600435610cb7611941565b80156103fe5760085580f35b5034610215578060031936011261021557546040516001600160a01b039091168152602090f35b50346102155760203660031901126102155760043561ffff811680820361075557610d13611941565b8015908115610d44575b50610c5657600a805461ffff60a01b191660a09290921b61ffff60a01b1691909117905580f35b6103e891501138610d1d565b5034610215578060031936011261021557600154336001600160a01b0390911603610dc257600180546001600160a01b0319908116909155815433918116821783556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b63118cdaa760e01b815233600452602490fd5b50346102155760203660031901126102155760043561ffff811680820361075557610dfe611941565b8015908115610e2f575b50610c5657600a805461ffff60801b191660809290921b61ffff60801b1691909117905580f35b6103e891501138610e08565b5034610215578060031936011261021557610e54611941565b600180546001600160a01b03199081169091558154908116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5034610215578060031936011261021557610eb96119a5565b333b15801590610fca575b6108955747801561087757610ee261ffff600a5460b01c1682611987565b90610ef5610ef08383611934565b61196a565b610f02610ef08484611934565b90804710610fb7578480808084732614f29c39de46468a921fd0b41fdd99a01f2edf5af1610f2e6119c5565b5015610fa85791610f70826104c8610f7c9695610f58610f769660018060a01b0360035416611a04565b6004546001600160a01b0316946104c8908890611934565b90611a04565b33611a04565b7f5da5f5ab15b3f7ce29e57210ae89068218f2196e9df956cf8b0586b0d65205528180a1600160025580f35b630a12f52160e11b8552600485fd5b63cd78605960e01b855230600452602485fd5b5032331415610ec4565b5034610215578060031936011261021557602061ffff600a5460a01c16604051908152f35b50346102155780600319360112610215576020600754604051908152f35b50346102155780600319360112610215576110306119a5565b333b15801590611145575b61089557600554604051631847200f60e11b8152306004820152906001600160a01b0316602082602481845afa91821561086c578392611111575b508115611102578083913b1561028b5781809160046040518094819363372500ab60e01b83525af18015610759576110ed575b506110c1610f768361ffff600a5460a01c1690611987565b7ffed0941ce691f3fb8248f283008cdad08fc01c94049d909957afe080b19e60408180a1600160025580f35b816110f79161179f565b61028b5781386110a9565b6312d37ee560e31b8352600483fd5b9091506020813d60201161113d575b8161112d6020938361179f565b8101031261039d57519038611076565b3d9150611120565b503233141561103b565b50346102155780600319360112610215576111686119a5565b333b15801590611296575b6108955760405163cf9a336160e01b8152306004820152602081602481600080516020611b2c8339815191525afa908115610759578291611264575b50801561125557600080516020611b2c8339815191523b1561028b576040516360484f1b60e01b81528290818160048183600080516020611b2c8339815191525af1801561075957611240575b50611214610f768361ffff600a5460a01c1690611987565b7f3158952e7c791deb52750003dbcb0fb942106f2bcd1005fb946a83cd6646fdc48180a1600160025580f35b8161124a9161179f565b61028b5781386111fc565b6312d37ee560e31b8252600482fd5b90506020813d60201161128e575b8161127f6020938361179f565b8101031261039d5751386111af565b3d9150611272565b5032331415611173565b5034610215576020366003190112610215576004356001600160a01b0381169081900361028b576112cf611941565b8015610ae6576001600160601b0360a01b600354161760035580f35b50346102155780600319360112610215576005546040516001600160a01b039091168152602090f35b5034610215578060031936011261021557333b15801590611602575b6108955761133c6117f9565b9068d8d726b7177a80000082106115ed575b50426007556113bc6104a06113a261137961137261ffff600a5460901c1686611987565b8095611934565b60405163a9059cbb60e01b60208201523360248201526044810195909552939182906064820190565b73fcd7ccee4071aa4ecfac1683b7cc0afecaf42a36611a6d565b604051636eb1769f60e11b8152306004820152600080516020611b2c833981519152602482015260208160448173fcd7ccee4071aa4ecfac1683b7cc0afecaf42a365afa801561086c57829084906115b7575b61141992506117d6565b828060405192602084019063095ea7b360e01b8252600080516020611b2c833981519152602486015260448501526044845261145660648561179f565b8351908273fcd7ccee4071aa4ecfac1683b7cc0afecaf42a365af16114796119c5565b81611588575b508061156a575b15611524575b50600080516020611b2c8339815191523b1561028b57604051906304010c0360e01b82526004820152610b48602482015281808260448183600080516020611b2c8339815191525af1801561151757611507575b7fde20bc92f9195457f9ba0ec9258c42c0814617c756a597287307a20494e839928180a180f35b6115109161179f565b38816114e0565b50604051903d90823e3d90fd5b611564906113a260405163095ea7b360e01b6020820152600080516020611b2c8339815191526024820152856044820152604481526113a260648261179f565b3861148c565b5073fcd7ccee4071aa4ecfac1683b7cc0afecaf42a363b1515611486565b805180159250821561159d575b50503861147f565b6115b09250602080918301019101611a55565b3880611595565b50506020813d6020116115e5575b816115d26020938361179f565b810103126107555781611419915161140f565b3d91506115c5565b4210610886576009548110610877573861134e565b5032331415611330565b50346102155780600319360112610215576040611627611895565b82519182526020820152f35b503461021557806003193601126102155760406116276117f9565b5034610215576020366003190112610215576004356001600160401b0381168082036107555761167c611941565b156103fe5767ffffffffffffffff60401b600a549160401b169067ffffffffffffffff60401b191617600a5580f35b5034610215576020366003190112610215576004356001600160a01b0381169081900361028b576116da611941565b8015610ae6576001600160601b0360a01b600454161760045580f35b50346102155760203660031901126102155760043561ffff81168082036107555761171f611941565b8015908115611750575b50610c5657600a805461ffff60b01b191660b09290921b61ffff60b01b1691909117905580f35b6103e891501138611729565b50346102155780600319360112610215576020600654604051908152f35b90503461028b578160031936011261028b576003546001600160a01b03168152602090f35b90601f801991011681019081106001600160401b038211176117c057604052565b634e487b7160e01b600052604160045260246000fd5b919082018092116117e357565b634e487b7160e01b600052601160045260246000fd5b6040516370a0823160e01b815230600482015260208160248173fcd7ccee4071aa4ecfac1683b7cc0afecaf42a365afa90811561188957600091611857575b506118546007546001600160401b03600a5460401c16906117d6565b91565b90506020813d602011611881575b816118726020938361179f565b8101031261039d575138611838565b3d9150611865565b6040513d6000823e3d90fd5b6040516370a0823160e01b815230600482015260208160248173f19308f923582a6f7c465e5ce7a9dc1bec6665b15afa90811561188957600091611902575b5060085490818111156118fb57505b6118546006546001600160401b03600a5416906117d6565b90506118e3565b906020823d60201161192c575b8161191c6020938361179f565b81010312610215575051386118d4565b3d915061190f565b919082039182116117e357565b6000546001600160a01b0316330361195557565b63118cdaa760e01b6000523360045260246000fd5b61106881029080820461106814901517156117e357612710900490565b9061ffff16908181029181830414901517156117e357612710900490565b60028054146119b45760028055565b633ee5aeb560e01b60005260046000fd5b3d156119ff573d906001600160401b0382116117c057604051916119f3601f8201601f19166020018461179f565b82523d6000602084013e565b606090565b814710611a40576000918291829182916001600160a01b03165af1611a276119c5565b5015611a2f57565b630a12f52160e11b60005260046000fd5b63cd78605960e01b6000523060045260246000fd5b9081602091031261039d5751801515810361039d5790565b600080611a969260018060a01b03169360208151910182865af1611a8f6119c5565b9083611adb565b8051908115159182611ac0575b5050611aac5750565b635274afe760e01b60005260045260246000fd5b611ad39250602080918301019101611a55565b153880611aa3565b90611af05750805115611a2f57805190602001fd5b81511580611b22575b611b01575090565b639996b31560e01b60009081526001600160a01b0391909116600452602490fd5b50803b15611af956fe000000000000000000000000bc0043bc5b0c394d9d05d49768f9548f8cf9587ba26469706673582212209f188ca5ad499cc421ee237e4d215d19915da5ddfcfda3a79f5b77ba186171ca64736f6c634300081a0033

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

0000000000000000000000007e7061905e6105eb6b2c8bac5bb44733d5a02d1a0000000000000000000000003d5f85548419f784c67903301cc59111681c042600000000000000000000000015e5b9b9adf208cc7ca3ae1e6a49506eb5f397dd

-----Decoded View---------------
Arg [0] : _owner (address): 0x7e7061905E6105eB6b2c8BaC5BB44733d5A02d1a
Arg [1] : _heliosBuyBurn (address): 0x3D5F85548419f784c67903301CC59111681c0426
Arg [2] : _heliosTreasury (address): 0x15E5B9B9Adf208cC7CA3aE1e6a49506eB5f397Dd

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000007e7061905e6105eb6b2c8bac5bb44733d5a02d1a
Arg [1] : 0000000000000000000000003d5f85548419f784c67903301cc59111681c0426
Arg [2] : 00000000000000000000000015e5b9b9adf208cc7ca3ae1e6a49506eb5f397dd


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

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