ETH Price: $3,906.81 (+1.24%)

Contract

0x8d67Ef98c103bE264F2b6D78D02079a11F26DA29
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OMD_LAUNCHPAD_V4

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : OMD_LAUNCHPAD_V4.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";

interface IERC20Burnable {
    function burn(uint256 amount) external returns (bool);

    function burnFrom(address account, uint256 amount) external returns (bool);
}

interface IERC20Decimals {
    function decimals() external returns (uint8);
}

contract OMD_LAUNCHPAD_V4 is
    Initializable,
    ContextUpgradeable,
    OwnableUpgradeable
{
    bytes32[] private whitelistedSymbols;
    mapping(bytes32 => address) private whitelistedTokens;
    mapping(bytes32 => mapping(uint8 => uint256)) private priceTokens;

    mapping(bytes32 => bytes32) private swapPairs;
    mapping(bytes32 => address) private swapTokens;
    mapping(bytes32 => mapping(bytes32 => uint256)) private swapTokensPrice;

    bytes32[] private referalInflCodes;
    mapping(bytes32 => mapping(bytes32 => uint256)) private inflTokenSize;
    mapping(bytes32 => uint16) private inflReflPercent;
    mapping(bytes32 => address) private inflAddress;
    address private addrSafe;
    using SafeERC20Upgradeable for IERC20Upgradeable;

    mapping(bytes32 => mapping(address => uint256)) private swapTokensUnlocked;

    function initialize() public initializer {
        swapTokens[bytes32("OMD")] = address(
            0xA4282798c2199a1C58843088297265acD748168c
        );
        swapTokens[bytes32("stOMD")] = address(
            0x497bdbA917430E72d09993a55cdBBD411763168B
        );
        __Context_init();
        __Ownable_init();
    }

    function getReferalCodes() external view returns (bytes32[] memory) {
        return referalInflCodes;
    }

    function getInflTokenSize(
        bytes32 referalCode,
        bytes32 symbol
    ) external view returns (uint256) {
        return inflTokenSize[referalCode][symbol];
    }

    function getInflFee(bytes32 referalCode) external view returns (uint16) {
        return inflReflPercent[referalCode];
    }

    function getInflAdr(bytes32 referalCode) external view returns (address) {
        return inflAddress[referalCode];
    }

    function getWhitelistedSymbols() external view returns (bytes32[] memory) {
        return whitelistedSymbols;
    }

    function getWhitelistedTokenAddress(
        bytes32 symbol
    ) external view returns (address) {
        return whitelistedTokens[symbol];
    }

    function getTierTokenPrice(
        bytes32 symbol,
        uint8 tier
    ) external view returns (uint256) {
        return priceTokens[symbol][tier];
    }

    function stringSymbolToByte32(
        string memory symbol
    ) public pure returns (bytes32) {
        return bytes32(bytes(symbol));
    }

    function byte32SymbolToString(
        bytes32 symbol
    ) public pure returns (string memory) {
        uint8 i = 0;
        while (i < 32 && symbol[i] != 0) {
            i++;
        }
        bytes memory bytesArray = new bytes(i);
        for (i = 0; i < 32 && symbol[i] != 0; i++) {
            bytesArray[i] = symbol[i];
        }
        return string(bytesArray);
    }

    function getSwapTokenAddress(
        bytes32 symbol
    ) external view returns (address) {
        return swapTokens[symbol];
    }

    function getSwapPair(bytes32 symbol) external view returns (bytes32) {
        return swapPairs[symbol];
    }

    function getSwapTokensUnlocked(
        bytes32 symbol,
        address account
    ) public view returns (uint256) {
        return swapTokensUnlocked[symbol][account];
    }

    function setWhitelistToken(
        bytes32 symbol,
        address tokenAddress,
        uint256 basePrice
    ) external onlyOwner {
        whitelistedSymbols.push(symbol);
        whitelistedTokens[symbol] = tokenAddress;
        priceTokens[symbol][0] = basePrice;
    }

    function setSwaplistToken(
        bytes32 symbolFrom,
        bytes32 symbolTo,
        uint256 price
    ) external onlyOwner {
        swapPairs[symbolFrom] = symbolTo;
        swapTokensPrice[symbolFrom][symbolTo] = price;
    }

    function setTierTokenPrice(
        bytes32 symbol,
        uint8 tier,
        uint256 price
    ) external onlyOwner {
        priceTokens[symbol][tier] = price;
    }

    function setSwapTokenAddress(
        bytes32 symbol,
        address addrToken
    ) external onlyOwner {
        require(addrToken != address(0), "ERC20: contract is the zero address");
        swapTokens[symbol] = addrToken;
    }

    function setSwapTokensUnlocked(
        bytes32 symbol,
        address[] memory arr_address,
        uint256[] memory unlockedAmount
    ) external onlyOwner {
        for (uint i = 0; i < arr_address.length; i++) {
            swapTokensUnlocked[symbol][arr_address[i]] = unlockedAmount[i];
        }
    }

    function setAddressSafe(address _addrSafe) external onlyOwner {
        addrSafe = _addrSafe;
    }

    // percent 1000 = 100% ; 1 = 0.001%
    function setReferalCode(
        bytes32 referalCode,
        uint16 percent,
        address addrInfl
    ) external onlyOwner {
        referalInflCodes.push(referalCode);
        inflReflPercent[referalCode] = percent;
        inflAddress[referalCode] = addrInfl;
    }

    function myPrice(
        address account,
        bytes32 symbol
    ) public view returns (uint256) {
        IERC20Upgradeable stOmd = IERC20Upgradeable(
            swapTokens[bytes32("stOMD")]
        );
        uint256 stake = stOmd.balanceOf(account);
        uint256 price = priceTokens[symbol][0];
        if (stake >= 100 && stake < 1000) price = priceTokens[symbol][1];
        if (stake >= 1000 && stake < 50000) price = priceTokens[symbol][2];
        if (stake >= 50000) price = priceTokens[symbol][3];
        if (price == 0) price = priceTokens[symbol][0];
        return price;
    }

    function mySwapPrice(bytes32 symbolFrom) public view returns (uint256) {
        return swapTokensPrice[symbolFrom][swapPairs[symbolFrom]];
    }

    // default referalCode byte32("base") 0x6261736500000000000000000000000000000000000000000000000000000000
    function buyToken(
        bytes32 symbol,
        uint256 _amount,
        bytes32 referalCode
    ) external {
        require(
            _amount >= 1 * 10 ** 6,
            "Amount must be greater than or equal to 1 OMD."
        );
        IERC20Upgradeable omd = IERC20Upgradeable(swapTokens[bytes32("OMD")]);
        if (addrSafe == address(0)) addrSafe = owner();
        uint256 ourAllowance = omd.allowance(_msgSender(), address(this));
        require(_amount <= ourAllowance, "Make sure to add enough allowance");
        uint256 safeAmount = _amount;
        if (referalCode != bytes32("base")) {
            if (inflAddress[referalCode] != address(0)) {
                require(
                    inflReflPercent[referalCode] > 0,
                    "inflReflPercent[referalCode] must be greater than 0"
                );
                uint256 refAmount = (_amount * inflReflPercent[referalCode]) /
                    1000;
                omd.transferFrom(
                    _msgSender(),
                    inflAddress[referalCode],
                    refAmount
                );
                safeAmount -= refAmount;
            }
            inflTokenSize[referalCode][symbol] += _amount;
        }
        bool success1 = omd.transferFrom(_msgSender(), addrSafe, safeAmount);
        require(
            success1,
            "Transfer failed! Please approve amount OMD for this contract."
        );
        IERC20Upgradeable launchToken = IERC20Upgradeable(
            whitelistedTokens[symbol]
        );
        uint256 price = myPrice(_msgSender(), symbol);
        uint256 amount = (_amount * 10 ** 6) / price;
        require(
            launchToken.balanceOf(address(this)) >= amount,
            "There are not so many tokens for sale."
        );
        bool success2 = launchToken.transfer(_msgSender(), amount);
        require(success2, "Transfer failed! No more tokens for sale.");
        address sender = _msgSender();
        string memory strSymbol = byte32SymbolToString(symbol);
        string memory strReferalCode = byte32SymbolToString(referalCode);
        emit BuyTokenRef(
            sender,
            _amount,
            strSymbol,
            price,
            strReferalCode,
            referalCode
        );
    }

    function swapToken(bytes32 symbolFrom, uint256 _amount) external {
        require(
            _amount >= 1 * 10 ** 6,
            "Amount must be greater than or equal to 1 token."
        );
        bytes32 symbolTo = swapPairs[symbolFrom];
        require(
            _amount <= getSwapTokensUnlocked(symbolTo, _msgSender()),
            "Amount must be less than or equal to swapTokensUnlocked value."
        );
        swapTokensUnlocked[symbolTo][_msgSender()] -= _amount;

        IERC20Burnable tokenFrom = IERC20Burnable(
            whitelistedTokens[symbolFrom]
        );
        bool success1 = tokenFrom.burnFrom(_msgSender(), _amount);
        require(
            success1,
            "Transfer failed! Please approve amount tokenFrom for this contract."
        );
        IERC20Upgradeable tokenTo = IERC20Upgradeable(swapTokens[symbolTo]);
        IERC20Decimals tokenToDecimals = IERC20Decimals(swapTokens[symbolTo]);
        uint8 tokenToDecimal = tokenToDecimals.decimals();
        uint256 amount = (((_amount * mySwapPrice(symbolFrom)) / 10 ** 6) *
            10 ** tokenToDecimal) / 10 ** 6;
        tokenTo.safeTransfer(_msgSender(), amount);
    }

    function withdrawToken(
        address _tokenContract,
        uint256 _amount
    ) external onlyOwner {
        require(
            _tokenContract != address(0),
            "ERC20: contract is the zero address"
        );
        IERC20Upgradeable tokenContract = IERC20Upgradeable(_tokenContract);
        tokenContract.safeTransfer(_msgSender(), _amount);
    }

    event BuyTokenRef(
        address indexed to,
        uint256 amount,
        string symbol,
        uint256 price,
        string referalCode,
        bytes32 indexed refCode
    );
}

File 2 of 8 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 3 of 8 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 4 of 8 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @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 amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

File 5 of 8 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 6 of 8 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../extensions/draft-IERC20PermitUpgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

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

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20PermitUpgradeable token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 8 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 8 of 8 : draft-IERC20PermitUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20PermitUpgradeable {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

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

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

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"string","name":"referalCode","type":"string"},{"indexed":true,"internalType":"bytes32","name":"refCode","type":"bytes32"}],"name":"BuyTokenRef","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32","name":"referalCode","type":"bytes32"}],"name":"buyToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"}],"name":"byte32SymbolToString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referalCode","type":"bytes32"}],"name":"getInflAdr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referalCode","type":"bytes32"}],"name":"getInflFee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referalCode","type":"bytes32"},{"internalType":"bytes32","name":"symbol","type":"bytes32"}],"name":"getInflTokenSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReferalCodes","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"}],"name":"getSwapPair","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"}],"name":"getSwapTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"getSwapTokensUnlocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"},{"internalType":"uint8","name":"tier","type":"uint8"}],"name":"getTierTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistedSymbols","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"}],"name":"getWhitelistedTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"symbol","type":"bytes32"}],"name":"myPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbolFrom","type":"bytes32"}],"name":"mySwapPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addrSafe","type":"address"}],"name":"setAddressSafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referalCode","type":"bytes32"},{"internalType":"uint16","name":"percent","type":"uint16"},{"internalType":"address","name":"addrInfl","type":"address"}],"name":"setReferalCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"},{"internalType":"address","name":"addrToken","type":"address"}],"name":"setSwapTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"},{"internalType":"address[]","name":"arr_address","type":"address[]"},{"internalType":"uint256[]","name":"unlockedAmount","type":"uint256[]"}],"name":"setSwapTokensUnlocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbolFrom","type":"bytes32"},{"internalType":"bytes32","name":"symbolTo","type":"bytes32"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setSwaplistToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"},{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setTierTokenPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbol","type":"bytes32"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"basePrice","type":"uint256"}],"name":"setWhitelistToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"symbol","type":"string"}],"name":"stringSymbolToByte32","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"symbolFrom","type":"bytes32"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenContract","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061231c806100206000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638129fc1c116100f9578063c8b4a8a311610097578063e9548aee11610071578063e9548aee14610471578063eb2511da14610484578063f2fde38b146104ba578063f95ee181146104cd57600080fd5b8063c8b4a8a3146103ff578063d96fb85a14610428578063e88127881461044857600080fd5b8063957d4393116100d3578063957d43931461038257806395a840df146103b95780639a88744c146103cc5780639e281a98146103ec57600080fd5b80638129fc1c1461033957806386538564146103415780638da5cb5b1461037157600080fd5b80634285e97f116101665780635d7df3b4116101405780635d7df3b4146102eb5780636dcf2cdf14610316578063715018a61461031e578063790d7c0a1461032657600080fd5b80634285e97f146102915780634b1e4aa5146102c357806359163521146102d857600080fd5b806327518de8116101a257806327518de8146102175780632f31a6201461025857806333df63d61461026b578063350b84931461027e57600080fd5b8063160a1268146101c95780631993a5fa146101de5780631eaa454a146101f1575b600080fd5b6101dc6101d7366004611b30565b6104e0565b005b6101dc6101ec366004611b5a565b61050a565b6102046101ff366004611b92565b610532565b6040519081526020015b60405180910390f35b610240610225366004611bbc565b6000908152606e60205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200161020e565b6101dc610266366004611bd5565b6106b1565b6101dc610279366004611c01565b610d70565b6101dc61028c366004611bd5565b610dcc565b61020461029f366004611bbc565b6000908152606a602090815260408083206068835281842054845290915290205490565b6102cb610dfa565b60405161020e9190611c2d565b6101dc6102e6366004611c71565b610e52565b6102046102f9366004611c71565b6000918252606c6020908152604080842092845291905290205490565b6102cb61118d565b6101dc6111e3565b6101dc610334366004611d69565b6111f7565b6101dc611291565b61020461034f366004611e34565b600091825260676020908152604080842060ff93909316845291905290205490565b6033546001600160a01b0316610240565b6103a6610390366004611bbc565b6000908152606d602052604090205461ffff1690565b60405161ffff909116815260200161020e565b6101dc6103c7366004611e64565b611441565b6103df6103da366004611bbc565b6114c4565b60405161020e9190611ef9565b6101dc6103fa366004611b92565b6115fb565b61024061040d366004611bbc565b6000908152606960205260409020546001600160a01b031690565b610204610436366004611bbc565b60009081526068602052604090205490565b610240610456366004611bbc565b6000908152606660205260409020546001600160a01b031690565b61020461047f366004611f0c565b611643565b610204610492366004611c01565b60009182526070602090815260408084206001600160a01b0393909316845291905290205490565b6101dc6104c8366004611b30565b61164e565b6101dc6104db366004611fa1565b6116c4565b6104e861173d565b606f80546001600160a01b0319166001600160a01b0392909216919091179055565b61051261173d565b600092835260676020908152604080852060ff9094168552929052912055565b641cdd13d35160da1b600090815260696020527f2d33507180ae71523aed1128fcfbe84c1894f41b19b55889a3c5f37afee3d66d546040516370a0823160e01b81526001600160a01b03858116600483015290911690829082906370a0823190602401602060405180830381865afa1580156105b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d69190611fd6565b60008581526067602090815260408083208380529091529020549091506064821080159061060557506103e882105b1561062757506000848152606760209081526040808320600184529091529020545b6103e8821015801561063a575061c35082105b1561065c57506000848152606760209081526040808320600284529091529020545b61c350821061068257506000848152606760209081526040808320600384529091529020545b806000036106a6575060008481526067602090815260408083208380529091529020545b925050505b92915050565b620f42408210156107205760405162461bcd60e51b815260206004820152602e60248201527f416d6f756e74206d7573742062652067726561746572207468616e206f72206560448201526d38bab0b6103a3790189027a6a21760911b60648201526084015b60405180910390fd5b6213d35160ea1b60005260696020527fa6d391160078ea5071921c1192b956bcece029fa7152cf33f70b9188060580e554606f546001600160a01b03918216911661078857603354606f80546001600160a01b0319166001600160a01b039092169190911790555b60006001600160a01b03821663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa1580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108089190611fd6565b9050808411156108645760405162461bcd60e51b815260206004820152602160248201527f4d616b65207375726520746f2061646420656e6f75676820616c6c6f77616e636044820152606560f81b6064820152608401610717565b83636261736560e01b8414610a0e576000848152606e60205260409020546001600160a01b0316156109df576000848152606d602052604090205461ffff1661090b5760405162461bcd60e51b815260206004820152603360248201527f696e666c5265666c50657263656e745b7265666572616c436f64655d206d75736044820152720742062652067726561746572207468616e203606c1b6064820152608401610717565b6000848152606d60205260408120546103e89061092c9061ffff1688612005565b610936919061201c565b90506001600160a01b0384166323b872dd336000888152606e60205260409081902054905160e084901b6001600160e01b03191681526001600160a01b03928316600482015291166024820152604481018490526064016020604051808303816000875af11580156109ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d0919061203e565b506109db8183612060565b9150505b6000848152606c6020908152604080832089845290915281208054879290610a08908490612073565b90915550505b60006001600160a01b0384166323b872dd33606f5460405160e084901b6001600160e01b03191681526001600160a01b03928316600482015291166024820152604481018590526064016020604051808303816000875af1158015610a77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9b919061203e565b905080610b105760405162461bcd60e51b815260206004820152603d60248201527f5472616e73666572206661696c65642120506c6561736520617070726f76652060448201527f616d6f756e74204f4d4420666f72207468697320636f6e74726163742e0000006064820152608401610717565b6000878152606660205260408120546001600160a01b031690610b33338a610532565b9050600081610b458a620f4240612005565b610b4f919061201c565b6040516370a0823160e01b815230600482015290915081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190611fd6565b1015610c195760405162461bcd60e51b815260206004820152602660248201527f546865726520617265206e6f7420736f206d616e7920746f6b656e7320666f726044820152651039b0b6329760d11b6064820152608401610717565b60006001600160a01b03841663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af1158015610c78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9c919061203e565b905080610cfd5760405162461bcd60e51b815260206004820152602960248201527f5472616e73666572206661696c656421204e6f206d6f726520746f6b656e73206044820152683337b91039b0b6329760b91b6064820152608401610717565b336000610d098d6114c4565b90506000610d168c6114c4565b90508b836001600160a01b03167f0a33c776fa7f8c9629baff6b5cc940732b5292ff2b2071159923f6985e665f4d8f858a86604051610d589493929190612086565b60405180910390a35050505050505050505050505050565b610d7861173d565b6001600160a01b038116610d9e5760405162461bcd60e51b8152600401610717906120b7565b60009182526069602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b610dd461173d565b6000928352606860209081526040808520849055606a8252808520938552929052912055565b60606065805480602002602001604051908101604052809291908181526020018280548015610e4857602002820191906000526020600020905b815481526020019060010190808311610e34575b5050505050905090565b620f4240811015610ebe5760405162461bcd60e51b815260206004820152603060248201527f416d6f756e74206d7573742062652067726561746572207468616e206f72206560448201526f38bab0b6103a379018903a37b5b2b71760811b6064820152608401610717565b600082815260686020526040902054610ed78133610492565b821115610f4c5760405162461bcd60e51b815260206004820152603e60248201527f416d6f756e74206d757374206265206c657373207468616e206f72206571756160448201527f6c20746f2073776170546f6b656e73556e6c6f636b65642076616c75652e00006064820152608401610717565b600081815260706020908152604080832033845290915281208054849290610f75908490612060565b90915550506000838152606660205260408120546001600160a01b031690816379cc6790336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018790526044016020604051808303816000875af1158015610fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100b919061203e565b90508061108c5760405162461bcd60e51b815260206004820152604360248201527f5472616e73666572206661696c65642120506c6561736520617070726f76652060448201527f616d6f756e7420746f6b656e46726f6d20666f72207468697320636f6e74726160648201526231ba1760e91b608482015260a401610717565b600083815260696020908152604080832054815163313ce56760e01b815291516001600160a01b039091169384939092849263313ce56792600480840193919291829003018187875af11580156110e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110b91906120fa565b90506000620f424061111e83600a6121fb565b60008b8152606a6020908152604080832060688352818420548452909152902054620f42409061114e908c612005565b611158919061201c565b6111629190612005565b61116c919061201c565b90506111826001600160a01b0385163383611797565b505050505050505050565b6060606b805480602002602001604051908101604052809291908181526020018280548015610e485760200282019190600052602060002090815481526020019060010190808311610e34575050505050905090565b6111eb61173d565b6111f560006117e9565b565b6111ff61173d565b60005b825181101561128b5781818151811061121d5761121d61220a565b602002602001015160706000868152602001908152602001600020600085848151811061124c5761124c61220a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550808061128390612220565b915050611202565b50505050565b600054610100900460ff16158080156112b15750600054600160ff909116105b806112cb5750303b1580156112cb575060005460ff166001145b61132e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610717565b6000805460ff191660011790558015611351576000805461ff0019166101001790555b60696020527fa6d391160078ea5071921c1192b956bcece029fa7152cf33f70b9188060580e580546001600160a01b031990811673a4282798c2199a1c58843088297265acd748168c17909155641cdd13d35160da1b6000527f2d33507180ae71523aed1128fcfbe84c1894f41b19b55889a3c5f37afee3d66d805490911673497bdba917430e72d09993a55cdbbd411763168b1790556113f061183b565b6113f8611862565b801561143e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b61144961173d565b606b8054600181019091557fbd43cb8ece8cd1863bcd6082d65c5b0d25665b1ce17980f0da43c0ed545f98b4018390556000928352606d60209081526040808520805461ffff191661ffff9590951694909417909355606e9052912080546001600160a01b0319166001600160a01b03909216919091179055565b606060005b60208160ff161080156114fd5750828160ff16602081106114ec576114ec61220a565b1a60f81b6001600160f81b03191615155b15611514578061150c81612239565b9150506114c9565b60008160ff1667ffffffffffffffff81111561153257611532611c93565b6040519080825280601f01601f19166020018201604052801561155c576020820181803683370190505b509050600091505b60208260ff161080156115985750838260ff16602081106115875761158761220a565b1a60f81b6001600160f81b03191615155b156115f457838260ff16602081106115b2576115b261220a565b1a60f81b818360ff16815181106115cb576115cb61220a565b60200101906001600160f81b031916908160001a905350816115ec81612239565b925050611564565b9392505050565b61160361173d565b6001600160a01b0382166116295760405162461bcd60e51b8152600401610717906120b7565b8161163e6001600160a01b0382163384611797565b505050565b60006106ab82612258565b61165661173d565b6001600160a01b0381166116bb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610717565b61143e816117e9565b6116cc61173d565b60658054600181019091557f8ff97419363ffd7000167f130ef7168fbea05faf9251824ca5043f113cc6a7c701839055600092835260666020908152604080852080546001600160a01b0319166001600160a01b039590951694909417909355606781528284208480529052912055565b6033546001600160a01b031633146111f55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610717565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261163e908490611891565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166111f55760405162461bcd60e51b81526004016107179061227f565b600054610100900460ff166118895760405162461bcd60e51b81526004016107179061227f565b6111f5611963565b60006118e6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119939092919063ffffffff16565b80519091501561163e5780806020019051810190611904919061203e565b61163e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610717565b600054610100900460ff1661198a5760405162461bcd60e51b81526004016107179061227f565b6111f5336117e9565b60606119a284846000856119aa565b949350505050565b606082471015611a0b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610717565b6001600160a01b0385163b611a625760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610717565b600080866001600160a01b03168587604051611a7e91906122ca565b60006040518083038185875af1925050503d8060008114611abb576040519150601f19603f3d011682016040523d82523d6000602084013e611ac0565b606091505b5091509150611ad0828286611adb565b979650505050505050565b60608315611aea5750816115f4565b825115611afa5782518084602001fd5b8160405162461bcd60e51b81526004016107179190611ef9565b80356001600160a01b0381168114611b2b57600080fd5b919050565b600060208284031215611b4257600080fd5b6115f482611b14565b60ff8116811461143e57600080fd5b600080600060608486031215611b6f57600080fd5b833592506020840135611b8181611b4b565b929592945050506040919091013590565b60008060408385031215611ba557600080fd5b611bae83611b14565b946020939093013593505050565b600060208284031215611bce57600080fd5b5035919050565b600080600060608486031215611bea57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215611c1457600080fd5b82359150611c2460208401611b14565b90509250929050565b6020808252825182820181905260009190848201906040850190845b81811015611c6557835183529284019291840191600101611c49565b50909695505050505050565b60008060408385031215611c8457600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611cd257611cd2611c93565b604052919050565b600067ffffffffffffffff821115611cf457611cf4611c93565b5060051b60200190565b600082601f830112611d0f57600080fd5b81356020611d24611d1f83611cda565b611ca9565b82815260059290921b84018101918181019086841115611d4357600080fd5b8286015b84811015611d5e5780358352918301918301611d47565b509695505050505050565b600080600060608486031215611d7e57600080fd5b8335925060208085013567ffffffffffffffff80821115611d9e57600080fd5b818701915087601f830112611db257600080fd5b8135611dc0611d1f82611cda565b81815260059190911b8301840190848101908a831115611ddf57600080fd5b938501935b82851015611e0457611df585611b14565b82529385019390850190611de4565b965050506040870135925080831115611e1c57600080fd5b5050611e2a86828701611cfe565b9150509250925092565b60008060408385031215611e4757600080fd5b823591506020830135611e5981611b4b565b809150509250929050565b600080600060608486031215611e7957600080fd5b83359250602084013561ffff81168114611e9257600080fd5b9150611ea060408501611b14565b90509250925092565b60005b83811015611ec4578181015183820152602001611eac565b50506000910152565b60008151808452611ee5816020860160208601611ea9565b601f01601f19169290920160200192915050565b6020815260006115f46020830184611ecd565b60006020808385031215611f1f57600080fd5b823567ffffffffffffffff80821115611f3757600080fd5b818501915085601f830112611f4b57600080fd5b813581811115611f5d57611f5d611c93565b611f6f601f8201601f19168501611ca9565b91508082528684828501011115611f8557600080fd5b8084840185840137600090820190930192909252509392505050565b600080600060608486031215611fb657600080fd5b83359250611fc660208501611b14565b9150604084013590509250925092565b600060208284031215611fe857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176106ab576106ab611fef565b60008261203957634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561205057600080fd5b815180151581146115f457600080fd5b818103818111156106ab576106ab611fef565b808201808211156106ab576106ab611fef565b84815260806020820152600061209f6080830186611ecd565b8460408401528281036060840152611ad08185611ecd565b60208082526023908201527f45524332303a20636f6e747261637420697320746865207a65726f206164647260408201526265737360e81b606082015260800190565b60006020828403121561210c57600080fd5b81516115f481611b4b565b600181815b8085111561215257816000190482111561213857612138611fef565b8085161561214557918102915b93841c939080029061211c565b509250929050565b600082612169575060016106ab565b81612176575060006106ab565b816001811461218c5760028114612196576121b2565b60019150506106ab565b60ff8411156121a7576121a7611fef565b50506001821b6106ab565b5060208310610133831016604e8410600b84101617156121d5575081810a6106ab565b6121df8383612117565b80600019048211156121f3576121f3611fef565b029392505050565b60006115f460ff84168361215a565b634e487b7160e01b600052603260045260246000fd5b60006001820161223257612232611fef565b5060010190565b600060ff821660ff810361224f5761224f611fef565b60010192915050565b80516020808301519190811015612279576000198160200360031b1b821691505b50919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516122dc818460208701611ea9565b919091019291505056fea2646970667358221220352e359f6cdbeaed1e78d4122d44248362352bdbbd6f168038a6f5a77fad81e464736f6c63430008110033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638129fc1c116100f9578063c8b4a8a311610097578063e9548aee11610071578063e9548aee14610471578063eb2511da14610484578063f2fde38b146104ba578063f95ee181146104cd57600080fd5b8063c8b4a8a3146103ff578063d96fb85a14610428578063e88127881461044857600080fd5b8063957d4393116100d3578063957d43931461038257806395a840df146103b95780639a88744c146103cc5780639e281a98146103ec57600080fd5b80638129fc1c1461033957806386538564146103415780638da5cb5b1461037157600080fd5b80634285e97f116101665780635d7df3b4116101405780635d7df3b4146102eb5780636dcf2cdf14610316578063715018a61461031e578063790d7c0a1461032657600080fd5b80634285e97f146102915780634b1e4aa5146102c357806359163521146102d857600080fd5b806327518de8116101a257806327518de8146102175780632f31a6201461025857806333df63d61461026b578063350b84931461027e57600080fd5b8063160a1268146101c95780631993a5fa146101de5780631eaa454a146101f1575b600080fd5b6101dc6101d7366004611b30565b6104e0565b005b6101dc6101ec366004611b5a565b61050a565b6102046101ff366004611b92565b610532565b6040519081526020015b60405180910390f35b610240610225366004611bbc565b6000908152606e60205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200161020e565b6101dc610266366004611bd5565b6106b1565b6101dc610279366004611c01565b610d70565b6101dc61028c366004611bd5565b610dcc565b61020461029f366004611bbc565b6000908152606a602090815260408083206068835281842054845290915290205490565b6102cb610dfa565b60405161020e9190611c2d565b6101dc6102e6366004611c71565b610e52565b6102046102f9366004611c71565b6000918252606c6020908152604080842092845291905290205490565b6102cb61118d565b6101dc6111e3565b6101dc610334366004611d69565b6111f7565b6101dc611291565b61020461034f366004611e34565b600091825260676020908152604080842060ff93909316845291905290205490565b6033546001600160a01b0316610240565b6103a6610390366004611bbc565b6000908152606d602052604090205461ffff1690565b60405161ffff909116815260200161020e565b6101dc6103c7366004611e64565b611441565b6103df6103da366004611bbc565b6114c4565b60405161020e9190611ef9565b6101dc6103fa366004611b92565b6115fb565b61024061040d366004611bbc565b6000908152606960205260409020546001600160a01b031690565b610204610436366004611bbc565b60009081526068602052604090205490565b610240610456366004611bbc565b6000908152606660205260409020546001600160a01b031690565b61020461047f366004611f0c565b611643565b610204610492366004611c01565b60009182526070602090815260408084206001600160a01b0393909316845291905290205490565b6101dc6104c8366004611b30565b61164e565b6101dc6104db366004611fa1565b6116c4565b6104e861173d565b606f80546001600160a01b0319166001600160a01b0392909216919091179055565b61051261173d565b600092835260676020908152604080852060ff9094168552929052912055565b641cdd13d35160da1b600090815260696020527f2d33507180ae71523aed1128fcfbe84c1894f41b19b55889a3c5f37afee3d66d546040516370a0823160e01b81526001600160a01b03858116600483015290911690829082906370a0823190602401602060405180830381865afa1580156105b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d69190611fd6565b60008581526067602090815260408083208380529091529020549091506064821080159061060557506103e882105b1561062757506000848152606760209081526040808320600184529091529020545b6103e8821015801561063a575061c35082105b1561065c57506000848152606760209081526040808320600284529091529020545b61c350821061068257506000848152606760209081526040808320600384529091529020545b806000036106a6575060008481526067602090815260408083208380529091529020545b925050505b92915050565b620f42408210156107205760405162461bcd60e51b815260206004820152602e60248201527f416d6f756e74206d7573742062652067726561746572207468616e206f72206560448201526d38bab0b6103a3790189027a6a21760911b60648201526084015b60405180910390fd5b6213d35160ea1b60005260696020527fa6d391160078ea5071921c1192b956bcece029fa7152cf33f70b9188060580e554606f546001600160a01b03918216911661078857603354606f80546001600160a01b0319166001600160a01b039092169190911790555b60006001600160a01b03821663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa1580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108089190611fd6565b9050808411156108645760405162461bcd60e51b815260206004820152602160248201527f4d616b65207375726520746f2061646420656e6f75676820616c6c6f77616e636044820152606560f81b6064820152608401610717565b83636261736560e01b8414610a0e576000848152606e60205260409020546001600160a01b0316156109df576000848152606d602052604090205461ffff1661090b5760405162461bcd60e51b815260206004820152603360248201527f696e666c5265666c50657263656e745b7265666572616c436f64655d206d75736044820152720742062652067726561746572207468616e203606c1b6064820152608401610717565b6000848152606d60205260408120546103e89061092c9061ffff1688612005565b610936919061201c565b90506001600160a01b0384166323b872dd336000888152606e60205260409081902054905160e084901b6001600160e01b03191681526001600160a01b03928316600482015291166024820152604481018490526064016020604051808303816000875af11580156109ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d0919061203e565b506109db8183612060565b9150505b6000848152606c6020908152604080832089845290915281208054879290610a08908490612073565b90915550505b60006001600160a01b0384166323b872dd33606f5460405160e084901b6001600160e01b03191681526001600160a01b03928316600482015291166024820152604481018590526064016020604051808303816000875af1158015610a77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9b919061203e565b905080610b105760405162461bcd60e51b815260206004820152603d60248201527f5472616e73666572206661696c65642120506c6561736520617070726f76652060448201527f616d6f756e74204f4d4420666f72207468697320636f6e74726163742e0000006064820152608401610717565b6000878152606660205260408120546001600160a01b031690610b33338a610532565b9050600081610b458a620f4240612005565b610b4f919061201c565b6040516370a0823160e01b815230600482015290915081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190611fd6565b1015610c195760405162461bcd60e51b815260206004820152602660248201527f546865726520617265206e6f7420736f206d616e7920746f6b656e7320666f726044820152651039b0b6329760d11b6064820152608401610717565b60006001600160a01b03841663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af1158015610c78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9c919061203e565b905080610cfd5760405162461bcd60e51b815260206004820152602960248201527f5472616e73666572206661696c656421204e6f206d6f726520746f6b656e73206044820152683337b91039b0b6329760b91b6064820152608401610717565b336000610d098d6114c4565b90506000610d168c6114c4565b90508b836001600160a01b03167f0a33c776fa7f8c9629baff6b5cc940732b5292ff2b2071159923f6985e665f4d8f858a86604051610d589493929190612086565b60405180910390a35050505050505050505050505050565b610d7861173d565b6001600160a01b038116610d9e5760405162461bcd60e51b8152600401610717906120b7565b60009182526069602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b610dd461173d565b6000928352606860209081526040808520849055606a8252808520938552929052912055565b60606065805480602002602001604051908101604052809291908181526020018280548015610e4857602002820191906000526020600020905b815481526020019060010190808311610e34575b5050505050905090565b620f4240811015610ebe5760405162461bcd60e51b815260206004820152603060248201527f416d6f756e74206d7573742062652067726561746572207468616e206f72206560448201526f38bab0b6103a379018903a37b5b2b71760811b6064820152608401610717565b600082815260686020526040902054610ed78133610492565b821115610f4c5760405162461bcd60e51b815260206004820152603e60248201527f416d6f756e74206d757374206265206c657373207468616e206f72206571756160448201527f6c20746f2073776170546f6b656e73556e6c6f636b65642076616c75652e00006064820152608401610717565b600081815260706020908152604080832033845290915281208054849290610f75908490612060565b90915550506000838152606660205260408120546001600160a01b031690816379cc6790336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018790526044016020604051808303816000875af1158015610fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100b919061203e565b90508061108c5760405162461bcd60e51b815260206004820152604360248201527f5472616e73666572206661696c65642120506c6561736520617070726f76652060448201527f616d6f756e7420746f6b656e46726f6d20666f72207468697320636f6e74726160648201526231ba1760e91b608482015260a401610717565b600083815260696020908152604080832054815163313ce56760e01b815291516001600160a01b039091169384939092849263313ce56792600480840193919291829003018187875af11580156110e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110b91906120fa565b90506000620f424061111e83600a6121fb565b60008b8152606a6020908152604080832060688352818420548452909152902054620f42409061114e908c612005565b611158919061201c565b6111629190612005565b61116c919061201c565b90506111826001600160a01b0385163383611797565b505050505050505050565b6060606b805480602002602001604051908101604052809291908181526020018280548015610e485760200282019190600052602060002090815481526020019060010190808311610e34575050505050905090565b6111eb61173d565b6111f560006117e9565b565b6111ff61173d565b60005b825181101561128b5781818151811061121d5761121d61220a565b602002602001015160706000868152602001908152602001600020600085848151811061124c5761124c61220a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550808061128390612220565b915050611202565b50505050565b600054610100900460ff16158080156112b15750600054600160ff909116105b806112cb5750303b1580156112cb575060005460ff166001145b61132e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610717565b6000805460ff191660011790558015611351576000805461ff0019166101001790555b60696020527fa6d391160078ea5071921c1192b956bcece029fa7152cf33f70b9188060580e580546001600160a01b031990811673a4282798c2199a1c58843088297265acd748168c17909155641cdd13d35160da1b6000527f2d33507180ae71523aed1128fcfbe84c1894f41b19b55889a3c5f37afee3d66d805490911673497bdba917430e72d09993a55cdbbd411763168b1790556113f061183b565b6113f8611862565b801561143e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b61144961173d565b606b8054600181019091557fbd43cb8ece8cd1863bcd6082d65c5b0d25665b1ce17980f0da43c0ed545f98b4018390556000928352606d60209081526040808520805461ffff191661ffff9590951694909417909355606e9052912080546001600160a01b0319166001600160a01b03909216919091179055565b606060005b60208160ff161080156114fd5750828160ff16602081106114ec576114ec61220a565b1a60f81b6001600160f81b03191615155b15611514578061150c81612239565b9150506114c9565b60008160ff1667ffffffffffffffff81111561153257611532611c93565b6040519080825280601f01601f19166020018201604052801561155c576020820181803683370190505b509050600091505b60208260ff161080156115985750838260ff16602081106115875761158761220a565b1a60f81b6001600160f81b03191615155b156115f457838260ff16602081106115b2576115b261220a565b1a60f81b818360ff16815181106115cb576115cb61220a565b60200101906001600160f81b031916908160001a905350816115ec81612239565b925050611564565b9392505050565b61160361173d565b6001600160a01b0382166116295760405162461bcd60e51b8152600401610717906120b7565b8161163e6001600160a01b0382163384611797565b505050565b60006106ab82612258565b61165661173d565b6001600160a01b0381166116bb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610717565b61143e816117e9565b6116cc61173d565b60658054600181019091557f8ff97419363ffd7000167f130ef7168fbea05faf9251824ca5043f113cc6a7c701839055600092835260666020908152604080852080546001600160a01b0319166001600160a01b039590951694909417909355606781528284208480529052912055565b6033546001600160a01b031633146111f55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610717565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261163e908490611891565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166111f55760405162461bcd60e51b81526004016107179061227f565b600054610100900460ff166118895760405162461bcd60e51b81526004016107179061227f565b6111f5611963565b60006118e6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119939092919063ffffffff16565b80519091501561163e5780806020019051810190611904919061203e565b61163e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610717565b600054610100900460ff1661198a5760405162461bcd60e51b81526004016107179061227f565b6111f5336117e9565b60606119a284846000856119aa565b949350505050565b606082471015611a0b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610717565b6001600160a01b0385163b611a625760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610717565b600080866001600160a01b03168587604051611a7e91906122ca565b60006040518083038185875af1925050503d8060008114611abb576040519150601f19603f3d011682016040523d82523d6000602084013e611ac0565b606091505b5091509150611ad0828286611adb565b979650505050505050565b60608315611aea5750816115f4565b825115611afa5782518084602001fd5b8160405162461bcd60e51b81526004016107179190611ef9565b80356001600160a01b0381168114611b2b57600080fd5b919050565b600060208284031215611b4257600080fd5b6115f482611b14565b60ff8116811461143e57600080fd5b600080600060608486031215611b6f57600080fd5b833592506020840135611b8181611b4b565b929592945050506040919091013590565b60008060408385031215611ba557600080fd5b611bae83611b14565b946020939093013593505050565b600060208284031215611bce57600080fd5b5035919050565b600080600060608486031215611bea57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215611c1457600080fd5b82359150611c2460208401611b14565b90509250929050565b6020808252825182820181905260009190848201906040850190845b81811015611c6557835183529284019291840191600101611c49565b50909695505050505050565b60008060408385031215611c8457600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611cd257611cd2611c93565b604052919050565b600067ffffffffffffffff821115611cf457611cf4611c93565b5060051b60200190565b600082601f830112611d0f57600080fd5b81356020611d24611d1f83611cda565b611ca9565b82815260059290921b84018101918181019086841115611d4357600080fd5b8286015b84811015611d5e5780358352918301918301611d47565b509695505050505050565b600080600060608486031215611d7e57600080fd5b8335925060208085013567ffffffffffffffff80821115611d9e57600080fd5b818701915087601f830112611db257600080fd5b8135611dc0611d1f82611cda565b81815260059190911b8301840190848101908a831115611ddf57600080fd5b938501935b82851015611e0457611df585611b14565b82529385019390850190611de4565b965050506040870135925080831115611e1c57600080fd5b5050611e2a86828701611cfe565b9150509250925092565b60008060408385031215611e4757600080fd5b823591506020830135611e5981611b4b565b809150509250929050565b600080600060608486031215611e7957600080fd5b83359250602084013561ffff81168114611e9257600080fd5b9150611ea060408501611b14565b90509250925092565b60005b83811015611ec4578181015183820152602001611eac565b50506000910152565b60008151808452611ee5816020860160208601611ea9565b601f01601f19169290920160200192915050565b6020815260006115f46020830184611ecd565b60006020808385031215611f1f57600080fd5b823567ffffffffffffffff80821115611f3757600080fd5b818501915085601f830112611f4b57600080fd5b813581811115611f5d57611f5d611c93565b611f6f601f8201601f19168501611ca9565b91508082528684828501011115611f8557600080fd5b8084840185840137600090820190930192909252509392505050565b600080600060608486031215611fb657600080fd5b83359250611fc660208501611b14565b9150604084013590509250925092565b600060208284031215611fe857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176106ab576106ab611fef565b60008261203957634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561205057600080fd5b815180151581146115f457600080fd5b818103818111156106ab576106ab611fef565b808201808211156106ab576106ab611fef565b84815260806020820152600061209f6080830186611ecd565b8460408401528281036060840152611ad08185611ecd565b60208082526023908201527f45524332303a20636f6e747261637420697320746865207a65726f206164647260408201526265737360e81b606082015260800190565b60006020828403121561210c57600080fd5b81516115f481611b4b565b600181815b8085111561215257816000190482111561213857612138611fef565b8085161561214557918102915b93841c939080029061211c565b509250929050565b600082612169575060016106ab565b81612176575060006106ab565b816001811461218c5760028114612196576121b2565b60019150506106ab565b60ff8411156121a7576121a7611fef565b50506001821b6106ab565b5060208310610133831016604e8410600b84101617156121d5575081810a6106ab565b6121df8383612117565b80600019048211156121f3576121f3611fef565b029392505050565b60006115f460ff84168361215a565b634e487b7160e01b600052603260045260246000fd5b60006001820161223257612232611fef565b5060010190565b600060ff821660ff810361224f5761224f611fef565b60010192915050565b80516020808301519190811015612279576000198160200360031b1b821691505b50919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516122dc818460208701611ea9565b919091019291505056fea2646970667358221220352e359f6cdbeaed1e78d4122d44248362352bdbbd6f168038a6f5a77fad81e464736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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