false
true
0

Contract Address Details

0x60e57d1D4d2AF3B4154014F687D0A84A04412779

Contract Name
IgnitionPhase
Creator
0x860ca5–8ae9d0 at 0x160b87–8a6f39
Balance
570.886452298311121427 PLS ( )
Tokens
Fetching tokens...
Transactions
86 Transactions
Transfers
167 Transfers
Gas Used
8,174,844
Last Balance Update
26205535
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
IgnitionPhase




Optimization enabled
true
Compiler version
v0.8.24+commit.e11b9ed9




Optimization runs
200
EVM Version
shanghai




Verified at
2025-06-13T02:06:21.381419Z

Constructor Arguments

0x00000000000000000000000030f3aa4de2152a588695e3f38669a712826c7696

Arg [0] (address) : 0x30f3aa4de2152a588695e3f38669a712826c7696

              

contracts/IgnitionPhase.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.24;


import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./tokens/Liftoff.sol";

/*------------------------------------------------------------------
 *    :::: EXTERNAL_CONTRACT_INTERFACE ::::
 *-----------------------------------------------------------------*/


interface Iv2Router02 {
    function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
}

interface ILockLiquidityv2 {
    function lockLiquidity(uint256 lockAmount) external returns(bool);
}

interface ItokenBurning {
    function burn(uint256 value) external;
}

interface IIntarsiaConfigProvider {
    function setConfig(uint8 configType, address value) external returns(bool);
    function setTokenConfig(address tokenAddress, uint16 taxValue, uint64 powerValue) external returns(bool);
    function g_AddressArray(uint8 configType) external view returns (address[] memory returnedArray);
    function aa_ticketTokens(uint256 index) external view returns (address);
    function aa_dexV2Routers(uint256 index) external view returns (address);    
    function a_IntarsiaSafe() external view returns (address);
}


/*------------------------------------------------------------------
 *    :::: IGNITION_PHASE_CONTRACT ::::
 *-----------------------------------------------------------------*/


/**
 * @title `Ignition Phase`
 * @dev Handles the Ignition of PULSE for LIFTOFF, addition of PULSE to PulseX LP, and Burning of the remaining tokens.
 *      The Ignition Phase is available between the starting timestamp and the ending timestamp.
 *      The Ignition Phase ends after the end timestamp or once the LIFTOFF supply is drained.
 *      The Ignition rate between PULSE and LIFTOFF decreases with every passing second.
 *      100% of the Pulse used to Ignite Liftoff will be added to a Liquidity Pool for Argyle, Comfy, and Switch tokens.
 *      The addition of Liquidiy is done through this contract.
 *      The LP is Locked for up to 1 year and receipts are sent to a multisig contract.
 *
 */
contract IgnitionPhase is 
    ReentrancyGuard, 
    Context 
{
	
    using SafeERC20 for Liftoff;

    /*------------------------
     *    :::: ENUM ::::
     *-----------------------*/
	
	enum AddressType {
        GtHolder,
        Token,
        PulseXPair,
        LpLock 
    }
    
   /*------------------------
    *  :::: CONSTANTS ::::
    *-----------------------*/
    
    uint256 private constant START_TIMESTAMP = 1751068800; // MAINNET: Sat Jun 28 2025 00:00:00 GMT+0000
	uint256 private constant IGNITE_DURATION = 2592000;
    uint256 private constant IGNITE_MULTIPLIER = 100e3;
	uint256 private constant IGNITE_MAX = IGNITE_MULTIPLIER;
	uint256 private constant IGNITE_MIN = (IGNITE_MULTIPLIER * 1e18) / (1e18 + (IGNITE_DURATION * 1e12));
	uint256 private constant END_TIMESTAMP = START_TIMESTAMP + IGNITE_DURATION;
	
    /*------------------------
     *  :::: CONSTANTS ::::
     *-----------------------*/
    
    IERC20 private immutable GOLDEN_TICKET;
	Liftoff private immutable LIFTOFF_TOKEN;
	address private immutable V2_ROUTER;
	address private immutable MULTISIG;
    IIntarsiaConfigProvider public immutable i_configProvider;

    /*------------------------
     *  :::: MAPPINGS ::::
     *-----------------------*/
     
    mapping(address => bool) private gtHolderMap;
    mapping(address => bool) private tokenMap;
    mapping(address => bool) private dexPairMap;
    mapping(address => bool) private lpLockMap;

   /*----------------------------
    *    :::: ARRAYS ::::
    *---------------------------*/
    
    address[] public listGtHolders;
    address[] public listTokens;
    address[] public listDexPairs;
    address[] public listLockContracts;


/*------------------------------------------------------------------
 *    :::: EVENTS_AND_ERRORS ::::
 *-----------------------------------------------------------------*/


    event TokensIgnited(
        address indexed sender,
        uint256 amountPulse,
        uint256 amountTokens
    );
    
    event LiquidityAdded(
        address indexed sender,
        address token,
        uint256 amountPulse,
        uint256 amountTokens
    );
    
    event LiquidityLocked(
        address indexed sender,
        address lpToken,
        address lpLock,
        uint256 amount
    );
    
    event ReceiptTransferred(
        address indexed sender,
        address receiptToken,
        uint256 amount
    );
    
    event TokensBurned(
        address indexed sender,
        address token,
        uint256 amount
    );
    
    
    error AddressZero_Error();
    error AmountPulse_Error();
    error Amount_Error();
    error Approve_Error();
    error Balance_Error();
    error BalanceofLiftoff_Error();
    error GoldenTicketAllowance_Error();
    error GoldenTicketBalance_Error();
    error GoldenTicketTransfer_Error();
    error InvalidLPToken_Error();
    error InvalidPair_Error();
    error InvalidSender_Error();
    error InvalidToken_Error();
    error IsActive_Error();
    error IsNotActive_Error();
    error InvalidAddressType();
    error LockLiquidity_Error();
    error ReceiveAmount_Error();
    error SetContract_Error();
    error TimeMultiplier_Error();
    error Transfer_Error();
    

/*------------------------------------------------------------------
 *    :::: MODIFIERS ::::
 *-----------------------------------------------------------------*/


   /**
    * @notice Modifier that checks if the contract is currently active based on the start and end timestamps.
    */
    modifier isActive() {
        uint256 timeNow = block.timestamp;
        if (timeNow < START_TIMESTAMP || timeNow > END_TIMESTAMP) revert IsNotActive_Error();
        _;
    }

   
   /**
    * @notice Modifier that checks if the contract is not active.
    */
    modifier isNotActive() {
        if (block.timestamp < END_TIMESTAMP) revert IsActive_Error();
        _;
    }
    
    
   /**
    * @notice Modifier that restricts access to only holders of the Golden Ticket.
    */
    modifier onlyGTHolder() {
    	address sender_ = _msgSender();
        IERC20 goldenTicket_ = GOLDEN_TICKET;
        if (!gtHolderMap[sender_] || sender_ == address(0)) revert InvalidSender_Error();
        if (goldenTicket_.balanceOf(sender_) < 1e18) revert GoldenTicketBalance_Error();
        if (goldenTicket_.allowance(sender_, address(this)) < 1e18) revert GoldenTicketAllowance_Error();
        _;
    }
    
    
/*------------------------------------------------------------------
 *    :::: CONSTRUCTOR ::::
 *-----------------------------------------------------------------*/


   /**
    * @dev Constructs the contract and initializes the state variables.
    *      Initializes the LIFTOFF_TOKEN with the specified name and symbol, and sets up the address maps
    *      and lists for the provided parameters.
    */
    constructor(address _configProviderAddress) {

        if (_configProviderAddress == address(0)) revert AddressZero_Error();
        i_configProvider = IIntarsiaConfigProvider(_configProviderAddress);
            
        address[] memory gtHolders_ = i_configProvider.g_AddressArray(8);
        address[] memory coreTokens_ = i_configProvider.g_AddressArray(5);
        address[] memory coreTokensLP_ = i_configProvider.g_AddressArray(6);
        address[] memory coreTokensLock = i_configProvider.g_AddressArray(7);
        
        GOLDEN_TICKET = IERC20(i_configProvider.aa_ticketTokens(2));
        MULTISIG = i_configProvider.a_IntarsiaSafe();
        V2_ROUTER = i_configProvider.aa_dexV2Routers(0);

        Liftoff.LiftoffTokenConfig memory config = Liftoff.LiftoffTokenConfig({name: "Liftoff", symbol: "LIFTOFF", ignitionPhaseContract: address(this)});
        LIFTOFF_TOKEN = new Liftoff(config);
        address liftoffToken_ = address(LIFTOFF_TOKEN);

        // Process gt holders
        for (uint8 i; i < 6; ) {
            address gtholderAddress = gtHolders_[i];
            if (gtholderAddress != address(0)) {
                gtHolderMap[gtholderAddress] = true;
                listGtHolders.push(gtholderAddress);
            }
            unchecked { ++i; }
        }
        
        // Process core tokens
        for (uint8 i; i < 3; ) {
            address token = coreTokens_[i];
            address tokenLP = coreTokensLP_[i];
            address tokenLock = coreTokensLock[i];
            if (token != address(0) && tokenLP != address(0) && tokenLock != address(0)) {
                listTokens.push(token);
                listDexPairs.push(tokenLP);
                listLockContracts.push(tokenLock);
                tokenMap[token] = true;
                dexPairMap[tokenLP] = true;
                lpLockMap[tokenLock] = true;
            }
            unchecked { ++i; }
        }
        
        tokenMap[liftoffToken_] = true;
        listTokens.push(liftoffToken_);
        
        // Set IgnitionPhase within the Intarsia Config Contract
        if (!i_configProvider.setConfig(4, address(this))) revert SetContract_Error();
        if (!i_configProvider.setTokenConfig(liftoffToken_, 0, 100)) revert SetContract_Error();

        
    }


   /**
    * @notice Allows the contract to receive direct Pulse deposits without triggering token allocation.
    * @dev Stores the Pulse in the contract.
    */
    receive() external payable {}
    

/*------------------------------------------------------------------
 *    :::: EXTERNAL_VIEW_GETTER ::::
 *-----------------------------------------------------------------*/


   /**
    * @notice Checks if a given address is mapped to a specific type.
    * @param addressType The type of address to check (1: gtHolderMap, 2: tokenMap, 3: dexPairMap, 4: lpLockMap).
    * @param addressCheck The address to check against the specified map.
    * @return bool True if the address is mapped, false otherwise.
    */
    function getAddrMaps(
        AddressType addressType, 
        address addressCheck
    ) external view returns (bool) {
        if (addressType == AddressType.GtHolder) return gtHolderMap[addressCheck];
        if (addressType == AddressType.Token) return tokenMap[addressCheck];
        if (addressType == AddressType.PulseXPair) return dexPairMap[addressCheck];
        if (addressType == AddressType.LpLock) return lpLockMap[addressCheck];
        revert InvalidAddressType();
    }


   /**
    * @notice Retrieves the current balance of the contract in both Pulse and token.
    * @return pulsebalance The balance of the contract in Pulse.
    * @return tokenBalance The balance of the contract in tokens.
    */
    function getBalance() external view returns (uint256 pulsebalance, uint256 tokenBalance){
        pulsebalance = address(this).balance;
        tokenBalance = LIFTOFF_TOKEN.balanceOf(address(this));
    }
    
    
   /**
    * @notice Provides the configuration values used in the contract.
    * @return uintValues An array of six unsigned integer configuration values.
    */
    function getConfigUint() external pure returns (uint256[6] memory uintValues) {
        uintValues = [IGNITE_MULTIPLIER, IGNITE_MIN, IGNITE_MAX, IGNITE_DURATION, START_TIMESTAMP, END_TIMESTAMP];
    }


   /**
    * @notice Provides the configuration values used in the contract.
    * @return addressValues An array of three address configuration values.
    */
    function getConfigAddress() external view returns (address[3] memory addressValues) {
        addressValues = [V2_ROUTER, MULTISIG, address(GOLDEN_TICKET)];
    }


   /**
    * @notice Provides the address of the Liftoff Token contract.
    * @return address The Liftoff Token address.
    */
    function getLiftoffAddress() external view returns (address) {
        return address(LIFTOFF_TOKEN);
    }


   /**
    * @notice Calculates the rate and amount of tokens to be received based on the given pulse amount and time.
    * @dev This function is only callable when the contract is active.
    * @param amountPulse The amount of pulses to calculate the token rate for.
    * @param timeCheck The specific time to check the rate; if 0, the current block timestamp is used.
    * @return tokensPerPulse The calculated number of tokens per pulse.
    * @return receiveAmount The total amount of tokens to be received for the given pulse amount.
    */
    function getRateCalc(
        uint256 amountPulse,
        uint256 timeCheck
    ) external view returns (uint256 tokensPerPulse, uint256 receiveAmount){
        uint256 timeNow = timeCheck != 0 ? timeCheck : block.timestamp;
        uint256 startTime = START_TIMESTAMP;
        if (timeNow < startTime || timeNow > END_TIMESTAMP) revert IsNotActive_Error();
        (tokensPerPulse, receiveAmount) = _calcValue(timeNow, amountPulse, startTime);
    }
    
    
   /**
    * @notice Retrieves the current rate and amount of tokens to be received for a standard pulse amount.
    * @dev This function is only callable when the contract is active.
    * @return tokensPerPulse The current number of tokens per pulse.
    * @return receiveAmount The total amount of tokens to be received for a standard pulse amount of 1e18.
    */
    function getRateCurrent() external view isActive returns (uint256 tokensPerPulse, uint256 receiveAmount){
        (tokensPerPulse, receiveAmount) = _calcValue(block.timestamp, 1e18, START_TIMESTAMP);
    }


/*------------------------------------------------------------------
 *    :::: EXTERNAL_PAYABLE ::::
 *-----------------------------------------------------------------*/


   /**
    * @notice Allows users to ignite tokens by sending Pulse to the contract.
    * @dev This function is only callable when the Ignition Phase is active.
    * @dev Emits a TokensIgnited event upon successful token transfer.
    */
    function igniteTokens() external 
        payable 
        isActive 
        nonReentrant 
    {
    	uint256 amountPulse_ = msg.value;
        address sender_ = _msgSender();
       
        if (sender_ == address(0) || sender_ == address(0xA1077a294dDE1B09bB078844df40758a5D0f9a27)) revert InvalidSender_Error();

        Liftoff liftoffToken_ = LIFTOFF_TOKEN;

        ( , uint256 receiveAmount) = _calcValue(block.timestamp, amountPulse_, START_TIMESTAMP);
        
        if (liftoffToken_.balanceOf(address(this)) < receiveAmount) revert BalanceofLiftoff_Error();
        liftoffToken_.safeTransfer(sender_, receiveAmount);
        
        emit TokensIgnited(
            sender_,
            amountPulse_,
            receiveAmount
        );
    }

    
/*------------------------------------------------------------------
 *    :::: EXTERNAL_NON_PAYABLE_GOLDEN_TICKET_FUNCTIONS ::::
 *-----------------------------------------------------------------*/


   /**
    * @notice Allows a Golden Ticket holder to add liquidity to the contract.
    * @dev This function is only callable by a holder of the Golden Ticket and is non-reentrant.
    * @param token The ERC20 token to be added as liquidity.
    * @param amountTkn The amount of the token to add as liquidity.
    * @param amountPulse The amount of Pulse to add as liquidity.
    * @param amountTknMin The minimum amount of tokens to accept.
    * @param amountPulseMin The minimum amount of Pulse to accept.
    * @dev Emits a LiquidityAdded event upon successful addition of liquidity.
    */
    function addLiquidity(
        IERC20 token, 
        uint256 amountTkn, 
        uint256 amountPulse,
        uint256 amountTknMin,
        uint256 amountPulseMin
    ) external 
        onlyGTHolder 
        nonReentrant 
    { 
        address v2Router_ = V2_ROUTER;
        address tokenAddress = address(token);
        
        if (amountTkn == 0 || amountPulse == 0) revert Amount_Error();
        if (!tokenMap[tokenAddress] || tokenAddress == address(0)) revert InvalidToken_Error();
        
        uint256 tokenBalance_ = token.balanceOf(address(this));
        
        if (address(this).balance < amountPulse || tokenBalance_ < amountTkn) revert Balance_Error();
        if (!token.approve(v2Router_, tokenBalance_)) revert Approve_Error();
        
        Iv2Router02(v2Router_).addLiquidityETH{value: amountPulse}(
            tokenAddress,
            amountTkn,
            amountTknMin,
            amountPulseMin,
            address(this),
            block.timestamp + 3600
        );
        
        if (!GOLDEN_TICKET.transferFrom(_msgSender(), address(this), 1e18)) revert GoldenTicketTransfer_Error();
        
        emit LiquidityAdded(_msgSender(),tokenAddress,amountPulse,amountTkn);
    }
    
    
   /**
    * @notice Allows a Golden Ticket holder to lock liquidity in a specified lock contract.
    * @dev This function is only callable by a holder of the Golden Ticket and is non-reentrant.
    * @param lpToken The liquidity pool token to be locked.
    * @param lpLock The address of the liquidity lock contract.
    * @param amount The amount of liquidity pool tokens to lock.
    * @dev Emits a LiquidityLocked event upon successful locking of liquidity.
    */
    function lockLiquidity(
        IERC20 lpToken, 
        address lpLock, 
        uint256 amount
    ) external 
        onlyGTHolder 
        nonReentrant 
    { 
        if (amount < 10000) revert Amount_Error();
        if (lpLock == address(0) || address(lpToken) == address(0)) revert AddressZero_Error();
        if (!dexPairMap[address(lpToken)]) revert InvalidPair_Error();
        if (!lpLockMap[lpLock]) revert InvalidLPToken_Error();
        if (lpToken.balanceOf(address(this)) < amount) revert Balance_Error();
        if (!GOLDEN_TICKET.transferFrom(_msgSender(), address(this), 1e18)) revert GoldenTicketTransfer_Error();
        if (!lpToken.approve(lpLock, amount)) revert Approve_Error();
        if (!ILockLiquidityv2(lpLock).lockLiquidity(amount)) revert LockLiquidity_Error();
        emit LiquidityLocked(_msgSender(),address(lpToken),lpLock,amount);
    }
    
    
   /**
    * @notice Allows a Golden Ticket holder to transfer receipt tokens to a multisig address.
    * @dev This function is only callable by a holder of the Golden Ticket and is non-reentrant.
    * @param receiptToken The ERC20 receipt token to be transferred.
    * @param amount The amount of receipt tokens to transfer.
    * @dev Emits a ReceiptTransferred event upon successful transfer of receipt tokens.
    */
    function transferReceipts(
        IERC20 receiptToken, 
        uint256 amount
    ) external 
        onlyGTHolder 
        nonReentrant 
    { 
        address receiptTokenAddress_ = address(receiptToken);
        if (amount == 0) revert Amount_Error();
        if (!lpLockMap[receiptTokenAddress_] || receiptTokenAddress_ == address(0)) revert InvalidToken_Error();
        if (receiptToken.balanceOf(address(this)) < amount) revert Balance_Error();
        if (!GOLDEN_TICKET.transferFrom(_msgSender(), address(this), 1e18)) revert GoldenTicketTransfer_Error();
        if (!receiptToken.transfer(MULTISIG, amount)) revert Transfer_Error();
        emit ReceiptTransferred(_msgSender(),receiptTokenAddress_,amount);
    }
    

   /**
    * @notice Allows a Golden Ticket holder to burn remaining tokens after the end timestamp.
    * @dev This function is only callable by a holder of the Golden Ticket, Ignition Phase must be completed, and is non-reentrant.
    * @param token The ERC20 token to be burned.
    * @param amount The amount of tokens to burn.
    * @dev Emits a TokensBurned event upon successful burning of tokens.
    */
    function burnRemainingTokens(
        address token,
        uint256 amount
    ) external 
        onlyGTHolder 
        isNotActive 
        nonReentrant 
    {
        if (amount == 0) revert Amount_Error();
        if (!tokenMap[token] || token == address(0)) revert InvalidToken_Error();
        if (IERC20(token).balanceOf(address(this)) < amount) revert Balance_Error();
        if (!GOLDEN_TICKET.transferFrom(_msgSender(), address(this), 1e18)) revert GoldenTicketTransfer_Error();
        ItokenBurning(token).burn(amount);
        emit TokensBurned(_msgSender(),token,amount);
    }


/*------------------------------------------------------------------
 *    :::: PRIVATE_INTERNAL_FUNCTIONS ::::
 *-----------------------------------------------------------------*/

    
   /**
    * @notice Calculates the token value based on the time elapsed and the amount of pulses.
    * @dev This is a private pure function that performs calculations to determine the tokens per pulse and the total amount.
    * @param _timeValue The current or specified time value for the calculation.
    * @param _amountPulse The amount of pulses to be used in the calculation.
    * @param _startTimestamp The starting timestamp for the calculation.
    * @return tokensPerPulse The calculated number of tokens per pulse.
    * @return receiveAmount The total calculated amount of tokens based on the Pulse and time.
    * @dev Reverts if the amount of Pulse is out of bounds, the time multiplier exceeds the allowed duration, or the calculated amount is invalid.
    */
    function _calcValue(
        uint256 _timeValue,
        uint256 _amountPulse,
        uint256 _startTimestamp
    ) private pure returns (uint256, uint256) {
    	
        if (_amountPulse < 1e18 || _amountPulse > 10e24) revert AmountPulse_Error();
        
        uint256 timeMultiplier_ = (_timeValue > _startTimestamp) ? (_timeValue - _startTimestamp) : 0;
        
        if (timeMultiplier_ > IGNITE_DURATION) revert TimeMultiplier_Error();
        
        uint256 tokensPerPulse = (timeMultiplier_ != 0) ? (1e18 + ((timeMultiplier_ * 1e45) / 1e33)) : 1e18; 
        uint256 receiveAmount = (tokensPerPulse != 0) ? ((_amountPulse * IGNITE_MULTIPLIER * 1e40) / tokensPerPulse / 1e22) : 0;
        
        uint256 igniteMin_;
        uint256 igniteMax_;
        
        unchecked {
            igniteMin_ = IGNITE_MIN * _amountPulse;
            igniteMax_ = IGNITE_MAX * _amountPulse;
        }
        
        if (receiveAmount > igniteMax_ || receiveAmount < igniteMin_) revert ReceiveAmount_Error();
        
        return (tokensPerPulse, receiveAmount);

    }


}

        

@openzeppelin/contracts/interfaces/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);
}
          

@openzeppelin/contracts/interfaces/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";
          

@openzeppelin/contracts/interfaces/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";
          

@openzeppelin/contracts/interfaces/draft-IERC6093.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC-721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC-1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
          

@openzeppelin/contracts/token/ERC20/ERC20.sol

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

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC-20
 * applications.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * Both values are immutable: they can only be set once during construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Skips emitting an {Approval} event indicating an allowance update. This is not
     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     *
     * ```solidity
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance < type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}
          

@openzeppelin/contracts/token/ERC20/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);
}
          

@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol

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

pragma solidity ^0.8.20;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys a `value` amount of tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 value) public virtual {
        _burn(_msgSender(), value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, deducting from
     * the caller's allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `value`.
     */
    function burnFrom(address account, uint256 value) public virtual {
        _spendAllowance(account, _msgSender(), value);
        _burn(account, value);
    }
}
          

@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol

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

pragma solidity ^0.8.20;

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

/**
 * @dev Interface for the optional metadata functions from the ERC-20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}
          

@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol

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

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(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);
    }
}
          

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

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

@openzeppelin/contracts/utils/introspection/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);
}
          

contracts/tokens/Liftoff.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.24;


import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";


/*-------------------------------------------------------------------------
 *    :::: LIFTOFF_CONTRACT ::::
 *------------------------------------------------------------------------*/


/**
 * @title Liftoff
 * @dev This contract implements an ERC20 token with burnable capabilities.
 * 100% of the total Initial Supply is minted to the Ignition Phase Contract
 * No ownership or additional supply can be minted.
 */
contract Liftoff is 
    ERC20, 
    ERC20Burnable
{
    struct LiftoffTokenConfig {
        address ignitionPhaseContract;
        string name;
        string symbol;
    }
    uint256 public constant totalInitialSupply = 36e30;
    address public immutable ignitionPhaseContract;
    constructor(
        LiftoffTokenConfig memory config
    ) ERC20(config.name, config.symbol) {
        ignitionPhaseContract = config.ignitionPhaseContract;
        _mint(ignitionPhaseContract, totalInitialSupply);
    }
}
          

Compiler Settings

{"outputSelection":{},"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"shanghai"}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_configProviderAddress","internalType":"address"}]},{"type":"error","name":"AddressZero_Error","inputs":[]},{"type":"error","name":"AmountPulse_Error","inputs":[]},{"type":"error","name":"Amount_Error","inputs":[]},{"type":"error","name":"Approve_Error","inputs":[]},{"type":"error","name":"Balance_Error","inputs":[]},{"type":"error","name":"BalanceofLiftoff_Error","inputs":[]},{"type":"error","name":"GoldenTicketAllowance_Error","inputs":[]},{"type":"error","name":"GoldenTicketBalance_Error","inputs":[]},{"type":"error","name":"GoldenTicketTransfer_Error","inputs":[]},{"type":"error","name":"InvalidAddressType","inputs":[]},{"type":"error","name":"InvalidLPToken_Error","inputs":[]},{"type":"error","name":"InvalidPair_Error","inputs":[]},{"type":"error","name":"InvalidSender_Error","inputs":[]},{"type":"error","name":"InvalidToken_Error","inputs":[]},{"type":"error","name":"IsActive_Error","inputs":[]},{"type":"error","name":"IsNotActive_Error","inputs":[]},{"type":"error","name":"LockLiquidity_Error","inputs":[]},{"type":"error","name":"ReceiveAmount_Error","inputs":[]},{"type":"error","name":"ReentrancyGuardReentrantCall","inputs":[]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"error","name":"SetContract_Error","inputs":[]},{"type":"error","name":"TimeMultiplier_Error","inputs":[]},{"type":"error","name":"Transfer_Error","inputs":[]},{"type":"event","name":"LiquidityAdded","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"address","name":"token","internalType":"address","indexed":false},{"type":"uint256","name":"amountPulse","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountTokens","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"LiquidityLocked","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"address","name":"lpToken","internalType":"address","indexed":false},{"type":"address","name":"lpLock","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ReceiptTransferred","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"address","name":"receiptToken","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokensBurned","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"address","name":"token","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokensIgnited","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"amountPulse","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountTokens","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addLiquidity","inputs":[{"type":"address","name":"token","internalType":"contract IERC20"},{"type":"uint256","name":"amountTkn","internalType":"uint256"},{"type":"uint256","name":"amountPulse","internalType":"uint256"},{"type":"uint256","name":"amountTknMin","internalType":"uint256"},{"type":"uint256","name":"amountPulseMin","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burnRemainingTokens","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"getAddrMaps","inputs":[{"type":"uint8","name":"addressType","internalType":"enum IgnitionPhase.AddressType"},{"type":"address","name":"addressCheck","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"pulsebalance","internalType":"uint256"},{"type":"uint256","name":"tokenBalance","internalType":"uint256"}],"name":"getBalance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[3]","name":"addressValues","internalType":"address[3]"}],"name":"getConfigAddress","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256[6]","name":"uintValues","internalType":"uint256[6]"}],"name":"getConfigUint","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getLiftoffAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"tokensPerPulse","internalType":"uint256"},{"type":"uint256","name":"receiveAmount","internalType":"uint256"}],"name":"getRateCalc","inputs":[{"type":"uint256","name":"amountPulse","internalType":"uint256"},{"type":"uint256","name":"timeCheck","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"tokensPerPulse","internalType":"uint256"},{"type":"uint256","name":"receiveAmount","internalType":"uint256"}],"name":"getRateCurrent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IIntarsiaConfigProvider"}],"name":"i_configProvider","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"igniteTokens","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"listDexPairs","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"listGtHolders","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"listLockContracts","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"listTokens","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"lockLiquidity","inputs":[{"type":"address","name":"lpToken","internalType":"contract IERC20"},{"type":"address","name":"lpLock","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferReceipts","inputs":[{"type":"address","name":"receiptToken","internalType":"contract IERC20"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

0x61012060405234801562000011575f80fd5b506040516200394738038062003947833981016040819052620000349162000867565b60015f556001600160a01b0381166200006057604051631863246760e01b815260040160405180910390fd5b6001600160a01b038116610100819052604051631bf2c52160e11b8152600860048201525f91906337e58a42906024015f60405180830381865afa158015620000ab573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052620000d491908101906200089e565b61010051604051631bf2c52160e11b8152600560048201529192505f916001600160a01b03909116906337e58a42906024015f60405180830381865afa15801562000121573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526200014a91908101906200089e565b61010051604051631bf2c52160e11b8152600660048201529192505f916001600160a01b03909116906337e58a42906024015f60405180830381865afa15801562000197573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052620001c091908101906200089e565b61010051604051631bf2c52160e11b8152600760048201529192505f916001600160a01b03909116906337e58a42906024015f60405180830381865afa1580156200020d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526200023691908101906200089e565b61010051604051630bc7a65360e01b8152600260048201529192506001600160a01b031690630bc7a65390602401602060405180830381865afa15801562000280573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620002a6919062000867565b6001600160a01b03166080816001600160a01b031681525050610100516001600160a01b031663f0854e026040518163ffffffff1660e01b8152600401602060405180830381865afa158015620002ff573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062000325919062000867565b6001600160a01b0390811660e0526101005160405163e429d5e560e01b81525f600482015291169063e429d5e590602401602060405180830381865afa15801562000372573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062000398919062000867565b6001600160a01b031660c05260408051606081018252308152815180830183526007808252662634b33a37b33360c91b6020838101919091528084019290925283518085018552908152662624a32a27a32360c91b91810191909152818301529051819062000407906200083d565b620004139190620009b0565b604051809103905ff0801580156200042d573d5f803e3d5ffd5b506001600160a01b031660a08190525f5b60068160ff161015620004f5575f878260ff168151811062000464576200046462000a07565b602002602001015190505f6001600160a01b0316816001600160a01b031614620004eb576001600160a01b0381165f8181526001602081905260408220805460ff1916821790556005805491820181559091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b03191690911790555b506001016200043e565b505f5b60038160ff161015620006b4575f868260ff16815181106200051e576200051e62000a07565b602002602001015190505f868360ff168151811062000541576200054162000a07565b602002602001015190505f868460ff168151811062000564576200056462000a07565b602002602001015190505f6001600160a01b0316836001600160a01b0316141580156200059957506001600160a01b03821615155b8015620005ae57506001600160a01b03811615155b15620006a5576006805460018181019092555f80516020620039278339815191520180546001600160a01b038087166001600160a01b03199283168117909355600780548086019091557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180548783169084168117909155600880548087019091557ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180549287169290931682179092555f928352600260209081526040808520805460ff19908116881790915593855260038252808520805485168717905591845260049052909120805490911690911790555b836001019350505050620004f8565b506001600160a01b038181165f81815260026020526040808220805460ff191660019081179091556006805491820181559092525f805160206200392783398151915290910180546001600160a01b031916909217909155610100519051630a3fb8ff60e11b815260048082015230602482015291169063147f71fe906044016020604051808303815f875af115801562000751573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062000777919062000a1b565b6200079557604051636c4d3c6760e11b815260040160405180910390fd5b6101005160405163711a111160e01b81526001600160a01b0383811660048301525f602483015260646044830181905292169163711a111191016020604051808303815f875af1158015620007ec573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062000812919062000a1b565b6200083057604051636c4d3c6760e11b815260040160405180910390fd5b5050505050505062000a3c565b610d628062002bc583390190565b80516001600160a01b038116811462000862575f80fd5b919050565b5f6020828403121562000878575f80fd5b62000883826200084b565b9392505050565b634e487b7160e01b5f52604160045260245ffd5b5f6020808385031215620008b0575f80fd5b82516001600160401b0380821115620008c7575f80fd5b818501915085601f830112620008db575f80fd5b815181811115620008f057620008f06200088a565b8060051b604051601f19603f830116810181811085821117156200091857620009186200088a565b60405291825284820192508381018501918883111562000936575f80fd5b938501935b828510156200095f576200094f856200084b565b845293850193928501926200093b565b98975050505050505050565b5f81518084525f5b81811015620009915760208185018101518683018201520162000973565b505f602082860101526020601f19601f83011685010191505092915050565b602080825282516001600160a01b031682820152820151606060408301525f90620009df60808401826200096b565b90506040840151601f19848303016060850152620009fe82826200096b565b95945050505050565b634e487b7160e01b5f52603260045260245ffd5b5f6020828403121562000a2c575f80fd5b8151801515811462000883575f80fd5b60805160a05160c05160e051610100516120f762000ace5f395f61013a01525f81816106b10152610f0201525f8181610edd01526115f501525f8181610295015281816107b30152610d9e01525f818161036a015281816105f4015281816108ff01528181610bb801528181610f2a01528181610f650152818161124f0152818161146d015261186201526120f75ff3fe6080604052600436106100fd575f3560e01c80636d669fc211610092578063c30ad99911610062578063c30ad999146102b9578063c33d1288146102d8578063ca97dc85146102f7578063dd14f4b314610326578063e468eb0114610345575f80fd5b80636d669fc21461022a5780639144b6da146102495780639538be0014610268578063b8e7068c14610287575f80fd5b80632560bf86116100cd5780632560bf86146101c157806336a262b8146101e25780633704cf7d146102015780633ec2734114610209575f80fd5b80630911845914610108578063097b49691461012957806312065fe01461017957806314ccd298146101a2575f80fd5b3661010457005b5f80fd5b348015610113575f80fd5b50610127610122366004611e38565b610359565b005b348015610134575f80fd5b5061015c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610184575f80fd5b5061018d61079a565b60408051928352602083019190915201610170565b3480156101ad575f80fd5b5061015c6101bc366004611e62565b61082a565b3480156101cc575f80fd5b506101d5610852565b6040516101709190611e79565b3480156101ed575f80fd5b506101276101fc366004611e38565b6108ee565b610127610d0b565b348015610214575f80fd5b5061021d610ec0565b6040516101709190611ea9565b348015610235575f80fd5b50610127610244366004611ed9565b610f54565b348015610254575f80fd5b50610127610263366004611f17565b61145c565b348015610273575f80fd5b5061015c610282366004611e62565b61197c565b348015610292575f80fd5b507f000000000000000000000000000000000000000000000000000000000000000061015c565b3480156102c4575f80fd5b5061015c6102d3366004611e62565b61198b565b3480156102e3575f80fd5b5061018d6102f2366004611f57565b61199a565b348015610302575f80fd5b50610316610311366004611f77565b611a06565b6040519015158152602001610170565b348015610331575f80fd5b5061015c610340366004611e62565b611b0d565b348015610350575f80fd5b5061018d611b1c565b335f818152600160205260409020547f00000000000000000000000000000000000000000000000000000000000000009060ff1615806103a057506001600160a01b038216155b156103be5760405163ef7f167360e01b815260040160405180910390fd5b6040516370a0823160e01b81526001600160a01b038381166004830152670de0b6b3a764000091908316906370a0823190602401602060405180830381865afa15801561040d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104319190611fb1565b1015610450576040516306e64b4560e01b815260040160405180910390fd5b604051636eb1769f60e11b81526001600160a01b038381166004830152306024830152670de0b6b3a7640000919083169063dd62ed3e90604401602060405180830381865afa1580156104a5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104c99190611fb1565b10156104e857604051633519647d60e01b815260040160405180910390fd5b6104f0611b7f565b835f8490036105125760405163901e555360e01b815260040160405180910390fd5b6001600160a01b0381165f9081526004602052604090205460ff16158061054057506001600160a01b038116155b1561055e5760405163627c56b360e11b815260040160405180910390fd5b6040516370a0823160e01b815230600482015284906001600160a01b038716906370a0823190602401602060405180830381865afa1580156105a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105c69190611fb1565b10156105e557604051634a5b2a2560e11b815260040160405180910390fd5b6040516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd9061063d9033903090670de0b6b3a764000090600401611fc8565b6020604051808303815f875af1158015610659573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061067d9190611fec565b61069a576040516325d99aa960e11b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820186905286169063a9059cbb906044016020604051808303815f875af1158015610706573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061072a9190611fec565b61074757604051630feaf2d760e11b815260040160405180910390fd5b604080516001600160a01b038316815260208101869052815133927f3d904a93564abf6b1d096686a4153d4cc16a5c7f3b2d108804044bd42ff9f7fa928290030190a25061079460015f55565b50505050565b6040516370a0823160e01b815230600482015247905f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610800573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108249190611fb1565b90509091565b60088181548110610839575f80fd5b5f918252602090912001546001600160a01b0316905081565b61085a611de8565b6040518060c00160405280620186a0815260200162278d0064e8d4a510006108829190612026565b61089490670de0b6b3a764000061203d565b6108a9620186a0670de0b6b3a7640000612026565b6108b39190612050565b8152602001620186a0815260200162278d00815260200163685f3080815260200162278d0063685f30806108e7919061203d565b9052919050565b335f818152600160205260409020547f00000000000000000000000000000000000000000000000000000000000000009060ff16158061093557506001600160a01b038216155b156109535760405163ef7f167360e01b815260040160405180910390fd5b6040516370a0823160e01b81526001600160a01b038381166004830152670de0b6b3a764000091908316906370a0823190602401602060405180830381865afa1580156109a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c69190611fb1565b10156109e5576040516306e64b4560e01b815260040160405180910390fd5b604051636eb1769f60e11b81526001600160a01b038381166004830152306024830152670de0b6b3a7640000919083169063dd62ed3e90604401602060405180830381865afa158015610a3a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a5e9190611fb1565b1015610a7d57604051633519647d60e01b815260040160405180910390fd5b610a8e62278d0063685f308061203d565b421015610aae5760405163d969132560e01b815260040160405180910390fd5b610ab6611b7f565b825f03610ad65760405163901e555360e01b815260040160405180910390fd5b6001600160a01b0384165f9081526002602052604090205460ff161580610b0457506001600160a01b038416155b15610b225760405163627c56b360e11b815260040160405180910390fd5b6040516370a0823160e01b815230600482015283906001600160a01b038616906370a0823190602401602060405180830381865afa158015610b66573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b8a9190611fb1565b1015610ba957604051634a5b2a2560e11b815260040160405180910390fd5b6040516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90610c019033903090670de0b6b3a764000090600401611fc8565b6020604051808303815f875af1158015610c1d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c419190611fec565b610c5e576040516325d99aa960e11b815260040160405180910390fd5b604051630852cd8d60e31b8152600481018490526001600160a01b038516906342966c68906024015f604051808303815f87803b158015610c9d575f80fd5b505af1158015610caf573d5f803e3d5ffd5b50505050610cba3390565b604080516001600160a01b0387811682526020820187905292909216917f857ac1c9e97cc66ecae5f524c9c611463ae748b85af3ca454a5ec4d7d341924d910160405180910390a261079460015f55565b4263685f3080811080610d2d5750610d2a62278d0063685f308061203d565b81115b15610d4b5760405163c56871bd60e01b815260040160405180910390fd5b610d53611b7f565b3433801580610d7e57506001600160a01b03811673a1077a294dde1b09bb078844df40758a5d0f9a27145b15610d9c5760405163ef7f167360e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000005f610dcd428563685f3080611ba7565b6040516370a0823160e01b81523060048201529092508291506001600160a01b038416906370a0823190602401602060405180830381865afa158015610e15573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e399190611fb1565b1015610e58576040516307dd0fd960e41b815260040160405180910390fd5b610e6c6001600160a01b0383168483611d21565b60408051858152602081018390526001600160a01b038516917fc97e81b2e25bf9e32ea9bf02d76798d8d2ff98820d3dcbd045085538324aa791910160405180910390a250505050610ebd60015f55565b50565b610ec8611e06565b50604080516060810182526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000811660208301527f0000000000000000000000000000000000000000000000000000000000000000169181019190915290565b335f818152600160205260409020547f00000000000000000000000000000000000000000000000000000000000000009060ff161580610f9b57506001600160a01b038216155b15610fb95760405163ef7f167360e01b815260040160405180910390fd5b6040516370a0823160e01b81526001600160a01b038381166004830152670de0b6b3a764000091908316906370a0823190602401602060405180830381865afa158015611008573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061102c9190611fb1565b101561104b576040516306e64b4560e01b815260040160405180910390fd5b604051636eb1769f60e11b81526001600160a01b038381166004830152306024830152670de0b6b3a7640000919083169063dd62ed3e90604401602060405180830381865afa1580156110a0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110c49190611fb1565b10156110e357604051633519647d60e01b815260040160405180910390fd5b6110eb611b7f565b61271083101561110e5760405163901e555360e01b815260040160405180910390fd5b6001600160a01b038416158061112b57506001600160a01b038516155b1561114957604051631863246760e01b815260040160405180910390fd5b6001600160a01b0385165f9081526003602052604090205460ff1661118157604051639979ecb560e01b815260040160405180910390fd5b6001600160a01b0384165f9081526004602052604090205460ff166111b95760405163312a4b8b60e01b815260040160405180910390fd5b6040516370a0823160e01b815230600482015283906001600160a01b038716906370a0823190602401602060405180830381865afa1580156111fd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112219190611fb1565b101561124057604051634a5b2a2560e11b815260040160405180910390fd5b6040516323b872dd60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906112989033903090670de0b6b3a764000090600401611fc8565b6020604051808303815f875af11580156112b4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112d89190611fec565b6112f5576040516325d99aa960e11b815260040160405180910390fd5b60405163095ea7b360e01b81526001600160a01b0385811660048301526024820185905286169063095ea7b3906044016020604051808303815f875af1158015611341573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113659190611fec565b6113825760405163caff824760e01b815260040160405180910390fd5b604051632bfbd9cf60e01b8152600481018490526001600160a01b03851690632bfbd9cf906024016020604051808303815f875af11580156113c6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113ea9190611fec565b6114075760405163fdd9f6bb60e01b815260040160405180910390fd5b336001600160a01b03167f0b7f017ddfa936797d2851ce094fce95af7c8c02dedb90cb9b2c74f036d4c4af86868660405161144493929190611fc8565b60405180910390a261145560015f55565b5050505050565b335f818152600160205260409020547f00000000000000000000000000000000000000000000000000000000000000009060ff1615806114a357506001600160a01b038216155b156114c15760405163ef7f167360e01b815260040160405180910390fd5b6040516370a0823160e01b81526001600160a01b038381166004830152670de0b6b3a764000091908316906370a0823190602401602060405180830381865afa158015611510573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115349190611fb1565b1015611553576040516306e64b4560e01b815260040160405180910390fd5b604051636eb1769f60e11b81526001600160a01b038381166004830152306024830152670de0b6b3a7640000919083169063dd62ed3e90604401602060405180830381865afa1580156115a8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115cc9190611fb1565b10156115eb57604051633519647d60e01b815260040160405180910390fd5b6115f3611b7f565b7f000000000000000000000000000000000000000000000000000000000000000087871580611620575086155b1561163e5760405163901e555360e01b815260040160405180910390fd5b6001600160a01b0381165f9081526002602052604090205460ff16158061166c57506001600160a01b038116155b1561168a5760405163627c56b360e11b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f906001600160a01b038b16906370a0823190602401602060405180830381865afa1580156116ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f29190611fb1565b90508747108061170157508881105b1561171f57604051634a5b2a2560e11b815260040160405180910390fd5b60405163095ea7b360e01b81526001600160a01b038481166004830152602482018390528b169063095ea7b3906044016020604051808303815f875af115801561176b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061178f9190611fec565b6117ac5760405163caff824760e01b815260040160405180910390fd5b6001600160a01b03831663f305d71989848c8b8b306117cd42610e1061203d565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af1158015611838573d5f803e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061185d919061206f565b5050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd6118963390565b30670de0b6b3a76400006040518463ffffffff1660e01b81526004016118be93929190611fc8565b6020604051808303815f875af11580156118da573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118fe9190611fec565b61191b576040516325d99aa960e11b815260040160405180910390fd5b604080516001600160a01b0384168152602081018a90528082018b9052905133917f36f3b2e1a21c19137dd82ec243b0708a1d26b3d1fa1dc49c44c4c366a5878138919081900360600190a250505061197360015f55565b50505050505050565b60068181548110610839575f80fd5b60058181548110610839575f80fd5b5f805f835f036119aa57426119ac565b835b905063685f3080808210806119d057506119cd62278d0063685f308061203d565b82115b156119ee5760405163c56871bd60e01b815260040160405180910390fd5b6119f9828783611ba7565b9097909650945050505050565b5f80836003811115611a1a57611a1a61209a565b03611a4057506001600160a01b0381165f9081526001602052604090205460ff16611b07565b6001836003811115611a5457611a5461209a565b03611a7a57506001600160a01b0381165f9081526002602052604090205460ff16611b07565b6002836003811115611a8e57611a8e61209a565b03611ab457506001600160a01b0381165f9081526003602052604090205460ff16611b07565b6003836003811115611ac857611ac861209a565b03611aee57506001600160a01b0381165f9081526004602052604090205460ff16611b07565b604051631616b52b60e11b815260040160405180910390fd5b92915050565b60078181548110610839575f80fd5b5f804263685f3080811080611b405750611b3d62278d0063685f308061203d565b81115b15611b5e5760405163c56871bd60e01b815260040160405180910390fd5b611b7542670de0b6b3a764000063685f3080611ba7565b9094909350915050565b60025f5403611ba157604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b5f80670de0b6b3a7640000841080611bc957506a084595161401484a00000084115b15611be757604051632c36f60b60e21b815260040160405180910390fd5b5f838611611bf5575f611bff565b611bff84876120ae565b905062278d00811115611c245760405162f3013760e51b815260040160405180910390fd5b5f815f03611c3a57670de0b6b3a7640000611c82565b6d314dc6448d9338c15b0a00000000611c6683722cd76fe086b93ce2f768a00b22a00000000000612026565b611c709190612050565b611c8290670de0b6b3a764000061203d565b90505f815f03611c92575f611cda565b69021e19e0c9bab240000082611cab620186a08a612026565b611cc690701d6329f1c35ca4bfabb9f5610000000000612026565b611cd09190612050565b611cda9190612050565b9050616cbf8702620186a0880280831180611cf457508183105b15611d1257604051635646d13b60e11b815260040160405180910390fd5b50919890975095505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611d73908490611d78565b505050565b5f8060205f8451602086015f885af180611d97576040513d5f823e3d81fd5b50505f513d91508115611dae578060011415611dbb565b6001600160a01b0384163b155b1561079457604051635274afe760e01b81526001600160a01b038516600482015260240160405180910390fd5b6040518060c001604052806006906020820280368337509192915050565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b0381168114610ebd575f80fd5b5f8060408385031215611e49575f80fd5b8235611e5481611e24565b946020939093013593505050565b5f60208284031215611e72575f80fd5b5035919050565b60c0810181835f5b6006811015611ea0578151835260209283019290910190600101611e81565b50505092915050565b6060810181835f5b6003811015611ea05781516001600160a01b0316835260209283019290910190600101611eb1565b5f805f60608486031215611eeb575f80fd5b8335611ef681611e24565b92506020840135611f0681611e24565b929592945050506040919091013590565b5f805f805f60a08688031215611f2b575f80fd5b8535611f3681611e24565b97602087013597506040870135966060810135965060800135945092505050565b5f8060408385031215611f68575f80fd5b50508035926020909101359150565b5f8060408385031215611f88575f80fd5b823560048110611f96575f80fd5b91506020830135611fa681611e24565b809150509250929050565b5f60208284031215611fc1575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f60208284031215611ffc575f80fd5b8151801515811461200b575f80fd5b9392505050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417611b0757611b07612012565b80820180821115611b0757611b07612012565b5f8261206a57634e487b7160e01b5f52601260045260245ffd5b500490565b5f805f60608486031215612081575f80fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b5f52602160045260245ffd5b81810381811115611b0757611b0761201256fea264697066735822122061fb3c3ad701cdb5a6ede99c137fde7da0addcab6beb375141c4c343916876fa64736f6c6343000818003360a060405234801562000010575f80fd5b5060405162000d6238038062000d628339810160408190526200003391620002f7565b6020810151604082015160036200004b838262000435565b5060046200005a828262000435565b505081516001600160a01b031660808190526200008791506d01c662460d49e87174f1000000006200008e565b5062000527565b6001600160a01b038216620000bd5760405163ec442f0560e01b81525f60048201526024015b60405180910390fd5b620000ca5f8383620000ce565b5050565b6001600160a01b038316620000fc578060025f828254620000f0919062000501565b909155506200016e9050565b6001600160a01b0383165f9081526020819052604090205481811015620001505760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401620000b4565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166200018c57600280548290039055620001aa565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620001f091815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715620002365762000236620001fd565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620002675762000267620001fd565b604052919050565b5f82601f8301126200027f575f80fd5b81516001600160401b038111156200029b576200029b620001fd565b6020620002b1601f8301601f191682016200023c565b8281528582848701011115620002c5575f80fd5b5f5b83811015620002e4578581018301518282018401528201620002c7565b505f928101909101919091529392505050565b5f6020828403121562000308575f80fd5b81516001600160401b03808211156200031f575f80fd5b908301906060828603121562000333575f80fd5b6200033d62000211565b82516001600160a01b038116811462000354575f80fd5b815260208301518281111562000368575f80fd5b62000376878286016200026f565b6020830152506040830151828111156200038e575f80fd5b6200039c878286016200026f565b60408301525095945050505050565b600181811c90821680620003c057607f821691505b602082108103620003df57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200043057805f5260205f20601f840160051c810160208510156200040c5750805b601f840160051c820191505b818110156200042d575f815560010162000418565b50505b505050565b81516001600160401b03811115620004515762000451620001fd565b6200046981620004628454620003ab565b84620003e5565b602080601f8311600181146200049f575f8415620004875750858301515b5f19600386901b1c1916600185901b178555620004f9565b5f85815260208120601f198616915b82811015620004cf57888601518255948401946001909101908401620004ae565b5085821015620004ed57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b808201808211156200052157634e487b7160e01b5f52601160045260245ffd5b92915050565b608051610822620005405f395f6101a101526108225ff3fe608060405234801561000f575f80fd5b50600436106100cb575f3560e01c806370a08231116100885780639ec8b52f116100635780639ec8b52f1461019c5780639fd4da40146101db578063a9059cbb146101f0578063dd62ed3e14610203575f80fd5b806370a082311461015957806379cc67901461018157806395d89b4114610194575f80fd5b806306fdde03146100cf578063095ea7b3146100ed57806318160ddd1461011057806323b872dd14610122578063313ce5671461013557806342966c6814610144575b5f80fd5b6100d761023b565b6040516100e49190610665565b60405180910390f35b6101006100fb3660046106cc565b6102cb565b60405190151581526020016100e4565b6002545b6040519081526020016100e4565b6101006101303660046106f4565b6102e4565b604051601281526020016100e4565b61015761015236600461072d565b610307565b005b610114610167366004610744565b6001600160a01b03165f9081526020819052604090205490565b61015761018f3660046106cc565b610314565b6100d761032d565b6101c37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100e4565b6101146d01c662460d49e87174f10000000081565b6101006101fe3660046106cc565b61033c565b610114610211366004610764565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606003805461024a90610795565b80601f016020809104026020016040519081016040528092919081815260200182805461027690610795565b80156102c15780601f10610298576101008083540402835291602001916102c1565b820191905f5260205f20905b8154815290600101906020018083116102a457829003601f168201915b5050505050905090565b5f336102d8818585610349565b60019150505b92915050565b5f336102f185828561035b565b6102fc8585856103dc565b506001949350505050565b6103113382610439565b50565b61031f82338361035b565b6103298282610439565b5050565b60606004805461024a90610795565b5f336102d88185856103dc565b610356838383600161046d565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f198110156103d657818110156103c857604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b6103d684848484035f61046d565b50505050565b6001600160a01b03831661040557604051634b637e8f60e11b81525f60048201526024016103bf565b6001600160a01b03821661042e5760405163ec442f0560e01b81525f60048201526024016103bf565b61035683838361053f565b6001600160a01b03821661046257604051634b637e8f60e11b81525f60048201526024016103bf565b610329825f8361053f565b6001600160a01b0384166104965760405163e602df0560e01b81525f60048201526024016103bf565b6001600160a01b0383166104bf57604051634a1406b160e11b81525f60048201526024016103bf565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156103d657826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161053191815260200190565b60405180910390a350505050565b6001600160a01b038316610569578060025f82825461055e91906107cd565b909155506105d99050565b6001600160a01b0383165f90815260208190526040902054818110156105bb5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103bf565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105f557600280548290039055610613565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161065891815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b8181101561069157858101830151858201604001528201610675565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146106c7575f80fd5b919050565b5f80604083850312156106dd575f80fd5b6106e6836106b1565b946020939093013593505050565b5f805f60608486031215610706575f80fd5b61070f846106b1565b925061071d602085016106b1565b9150604084013590509250925092565b5f6020828403121561073d575f80fd5b5035919050565b5f60208284031215610754575f80fd5b61075d826106b1565b9392505050565b5f8060408385031215610775575f80fd5b61077e836106b1565b915061078c602084016106b1565b90509250929050565b600181811c908216806107a957607f821691505b6020821081036107c757634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156102de57634e487b7160e01b5f52601160045260245ffdfea26469706673582212208c4ec75c36ec98723a5d1dac24f4d3f8a964b3a04069c2e7f3d2bf0b5925ab9064736f6c63430008180033f652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f00000000000000000000000030f3aa4de2152a588695e3f38669a712826c7696

Deployed ByteCode

0x6080604052600436106100fd575f3560e01c80636d669fc211610092578063c30ad99911610062578063c30ad999146102b9578063c33d1288146102d8578063ca97dc85146102f7578063dd14f4b314610326578063e468eb0114610345575f80fd5b80636d669fc21461022a5780639144b6da146102495780639538be0014610268578063b8e7068c14610287575f80fd5b80632560bf86116100cd5780632560bf86146101c157806336a262b8146101e25780633704cf7d146102015780633ec2734114610209575f80fd5b80630911845914610108578063097b49691461012957806312065fe01461017957806314ccd298146101a2575f80fd5b3661010457005b5f80fd5b348015610113575f80fd5b50610127610122366004611e38565b610359565b005b348015610134575f80fd5b5061015c7f00000000000000000000000030f3aa4de2152a588695e3f38669a712826c769681565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610184575f80fd5b5061018d61079a565b60408051928352602083019190915201610170565b3480156101ad575f80fd5b5061015c6101bc366004611e62565b61082a565b3480156101cc575f80fd5b506101d5610852565b6040516101709190611e79565b3480156101ed575f80fd5b506101276101fc366004611e38565b6108ee565b610127610d0b565b348015610214575f80fd5b5061021d610ec0565b6040516101709190611ea9565b348015610235575f80fd5b50610127610244366004611ed9565b610f54565b348015610254575f80fd5b50610127610263366004611f17565b61145c565b348015610273575f80fd5b5061015c610282366004611e62565b61197c565b348015610292575f80fd5b507f00000000000000000000000094d9f6d66044fbf50a91f102010b91262efbdf3961015c565b3480156102c4575f80fd5b5061015c6102d3366004611e62565b61198b565b3480156102e3575f80fd5b5061018d6102f2366004611f57565b61199a565b348015610302575f80fd5b50610316610311366004611f77565b611a06565b6040519015158152602001610170565b348015610331575f80fd5b5061015c610340366004611e62565b611b0d565b348015610350575f80fd5b5061018d611b1c565b335f818152600160205260409020547f00000000000000000000000024601b6cb17b6c6750796fe562e6584da4c82b3f9060ff1615806103a057506001600160a01b038216155b156103be5760405163ef7f167360e01b815260040160405180910390fd5b6040516370a0823160e01b81526001600160a01b038381166004830152670de0b6b3a764000091908316906370a0823190602401602060405180830381865afa15801561040d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104319190611fb1565b1015610450576040516306e64b4560e01b815260040160405180910390fd5b604051636eb1769f60e11b81526001600160a01b038381166004830152306024830152670de0b6b3a7640000919083169063dd62ed3e90604401602060405180830381865afa1580156104a5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104c99190611fb1565b10156104e857604051633519647d60e01b815260040160405180910390fd5b6104f0611b7f565b835f8490036105125760405163901e555360e01b815260040160405180910390fd5b6001600160a01b0381165f9081526004602052604090205460ff16158061054057506001600160a01b038116155b1561055e5760405163627c56b360e11b815260040160405180910390fd5b6040516370a0823160e01b815230600482015284906001600160a01b038716906370a0823190602401602060405180830381865afa1580156105a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105c69190611fb1565b10156105e557604051634a5b2a2560e11b815260040160405180910390fd5b6040516323b872dd60e01b81527f00000000000000000000000024601b6cb17b6c6750796fe562e6584da4c82b3f6001600160a01b0316906323b872dd9061063d9033903090670de0b6b3a764000090600401611fc8565b6020604051808303815f875af1158015610659573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061067d9190611fec565b61069a576040516325d99aa960e11b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000d1cc6fc563af0bf1d020730cc78a13decb7cb371811660048301526024820186905286169063a9059cbb906044016020604051808303815f875af1158015610706573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061072a9190611fec565b61074757604051630feaf2d760e11b815260040160405180910390fd5b604080516001600160a01b038316815260208101869052815133927f3d904a93564abf6b1d096686a4153d4cc16a5c7f3b2d108804044bd42ff9f7fa928290030190a25061079460015f55565b50505050565b6040516370a0823160e01b815230600482015247905f907f00000000000000000000000094d9f6d66044fbf50a91f102010b91262efbdf396001600160a01b0316906370a0823190602401602060405180830381865afa158015610800573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108249190611fb1565b90509091565b60088181548110610839575f80fd5b5f918252602090912001546001600160a01b0316905081565b61085a611de8565b6040518060c00160405280620186a0815260200162278d0064e8d4a510006108829190612026565b61089490670de0b6b3a764000061203d565b6108a9620186a0670de0b6b3a7640000612026565b6108b39190612050565b8152602001620186a0815260200162278d00815260200163685f3080815260200162278d0063685f30806108e7919061203d565b9052919050565b335f818152600160205260409020547f00000000000000000000000024601b6cb17b6c6750796fe562e6584da4c82b3f9060ff16158061093557506001600160a01b038216155b156109535760405163ef7f167360e01b815260040160405180910390fd5b6040516370a0823160e01b81526001600160a01b038381166004830152670de0b6b3a764000091908316906370a0823190602401602060405180830381865afa1580156109a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c69190611fb1565b10156109e5576040516306e64b4560e01b815260040160405180910390fd5b604051636eb1769f60e11b81526001600160a01b038381166004830152306024830152670de0b6b3a7640000919083169063dd62ed3e90604401602060405180830381865afa158015610a3a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a5e9190611fb1565b1015610a7d57604051633519647d60e01b815260040160405180910390fd5b610a8e62278d0063685f308061203d565b421015610aae5760405163d969132560e01b815260040160405180910390fd5b610ab6611b7f565b825f03610ad65760405163901e555360e01b815260040160405180910390fd5b6001600160a01b0384165f9081526002602052604090205460ff161580610b0457506001600160a01b038416155b15610b225760405163627c56b360e11b815260040160405180910390fd5b6040516370a0823160e01b815230600482015283906001600160a01b038616906370a0823190602401602060405180830381865afa158015610b66573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b8a9190611fb1565b1015610ba957604051634a5b2a2560e11b815260040160405180910390fd5b6040516323b872dd60e01b81527f00000000000000000000000024601b6cb17b6c6750796fe562e6584da4c82b3f6001600160a01b0316906323b872dd90610c019033903090670de0b6b3a764000090600401611fc8565b6020604051808303815f875af1158015610c1d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c419190611fec565b610c5e576040516325d99aa960e11b815260040160405180910390fd5b604051630852cd8d60e31b8152600481018490526001600160a01b038516906342966c68906024015f604051808303815f87803b158015610c9d575f80fd5b505af1158015610caf573d5f803e3d5ffd5b50505050610cba3390565b604080516001600160a01b0387811682526020820187905292909216917f857ac1c9e97cc66ecae5f524c9c611463ae748b85af3ca454a5ec4d7d341924d910160405180910390a261079460015f55565b4263685f3080811080610d2d5750610d2a62278d0063685f308061203d565b81115b15610d4b5760405163c56871bd60e01b815260040160405180910390fd5b610d53611b7f565b3433801580610d7e57506001600160a01b03811673a1077a294dde1b09bb078844df40758a5d0f9a27145b15610d9c5760405163ef7f167360e01b815260040160405180910390fd5b7f00000000000000000000000094d9f6d66044fbf50a91f102010b91262efbdf395f610dcd428563685f3080611ba7565b6040516370a0823160e01b81523060048201529092508291506001600160a01b038416906370a0823190602401602060405180830381865afa158015610e15573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e399190611fb1565b1015610e58576040516307dd0fd960e41b815260040160405180910390fd5b610e6c6001600160a01b0383168483611d21565b60408051858152602081018390526001600160a01b038516917fc97e81b2e25bf9e32ea9bf02d76798d8d2ff98820d3dcbd045085538324aa791910160405180910390a250505050610ebd60015f55565b50565b610ec8611e06565b50604080516060810182526001600160a01b037f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9811682527f000000000000000000000000d1cc6fc563af0bf1d020730cc78a13decb7cb371811660208301527f00000000000000000000000024601b6cb17b6c6750796fe562e6584da4c82b3f169181019190915290565b335f818152600160205260409020547f00000000000000000000000024601b6cb17b6c6750796fe562e6584da4c82b3f9060ff161580610f9b57506001600160a01b038216155b15610fb95760405163ef7f167360e01b815260040160405180910390fd5b6040516370a0823160e01b81526001600160a01b038381166004830152670de0b6b3a764000091908316906370a0823190602401602060405180830381865afa158015611008573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061102c9190611fb1565b101561104b576040516306e64b4560e01b815260040160405180910390fd5b604051636eb1769f60e11b81526001600160a01b038381166004830152306024830152670de0b6b3a7640000919083169063dd62ed3e90604401602060405180830381865afa1580156110a0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110c49190611fb1565b10156110e357604051633519647d60e01b815260040160405180910390fd5b6110eb611b7f565b61271083101561110e5760405163901e555360e01b815260040160405180910390fd5b6001600160a01b038416158061112b57506001600160a01b038516155b1561114957604051631863246760e01b815260040160405180910390fd5b6001600160a01b0385165f9081526003602052604090205460ff1661118157604051639979ecb560e01b815260040160405180910390fd5b6001600160a01b0384165f9081526004602052604090205460ff166111b95760405163312a4b8b60e01b815260040160405180910390fd5b6040516370a0823160e01b815230600482015283906001600160a01b038716906370a0823190602401602060405180830381865afa1580156111fd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112219190611fb1565b101561124057604051634a5b2a2560e11b815260040160405180910390fd5b6040516323b872dd60e01b81527f00000000000000000000000024601b6cb17b6c6750796fe562e6584da4c82b3f6001600160a01b0316906323b872dd906112989033903090670de0b6b3a764000090600401611fc8565b6020604051808303815f875af11580156112b4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112d89190611fec565b6112f5576040516325d99aa960e11b815260040160405180910390fd5b60405163095ea7b360e01b81526001600160a01b0385811660048301526024820185905286169063095ea7b3906044016020604051808303815f875af1158015611341573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113659190611fec565b6113825760405163caff824760e01b815260040160405180910390fd5b604051632bfbd9cf60e01b8152600481018490526001600160a01b03851690632bfbd9cf906024016020604051808303815f875af11580156113c6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113ea9190611fec565b6114075760405163fdd9f6bb60e01b815260040160405180910390fd5b336001600160a01b03167f0b7f017ddfa936797d2851ce094fce95af7c8c02dedb90cb9b2c74f036d4c4af86868660405161144493929190611fc8565b60405180910390a261145560015f55565b5050505050565b335f818152600160205260409020547f00000000000000000000000024601b6cb17b6c6750796fe562e6584da4c82b3f9060ff1615806114a357506001600160a01b038216155b156114c15760405163ef7f167360e01b815260040160405180910390fd5b6040516370a0823160e01b81526001600160a01b038381166004830152670de0b6b3a764000091908316906370a0823190602401602060405180830381865afa158015611510573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115349190611fb1565b1015611553576040516306e64b4560e01b815260040160405180910390fd5b604051636eb1769f60e11b81526001600160a01b038381166004830152306024830152670de0b6b3a7640000919083169063dd62ed3e90604401602060405180830381865afa1580156115a8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115cc9190611fb1565b10156115eb57604051633519647d60e01b815260040160405180910390fd5b6115f3611b7f565b7f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d987871580611620575086155b1561163e5760405163901e555360e01b815260040160405180910390fd5b6001600160a01b0381165f9081526002602052604090205460ff16158061166c57506001600160a01b038116155b1561168a5760405163627c56b360e11b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f906001600160a01b038b16906370a0823190602401602060405180830381865afa1580156116ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f29190611fb1565b90508747108061170157508881105b1561171f57604051634a5b2a2560e11b815260040160405180910390fd5b60405163095ea7b360e01b81526001600160a01b038481166004830152602482018390528b169063095ea7b3906044016020604051808303815f875af115801561176b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061178f9190611fec565b6117ac5760405163caff824760e01b815260040160405180910390fd5b6001600160a01b03831663f305d71989848c8b8b306117cd42610e1061203d565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af1158015611838573d5f803e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061185d919061206f565b5050507f00000000000000000000000024601b6cb17b6c6750796fe562e6584da4c82b3f6001600160a01b03166323b872dd6118963390565b30670de0b6b3a76400006040518463ffffffff1660e01b81526004016118be93929190611fc8565b6020604051808303815f875af11580156118da573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118fe9190611fec565b61191b576040516325d99aa960e11b815260040160405180910390fd5b604080516001600160a01b0384168152602081018a90528082018b9052905133917f36f3b2e1a21c19137dd82ec243b0708a1d26b3d1fa1dc49c44c4c366a5878138919081900360600190a250505061197360015f55565b50505050505050565b60068181548110610839575f80fd5b60058181548110610839575f80fd5b5f805f835f036119aa57426119ac565b835b905063685f3080808210806119d057506119cd62278d0063685f308061203d565b82115b156119ee5760405163c56871bd60e01b815260040160405180910390fd5b6119f9828783611ba7565b9097909650945050505050565b5f80836003811115611a1a57611a1a61209a565b03611a4057506001600160a01b0381165f9081526001602052604090205460ff16611b07565b6001836003811115611a5457611a5461209a565b03611a7a57506001600160a01b0381165f9081526002602052604090205460ff16611b07565b6002836003811115611a8e57611a8e61209a565b03611ab457506001600160a01b0381165f9081526003602052604090205460ff16611b07565b6003836003811115611ac857611ac861209a565b03611aee57506001600160a01b0381165f9081526004602052604090205460ff16611b07565b604051631616b52b60e11b815260040160405180910390fd5b92915050565b60078181548110610839575f80fd5b5f804263685f3080811080611b405750611b3d62278d0063685f308061203d565b81115b15611b5e5760405163c56871bd60e01b815260040160405180910390fd5b611b7542670de0b6b3a764000063685f3080611ba7565b9094909350915050565b60025f5403611ba157604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b5f80670de0b6b3a7640000841080611bc957506a084595161401484a00000084115b15611be757604051632c36f60b60e21b815260040160405180910390fd5b5f838611611bf5575f611bff565b611bff84876120ae565b905062278d00811115611c245760405162f3013760e51b815260040160405180910390fd5b5f815f03611c3a57670de0b6b3a7640000611c82565b6d314dc6448d9338c15b0a00000000611c6683722cd76fe086b93ce2f768a00b22a00000000000612026565b611c709190612050565b611c8290670de0b6b3a764000061203d565b90505f815f03611c92575f611cda565b69021e19e0c9bab240000082611cab620186a08a612026565b611cc690701d6329f1c35ca4bfabb9f5610000000000612026565b611cd09190612050565b611cda9190612050565b9050616cbf8702620186a0880280831180611cf457508183105b15611d1257604051635646d13b60e11b815260040160405180910390fd5b50919890975095505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611d73908490611d78565b505050565b5f8060205f8451602086015f885af180611d97576040513d5f823e3d81fd5b50505f513d91508115611dae578060011415611dbb565b6001600160a01b0384163b155b1561079457604051635274afe760e01b81526001600160a01b038516600482015260240160405180910390fd5b6040518060c001604052806006906020820280368337509192915050565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b0381168114610ebd575f80fd5b5f8060408385031215611e49575f80fd5b8235611e5481611e24565b946020939093013593505050565b5f60208284031215611e72575f80fd5b5035919050565b60c0810181835f5b6006811015611ea0578151835260209283019290910190600101611e81565b50505092915050565b6060810181835f5b6003811015611ea05781516001600160a01b0316835260209283019290910190600101611eb1565b5f805f60608486031215611eeb575f80fd5b8335611ef681611e24565b92506020840135611f0681611e24565b929592945050506040919091013590565b5f805f805f60a08688031215611f2b575f80fd5b8535611f3681611e24565b97602087013597506040870135966060810135965060800135945092505050565b5f8060408385031215611f68575f80fd5b50508035926020909101359150565b5f8060408385031215611f88575f80fd5b823560048110611f96575f80fd5b91506020830135611fa681611e24565b809150509250929050565b5f60208284031215611fc1575f80fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f60208284031215611ffc575f80fd5b8151801515811461200b575f80fd5b9392505050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417611b0757611b07612012565b80820180821115611b0757611b07612012565b5f8261206a57634e487b7160e01b5f52601260045260245ffd5b500490565b5f805f60608486031215612081575f80fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b5f52602160045260245ffd5b81810381811115611b0757611b0761201256fea264697066735822122061fb3c3ad701cdb5a6ede99c137fde7da0addcab6beb375141c4c343916876fa64736f6c63430008180033