Contract

0x4d8C24Ab68B5C32c38BC39ab841B6cCE454C03aD

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Harvest21569392025-01-01 12:29:1813 mins ago1735734558IN
0x4d8C24Ab...E454C03aD
0 S0.001145231.1
Harvest21478282025-01-01 10:14:182 hrs ago1735726458IN
0x4d8C24Ab...E454C03aD
0 S0.001166191.1
Harvest21404362025-01-01 7:44:184 hrs ago1735717458IN
0x4d8C24Ab...E454C03aD
0 S0.001318921.1
Harvest21330512025-01-01 4:59:187 hrs ago1735707558IN
0x4d8C24Ab...E454C03aD
0 S0.001294021.1
Harvest21260252025-01-01 2:29:1810 hrs ago1735698558IN
0x4d8C24Ab...E454C03aD
0 S0.001196291.1
Harvest21148172024-12-31 22:44:1713 hrs ago1735685057IN
0x4d8C24Ab...E454C03aD
0 S0.001227511.1
Harvest21016712024-12-31 18:29:1718 hrs ago1735669757IN
0x4d8C24Ab...E454C03aD
0 S0.001151141.1
Harvest20936922024-12-31 16:14:1820 hrs ago1735661658IN
0x4d8C24Ab...E454C03aD
0 S0.001067251.1
Harvest20865012024-12-31 14:14:1822 hrs ago1735654458IN
0x4d8C24Ab...E454C03aD
0 S0.001242561.1
Harvest20773912024-12-31 11:44:1824 hrs ago1735645458IN
0x4d8C24Ab...E454C03aD
0 S0.001181241.1
Harvest20699372024-12-31 9:29:1827 hrs ago1735637358IN
0x4d8C24Ab...E454C03aD
0 S0.001102371.1
Harvest20635352024-12-31 7:29:1829 hrs ago1735630158IN
0x4d8C24Ab...E454C03aD
0 S0.00125761.1
Harvest20571852024-12-31 4:59:1831 hrs ago1735621158IN
0x4d8C24Ab...E454C03aD
0 S0.001318921.1
Harvest20504132024-12-31 2:29:1834 hrs ago1735612158IN
0x4d8C24Ab...E454C03aD
0 S0.001181241.1
Harvest20495262024-12-31 2:14:1834 hrs ago1735611258IN
0x4d8C24Ab...E454C03aD
0 S0.001459181.1
Harvest20411762024-12-30 23:44:1836 hrs ago1735602258IN
0x4d8C24Ab...E454C03aD
0 S0.001166191.1
Harvest20302032024-12-30 21:17:2639 hrs ago1735593446IN
0x4d8C24Ab...E454C03aD
0 S0.001211471.1
Harvest20221862024-12-30 18:57:1141 hrs ago1735585031IN
0x4d8C24Ab...E454C03aD
0 S0.001413911.11
Harvest20144742024-12-30 16:59:3643 hrs ago1735577976IN
0x4d8C24Ab...E454C03aD
0 S0.001181241.1
Harvest20017762024-12-30 14:29:1846 hrs ago1735568958IN
0x4d8C24Ab...E454C03aD
0 S0.001217371.1
Harvest19875182024-12-30 11:59:172 days ago1735559957IN
0x4d8C24Ab...E454C03aD
0 S0.001257611.1
Harvest19752162024-12-30 9:29:182 days ago1735550958IN
0x4d8C24Ab...E454C03aD
0 S0.001155351.1
Harvest19678272024-12-30 7:29:262 days ago1735543766IN
0x4d8C24Ab...E454C03aD
0 S0.001257611.1
Harvest19607162024-12-30 5:14:202 days ago1735535660IN
0x4d8C24Ab...E454C03aD
0 S0.001070631.1
Harvest19543042024-12-30 3:14:182 days ago1735528458IN
0x4d8C24Ab...E454C03aD
0 S0.001160771.1
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Blacksail_Equal_Strategy

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 14 : Blacksail_Equal_Strategy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Pausable.sol';
import './Equalizer_Interface.sol';

contract Blacksail_Equal_Strategy is Ownable, Pausable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    uint256 public immutable MAX = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

    // Tokens
    IERC20 public immutable native_token = IERC20(0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38);
    address public reward_token;
    address public staking_token;
    address public deposit_token;
    address public lp0;
    address public lp1;

    // Fee structure
    uint256 public WITHDRAWAL_MAX = 100000;
    uint256 public WITHDRAW_FEE = 100;     
    uint256 public DIVISOR = 1000;
    uint256 public CALL_FEE = 100;          
    uint256 public FEE_BATCH = 900;       
    uint256 public PLATFORM_FEE = 45;      

    // Third Party Addresses
    address public rewardPool;
    address public unirouter;

    // Information
    uint256 public lastHarvest;
    bool public harvestOnDeposit;

    // Platform Addresses
    address public vault;
    address public treasury;

    // Routes
    IEqualizer.Route[] public rewardToNative;
    IEqualizer.Route[] public nativeToLp0;
    IEqualizer.Route[] public nativeToLp1;
    address[] public rewards;
    uint256 public slippageTolerance;

    event Deposit(uint256 amount);
    event Withdraw(uint256 amount);
    event Harvest(address indexed harvester);
    event ChargeFees(uint256 callFee, uint256 protocolFee);
    event SetVault(address indexed newVault);
    event SetWithdrawalFee(uint256 newFee);
    event SetSlippageTolerance(uint256 newTolerance);

    /**
    * @dev Constructor to initialize the strategy contract.
    * @param _staking_token The token to be staked in the third-party farm.
    * @param _rewardPool The address of the reward pool where staking and rewards occur.
    * @param _unirouter The address of the Uniswap V2/V3 router for token swaps.
    * @param _harvestOnDeposit Boolean to enable or disable reward harvesting during deposits.
    * @param _rewardToNative The path for swapping rewards to the native token, using IEqualizer routes.
    *
    * This constructor:
    * - Sets up the core token and contract addresses for staking, rewards, and routing.
    * - Enables or disables harvest-on-deposit, with a default withdrawal fee of 0 if enabled.
    * - Defines the reward-to-native token conversion path for liquidity and fee operations.
    * - Grants initial token allowances to external contracts. */

    constructor (
        address _staking_token,
        address _rewardPool,
        address _rewardToken,
        address _unirouter,
        bool _harvestOnDeposit,
        address _treasury,
        IEqualizer.Route[] memory _rewardToNative,
        IEqualizer.Route[] memory _nativeToLp0,
        IEqualizer.Route[] memory _nativeToLp1
    ) Ownable(msg.sender) {

        staking_token = _staking_token;
        rewardPool = _rewardPool;
        reward_token = _rewardToken;

        rewardToNative = _rewardToNative;
        nativeToLp0 = _nativeToLp0;
        nativeToLp1 = _nativeToLp1;

        lp0 = nativeToLp0[0].to;
        lp1 = nativeToLp1[0].to;

        unirouter = _unirouter;
        treasury = _treasury;

        harvestOnDeposit = _harvestOnDeposit;

        rewards.push(reward_token);

        if (harvestOnDeposit) {
            setWithdrawalFee(0);
        }
    }

    /** @dev Sets the vault connected to this strategy */
    function setVault(address _vault) external onlyOwner {
        require(isContract(_vault), "Vault must be a contract");
        require(vault == address(0), "Vault already set");
        
        vault = _vault;
        _giveAllowances();
        emit SetVault(_vault);
    }

    /** @dev Function to synchronize balances before new user deposit. Can be overridden in the strategy. */
    function beforeDeposit() external virtual {
        if (harvestOnDeposit) {
            require(msg.sender == vault, "Vault deposit only");
            _harvest(address(this));
        }
    }

    
    /** @dev Deposits funds into third party farm */
    function deposit() public onlyAuthorized whenNotPaused {
        _deposit();
    }

    function _deposit() internal {
        uint256 staking_balance = IERC20(staking_token).balanceOf(address(this));

        if (staking_balance > 0) {
           IEqualizerPool(rewardPool).deposit(staking_balance);
        } 
    }

    /**
    * @dev Withdraws a specified amount of staking tokens to the vault. 
    * Handles balance retrieval from the reward pool if needed and deducts withdrawal fees if applicable.
    * 
    * @param _amount The amount of staking tokens to withdraw.
    *
    * Requirements:
    * - Can only be called by the vault.
    * - If not the owner and contract is not paused, a withdrawal fee is deducted unless `harvestOnDeposit` is enabled.
    *
    * Emits a {Withdraw} event with the updated strategy balance. */

    function withdraw(uint256 _amount) external nonReentrant {
        require(msg.sender == vault, "!vault");

        uint256 stakingBal = IERC20(staking_token).balanceOf(address(this));

        if (stakingBal < _amount) {
            IEqualizerPool(rewardPool).withdraw(_amount - stakingBal);
            stakingBal = IERC20(staking_token).balanceOf(address(this));
        }           
 
        if (stakingBal > _amount) {
            stakingBal = _amount;
        }

        uint256 wFee = (stakingBal * WITHDRAW_FEE) / WITHDRAWAL_MAX;

        if (!paused() && !harvestOnDeposit) {
            stakingBal = stakingBal - wFee;
        }

        IERC20(staking_token).safeTransfer(vault, stakingBal);

        emit Withdraw(balanceOf());
    }

    /**
    * @dev Triggers the harvest process to compound earnings.
    * Internally calls `_harvest` to collect rewards, charge fees, add liquidity, and reinvest. */

    function harvest() external {
        require(!isContract(msg.sender) || msg.sender == vault, "!auth Contract Harvest");
        _harvest(msg.sender);
    }

    /** @dev Compounds the strategy's earnings and charges fees */
    function _harvest(address caller) internal whenNotPaused {
        
        IEqualizerPool(rewardPool).getReward(address(this), rewards);
        uint256 rewardAmt = IERC20(reward_token).balanceOf(address(this));

        if (rewardAmt > 0){
            chargeFees(caller);
            addLiquidity();
            _deposit();
        }

        lastHarvest = block.timestamp;
        emit Harvest(msg.sender);
    }

    /** @dev This function converts all funds to WFTM, charges fees, and sends fees to respective accounts */
    function chargeFees(address caller) internal {                  
        uint256 toNative = IERC20(reward_token).balanceOf(address(this));

        IEqualizer(unirouter).swapExactTokensForTokensSupportingFeeOnTransferTokens(toNative, 0, rewardToNative, address(this), block.timestamp);
        
        uint256 nativeBal = IERC20(native_token).balanceOf(address(this));

        uint256 platformFee = (nativeBal * PLATFORM_FEE) / DIVISOR;
        uint256 callFeeAmount = (platformFee * CALL_FEE) / DIVISOR;
        uint256 treasuryFee = platformFee - callFeeAmount;

        if (caller != address(this)) {
            IERC20(native_token).safeTransfer(caller, callFeeAmount);
        }
        
        IERC20(native_token).safeTransfer(treasury, treasuryFee);

        emit ChargeFees(callFeeAmount, platformFee);
    }

    /**
    * @dev Adds liquidity by converting native tokens to the deposit token and forwarding them to the ICHI Vault.
    * 
    * - Checks for sufficient native token balance.
    * - Converts native tokens to the deposit token using the Uniswap V3 router if required.
    * - Approves the necessary allowances for the Uniswap V3 router.
    * - Forwards the converted deposit tokens to the ICHI Vault for staking.
    *
    * Requirements:
    * - The contract must have a positive balance of the native token. */

    function addLiquidity() internal {
        uint256 half = IERC20(native_token).balanceOf(address(this)) / 2;

        if (half > 0) {
            if (address(native_token) != lp0) {
                IEqualizer(unirouter).swapExactTokensForTokensSupportingFeeOnTransferTokens(
                    half, 
                    0, 
                    nativeToLp0, 
                    address(this), 
                    block.timestamp
                );
            }

            if (address(native_token) != lp1) {
                IEqualizer(unirouter).swapExactTokensForTokensSupportingFeeOnTransferTokens(
                    half, 
                    0, 
                    nativeToLp1, 
                    address(this), 
                    block.timestamp
                );
            }

            uint256 balLp0 = IERC20(lp0).balanceOf(address(this));
            uint256 balLp1 = IERC20(lp1).balanceOf(address(this));

            IEqualizer(unirouter).addLiquidity(
                lp0, 
                lp1, 
                false, 
                balLp0, 
                balLp1, 
                1, 
                1, 
                address(this), 
                block.timestamp
            );
        }
    }

    /** @dev Determines the amount of reward in WFTM upon calling the harvest function */
    function harvestCallReward() public view returns (uint256) {
        uint256 rewardBal = rewardsAvailable();
        uint256 nativeOut;
        if (rewardBal > 0) {
            (nativeOut, ) = IEqualizer(unirouter).getAmountOut(rewardBal, reward_token, address(native_token));
        }

        return (((nativeOut * PLATFORM_FEE) / DIVISOR) * CALL_FEE) / DIVISOR;
    }

    /** @dev Sets harvest on deposit to @param _harvestOnDeposit */
    function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyOwner {
        harvestOnDeposit = _harvestOnDeposit;

        if (harvestOnDeposit) {
            setWithdrawalFee(0);
        } else {
            setWithdrawalFee(10);
        }
    }

    /** @dev Returns the amount of rewards that are pending */
    function rewardsAvailable() public view returns (uint256) {
        return IEqualizerPool(rewardPool).earned(reward_token, address(this));
    }

    /** @dev calculate the total underlaying staking tokens held by the strat */
    function balanceOf() public view returns (uint256) {
        return balanceOfStakingToken() + balanceOfPool();
    }

    /** @dev it calculates how many staking tokens this contract holds */
    function balanceOfStakingToken() public view returns (uint256) {
        return IERC20(staking_token).balanceOf(address(this));
    }

    /** @dev it calculates how many staking tokens the strategy has working in the farm */
    function balanceOfPool() public view returns (uint256) {
        return IEqualizerPool(rewardPool).balanceOf(address(this));
    }

    /** @dev called as part of strat migration. Sends all the available funds back to the vault */
    function retireStrat() external {
        require(msg.sender == vault, "!vault");
        IEqualizerPool(rewardPool).withdraw(balanceOfPool());
        uint256 stakingBal = IERC20(staking_token).balanceOf(address(this));
        IERC20(staking_token).transfer(vault, stakingBal);
    }

    /** @dev Pauses the strategy contract */
    function pause() public onlyOwner {
        _pause();
        _removeAllowances();
    }

    /** @dev Unpauses the strategy contract */
    function unpause() external onlyOwner {
        _unpause();
        _giveAllowances();
        deposit();
    }

    /** @dev Gives allowances to spenders */
    function _giveAllowances() internal {
        IERC20(staking_token).approve(rewardPool, MAX);
        IERC20(reward_token).approve(unirouter, MAX);
        native_token.approve(unirouter, MAX);
        IERC20(lp0).approve(unirouter, MAX);
        IERC20(lp1).approve(unirouter, MAX);
    }

    /** @dev Removes allowances to spenders */
    function _removeAllowances() internal {
        IERC20(staking_token).approve(rewardPool, 0);
        IERC20(reward_token).approve(unirouter, 0);
        native_token.approve(unirouter, 0);
        IERC20(lp0).approve(unirouter, 0);
        IERC20(lp1).approve(unirouter, 0);
    }

    /**
    * @dev Sets the withdrawal fee for the strategy.
    *
    * - Ensures that the fee does not exceed 100 (representing 1%).
    * - Updates the `WITHDRAW_FEE` variable with the new fee value.
    *
    * Requirements:
    * - `fee` must be less than or equal to 100.
    *
    * @param fee The new withdrawal fee (scaled by 100,000 for precision). */

    function setWithdrawalFee(uint256 fee) internal {
        require(fee <= 100, "Fee too high");

        WITHDRAW_FEE = fee;
        emit SetWithdrawalFee(fee);
    }

    /**
    * @dev Allows the contract owner to set the slippage tolerance for token swaps.
    * This value is used to calculate the minimum acceptable output amount in swaps,
    * helping to mitigate the risks of slippage and unfavorable price changes.
    * 
    * Requirements:
    * - The caller must be the contract owner.
    * - The provided tolerance must be less than or equal to 1500 (representing a maximum of 15% slippage).
    * 
    * Emits:
    * - A {SetSlippageTolerance} event indicating the updated slippage tolerance.
    * 
    * @param _tolerance The new slippage tolerance value, scaled by 10,000 (e.g., 1500 = 15%).
    */
    function setSlippageTolerance(uint256 _tolerance) external onlyOwner {
        require(_tolerance <= 1500, "Invalid tolerance"); // Max 15%

        slippageTolerance = _tolerance;
        emit SetSlippageTolerance(slippageTolerance);
    }

    function isContract(address account) internal view returns (bool) {
        return account.code.length > 0;
    }

    modifier onlyAuthorized() {
        require(msg.sender == vault || msg.sender == address(this), "Not authorized, only Vault or Strategy");
        _;
    }
}

File 2 of 14 : Ownable.sol
// 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);
    }
}

File 3 of 14 : IERC1363.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

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

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

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

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 5 of 14 : 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";

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

File 7 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
import {Address} from "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 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 {
    /**
     * @dev An operation with an ERC-20 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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    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.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            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 silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

File 8 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @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 Errors.InsufficientBalance(address(this).balance, amount);
        }

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

    /**
     * @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
     * {Errors.FailedCall} 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 Errors.InsufficientBalance(address(this).balance, value);
        }
        (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 {Errors.FailedCall}) 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 {Errors.FailedCall} 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 {Errors.FailedCall}.
     */
    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
            assembly ("memory-safe") {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert Errors.FailedCall();
        }
    }
}

File 9 of 14 : Context.sol
// 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;
    }
}

File 10 of 14 : Errors.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of common custom errors used in multiple contracts
 *
 * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
 * It is recommended to avoid relying on the error API for critical functionality.
 *
 * _Available since v5.1._
 */
library Errors {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error InsufficientBalance(uint256 balance, uint256 needed);

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

    /**
     * @dev The deployment failed.
     */
    error FailedDeployment();

    /**
     * @dev A necessary precompile is missing.
     */
    error MissingPrecompile(address);
}

File 11 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

File 12 of 14 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 13 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.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 EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * 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;
    }
}

File 14 of 14 : Equalizer_Interface.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;

interface IEqualizer {
    // Routes
    struct Routes {
        address from;
        address to;
        bool stable;
    }

    struct Route {
        address from;
        address to;
        bool stable;
    }

    function addLiquidity(
        address tokenA,
        address tokenB,
        bool stable,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);

    function addLiquidityETH(
        address token,
        bool stable,
        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,
        bool stable,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);

    function removeLiquidityETH(
        address token,
        bool stable,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);

    function swapExactTokensForTokensSimple(
        uint amountIn,
        uint amountOutMin,
        address tokenFrom,
        address tokenTo,
        bool stable,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);

    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        Routes[] memory route,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);

     function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        Route[] calldata routes,
        address to,
        uint deadline
    ) external;

    function getAmountOut(
        uint amountIn,
        address tokenIn,
        address tokenOut
    ) external view returns (uint amount, bool stable);

    function getAmountsOut(uint amountIn, Route[] memory routes) external view returns (uint[] memory amounts);

    function quoteAddLiquidity(
        address tokenA,
        address tokenB,
        bool stable,
        uint amountADesired,
        uint amountBDesired
    ) external view returns (uint amountA, uint amountB, uint liquidity);

    function quoteAddLiquidity(
        address tokenA,
        address tokenB,
        bool stable,
        address _factory,
        uint amountADesired,
        uint amountBDesired
    ) external view returns (uint amountA, uint amountB, uint liquidity);

    function defaultFactory() external view returns (address);
}

interface IEqualizerPool {
    function deposit(uint256 amount) external;
    function withdraw(uint256 amount) external;
    function getReward(address user, address[] memory rewards) external;
    function earned(address token, address user) external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function stake() external view returns (address);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_staking_token","type":"address"},{"internalType":"address","name":"_rewardPool","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_unirouter","type":"address"},{"internalType":"bool","name":"_harvestOnDeposit","type":"bool"},{"internalType":"address","name":"_treasury","type":"address"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct IEqualizer.Route[]","name":"_rewardToNative","type":"tuple[]"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct IEqualizer.Route[]","name":"_nativeToLp0","type":"tuple[]"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct IEqualizer.Route[]","name":"_nativeToLp1","type":"tuple[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","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":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"callFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"protocolFee","type":"uint256"}],"name":"ChargeFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"harvester","type":"address"}],"name":"Harvest","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":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTolerance","type":"uint256"}],"name":"SetSlippageTolerance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newVault","type":"address"}],"name":"SetVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"SetWithdrawalFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"CALL_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_BATCH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PLATFORM_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWAL_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfStakingToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beforeDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deposit_token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestCallReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvestOnDeposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastHarvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lp0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lp1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nativeToLp0","outputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nativeToLp1","outputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"native_token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retireStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardToNative","outputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reward_token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_harvestOnDeposit","type":"bool"}],"name":"setHarvestOnDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tolerance","type":"uint256"}],"name":"setSlippageTolerance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slippageTolerance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"staking_token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unirouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234620006cf576200309d803803806200001d81620006d4565b928339810161012082820312620006cf576200003982620006fa565b906200004860208401620006fa565b916200005760408501620006fa565b936200006660608201620006fa565b9262000075608083016200070f565b956200008460a08401620006fa565b60c084015190966001600160401b03949091858111620006cf5784620000ac9183016200071d565b9360e0820151868111620006cf5781620000c89184016200071d565b95610100830151908111620006cf57620000e392016200071d565b943315620006b6576000543360018060a01b0382167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36001600160a81b0319163360ff60a01b1916176000556001805560001960805273039e2fb66102314ce7b64ce5ce3e5183bc94ad3860a052620186a0600755606460088190556103e8600955600a55610384600b55602d600c55600380546001600160a01b03199081166001600160a01b0393841617909155600d805482169383169390931790925560028054909216921691909117905580519068010000000000000000821162000459576012548260125580831062000662575b50602001601260005260206000206000915b838310620005fb5750505050805190680100000000000000008211620004595760135482601355808310620005a7575b50602001601360005260206000206000915b838310620005405750505050805190680100000000000000008211620004595760145482601455808310620004d6575b50602001601460005260206000206000915b8383106200046f575050505060135415620004435760136000527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a09154600580546001600160a01b0319166001600160a01b039290921691909117905560145415620004435760146000527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ed54600680546001600160a01b03199081166001600160a01b0393841617909155600e8054821693831693909317909255601180549092169281169290921790556010805492151560ff1660ff1993909316929092179091556002546015549116906801000000000000000081101562000459576001810180601555811015620004435760156000527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750180546001600160a01b031916909117905560105460ff166200040d575b6040516128a49081620007f9823960805181818161065601526125ee015260a0518181816108e301528181610ee00152818161150d01528181611cfc01528181611df701526126a40152f35b60006008557f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af602060405160008152a1620003c1565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8051805183546001600160a01b039182166001600160a01b03199091161784556020808301516001808701805460409096015160ff60a01b90151560a01b16929094166001600160a81b03199095169490941717909155930192600290920191016200026f565b6001600160ff1b0381811682036200052a57831683036200052a57601460005260206000209060011b8101908360011b015b8181106200051757506200025d565b6000808255600182015560020162000508565b634e487b7160e01b600052601160045260246000fd5b8051805183546001600160a01b039182166001600160a01b03199091161784556020808301516001808701805460409096015160ff60a01b90151560a01b16929094166001600160a81b03199095169490941717909155930192600290920191016200022d565b6001600160ff1b0381811682036200052a57831683036200052a57601360005260206000209060011b8101908360011b015b818110620005e857506200021b565b60008082556001820155600201620005d9565b8051805183546001600160a01b039182166001600160a01b03199091161784556020808301516001808701805460409096015160ff60a01b90151560a01b16929094166001600160a81b0319909516949094171790915593019260029092019101620001eb565b6001600160ff1b0381811682036200052a57831683036200052a57601260005260206000209060011b8101908360011b015b818110620006a35750620001d9565b6000808255600182015560020162000694565b604051631e4fbdf760e01b815260006004820152602490fd5b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200045957604052565b51906001600160a01b0382168203620006cf57565b51908115158203620006cf57565b81601f82011215620006cf5780516001600160401b0392909190838311620004595760209062000752828560051b01620006d4565b948286868152019183606080970286010194818611620006cf578401925b85841062000782575050505050505090565b8684830312620006cf576040908151908882019180831086841117620007e3578388938b9552620007b388620006fa565b8252620007c2848901620006fa565b84830152620007d38189016200070f565b9082015281520193019262000770565b60246000634e487b7160e01b81526041600452fdfe608060408181526004918236101561001657600080fd5b600092833560e01c918263025e30b014611fee575081630974632414611fc55781630e8fbb5a14611f495781631158808614611f2c578163117da1ee14611e9c578163171d218914611d7d578163257ae0de14611d545781632638c09e14611d2b57816327ced53714611ce75781632dc7d74c14611cbe5781632e1a7d4d14611a655781633410fe6e14611a4657816334fbc9a114611a275781633f4ba83a1461198c5781634641257d1461138b57816354518b1a1461136c578163573fef0a14610d48578163583bd47714610ca75781635c975abb14610c8257816361d027b314610c5957816366666aa914610c305781636817031b14610b19578163715018a614610abf578163722713f714610aa25781637b83fc1d14610a795781637ff8f1e914610a5c5781638456cb59146107ec5781638912cb8b146107c85781638cab0f99146107a05781638da5cb5b14610778578163951d6d20146107595781639bff5ddb1461073a578163d03153aa1461071b578163d0e30db014610679578163d49d51811461063e578163e7a7250a1461061a578163ed8501db14610579578163f1a392da1461055a578163f2fde38b146104c1578163f301af421461046a578163fb617787146102d1578163fbe751521461022d575063fbfa77cf146101fe57600080fd5b34610229578160031936011261022957601054905160089190911c6001600160a01b03168152602090f35b5080fd5b839150346102295760203660031901126102295735906012548210156102ce5750601260005260011b7fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34448101547fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34459091015491516001600160a01b039182168152908216602082015260ff60a09290921c9190911615156040820152606090f35b80fd5b9190503461046657826003193601126104665760018060a01b03906102fe8260105460081c16331461216e565b8382600d541661030c612589565b813b156104665782916024839286519485938492632e1a7d4d60e01b84528b8401525af1801561045c57610444575b505081600354168151906370a0823160e01b82523085830152856020948584602481865afa93841561043a5782946103fe575b50601054855163a9059cbb60e01b81526001600160a01b0360089290921c9092161696810196875260208701939093529194849286929183919082906040015b03925af19081156103f557506103c2578280f35b81813d83116103ee575b6103d68183612081565b81010312610229576103e7906124ab565b5038808280f35b503d6103cc565b513d85823e3d90fd5b93509190508483813d8111610433575b6104188183612081565b8101031261042e579151919086906103ae61036e565b600080fd5b503d61040e565b85513d84823e3d90fd5b61044d90612057565b61045857833861033b565b8380fd5b83513d84823e3d90fd5b8280fd5b90503461046657602036600319011261046657356015548110156104665760156020935260018060a01b03907f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750154169051908152f35b91905034610466576020366003190112610466576001600160a01b03823581811693919290849003610556576104f561200a565b8315610540575050600054826bffffffffffffffffffffffff60a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8480fd5b505034610229578160031936011261022957602090600f549051908152f35b839150346102295760203660031901126102295735906014548210156102ce5750601460005260011b7fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec8101547fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ed9091015491516001600160a01b039182168152908216602082015260ff60a09290921c9190911615156040820152606090f35b5050346102295781600319360112610229576020906106376124b8565b9051908152f35b505034610229578160031936011261022957602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b919050346104665782600319360112610466576010543360089190911c6001600160a01b0316148015610712575b156106c057826106b5612036565b6106bd6120a3565b80f35b906020608492519162461bcd60e51b8352820152602660248201527f4e6f7420617574686f72697a65642c206f6e6c79205661756c74206f7220537460448201526572617465677960d01b6064820152fd5b503033146106a7565b5050346102295781600319360112610229576020906016549051908152f35b5050346102295781600319360112610229576020906008549051908152f35b505034610229578160031936011261022957602090600a549051908152f35b505034610229578160031936011261022957905490516001600160a01b039091168152602090f35b9050346104665782600319360112610466575490516001600160a01b03909116815260209150f35b50503461022957816003193601126102295760209060ff6010541690519015158152f35b9190503461046657826003193601126104665761080761200a565b61080f612036565b825460ff60a01b1916600160a01b1783558051338152602091907f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258908390a1600354600d54825163095ea7b360e01b8082526001600160a01b0392831682880152602482018890529195928590829060449082908b908b165af180156109b657610a28575b5085848660025416604488600e541687519485938492888452898401528160248401525af180156109b6576109f4575b5084600e54168351908282528382015286602482015284816044818a8a7f0000000000000000000000000000000000000000000000000000000000000000165af180156109b6576109c0575b5085848660055416604488600e541687519485938492888452898401528160248401525af180156109b6579085939291610979575b5060449087876006541697600e5416978651988995869485528401528160248401525af19081156103f557506103c2578280f35b909281813d83116109af575b61098f8183612081565b810103126109ab5784926109a46044926124ab565b5090610945565b8680fd5b503d610985565b84513d89823e3d90fd5b8481813d83116109ed575b6109d58183612081565b810103126109ab576109e6906124ab565b5038610910565b503d6109cb565b8481813d8311610a21575b610a098183612081565b810103126109ab57610a1a906124ab565b50386108c4565b503d6109ff565b8481813d8311610a55575b610a3d8183612081565b810103126109ab57610a4e906124ab565b5038610894565b503d610a33565b50503461022957816003193601126102295760209061063761254b565b50503461022957816003193601126102295760055490516001600160a01b039091168152602090f35b50503461022957816003193601126102295760209061063761252f565b83346102ce57806003193601126102ce57610ad861200a565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b9050346104665760203660031901126104665780356001600160a01b0381811693909290848303610c2c57610b4c61200a565b823b15610be957601054938460081c16610bb2575050610100600160a81b031990911660089190911b610100600160a81b031617601055610b8b6125c7565b7fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f308280a280f35b906020606492519162461bcd60e51b8352820152601160248201527015985d5b1d08185b1c9958591e481cd95d607a1b6044820152fd5b906020606492519162461bcd60e51b8352820152601860248201527f5661756c74206d757374206265206120636f6e747261637400000000000000006044820152fd5b8580fd5b505034610229578160031936011261022957600d5490516001600160a01b039091168152602090f35b50503461022957816003193601126102295760115490516001600160a01b039091168152602090f35b50503461022957816003193601126102295760ff6020925460a01c1690519015158152f35b839150346102295760203660031901126102295735906013548210156102ce5750601360005260011b7f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0908101547f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0919091015491516001600160a01b039182168152908216602082015260ff60a09290921c9190911615156040820152606090f35b9190503461046657826003193601126104665760105460ff8116610d6a578380f35b6001600160a01b039060081c8116330361133457610d86612036565b80600d541692833b15610556578483516331279d3d60e01b81526044810195308483015260249686888401526015548091526064830190601585527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec47590855b818110611319575050508391838381809403925af1801561043a57611305575b505060025483516370a0823160e01b80825230828501526020939288929086169085818a81855afa9081156111655784916112d4575b50610e79575b505050505050505042600f55337f188a622567eeca997c3d494fd65f76ca910b90a50a0c44d5e37b2ea5539e027b8280a23880808380f35b84889188519283809286825230898301525afa9081156111bf5783916112a3575b5085600e5416803b15610458578388518092818381610eca636cc1ae1360e01b988983528c42913091850161228c565b03925af180156111655790849161128f575b50507f000000000000000000000000000000000000000000000000000000000000000090868216918851848152308782015287818c81875afa90811561121d57908a92918791611258575b5090610f587f5c48b059bc2759d631bf4951f184f5641ca6db26a8ad956276910a01562d59b39392600c54906121c6565b610f94610f7d610f6b60095480946121d9565b92610f78600a54856121c6565b6121d9565b92610f8884846121a3565b908d60115416906121f9565b825191825289820152a18751838152308682015286818b81865afa90811561112a578591611227575b5060011c9182610fe7575b50505050505050505050610fda6120a3565b3880808080858180610e41565b876005541681036111c9575b87600654160361116f575b50508460055416938651828152308582015281818a81895afa908115611165578491611134575b508660065416928851908152308682015282818b81875afa92831561112a5785936110f0575b50509061012494939291606097600e54169289519a8b988997635a47ddc360e01b895288015286015283604486015260648501526084840152600160a4840152600160c48401523060e4840152426101048401525af19081156110e757506110bc575b808080808581808080610fc8565b606090813d81116110e0575b6110d28183612081565b810103126102ce57386110ae565b503d6110c8565b513d84823e3d90fd5b8092969550819493503d8311611123575b61110b8183612081565b8101031261042e57905191928892908061012461104b565b503d611101565b89513d87823e3d90fd5b809450828092503d831161115e575b61114d8183612081565b8101031261042e5788925138611025565b503d611143565b88513d86823e3d90fd5b86600e541691823b1561055657611199928592838b518096819582948352429030908d85016123f6565b03925af180156111bf5790839115610ffe576111b490612057565b610229578138610ffe565b87513d85823e3d90fd5b87600e5416803b15610c2c57858a5180928582528183816111f08d42908c30918501612341565b03925af1801561121d57908691611209575b5050610ff3565b61121290612057565b610556578438611202565b8a513d88823e3d90fd5b809550878092503d8311611251575b6112408183612081565b8101031261042e5789935138610fbd565b503d611236565b96505090508685813d8311611288575b6112728183612081565b8101031261042e5793518a948991610f58610f27565b503d611268565b61129890612057565b610466578238610edc565b809350858092503d83116112cd575b6112bc8183612081565b8101031261042e5787915138610e9a565b503d6112b2565b809450868092503d83116112fe575b6112ed8183612081565b8101031261042e5788925138610e3b565b503d6112e3565b61130e90612057565b610556578438610e05565b8254891684528b965060209093019260019283019201610de5565b815162461bcd60e51b815260208185015260126024820152715661756c74206465706f736974206f6e6c7960701b6044820152606490fd5b5050346102295781600319360112610229576020906007549051908152f35b91905034610466578260031936011261046657333b158015611972575b15611936576113b5612036565b600d546001600160a01b0390811692833b15610556578483516331279d3d60e01b81526044810195308483015260249686888401526015548091526064830190601585527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec47590855b81811061191b575050508391838381809403925af1801561043a57611907575b505060025483516370a0823160e01b80825230828501526020939288929086169085818a81855afa9081156111655784916118d6575b506114a6575b8242600f55337f188a622567eeca997c3d494fd65f76ca910b90a50a0c44d5e37b2ea5539e027b8280a280f35b84889188519283809286825230898301525afa9081156111bf5783916118a5575b5085600e5416803b156104585783885180928183816114f7636cc1ae1360e01b988983528c42913091850161228c565b03925af1801561116557908491611891575b50507f000000000000000000000000000000000000000000000000000000000000000090868216918851848152308782015287818c81875afa90811561121d57908a9291879161185a575b50906115857f5c48b059bc2759d631bf4951f184f5641ca6db26a8ad956276910a01562d59b39392600c54906121c6565b6115b7611598610f6b60095480946121d9565b926115a384846121a3565b9030330361184a575b8d60115416906121f9565b825191825289820152a18751838152308682015286818b81865afa90811561112a578591611819575b5060011c918261160a575b505050505050505050506115fd6120a3565b3880808080858180611479565b876005541681036117c5575b876006541603611775575b50508460055416938651828152308582015281818a81895afa908115611165578491611744575b508660065416928851908152308682015282818b81875afa92831561112a57859361170a575b50509061012494939291606097600e54169289519a8b988997635a47ddc360e01b895288015286015283604486015260648501526084840152600160a4840152600160c48401523060e4840152426101048401525af19081156110e757506116df575b8080808085818080806115eb565b606090813d8111611703575b6116f58183612081565b810103126102ce57386116d1565b503d6116eb565b8092969550819493503d831161173d575b6117258183612081565b8101031261042e57905191928892908061012461166e565b503d61171b565b809450828092503d831161176e575b61175d8183612081565b8101031261042e5788925138611648565b503d611753565b86600e541691823b156105565761179f928592838b518096819582948352429030908d85016123f6565b03925af180156111bf5790839115611621576117ba90612057565b610229578138611621565b87600e5416803b15610c2c57858a5180928582528183816117ec8d42908c30918501612341565b03925af1801561121d57908691611805575b5050611616565b61180e90612057565b6105565784386117fe565b809550878092503d8311611843575b6118328183612081565b8101031261042e57899351386115e0565b503d611828565b6118558533836121f9565b6115ac565b96505090508685813d831161188a575b6118748183612081565b8101031261042e5793518a948991611585611554565b503d61186a565b61189a90612057565b610466578238611509565b809350858092503d83116118cf575b6118be8183612081565b8101031261042e57879151386114c7565b503d6118b4565b809450868092503d8311611900575b6118ef8183612081565b8101031261042e5788925138611473565b503d6118e5565b61191090612057565b61055657843861143d565b8254891684528b96506020909301926001928301920161141d565b906020606492519162461bcd60e51b8352820152601660248201527508585d5d1a0810dbdb9d1c9858dd0812185c9d995cdd60521b6044820152fd5b506010543360089190911c6001600160a01b0316146113a8565b919050346104665782600319360112610466576119a761200a565b825460ff8160a01c1615611a195760ff60a01b1916835580513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a16119f16125c7565b6010543360089190911c6001600160a01b031614801561071257156106c057826106b5612036565b5051638dfc202b60e01b8152fd5b505034610229578160031936011261022957602090600c549051908152f35b5050346102295781600319360112610229576020906009549051908152f35b91905034610466576020908160031936011261045857823592600260015414611cb057600260015560018060a01b0393611aa78560105460081c16331461216e565b846003541683519285846024816370a0823160e01b9586825230868301525afa938415611c73578894611c7d575b508784848110611b8e575b50505050907f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d9482611b53938311611b86575b50611b2c611b23600854846121c6565b600754906121d9565b60ff885460a01c161580611b79575b611b68575b5060035460105460081c821691166121f9565b611b5b61252f565b9051908152a16001805580f35b611b7291926121a3565b9038611b40565b5060ff6010541615611b3b565b915038611b13565b909192939450611ba388600d541691866121a3565b90803b15610466576024839288519485938492632e1a7d4d60e01b8452888401525af18015611c7357611c60575b508490602487600354169386519485938492835230908301525afa908115611c56578691611c07575b509084611b538738611ae0565b9190508382813d8311611c4f575b611c1f8183612081565b8101031261042e5790517f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d611bfa565b503d611c15565b83513d88823e3d90fd5b96611c6c869298612057565b9690611bd1565b85513d8a823e3d90fd5b9093508581813d8311611ca9575b611c958183612081565b81010312611ca557519238611ad5565b8780fd5b503d611c8b565b9051633ee5aeb560e01b8152fd5b50503461022957816003193601126102295760035490516001600160a01b039091168152602090f35b505034610229578160031936011261022957517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50503461022957816003193601126102295760025490516001600160a01b039091168152602090f35b505034610229578160031936011261022957600e5490516001600160a01b039091168152602090f35b8284346102ce57806003193601126102ce57611d976124b8565b92819380611dcc575b602084610637611db388600c54906121c6565b610f78611dc360095480936121d9565b600a54906121c6565b600e546002548551635e1e632560e01b8152938401929092526001600160a01b0391821660248401527f0000000000000000000000000000000000000000000000000000000000000000821660448401529294509091839183916064918391165afa928315611e91578093611e4b575b5050610637611db36020611da0565b9092508183813d8311611e8a575b611e638183612081565b810103126102ce5750610637611db383611e82602080965192016124ab565b509350611e3c565b503d611e59565b8251903d90823e3d90fd5b9190503461046657602036600319011261046657813591611ebb61200a565b6105dc8311611ef65750816020917fe4a7fd2711237e77309a9a16ff636a748dbf956fd91f6e6da800d9302f441a799360165551908152a180f35b6020606492519162461bcd60e51b83528201526011602482015270496e76616c696420746f6c6572616e636560781b6044820152fd5b505034610229578160031936011261022957602090610637612589565b9050346104665760203660031901126104665735801515809103610466577f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af91602091611f9461200a565b60ff8019601054169116809117601055600014611fb7578360085551838152a180f35b600a60085551600a8152a180f35b50503461022957816003193601126102295760065490516001600160a01b039091168152602090f35b849034610229578160031936011261022957602090600b548152f35b6000546001600160a01b0316330361201e57565b60405163118cdaa760e01b8152336004820152602490fd5b60ff60005460a01c1661204557565b60405163d93c066560e01b8152600490fd5b67ffffffffffffffff811161206b57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761206b57604052565b6003546040516370a0823160e01b8152306004820152906001600160a01b03906020908390602490829085165afa91821561212f5760009261213b575b50816120ea575050565b600d541690813b1561042e5760009160248392604051948593849263b6b55f2560e01b845260048401525af1801561212f57612124575b50565b61212d90612057565b565b6040513d6000823e3d90fd5b90916020823d8211612166575b8161215560209383612081565b810103126102ce57505190386120e0565b3d9150612148565b1561217557565b60405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b6044820152606490fd5b919082039182116121b057565b634e487b7160e01b600052601160045260246000fd5b818102929181159184041417156121b057565b81156121e3570490565b634e487b7160e01b600052601260045260246000fd5b60405163a9059cbb60e01b60208083019182526001600160a01b039490941660248301526044808301959095529381529092600091612239606482612081565b519082855af11561212f576000513d61228357506001600160a01b0381163b155b6122615750565b604051635274afe760e01b81526001600160a01b039091166004820152602490fd5b6001141561225a565b909392919360a090818301908352602090600082850152604092808486015260125480925260c085019360126000527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec3444936000925b84841061230457505050505050906080919460018060a01b031660608201520152565b85546001600160a01b0390811688526001808801549182168985015290821c60ff16151588850152606090970196600290960195909301926122e1565b909392919360a090818301908352602090600082850152604092808486015260135480925260c085019360136000527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a090936000925b8484106123b957505050505050906080919460018060a01b031660608201520152565b85546001600160a01b0390811688526001808801549182168985015290821c60ff1615158885015260609097019660029096019590930192612396565b909392919360a090818301908352602090600082850152604092808486015260145480925260c085019360146000527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec936000925b84841061246e57505050505050906080919460018060a01b031660608201520152565b85546001600160a01b0390811688526001808801549182168985015290821c60ff161515888501526060909701966002909601959093019261244b565b5190811515820361042e57565b600d5460025460405163211dc32d60e01b81526001600160a01b0391821660048201523060248201529160209183916044918391165afa90811561212f57600091612501575090565b906020823d8211612527575b8161251a60209383612081565b810103126102ce57505190565b3d915061250d565b61253761254b565b61253f612589565b81018091116121b05790565b6003546040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa90811561212f57600091612501575090565b600d546040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa90811561212f57600091612501575090565b600354600d546040805163095ea7b360e01b8082526001600160a01b0393841660048301527f0000000000000000000000000000000000000000000000000000000000000000602483018190529594841693602093929091908481806044810103816000809a5af180156127c85761283a575b50600254600e5484518381529084166001600160a01b0316600482015260248101899052908590829085168189816044810103925af180156127c857612806575b50600e5483518281529083166001600160a01b03166004820152602481018890528481604481897f000000000000000000000000000000000000000000000000000000000000000088165af180156127c8576127d2575b50600554600e5484518381529084166001600160a01b0316600482015260248101899052908590829085168189816044810103925af180156127c857612788575b50600654600e54845192835283166001600160a01b03166004830152602482019790975294958391869116818681604481015b03925af19081156110e7575061275b57505050565b82813d8311612781575b61276f8183612081565b810103126102ce5750612121906124ab565b503d612765565b8481813d83116127c1575b61279d8183612081565b81010312610c2c57916127469697916127b686946124ab565b509197965091612713565b503d612793565b84513d88823e3d90fd5b8481813d83116127ff575b6127e78183612081565b81010312610c2c576127f8906124ab565b50386126d2565b503d6127dd565b8481813d8311612833575b61281b8183612081565b81010312610c2c5761282c906124ab565b503861267b565b503d612811565b8481813d8311612867575b61284f8183612081565b81010312610c2c57612860906124ab565b503861263a565b503d61284556fea26469706673582212200a438df2913ec13512e59d08bfac521a54fcaa7af2f552848ac9e747e8bf106464736f6c63430008140033000000000000000000000000bcbc5777537c0d0462fb82ba48eeb6cb361e853f000000000000000000000000f8f2462a8fa08df933c0d6bbaf34108fd7af526e000000000000000000000000ddf26b42c1d903de8962d3f79a74a501420d5f19000000000000000000000000cc6169aa1e879d3a4227536671f85afdb2d23fad00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000c16da76872131bc6095f73b894b4757873dace1000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ddf26b42c1d903de8962d3f79a74a501420d5f19000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3800000000000000000000000029219dd400f2bf60e5a23d13be72b486d403889400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3800000000000000000000000050c42deacd8fc9773493ed674b675be577f2634b0000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060408181526004918236101561001657600080fd5b600092833560e01c918263025e30b014611fee575081630974632414611fc55781630e8fbb5a14611f495781631158808614611f2c578163117da1ee14611e9c578163171d218914611d7d578163257ae0de14611d545781632638c09e14611d2b57816327ced53714611ce75781632dc7d74c14611cbe5781632e1a7d4d14611a655781633410fe6e14611a4657816334fbc9a114611a275781633f4ba83a1461198c5781634641257d1461138b57816354518b1a1461136c578163573fef0a14610d48578163583bd47714610ca75781635c975abb14610c8257816361d027b314610c5957816366666aa914610c305781636817031b14610b19578163715018a614610abf578163722713f714610aa25781637b83fc1d14610a795781637ff8f1e914610a5c5781638456cb59146107ec5781638912cb8b146107c85781638cab0f99146107a05781638da5cb5b14610778578163951d6d20146107595781639bff5ddb1461073a578163d03153aa1461071b578163d0e30db014610679578163d49d51811461063e578163e7a7250a1461061a578163ed8501db14610579578163f1a392da1461055a578163f2fde38b146104c1578163f301af421461046a578163fb617787146102d1578163fbe751521461022d575063fbfa77cf146101fe57600080fd5b34610229578160031936011261022957601054905160089190911c6001600160a01b03168152602090f35b5080fd5b839150346102295760203660031901126102295735906012548210156102ce5750601260005260011b7fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34448101547fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34459091015491516001600160a01b039182168152908216602082015260ff60a09290921c9190911615156040820152606090f35b80fd5b9190503461046657826003193601126104665760018060a01b03906102fe8260105460081c16331461216e565b8382600d541661030c612589565b813b156104665782916024839286519485938492632e1a7d4d60e01b84528b8401525af1801561045c57610444575b505081600354168151906370a0823160e01b82523085830152856020948584602481865afa93841561043a5782946103fe575b50601054855163a9059cbb60e01b81526001600160a01b0360089290921c9092161696810196875260208701939093529194849286929183919082906040015b03925af19081156103f557506103c2578280f35b81813d83116103ee575b6103d68183612081565b81010312610229576103e7906124ab565b5038808280f35b503d6103cc565b513d85823e3d90fd5b93509190508483813d8111610433575b6104188183612081565b8101031261042e579151919086906103ae61036e565b600080fd5b503d61040e565b85513d84823e3d90fd5b61044d90612057565b61045857833861033b565b8380fd5b83513d84823e3d90fd5b8280fd5b90503461046657602036600319011261046657356015548110156104665760156020935260018060a01b03907f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750154169051908152f35b91905034610466576020366003190112610466576001600160a01b03823581811693919290849003610556576104f561200a565b8315610540575050600054826bffffffffffffffffffffffff60a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8480fd5b505034610229578160031936011261022957602090600f549051908152f35b839150346102295760203660031901126102295735906014548210156102ce5750601460005260011b7fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec8101547fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ed9091015491516001600160a01b039182168152908216602082015260ff60a09290921c9190911615156040820152606090f35b5050346102295781600319360112610229576020906106376124b8565b9051908152f35b505034610229578160031936011261022957602090517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8152f35b919050346104665782600319360112610466576010543360089190911c6001600160a01b0316148015610712575b156106c057826106b5612036565b6106bd6120a3565b80f35b906020608492519162461bcd60e51b8352820152602660248201527f4e6f7420617574686f72697a65642c206f6e6c79205661756c74206f7220537460448201526572617465677960d01b6064820152fd5b503033146106a7565b5050346102295781600319360112610229576020906016549051908152f35b5050346102295781600319360112610229576020906008549051908152f35b505034610229578160031936011261022957602090600a549051908152f35b505034610229578160031936011261022957905490516001600160a01b039091168152602090f35b9050346104665782600319360112610466575490516001600160a01b03909116815260209150f35b50503461022957816003193601126102295760209060ff6010541690519015158152f35b9190503461046657826003193601126104665761080761200a565b61080f612036565b825460ff60a01b1916600160a01b1783558051338152602091907f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258908390a1600354600d54825163095ea7b360e01b8082526001600160a01b0392831682880152602482018890529195928590829060449082908b908b165af180156109b657610a28575b5085848660025416604488600e541687519485938492888452898401528160248401525af180156109b6576109f4575b5084600e54168351908282528382015286602482015284816044818a8a7f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38165af180156109b6576109c0575b5085848660055416604488600e541687519485938492888452898401528160248401525af180156109b6579085939291610979575b5060449087876006541697600e5416978651988995869485528401528160248401525af19081156103f557506103c2578280f35b909281813d83116109af575b61098f8183612081565b810103126109ab5784926109a46044926124ab565b5090610945565b8680fd5b503d610985565b84513d89823e3d90fd5b8481813d83116109ed575b6109d58183612081565b810103126109ab576109e6906124ab565b5038610910565b503d6109cb565b8481813d8311610a21575b610a098183612081565b810103126109ab57610a1a906124ab565b50386108c4565b503d6109ff565b8481813d8311610a55575b610a3d8183612081565b810103126109ab57610a4e906124ab565b5038610894565b503d610a33565b50503461022957816003193601126102295760209061063761254b565b50503461022957816003193601126102295760055490516001600160a01b039091168152602090f35b50503461022957816003193601126102295760209061063761252f565b83346102ce57806003193601126102ce57610ad861200a565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b9050346104665760203660031901126104665780356001600160a01b0381811693909290848303610c2c57610b4c61200a565b823b15610be957601054938460081c16610bb2575050610100600160a81b031990911660089190911b610100600160a81b031617601055610b8b6125c7565b7fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f308280a280f35b906020606492519162461bcd60e51b8352820152601160248201527015985d5b1d08185b1c9958591e481cd95d607a1b6044820152fd5b906020606492519162461bcd60e51b8352820152601860248201527f5661756c74206d757374206265206120636f6e747261637400000000000000006044820152fd5b8580fd5b505034610229578160031936011261022957600d5490516001600160a01b039091168152602090f35b50503461022957816003193601126102295760115490516001600160a01b039091168152602090f35b50503461022957816003193601126102295760ff6020925460a01c1690519015158152f35b839150346102295760203660031901126102295735906013548210156102ce5750601360005260011b7f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0908101547f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0919091015491516001600160a01b039182168152908216602082015260ff60a09290921c9190911615156040820152606090f35b9190503461046657826003193601126104665760105460ff8116610d6a578380f35b6001600160a01b039060081c8116330361133457610d86612036565b80600d541692833b15610556578483516331279d3d60e01b81526044810195308483015260249686888401526015548091526064830190601585527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec47590855b818110611319575050508391838381809403925af1801561043a57611305575b505060025483516370a0823160e01b80825230828501526020939288929086169085818a81855afa9081156111655784916112d4575b50610e79575b505050505050505042600f55337f188a622567eeca997c3d494fd65f76ca910b90a50a0c44d5e37b2ea5539e027b8280a23880808380f35b84889188519283809286825230898301525afa9081156111bf5783916112a3575b5085600e5416803b15610458578388518092818381610eca636cc1ae1360e01b988983528c42913091850161228c565b03925af180156111655790849161128f575b50507f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3890868216918851848152308782015287818c81875afa90811561121d57908a92918791611258575b5090610f587f5c48b059bc2759d631bf4951f184f5641ca6db26a8ad956276910a01562d59b39392600c54906121c6565b610f94610f7d610f6b60095480946121d9565b92610f78600a54856121c6565b6121d9565b92610f8884846121a3565b908d60115416906121f9565b825191825289820152a18751838152308682015286818b81865afa90811561112a578591611227575b5060011c9182610fe7575b50505050505050505050610fda6120a3565b3880808080858180610e41565b876005541681036111c9575b87600654160361116f575b50508460055416938651828152308582015281818a81895afa908115611165578491611134575b508660065416928851908152308682015282818b81875afa92831561112a5785936110f0575b50509061012494939291606097600e54169289519a8b988997635a47ddc360e01b895288015286015283604486015260648501526084840152600160a4840152600160c48401523060e4840152426101048401525af19081156110e757506110bc575b808080808581808080610fc8565b606090813d81116110e0575b6110d28183612081565b810103126102ce57386110ae565b503d6110c8565b513d84823e3d90fd5b8092969550819493503d8311611123575b61110b8183612081565b8101031261042e57905191928892908061012461104b565b503d611101565b89513d87823e3d90fd5b809450828092503d831161115e575b61114d8183612081565b8101031261042e5788925138611025565b503d611143565b88513d86823e3d90fd5b86600e541691823b1561055657611199928592838b518096819582948352429030908d85016123f6565b03925af180156111bf5790839115610ffe576111b490612057565b610229578138610ffe565b87513d85823e3d90fd5b87600e5416803b15610c2c57858a5180928582528183816111f08d42908c30918501612341565b03925af1801561121d57908691611209575b5050610ff3565b61121290612057565b610556578438611202565b8a513d88823e3d90fd5b809550878092503d8311611251575b6112408183612081565b8101031261042e5789935138610fbd565b503d611236565b96505090508685813d8311611288575b6112728183612081565b8101031261042e5793518a948991610f58610f27565b503d611268565b61129890612057565b610466578238610edc565b809350858092503d83116112cd575b6112bc8183612081565b8101031261042e5787915138610e9a565b503d6112b2565b809450868092503d83116112fe575b6112ed8183612081565b8101031261042e5788925138610e3b565b503d6112e3565b61130e90612057565b610556578438610e05565b8254891684528b965060209093019260019283019201610de5565b815162461bcd60e51b815260208185015260126024820152715661756c74206465706f736974206f6e6c7960701b6044820152606490fd5b5050346102295781600319360112610229576020906007549051908152f35b91905034610466578260031936011261046657333b158015611972575b15611936576113b5612036565b600d546001600160a01b0390811692833b15610556578483516331279d3d60e01b81526044810195308483015260249686888401526015548091526064830190601585527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec47590855b81811061191b575050508391838381809403925af1801561043a57611907575b505060025483516370a0823160e01b80825230828501526020939288929086169085818a81855afa9081156111655784916118d6575b506114a6575b8242600f55337f188a622567eeca997c3d494fd65f76ca910b90a50a0c44d5e37b2ea5539e027b8280a280f35b84889188519283809286825230898301525afa9081156111bf5783916118a5575b5085600e5416803b156104585783885180928183816114f7636cc1ae1360e01b988983528c42913091850161228c565b03925af1801561116557908491611891575b50507f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3890868216918851848152308782015287818c81875afa90811561121d57908a9291879161185a575b50906115857f5c48b059bc2759d631bf4951f184f5641ca6db26a8ad956276910a01562d59b39392600c54906121c6565b6115b7611598610f6b60095480946121d9565b926115a384846121a3565b9030330361184a575b8d60115416906121f9565b825191825289820152a18751838152308682015286818b81865afa90811561112a578591611819575b5060011c918261160a575b505050505050505050506115fd6120a3565b3880808080858180611479565b876005541681036117c5575b876006541603611775575b50508460055416938651828152308582015281818a81895afa908115611165578491611744575b508660065416928851908152308682015282818b81875afa92831561112a57859361170a575b50509061012494939291606097600e54169289519a8b988997635a47ddc360e01b895288015286015283604486015260648501526084840152600160a4840152600160c48401523060e4840152426101048401525af19081156110e757506116df575b8080808085818080806115eb565b606090813d8111611703575b6116f58183612081565b810103126102ce57386116d1565b503d6116eb565b8092969550819493503d831161173d575b6117258183612081565b8101031261042e57905191928892908061012461166e565b503d61171b565b809450828092503d831161176e575b61175d8183612081565b8101031261042e5788925138611648565b503d611753565b86600e541691823b156105565761179f928592838b518096819582948352429030908d85016123f6565b03925af180156111bf5790839115611621576117ba90612057565b610229578138611621565b87600e5416803b15610c2c57858a5180928582528183816117ec8d42908c30918501612341565b03925af1801561121d57908691611805575b5050611616565b61180e90612057565b6105565784386117fe565b809550878092503d8311611843575b6118328183612081565b8101031261042e57899351386115e0565b503d611828565b6118558533836121f9565b6115ac565b96505090508685813d831161188a575b6118748183612081565b8101031261042e5793518a948991611585611554565b503d61186a565b61189a90612057565b610466578238611509565b809350858092503d83116118cf575b6118be8183612081565b8101031261042e57879151386114c7565b503d6118b4565b809450868092503d8311611900575b6118ef8183612081565b8101031261042e5788925138611473565b503d6118e5565b61191090612057565b61055657843861143d565b8254891684528b96506020909301926001928301920161141d565b906020606492519162461bcd60e51b8352820152601660248201527508585d5d1a0810dbdb9d1c9858dd0812185c9d995cdd60521b6044820152fd5b506010543360089190911c6001600160a01b0316146113a8565b919050346104665782600319360112610466576119a761200a565b825460ff8160a01c1615611a195760ff60a01b1916835580513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a16119f16125c7565b6010543360089190911c6001600160a01b031614801561071257156106c057826106b5612036565b5051638dfc202b60e01b8152fd5b505034610229578160031936011261022957602090600c549051908152f35b5050346102295781600319360112610229576020906009549051908152f35b91905034610466576020908160031936011261045857823592600260015414611cb057600260015560018060a01b0393611aa78560105460081c16331461216e565b846003541683519285846024816370a0823160e01b9586825230868301525afa938415611c73578894611c7d575b508784848110611b8e575b50505050907f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d9482611b53938311611b86575b50611b2c611b23600854846121c6565b600754906121d9565b60ff885460a01c161580611b79575b611b68575b5060035460105460081c821691166121f9565b611b5b61252f565b9051908152a16001805580f35b611b7291926121a3565b9038611b40565b5060ff6010541615611b3b565b915038611b13565b909192939450611ba388600d541691866121a3565b90803b15610466576024839288519485938492632e1a7d4d60e01b8452888401525af18015611c7357611c60575b508490602487600354169386519485938492835230908301525afa908115611c56578691611c07575b509084611b538738611ae0565b9190508382813d8311611c4f575b611c1f8183612081565b8101031261042e5790517f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d611bfa565b503d611c15565b83513d88823e3d90fd5b96611c6c869298612057565b9690611bd1565b85513d8a823e3d90fd5b9093508581813d8311611ca9575b611c958183612081565b81010312611ca557519238611ad5565b8780fd5b503d611c8b565b9051633ee5aeb560e01b8152fd5b50503461022957816003193601126102295760035490516001600160a01b039091168152602090f35b505034610229578160031936011261022957517f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b03168152602090f35b50503461022957816003193601126102295760025490516001600160a01b039091168152602090f35b505034610229578160031936011261022957600e5490516001600160a01b039091168152602090f35b8284346102ce57806003193601126102ce57611d976124b8565b92819380611dcc575b602084610637611db388600c54906121c6565b610f78611dc360095480936121d9565b600a54906121c6565b600e546002548551635e1e632560e01b8152938401929092526001600160a01b0391821660248401527f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38821660448401529294509091839183916064918391165afa928315611e91578093611e4b575b5050610637611db36020611da0565b9092508183813d8311611e8a575b611e638183612081565b810103126102ce5750610637611db383611e82602080965192016124ab565b509350611e3c565b503d611e59565b8251903d90823e3d90fd5b9190503461046657602036600319011261046657813591611ebb61200a565b6105dc8311611ef65750816020917fe4a7fd2711237e77309a9a16ff636a748dbf956fd91f6e6da800d9302f441a799360165551908152a180f35b6020606492519162461bcd60e51b83528201526011602482015270496e76616c696420746f6c6572616e636560781b6044820152fd5b505034610229578160031936011261022957602090610637612589565b9050346104665760203660031901126104665735801515809103610466577f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af91602091611f9461200a565b60ff8019601054169116809117601055600014611fb7578360085551838152a180f35b600a60085551600a8152a180f35b50503461022957816003193601126102295760065490516001600160a01b039091168152602090f35b849034610229578160031936011261022957602090600b548152f35b6000546001600160a01b0316330361201e57565b60405163118cdaa760e01b8152336004820152602490fd5b60ff60005460a01c1661204557565b60405163d93c066560e01b8152600490fd5b67ffffffffffffffff811161206b57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761206b57604052565b6003546040516370a0823160e01b8152306004820152906001600160a01b03906020908390602490829085165afa91821561212f5760009261213b575b50816120ea575050565b600d541690813b1561042e5760009160248392604051948593849263b6b55f2560e01b845260048401525af1801561212f57612124575b50565b61212d90612057565b565b6040513d6000823e3d90fd5b90916020823d8211612166575b8161215560209383612081565b810103126102ce57505190386120e0565b3d9150612148565b1561217557565b60405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b6044820152606490fd5b919082039182116121b057565b634e487b7160e01b600052601160045260246000fd5b818102929181159184041417156121b057565b81156121e3570490565b634e487b7160e01b600052601260045260246000fd5b60405163a9059cbb60e01b60208083019182526001600160a01b039490941660248301526044808301959095529381529092600091612239606482612081565b519082855af11561212f576000513d61228357506001600160a01b0381163b155b6122615750565b604051635274afe760e01b81526001600160a01b039091166004820152602490fd5b6001141561225a565b909392919360a090818301908352602090600082850152604092808486015260125480925260c085019360126000527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec3444936000925b84841061230457505050505050906080919460018060a01b031660608201520152565b85546001600160a01b0390811688526001808801549182168985015290821c60ff16151588850152606090970196600290960195909301926122e1565b909392919360a090818301908352602090600082850152604092808486015260135480925260c085019360136000527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a090936000925b8484106123b957505050505050906080919460018060a01b031660608201520152565b85546001600160a01b0390811688526001808801549182168985015290821c60ff1615158885015260609097019660029096019590930192612396565b909392919360a090818301908352602090600082850152604092808486015260145480925260c085019360146000527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec936000925b84841061246e57505050505050906080919460018060a01b031660608201520152565b85546001600160a01b0390811688526001808801549182168985015290821c60ff161515888501526060909701966002909601959093019261244b565b5190811515820361042e57565b600d5460025460405163211dc32d60e01b81526001600160a01b0391821660048201523060248201529160209183916044918391165afa90811561212f57600091612501575090565b906020823d8211612527575b8161251a60209383612081565b810103126102ce57505190565b3d915061250d565b61253761254b565b61253f612589565b81018091116121b05790565b6003546040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa90811561212f57600091612501575090565b600d546040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa90811561212f57600091612501575090565b600354600d546040805163095ea7b360e01b8082526001600160a01b0393841660048301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602483018190529594841693602093929091908481806044810103816000809a5af180156127c85761283a575b50600254600e5484518381529084166001600160a01b0316600482015260248101899052908590829085168189816044810103925af180156127c857612806575b50600e5483518281529083166001600160a01b03166004820152602481018890528481604481897f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3888165af180156127c8576127d2575b50600554600e5484518381529084166001600160a01b0316600482015260248101899052908590829085168189816044810103925af180156127c857612788575b50600654600e54845192835283166001600160a01b03166004830152602482019790975294958391869116818681604481015b03925af19081156110e7575061275b57505050565b82813d8311612781575b61276f8183612081565b810103126102ce5750612121906124ab565b503d612765565b8481813d83116127c1575b61279d8183612081565b81010312610c2c57916127469697916127b686946124ab565b509197965091612713565b503d612793565b84513d88823e3d90fd5b8481813d83116127ff575b6127e78183612081565b81010312610c2c576127f8906124ab565b50386126d2565b503d6127dd565b8481813d8311612833575b61281b8183612081565b81010312610c2c5761282c906124ab565b503861267b565b503d612811565b8481813d8311612867575b61284f8183612081565b81010312610c2c57612860906124ab565b503861263a565b503d61284556fea26469706673582212200a438df2913ec13512e59d08bfac521a54fcaa7af2f552848ac9e747e8bf106464736f6c63430008140033

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

000000000000000000000000bcbc5777537c0d0462fb82ba48eeb6cb361e853f000000000000000000000000f8f2462a8fa08df933c0d6bbaf34108fd7af526e000000000000000000000000ddf26b42c1d903de8962d3f79a74a501420d5f19000000000000000000000000cc6169aa1e879d3a4227536671f85afdb2d23fad00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000c16da76872131bc6095f73b894b4757873dace1000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ddf26b42c1d903de8962d3f79a74a501420d5f19000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3800000000000000000000000029219dd400f2bf60e5a23d13be72b486d403889400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3800000000000000000000000050c42deacd8fc9773493ed674b675be577f2634b0000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _staking_token (address): 0xbCbC5777537c0D0462fb82BA48Eeb6cb361E853f
Arg [1] : _rewardPool (address): 0xf8F2462A8Fa08Df933C0d6bbaf34108Fd7af526E
Arg [2] : _rewardToken (address): 0xddF26B42C1d903De8962d3F79a74a501420d5F19
Arg [3] : _unirouter (address): 0xcC6169aA1E879d3a4227536671F85afdb2d23fAD
Arg [4] : _harvestOnDeposit (bool): True
Arg [5] : _treasury (address): 0x0c16Da76872131bC6095f73b894B4757873dAce1
Arg [6] : _rewardToNative (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [7] : _nativeToLp0 (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [8] : _nativeToLp1 (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
21 Constructor Arguments found :
Arg [0] : 000000000000000000000000bcbc5777537c0d0462fb82ba48eeb6cb361e853f
Arg [1] : 000000000000000000000000f8f2462a8fa08df933c0d6bbaf34108fd7af526e
Arg [2] : 000000000000000000000000ddf26b42c1d903de8962d3f79a74a501420d5f19
Arg [3] : 000000000000000000000000cc6169aa1e879d3a4227536671f85afdb2d23fad
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 0000000000000000000000000c16da76872131bc6095f73b894b4757873dace1
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [7] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [10] : 000000000000000000000000ddf26b42c1d903de8962d3f79a74a501420d5f19
Arg [11] : 000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [14] : 000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38
Arg [15] : 00000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [18] : 000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38
Arg [19] : 00000000000000000000000050c42deacd8fc9773493ed674b675be577f2634b
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

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