ETH Price: $2,603.60 (-0.87%)

Contract

0x7E2bDd0837A497513A4650Ac477aDF7475D87ecE
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Transaction Hash
Method
Block
From
To
Sell Altcoin171451652023-04-28 14:17:47482 days ago1682691467IN
0x7E2bDd08...475D87ecE
0 ETH0.0118782340.52899893
Renounce Role162462972022-12-23 8:42:59608 days ago1671784979IN
0x7E2bDd08...475D87ecE
0 ETH0.0003555113.13310854
Grant Role162462902022-12-23 8:41:35608 days ago1671784895IN
0x7E2bDd08...475D87ecE
0 ETH0.0007518414.07211849
Set Multicall162462822022-12-23 8:39:59608 days ago1671784799IN
0x7E2bDd08...475D87ecE
0 ETH0.0003979613.48443045
0x61010060162462392022-12-23 8:31:23608 days ago1671784283IN
 Create: UnimoonTreasury
0 ETH0.0524746816

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UnimoonTreasury

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 13 : UnimoonTreasury.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "./interfaces/IToken.sol";
import "./interfaces/IRouter.sol";
import "./interfaces/IStaking.sol";
import "./pancake-swap/libraries/TransferHelper.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

contract UnimoonTreasury is AccessControl, ReentrancyGuard {
    using EnumerableSet for EnumerableSet.AddressSet;

    bytes32 public constant BACKEND_ROLE = keccak256("BACKEND_ROLE");
    uint8 public constant DENOMINATOR = 100;

    address public immutable UNIMOON_TOKEN;
    address public immutable USDC;
    IRouter public immutable ROUTER;
    IStaking public immutable STAKING;

    address public multicall;

    uint8 public stakingProfitPerc;
    FeeDistribution[2] public feeDistribution;

    EnumerableSet.AddressSet private _activeTokens;
    EnumerableSet.AddressSet private _allPurchasedTokens;

    mapping(address => Purchase[]) public purchases; // altcoin => array of purchases for this altcoin

    struct FeeDistribution {
        address to;
        uint8 percent;
    }

    struct Purchase {
        uint256 purchasedAmount; // in altcoin
        uint256 spendedAmount; // in USDC
        uint256 alreadySold; // in altcoin
        uint256 pricePerOneToken; // in USDC
    }

    event PurchaseNewAltcoin(
        address altcoin,
        uint256 purchasedAmount,
        uint256 spendedAmount,
        uint256 id
    );
    event SellAltcoin(
        address altcoin,
        uint256 id,
        uint256 sold,
        uint256 received,
        uint256 profit
    );

    // addresses: [0] - owner, [1] - backend, [2] - unimoon token, [3] - usdc, [4] - router, [5] - staking
    constructor(
        uint8 _stakingProfitPerc,
        FeeDistribution[2] memory _feeDistribution,
        address[6] memory _addresses
    ) {
        require(
            _addresses[0] != address(0) &&
                _addresses[1] != address(0) &&
                _addresses[2] != address(0) &&
                _addresses[3] != address(0) &&
                _addresses[4] != address(0) &&
                _addresses[5] != address(0) &&
                _feeDistribution[0].to != address(0) &&
                _feeDistribution[1].to != address(0),
            "UnimoonTreasury: address 0x0..."
        );
        require(
            _feeDistribution[0].percent + _feeDistribution[1].percent <=
                DENOMINATOR,
            "UnimoonTreasury: wrong fee distribution percent values"
        );

        UNIMOON_TOKEN = _addresses[2];
        USDC = _addresses[3];
        ROUTER = IRouter(_addresses[4]);
        STAKING = IStaking(_addresses[5]);

        stakingProfitPerc = _stakingProfitPerc;
        feeDistribution[0] = _feeDistribution[0];
        feeDistribution[1] = _feeDistribution[1];

        _setupRole(DEFAULT_ADMIN_ROLE, _addresses[0]);
        _setupRole(BACKEND_ROLE, _addresses[1]);
    }

    modifier swapExistTokens() {
        uint256 balance = IToken(UNIMOON_TOKEN).balanceOf(address(this));
        if (balance > 0) {
            address[] memory path = new address[](2);
            path[0] = UNIMOON_TOKEN;
            path[1] = USDC;

            TransferHelper.safeApprove(UNIMOON_TOKEN, address(ROUTER), balance);
            uint256[] memory amounts = ROUTER.swapExactTokensForTokens(
                balance,
                0,
                path,
                address(this),
                block.timestamp
            );
            TransferHelper.safeTransfer(
                USDC,
                feeDistribution[0].to,
                (amounts[1] * feeDistribution[0].percent) / DENOMINATOR
            );
            TransferHelper.safeTransfer(
                USDC,
                feeDistribution[1].to,
                (amounts[1] * feeDistribution[1].percent) / DENOMINATOR
            );
        }
        _;
    }

    modifier onlyAdminOrBackOrToken() {
        require(
            hasRole(DEFAULT_ADMIN_ROLE, _msgSender()) ||
                hasRole(BACKEND_ROLE, _msgSender()) ||
                UNIMOON_TOKEN == _msgSender(),
            "UnimoonTreasury: wrong sender"
        );
        _;
    }

    /** @dev View function to get an array of all altcoin purchases
     * @param altcoin token address
     * @return an array of purchases
     */
    function getAllAltcoinPurchases(address altcoin)
        external
        view
        returns (Purchase[] memory)
    {
        return purchases[altcoin];
    }

    /** @dev View function to get available USDC balance in
     * treasury (USDC treasury contract balance + non-swapped swap fees)
     * @return available USDC balance
     */
    function gelAllAvailableFunds() external view returns (uint256) {
        uint256 balance = IToken(UNIMOON_TOKEN).balanceOf(address(this));
        if (balance == 0) return IToken(USDC).balanceOf(address(this));
        address[] memory path = new address[](2);
        path[0] = UNIMOON_TOKEN;
        path[1] = USDC;
        uint256[] memory amounts = ROUTER.getAmountsOut(balance, path);
        return
            IToken(USDC).balanceOf(address(this)) +
            (amounts[1] *
                (DENOMINATOR -
                    feeDistribution[0].percent -
                    feeDistribution[1].percent)) /
            DENOMINATOR;
    }

    /** @dev View function to get the list of unsold tokens
     * @return an array of unsold token addresses
     */
    function getListOfActiveTokens() external view returns (address[] memory) {
        return _activeTokens.values();
    }

    /** @dev View function to get the list of all purchased (sold+unsold) tokens
     * @return an array of all purchased (sold+unsold) token addresses
     */
    function getListOfAllTokens() external view returns (address[] memory) {
        return _allPurchasedTokens.values();
    }

    /** @dev Function to create purchase of current altcoin in UniswapV2
     * @notice available for backend only
     * @param amount of USDC you're ready to spend
     * @param amountOutMin minimum amount of altcoins you're ready to purchase
     * @param path to swap ([USDC, altcoin], for example)
     * @return received amount of altcoins
     */
    function purchaseNewAltcoin(
        uint256 amount,
        uint256 amountOutMin,
        address[] memory path
    )
        external
        onlyRole(BACKEND_ROLE)
        swapExistTokens
        nonReentrant
        returns (uint256)
    {
        require(
            path.length > 1 && path[0] == USDC,
            "UnimoonTreasury: wrong path"
        );
        require(
            amount > 0 && IToken(USDC).balanceOf(address(this)) >= amount,
            "UnimoonTreasury: wrong amount"
        );

        TransferHelper.safeApprove(USDC, address(ROUTER), amount);
        address altcoin = path[path.length - 1];
        uint256 beforeTokenBalance = IToken(altcoin).balanceOf(
            address(this)
        );
        uint256[] memory amounts = ROUTER.swapExactTokensForTokens(
            amount,
            amountOutMin,
            path,
            address(this),
            block.timestamp
        );
        amounts[amounts.length - 1] =
            IToken(altcoin).balanceOf(address(this)) -
            beforeTokenBalance;

        purchases[altcoin].push(
            Purchase(
                amounts[amounts.length - 1],
                amount,
                0,
                (amount * (10**IToken(altcoin).decimals())) /
                    amounts[amounts.length - 1]
            )
        );

        // accounting for the list of tokens
        if (!_activeTokens.contains(altcoin)) {
            _activeTokens.add(altcoin);
            if (!_allPurchasedTokens.contains(altcoin))
                _allPurchasedTokens.add(altcoin);
        }

        emit PurchaseNewAltcoin(
            altcoin,
            amounts[amounts.length - 1],
            amount,
            purchases[altcoin].length - 1
        );

        return amounts[amounts.length - 1];
    }

    /** @dev Function to sell purchased altcoin and distribute profit
     * @notice available for backend only
     * @param path to swap ([altcoin, USDC], for example)
     * @param id an index of current purchase from an array of all existed purchases
     * @param sellPercent percent which is necessary to spend
     * ( spended amount will be equal to (purchase.purchasedAmount - purchase.alreadySold) * sellPercent / 100) )
     * @param amountOutMin minimal amount of USDC you are ready to get (depends on slippage)
     * @return received amount of USDC
     */
    function sellAltcoin(
        address[] memory path,
        uint256 id,
        uint8 sellPercent,
        uint256 amountOutMin
    )
        external
        onlyRole(BACKEND_ROLE)
        swapExistTokens
        nonReentrant
        returns (uint256)
    {
        require(
            path.length > 1 && path[path.length - 1] == USDC,
            "UnimoonTreasury: wrong path"
        );
        address altcoin = path[0];
        require(purchases[altcoin].length > id, "UnimoonTreasury: wrong id");
        Purchase storage purch = purchases[altcoin][id];
        uint256 amountToSell = (sellPercent >= DENOMINATOR)
            ? purch.purchasedAmount - purch.alreadySold
            : ((purch.purchasedAmount - purch.alreadySold) * sellPercent) /
                DENOMINATOR;
        require(
            amountToSell > 0 &&
                IToken(altcoin).balanceOf(address(this)) >= amountToSell,
            "UnimoonTreasury: wrong amount"
        );

        TransferHelper.safeApprove(altcoin, address(ROUTER), amountToSell);
        uint256[] memory amounts;
        amounts = new uint256[](2);
        amounts[0] = amountToSell;
        uint256 usdcBalanceBefore = IToken(USDC).balanceOf(address(this));
        ROUTER.swapExactTokensForTokensSupportingFeeOnTransferTokens(
            amountToSell,
            amountOutMin,
            path,
            address(this),
            block.timestamp
        );
        amounts[1] = IToken(USDC).balanceOf(address(this)) - usdcBalanceBefore;
        purch.alreadySold += amounts[0];
        // calculate profit (or inflation)
        uint256 oldValue = (purch.pricePerOneToken * amountToSell) /
            (10**IToken(altcoin).decimals());
        uint256 profit;
        if (amounts[1] > oldValue) {
            profit = amounts[1] - oldValue;
            // call increase staking method
            (uint256 alloc, uint256 weight) = STAKING.getAllocAndWeight();
            if (alloc > 0 && weight > 0 && stakingProfitPerc > 0) {
                TransferHelper.safeTransfer(
                    USDC,
                    address(STAKING),
                    ((amounts[1] - oldValue) *
                        stakingProfitPerc) / DENOMINATOR
                );
                STAKING.increaseRewardPool(
                    ((amounts[1] - oldValue) *
                        stakingProfitPerc) / DENOMINATOR
                );
            }
        }

        // accounting for the list of tokens
        if (IToken(altcoin).balanceOf(address(this)) == 0)
            _activeTokens.remove(altcoin);

        emit SellAltcoin(
            altcoin,
            id,
            amountToSell,
            amounts[1],
            profit
        );

        return amounts[1];
    }

    /** @dev Function to swap stored Unimoon token fees
     * @notice available for backend and owner only
     */
    function swapUnimoonToUSDC()
        external
        onlyAdminOrBackOrToken
        swapExistTokens
        nonReentrant
    {
        //
    }

    /** @dev Function to change team and marketing addresses and percent of fees that they get
     * @notice available for owner only
     * @param _feeDistribution an array of objects in FeeDistribution structure format
     */
    function changeFeeDistribution(FeeDistribution[2] memory _feeDistribution)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(
            _feeDistribution[0].to != address(0) &&
                _feeDistribution[1].to != address(0),
            "UnimoonTreasury: wrong receiver"
        );
        require(
            _feeDistribution[0].percent + _feeDistribution[1].percent <=
                DENOMINATOR,
            "UnimoonTreasury: wrong percents"
        );
        feeDistribution[0] = _feeDistribution[0];
        feeDistribution[1] = _feeDistribution[1];
    }

    /** @dev Function to change staking profit distribution percent
     * @notice available for owner only
     * @param _profitDistribution new staking profit distribution percent
     */
    function changeProfitDistribution(uint8 _profitDistribution)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(
            _profitDistribution <= DENOMINATOR,
            "UnimoonTreasury: wrong percent"
        );
        stakingProfitPerc = _profitDistribution;
    }

    /** @dev Function to emergency withdraw tokens. Removes all of the existed purchases with this token
     * @notice available for owner only
     * @param _token token is necessary to withdraw
     */
    function emergencyWithdrawTokens(address _token)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(_token != address(0), "UnimoonTreasury: wrong input");
        uint256 balance = IToken(_token).balanceOf(address(this));
        if (balance > 0) {
            delete purchases[_token];
            TransferHelper.safeTransfer(_token, _msgSender(), balance);
        }
    }

    /** @dev Function to set multicall contract address.
     * @notice available for owner only
     * @param _multicall contract address
     */
    function setMulticall(address _multicall)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(_multicall != address(0), "UnimoonTreasury: wrong input");
        multicall = _multicall;
    }

    function _msgSender() internal view override returns (address sender) {
        if (multicall == msg.sender) {
            // The assembly code is more direct than the Solidity version using abi.decode.
            /// @solidity memory-safe-assembly
            assembly {
                sender := shr(96, calldataload(sub(calldatasize(), 20)))
            }
        } else {
            return super._msgSender();
        }
    }
}

File 2 of 13 : IToken.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IToken {
    function balanceOf(address account) external view returns (uint256);

    function decimals() external view returns (uint8);
}

File 3 of 13 : IRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IRouter {
    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function getAmountsOut(uint256 amountIn, address[] memory path)
        external
        view
        returns (uint256[] memory amounts);
}

File 4 of 13 : IStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IStaking {
    struct Data {
        uint256 value;
        uint64 lockedFrom;
        uint64 lockedUntil;
        uint256 weight;
        uint256 lastAccValue;
        uint256 pendingYield;
    }

    function increaseRewardPool(uint256 amount) external;

    function getAllocAndWeight() external view returns (uint256, uint256);

    function pendingRewardPerDeposit(
        address user,
        uint8 pid,
        uint256 stakeId
    ) external view returns (uint256);

    function getUserStakes(address user, uint256 pid)
        external
        view
        returns (Data[] memory);
}

File 5 of 13 : TransferHelper.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper::safeApprove: approve failed"
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper::safeTransfer: transfer failed"
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper::transferFrom: transferFrom failed"
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(
            success,
            "TransferHelper::safeTransferETH: ETH transfer failed"
        );
    }
}

File 6 of 13 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 7 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 8 of 13 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.
 *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 9 of 13 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 10 of 13 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 11 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

File 12 of 13 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 13 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * 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[EIP 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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint8","name":"_stakingProfitPerc","type":"uint8"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint8","name":"percent","type":"uint8"}],"internalType":"struct UnimoonTreasury.FeeDistribution[2]","name":"_feeDistribution","type":"tuple[2]"},{"internalType":"address[6]","name":"_addresses","type":"address[6]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"altcoin","type":"address"},{"indexed":false,"internalType":"uint256","name":"purchasedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"spendedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"PurchaseNewAltcoin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"altcoin","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"received","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"profit","type":"uint256"}],"name":"SellAltcoin","type":"event"},{"inputs":[],"name":"BACKEND_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DENOMINATOR","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROUTER","outputs":[{"internalType":"contract IRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKING","outputs":[{"internalType":"contract IStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNIMOON_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint8","name":"percent","type":"uint8"}],"internalType":"struct UnimoonTreasury.FeeDistribution[2]","name":"_feeDistribution","type":"tuple[2]"}],"name":"changeFeeDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_profitDistribution","type":"uint8"}],"name":"changeProfitDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"emergencyWithdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"feeDistribution","outputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint8","name":"percent","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gelAllAvailableFunds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"altcoin","type":"address"}],"name":"getAllAltcoinPurchases","outputs":[{"components":[{"internalType":"uint256","name":"purchasedAmount","type":"uint256"},{"internalType":"uint256","name":"spendedAmount","type":"uint256"},{"internalType":"uint256","name":"alreadySold","type":"uint256"},{"internalType":"uint256","name":"pricePerOneToken","type":"uint256"}],"internalType":"struct UnimoonTreasury.Purchase[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getListOfActiveTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getListOfAllTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multicall","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"purchaseNewAltcoin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"purchases","outputs":[{"internalType":"uint256","name":"purchasedAmount","type":"uint256"},{"internalType":"uint256","name":"spendedAmount","type":"uint256"},{"internalType":"uint256","name":"alreadySold","type":"uint256"},{"internalType":"uint256","name":"pricePerOneToken","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint8","name":"sellPercent","type":"uint8"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"}],"name":"sellAltcoin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_multicall","type":"address"}],"name":"setMulticall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingProfitPerc","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapUnimoonToUSDC","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101006040523480156200001257600080fd5b5060405162003ea738038062003ea78339810160408190526200003591620004a3565b6001805580516001600160a01b0316158015906200005f575060208101516001600160a01b031615155b801562000078575060408101516001600160a01b031615155b801562000091575060608101516001600160a01b031615155b8015620000aa575060808101516001600160a01b031615155b8015620000c3575060a08101516001600160a01b031615155b8015620000da57508151516001600160a01b031615155b8015620000f457506020820151516001600160a01b031615155b620001465760405162461bcd60e51b815260206004820152601f60248201527f556e696d6f6f6e54726561737572793a2061646472657373203078302e2e2e0060448201526064015b60405180910390fd5b602082810151810151835190910151606491620001639162000569565b60ff161115620001dc5760405162461bcd60e51b815260206004820152603660248201527f556e696d6f6f6e54726561737572793a2077726f6e672066656520646973747260448201527f69627574696f6e2070657263656e742076616c7565730000000000000000000060648201526084016200013d565b60408101516001600160a01b0390811660809081526060830151821660a090815290830151821660c052820151811660e0526002805460ff60a01b1916600160a01b60ff8781168202929092179092558451805160038054602093840151851686026001600160a81b031991821693881693909317929092179055818701518051600480549290940151909416909402931691909316171790556200028a600082815b6020020151620002c1565b620002b87f25cf2b509f2a7f322675b2a5322b182f44ad2c03ac941a0af17c9b178f5d5d5f8260016200027f565b5050506200059d565b620002cd8282620002d1565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620002cd576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200032f62000373565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600254600090336001600160a01b039091160362000398575060131936013560601c90565b620003ad620003b260201b620026b81760201c565b905090565b3390565b805160ff81168114620003c857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715620004085762000408620003cd565b60405290565b80516001600160a01b0381168114620003c857600080fd5b600082601f8301126200043857600080fd5b60405160c081016001600160401b03811182821017156200045d576200045d620003cd565b6040528060c08401858111156200047357600080fd5b845b81811015620004985762000489816200040e565b83526020928301920162000475565b509195945050505050565b60008060006101608486031215620004ba57600080fd5b620004c584620003b6565b9250602085603f860112620004d957600080fd5b620004e3620003e3565b8060a0870188811115620004f657600080fd5b8388015b818110156200054c576040818b031215620005155760008081fd5b6200051f620003e3565b6200052a826200040e565b815262000539868301620003b6565b81870152845292840192604001620004fa565b508195506200055c898262000426565b9450505050509250925092565b600060ff821660ff84168060ff038211156200059557634e487b7160e01b600052601160045260246000fd5b019392505050565b60805160a05160c05160e05161379562000712600039600081816103f0015281816123860152818161245b01526124d10152600081816102bb0152818161075a01528181610c7701528181610cb6015281816110df0152818161111e015281816113da0152818161149f01528181611c6201528181611ca10152818161204b015261213e01526000818161039901528181610610015281816107000152818161084d01528181610bff01528181610d4101528181610dc001528181611067015281816111a9015281816111d601528181611236015281816112f2015281816113b901528181611bea01528181611d2c01528181611d5901528181611db9015281816120c7015281816121d8015261243a01526000818161041f01528181610586015281816106ac01528181610a7f01528181610b0d01528181610bab01528181610c5601528181610f7501528181611013015281816110be01528181611af801528181611b960152611c4101526137956000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c8063674da505116100f9578063a628a75811610097578063b5ee90b211610071578063b5ee90b214610467578063d547741f1461046f578063e3095f9414610482578063e95417441461049557600080fd5b8063a628a7581461041a578063ab7fff4614610441578063b2af127c1461045457600080fd5b806391d14854116100d357806391d14854146103c357806392c2becc146103d657806397610f30146103eb578063a217fddf1461041257600080fd5b8063674da5051461037457806389a3027114610394578063918f8674146103bb57600080fd5b80632f2ff15d11610166578063462c531311610140578063462c5313146102f0578063498d1a04146103245780634ddd33cc1461032c57806352d3f8491461034157600080fd5b80632f2ff15d146102a357806332fe7b26146102b657806336568abe146102dd57600080fd5b806318f5b2bf116101a257806318f5b2bf1461022c5780631cdcf85a14610242578063248a9ca31461026d57806326c8dc501461029057600080fd5b806301ffc9a7146101c95780630767e3b9146101f15780631847033614610206575b600080fd5b6101dc6101d7366004612ea1565b6104a8565b60405190151581526020015b60405180910390f35b6102046101ff366004612eda565b6104df565b005b60025461021a90600160a01b900460ff1681565b60405160ff90911681526020016101e8565b610234610564565b6040519081526020016101e8565b600254610255906001600160a01b031681565b6040516001600160a01b0390911681526020016101e8565b61023461027b366004612ef7565b60009081526020819052604090206001015490565b61020461029e366004612f2c565b6108d2565b6102046102b1366004612f47565b610956565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b6102046102eb366004612f47565b610980565b6103036102fe366004612ef7565b610a0e565b604080516001600160a01b03909316835260ff9091166020830152016101e8565b610204610a39565b610334610e26565b6040516101e89190612fb7565b61035461034f366004612fca565b610e37565b6040805194855260208501939093529183015260608201526080016101e8565b610387610382366004612f2c565b610e7d565b6040516101e89190612ff4565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b61021a606481565b6101dc6103d1366004612f47565b610f1a565b61023460008051602061374083398151915281565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b610234600081565b6102557f000000000000000000000000000000000000000000000000000000000000000081565b61023461044f36600461315e565b610f43565b610204610462366004612f2c565b611847565b61033461194e565b61020461047d366004612f47565b61195a565b6102046104903660046131ae565b61197f565b6102346104a3366004613245565b611ac6565b60006001600160e01b03198216637965db0b60e01b14806104d957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006104ea816126bc565b606460ff831611156105435760405162461bcd60e51b815260206004820152601e60248201527f556e696d6f6f6e54726561737572793a2077726f6e672070657263656e74000060448201526064015b60405180910390fd5b506002805460ff909216600160a01b0260ff60a01b19909216919091179055565b6040516370a0823160e01b815230600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156105cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f191906132a6565b905080600003610689576040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561065f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068391906132a6565b91505090565b6040805160028082526060820183526000926020830190803683370190505090507f0000000000000000000000000000000000000000000000000000000000000000816000815181106106de576106de6132bf565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610732576107326132bf565b6001600160a01b03928316602091820292909201015260405163d06ca61f60e01b81526000917f0000000000000000000000000000000000000000000000000000000000000000169063d06ca61f9061079190869086906004016132d5565b600060405180830381865afa1580156107ae573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107d691908101906132f6565b60045460035491925060649160ff600160a01b928390048116926107fc9204168361339d565b610806919061339d565b60ff168260018151811061081c5761081c6132bf565b602002602001015161082e91906133c0565b61083891906133df565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561089c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c091906132a6565b6108ca9190613401565b935050505090565b60006108dd816126bc565b6001600160a01b0382166109335760405162461bcd60e51b815260206004820152601c60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720696e70757400000000604482015260640161053a565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260208190526040902060010154610971816126bc565b61097b83836126d0565b505050565b610988612755565b6001600160a01b0316816001600160a01b031614610a005760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161053a565b610a0a828261277e565b5050565b60038160028110610a1e57600080fd5b01546001600160a01b0381169150600160a01b900460ff1682565b610a4660006103d1612755565b80610a665750610a666000805160206137408339815191526103d1612755565b80610aa95750610a74612755565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316145b610af55760405162461bcd60e51b815260206004820152601d60248201527f556e696d6f6f6e54726561737572793a2077726f6e672073656e646572000000604482015260640161053a565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8091906132a6565b90508015610dfd576040805160028082526060820183526000926020830190803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610bdd57610bdd6132bf565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610c3157610c316132bf565b60200260200101906001600160a01b031690816001600160a01b031681525050610c9c7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000084612801565b6040516338ed173960e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906338ed173990610cf39086908590879030904290600401613419565b6000604051808303816000875af1158015610d12573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d3a91908101906132f6565b9050610dbb7f0000000000000000000000000000000000000000000000000000000000000000600360005b01546001600160a01b03166064600360005b01548551600160a01b90910460ff169086906001908110610d9a57610d9a6132bf565b6020026020010151610dac91906133c0565b610db691906133df565b612930565b610dfa7f0000000000000000000000000000000000000000000000000000000000000000600360015b01546001600160a01b0316606460036001610d77565b50505b600260015403610e1f5760405162461bcd60e51b815260040161053a90613455565b5060018055565b6060610e326005612a5a565b905090565b60096020528160005260406000208181548110610e5357600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919450925084565b6001600160a01b0381166000908152600960209081526040808320805482518185028101850190935280835260609492939192909184015b82821015610f0f578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190610eb5565b505050509050919050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000600080516020613740833981519152610f5d816126bc565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610fc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe891906132a6565b90508015611201576040805160028082526060820183526000926020830190803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611045576110456132bf565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110611099576110996132bf565b60200260200101906001600160a01b031690816001600160a01b0316815250506111047f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000084612801565b6040516338ed173960e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906338ed17399061115b9086908590879030904290600401613419565b6000604051808303816000875af115801561117a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111a291908101906132f6565b90506111d17f000000000000000000000000000000000000000000000000000000000000000060036000610d65565b6111fe7f000000000000000000000000000000000000000000000000000000000000000060036001610de4565b50505b6002600154036112235760405162461bcd60e51b815260040161053a90613455565b60026001908155845111801561128457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031684600081518110611271576112716132bf565b60200260200101516001600160a01b0316145b6112d05760405162461bcd60e51b815260206004820152601b60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720706174680000000000604482015260640161053a565b60008611801561136857506040516370a0823160e01b815230600482015286907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611341573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136591906132a6565b10155b6113b45760405162461bcd60e51b815260206004820152601d60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720616d6f756e74000000604482015260640161053a565b6113ff7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000088612801565b60008460018651611410919061348c565b81518110611420576114206132bf565b60209081029190910101516040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611475573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149991906132a6565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166338ed17398a8a8a30426040518663ffffffff1660e01b81526004016114f1959493929190613419565b6000604051808303816000875af1158015611510573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261153891908101906132f6565b6040516370a0823160e01b815230600482015290915082906001600160a01b038516906370a0823190602401602060405180830381865afa158015611581573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a591906132a6565b6115af919061348c565b81600183516115be919061348c565b815181106115ce576115ce6132bf565b60200260200101818152505060096000846001600160a01b03166001600160a01b0316815260200190815260200160002060405180608001604052808360018551611619919061348c565b81518110611629576116296132bf565b602002602001015181526020018b8152602001600081526020018360018551611652919061348c565b81518110611662576116626132bf565b6020026020010151866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cc91906134a3565b6116d790600a6135a4565b6116e1908e6133c0565b6116eb91906133df565b90528154600181810184556000938452602093849020835160049093020191825592820151928101929092556040810151600283015560600151600390910155611736600584612a6e565b61176257611745600584612a90565b50611751600784612a6e565b61176257611760600784612a90565b505b7fdc8ab43f84fa54103e17414173534455b5fde004965801b361a399086dc37069838260018451611793919061348c565b815181106117a3576117a36132bf565b60200260200101518b600160096000896001600160a01b03166001600160a01b03168152602001908152602001600020805490506117e1919061348c565b604080516001600160a01b039095168552602085019390935291830152606082015260800160405180910390a1806001825161181d919061348c565b8151811061182d5761182d6132bf565b602002602001015195505050505050600180559392505050565b6000611852816126bc565b6001600160a01b0382166118a85760405162461bcd60e51b815260206004820152601c60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720696e70757400000000604482015260640161053a565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156118ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191391906132a6565b9050801561097b576001600160a01b038316600090815260096020526040812061193c91612e58565b61097b83611948612755565b83612930565b6060610e326007612a5a565b600082815260208190526040902060010154611975816126bc565b61097b838361277e565b600061198a816126bc565b8151516001600160a01b0316158015906119b157506020820151516001600160a01b031615155b6119fd5760405162461bcd60e51b815260206004820152601f60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720726563656976657200604482015260640161053a565b602082810151810151835190910151606491611a18916135b3565b60ff161115611a695760405162461bcd60e51b815260206004820152601f60248201527f556e696d6f6f6e54726561737572793a2077726f6e672070657263656e747300604482015260640161053a565b5080518051600380546020938401516001600160a01b039384166001600160a81b031992831617600160a01b60ff928316810291909117909355948401518051600480549290960151941691161791909316909202919091179055565b6000600080516020613740833981519152611ae0816126bc565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611b47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6b91906132a6565b90508015611d84576040805160028082526060820183526000926020830190803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611bc857611bc86132bf565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110611c1c57611c1c6132bf565b60200260200101906001600160a01b031690816001600160a01b031681525050611c877f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000084612801565b6040516338ed173960e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906338ed173990611cde9086908590879030904290600401613419565b6000604051808303816000875af1158015611cfd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d2591908101906132f6565b9050611d547f000000000000000000000000000000000000000000000000000000000000000060036000610d65565b611d817f000000000000000000000000000000000000000000000000000000000000000060036001610de4565b50505b600260015403611da65760405162461bcd60e51b815260040161053a90613455565b600260019081558751118015611e1357507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168760018951611df0919061348c565b81518110611e0057611e006132bf565b60200260200101516001600160a01b0316145b611e5f5760405162461bcd60e51b815260206004820152601b60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720706174680000000000604482015260640161053a565b600087600081518110611e7457611e746132bf565b602002602001015190508660096000836001600160a01b03166001600160a01b031681526020019081526020016000208054905011611ef55760405162461bcd60e51b815260206004820152601960248201527f556e696d6f6f6e54726561737572793a2077726f6e6720696400000000000000604482015260640161053a565b6001600160a01b0381166000908152600960205260408120805489908110611f1f57611f1f6132bf565b6000918252602082206004909102019150606460ff89161015611f6e576002820154825460649160ff8b1691611f55919061348c565b611f5f91906133c0565b611f6991906133df565b611f7f565b60028201548254611f7f919061348c565b9050600081118015611ff957506040516370a0823160e01b815230600482015281906001600160a01b038516906370a0823190602401602060405180830381865afa158015611fd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff691906132a6565b10155b6120455760405162461bcd60e51b815260206004820152601d60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720616d6f756e74000000604482015260640161053a565b612070837f000000000000000000000000000000000000000000000000000000000000000083612801565b604080516002808252606080830184529260208301908036833701905050905081816000815181106120a4576120a46132bf565b60209081029190910101526040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015612116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213a91906132a6565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635c11d795848b8f30426040518663ffffffff1660e01b8152600401612190959493929190613419565b600060405180830381600087803b1580156121aa57600080fd5b505af11580156121be573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201528392507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a0823190602401602060405180830381865afa158015612228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224c91906132a6565b612256919061348c565b82600181518110612269576122696132bf565b60200260200101818152505081600081518110612288576122886132bf565b60200260200101518460020160008282546122a39190613401565b925050819055506000856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230e91906134a3565b61231990600a6135a4565b84866003015461232991906133c0565b61233391906133df565b90506000818460018151811061234b5761234b6132bf565b6020026020010151111561259557818460018151811061236d5761236d6132bf565b602002602001015161237f919061348c565b90506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663699fe9f16040518163ffffffff1660e01b81526004016040805180830381865afa1580156123e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240591906135d8565b915091506000821180156124195750600081115b80156124305750600254600160a01b900460ff1615155b15612592576124c27f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000606460ff16600260149054906101000a900460ff1660ff16888b6001815181106124a6576124a66132bf565b60200260200101516124b8919061348c565b610dac91906133c0565b60025486516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163193132b291606491600160a01b900460ff169088908b90600190811061251b5761251b6132bf565b602002602001015161252d919061348c565b61253791906133c0565b61254191906133df565b6040518263ffffffff1660e01b815260040161255f91815260200190565b600060405180830381600087803b15801561257957600080fd5b505af115801561258d573d6000803e3d6000fd5b505050505b50505b6040516370a0823160e01b81523060048201526001600160a01b038816906370a0823190602401602060405180830381865afa1580156125d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125fd91906132a6565b6000036126115761260f600588612aa5565b505b7f268863020aa1fa9fc39efe7e7b98fa24d702d4a98464214740ec242239eff22c878e8787600181518110612648576126486132bf565b602090810291909101810151604080516001600160a01b0390961686529185019390935283015260608201526080810183905260a00160405180910390a183600181518110612699576126996132bf565b6020026020010151995050505050505050505060018055949350505050565b3390565b6126cd816126c8612755565b612aba565b50565b6126da8282610f1a565b610a0a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612711612755565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600254600090336001600160a01b0390911603612779575060131936013560601c90565b503390565b6127888282610f1a565b15610a0a576000828152602081815260408083206001600160a01b03851684529091529020805460ff191690556127bd612755565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169161285d919061362c565b6000604051808303816000865af19150503d806000811461289a576040519150601f19603f3d011682016040523d82523d6000602084013e61289f565b606091505b50915091508180156128c95750805115806128c95750808060200190518101906128c99190613648565b6129295760405162461bcd60e51b815260206004820152602b60248201527f5472616e7366657248656c7065723a3a73616665417070726f76653a2061707060448201526a1c9bdd994819985a5b195960aa1b606482015260840161053a565b5050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161298c919061362c565b6000604051808303816000865af19150503d80600081146129c9576040519150601f19603f3d011682016040523d82523d6000602084013e6129ce565b606091505b50915091508180156129f85750805115806129f85750808060200190518101906129f89190613648565b6129295760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201526c185b9cd9995c8819985a5b1959609a1b606482015260840161053a565b60606000612a6783612b1e565b9392505050565b6001600160a01b03811660009081526001830160205260408120541515612a67565b6000612a67836001600160a01b038416612b7a565b6000612a67836001600160a01b038416612bc9565b612ac48282610f1a565b610a0a57612adc816001600160a01b03166014612cbc565b612ae7836020612cbc565b604051602001612af892919061366a565b60408051601f198184030181529082905262461bcd60e51b825261053a916004016136df565b606081600001805480602002602001604051908101604052809291908181526020018280548015612b6e57602002820191906000526020600020905b815481526020019060010190808311612b5a575b50505050509050919050565b6000818152600183016020526040812054612bc1575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104d9565b5060006104d9565b60008181526001830160205260408120548015612cb2576000612bed60018361348c565b8554909150600090612c019060019061348c565b9050818114612c66576000866000018281548110612c2157612c216132bf565b9060005260206000200154905080876000018481548110612c4457612c446132bf565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612c7757612c77613712565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104d9565b60009150506104d9565b60606000612ccb8360026133c0565b612cd6906002613401565b67ffffffffffffffff811115612cee57612cee613058565b6040519080825280601f01601f191660200182016040528015612d18576020820181803683370190505b509050600360fc1b81600081518110612d3357612d336132bf565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d6257612d626132bf565b60200101906001600160f81b031916908160001a9053506000612d868460026133c0565b612d91906001613401565b90505b6001811115612e09576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612dc557612dc56132bf565b1a60f81b828281518110612ddb57612ddb6132bf565b60200101906001600160f81b031916908160001a90535060049490941c93612e0281613728565b9050612d94565b508315612a675760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161053a565b50805460008255600402906000526020600020908101906126cd91905b80821115612e9d57600080825560018201819055600282018190556003820155600401612e75565b5090565b600060208284031215612eb357600080fd5b81356001600160e01b031981168114612a6757600080fd5b60ff811681146126cd57600080fd5b600060208284031215612eec57600080fd5b8135612a6781612ecb565b600060208284031215612f0957600080fd5b5035919050565b80356001600160a01b0381168114612f2757600080fd5b919050565b600060208284031215612f3e57600080fd5b612a6782612f10565b60008060408385031215612f5a57600080fd5b82359150612f6a60208401612f10565b90509250929050565b600081518084526020808501945080840160005b83811015612fac5781516001600160a01b031687529582019590820190600101612f87565b509495945050505050565b602081526000612a676020830184612f73565b60008060408385031215612fdd57600080fd5b612fe683612f10565b946020939093013593505050565b602080825282518282018190526000919060409081850190868401855b8281101561304b57815180518552868101518786015285810151868601526060908101519085015260809093019290850190600101613011565b5091979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561309157613091613058565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156130c0576130c0613058565b604052919050565b600067ffffffffffffffff8211156130e2576130e2613058565b5060051b60200190565b600082601f8301126130fd57600080fd5b8135602061311261310d836130c8565b613097565b82815260059290921b8401810191818101908684111561313157600080fd5b8286015b848110156131535761314681612f10565b8352918301918301613135565b509695505050505050565b60008060006060848603121561317357600080fd5b8335925060208401359150604084013567ffffffffffffffff81111561319857600080fd5b6131a4868287016130ec565b9150509250925092565b6000608082840312156131c057600080fd5b82601f8301126131cf57600080fd5b6131d761306e565b8060808401858111156131e957600080fd5b845b8181101561323a57604081880312156132045760008081fd5b61320c61306e565b61321582612f10565b815260208083013561322681612ecb565b8282015290855293909301926040016131eb565b509095945050505050565b6000806000806080858703121561325b57600080fd5b843567ffffffffffffffff81111561327257600080fd5b61327e878288016130ec565b94505060208501359250604085013561329681612ecb565b9396929550929360600135925050565b6000602082840312156132b857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b8281526040602082015260006132ee6040830184612f73565b949350505050565b6000602080838503121561330957600080fd5b825167ffffffffffffffff81111561332057600080fd5b8301601f8101851361333157600080fd5b805161333f61310d826130c8565b81815260059190911b8201830190838101908783111561335e57600080fd5b928401925b8284101561337c57835182529284019290840190613363565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8416808210156133b7576133b7613387565b90039392505050565b60008160001904831182151516156133da576133da613387565b500290565b6000826133fc57634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561341457613414613387565b500190565b85815284602082015260a06040820152600061343860a0830186612f73565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008282101561349e5761349e613387565b500390565b6000602082840312156134b557600080fd5b8151612a6781612ecb565b600181815b808511156134fb5781600019048211156134e1576134e1613387565b808516156134ee57918102915b93841c93908002906134c5565b509250929050565b600082613512575060016104d9565b8161351f575060006104d9565b8160018114613535576002811461353f5761355b565b60019150506104d9565b60ff84111561355057613550613387565b50506001821b6104d9565b5060208310610133831016604e8410600b841016171561357e575081810a6104d9565b61358883836134c0565b806000190482111561359c5761359c613387565b029392505050565b6000612a6760ff841683613503565b600060ff821660ff84168060ff038211156135d0576135d0613387565b019392505050565b600080604083850312156135eb57600080fd5b505080516020909101519092909150565b60005b838110156136175781810151838201526020016135ff565b83811115613626576000848401525b50505050565b6000825161363e8184602087016135fc565b9190910192915050565b60006020828403121561365a57600080fd5b81518015158114612a6757600080fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516136a28160178501602088016135fc565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516136d38160288401602088016135fc565b01602801949350505050565b60208152600082518060208401526136fe8160408501602087016135fc565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603160045260246000fd5b60008161373757613737613387565b50600019019056fe25cf2b509f2a7f322675b2a5322b182f44ad2c03ac941a0af17c9b178f5d5d5fa2646970667358221220dc0fe87b119b5bb3096b298f5ab4c2fc8a122b23a72b14602d5815257b9d4efb64736f6c634300080d00330000000000000000000000000000000000000000000000000000000000000032000000000000000000000000ed9ec4fa62ce9492ef05c067f8f5fccc724a9b66000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000004527147f079957171b6fe34f6b0e7ec0e3d9aab600000000000000000000000000000000000000000000000000000000000000280000000000000000000000002c30803cc56589a46fff3ef92f7d2f7f47b3f431000000000000000000000000876ae0ea1166b5f0c93629bdf710c3ba2118fe9a00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000008a798d4a63c98e261cac6331b90e60ef532d9a45

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c45760003560e01c8063674da505116100f9578063a628a75811610097578063b5ee90b211610071578063b5ee90b214610467578063d547741f1461046f578063e3095f9414610482578063e95417441461049557600080fd5b8063a628a7581461041a578063ab7fff4614610441578063b2af127c1461045457600080fd5b806391d14854116100d357806391d14854146103c357806392c2becc146103d657806397610f30146103eb578063a217fddf1461041257600080fd5b8063674da5051461037457806389a3027114610394578063918f8674146103bb57600080fd5b80632f2ff15d11610166578063462c531311610140578063462c5313146102f0578063498d1a04146103245780634ddd33cc1461032c57806352d3f8491461034157600080fd5b80632f2ff15d146102a357806332fe7b26146102b657806336568abe146102dd57600080fd5b806318f5b2bf116101a257806318f5b2bf1461022c5780631cdcf85a14610242578063248a9ca31461026d57806326c8dc501461029057600080fd5b806301ffc9a7146101c95780630767e3b9146101f15780631847033614610206575b600080fd5b6101dc6101d7366004612ea1565b6104a8565b60405190151581526020015b60405180910390f35b6102046101ff366004612eda565b6104df565b005b60025461021a90600160a01b900460ff1681565b60405160ff90911681526020016101e8565b610234610564565b6040519081526020016101e8565b600254610255906001600160a01b031681565b6040516001600160a01b0390911681526020016101e8565b61023461027b366004612ef7565b60009081526020819052604090206001015490565b61020461029e366004612f2c565b6108d2565b6102046102b1366004612f47565b610956565b6102557f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6102046102eb366004612f47565b610980565b6103036102fe366004612ef7565b610a0e565b604080516001600160a01b03909316835260ff9091166020830152016101e8565b610204610a39565b610334610e26565b6040516101e89190612fb7565b61035461034f366004612fca565b610e37565b6040805194855260208501939093529183015260608201526080016101e8565b610387610382366004612f2c565b610e7d565b6040516101e89190612ff4565b6102557f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b61021a606481565b6101dc6103d1366004612f47565b610f1a565b61023460008051602061374083398151915281565b6102557f0000000000000000000000008a798d4a63c98e261cac6331b90e60ef532d9a4581565b610234600081565b6102557f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da81565b61023461044f36600461315e565b610f43565b610204610462366004612f2c565b611847565b61033461194e565b61020461047d366004612f47565b61195a565b6102046104903660046131ae565b61197f565b6102346104a3366004613245565b611ac6565b60006001600160e01b03198216637965db0b60e01b14806104d957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006104ea816126bc565b606460ff831611156105435760405162461bcd60e51b815260206004820152601e60248201527f556e696d6f6f6e54726561737572793a2077726f6e672070657263656e74000060448201526064015b60405180910390fd5b506002805460ff909216600160a01b0260ff60a01b19909216919091179055565b6040516370a0823160e01b815230600482015260009081906001600160a01b037f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da16906370a0823190602401602060405180830381865afa1580156105cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f191906132a6565b905080600003610689576040516370a0823160e01b81523060048201527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa15801561065f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068391906132a6565b91505090565b6040805160028082526060820183526000926020830190803683370190505090507f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da816000815181106106de576106de6132bf565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881600181518110610732576107326132bf565b6001600160a01b03928316602091820292909201015260405163d06ca61f60e01b81526000917f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063d06ca61f9061079190869086906004016132d5565b600060405180830381865afa1580156107ae573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107d691908101906132f6565b60045460035491925060649160ff600160a01b928390048116926107fc9204168361339d565b610806919061339d565b60ff168260018151811061081c5761081c6132bf565b602002602001015161082e91906133c0565b61083891906133df565b6040516370a0823160e01b81523060048201527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa15801561089c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c091906132a6565b6108ca9190613401565b935050505090565b60006108dd816126bc565b6001600160a01b0382166109335760405162461bcd60e51b815260206004820152601c60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720696e70757400000000604482015260640161053a565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260208190526040902060010154610971816126bc565b61097b83836126d0565b505050565b610988612755565b6001600160a01b0316816001600160a01b031614610a005760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161053a565b610a0a828261277e565b5050565b60038160028110610a1e57600080fd5b01546001600160a01b0381169150600160a01b900460ff1682565b610a4660006103d1612755565b80610a665750610a666000805160206137408339815191526103d1612755565b80610aa95750610a74612755565b6001600160a01b03167f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da6001600160a01b0316145b610af55760405162461bcd60e51b815260206004820152601d60248201527f556e696d6f6f6e54726561737572793a2077726f6e672073656e646572000000604482015260640161053a565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da6001600160a01b0316906370a0823190602401602060405180830381865afa158015610b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8091906132a6565b90508015610dfd576040805160028082526060820183526000926020830190803683370190505090507f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da81600081518110610bdd57610bdd6132bf565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881600181518110610c3157610c316132bf565b60200260200101906001600160a01b031690816001600160a01b031681525050610c9c7f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84612801565b6040516338ed173960e01b81526000906001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d16906338ed173990610cf39086908590879030904290600401613419565b6000604051808303816000875af1158015610d12573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d3a91908101906132f6565b9050610dbb7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48600360005b01546001600160a01b03166064600360005b01548551600160a01b90910460ff169086906001908110610d9a57610d9a6132bf565b6020026020010151610dac91906133c0565b610db691906133df565b612930565b610dfa7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48600360015b01546001600160a01b0316606460036001610d77565b50505b600260015403610e1f5760405162461bcd60e51b815260040161053a90613455565b5060018055565b6060610e326005612a5a565b905090565b60096020528160005260406000208181548110610e5357600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919450925084565b6001600160a01b0381166000908152600960209081526040808320805482518185028101850190935280835260609492939192909184015b82821015610f0f578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190610eb5565b505050509050919050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000600080516020613740833981519152610f5d816126bc565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da6001600160a01b0316906370a0823190602401602060405180830381865afa158015610fc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe891906132a6565b90508015611201576040805160028082526060820183526000926020830190803683370190505090507f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da81600081518110611045576110456132bf565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881600181518110611099576110996132bf565b60200260200101906001600160a01b031690816001600160a01b0316815250506111047f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84612801565b6040516338ed173960e01b81526000906001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d16906338ed17399061115b9086908590879030904290600401613419565b6000604051808303816000875af115801561117a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111a291908101906132f6565b90506111d17f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860036000610d65565b6111fe7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860036001610de4565b50505b6002600154036112235760405162461bcd60e51b815260040161053a90613455565b60026001908155845111801561128457507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b031684600081518110611271576112716132bf565b60200260200101516001600160a01b0316145b6112d05760405162461bcd60e51b815260206004820152601b60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720706174680000000000604482015260640161053a565b60008611801561136857506040516370a0823160e01b815230600482015286907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa158015611341573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136591906132a6565b10155b6113b45760405162461bcd60e51b815260206004820152601d60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720616d6f756e74000000604482015260640161053a565b6113ff7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb487f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d88612801565b60008460018651611410919061348c565b81518110611420576114206132bf565b60209081029190910101516040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611475573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149991906132a6565b905060007f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b03166338ed17398a8a8a30426040518663ffffffff1660e01b81526004016114f1959493929190613419565b6000604051808303816000875af1158015611510573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261153891908101906132f6565b6040516370a0823160e01b815230600482015290915082906001600160a01b038516906370a0823190602401602060405180830381865afa158015611581573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a591906132a6565b6115af919061348c565b81600183516115be919061348c565b815181106115ce576115ce6132bf565b60200260200101818152505060096000846001600160a01b03166001600160a01b0316815260200190815260200160002060405180608001604052808360018551611619919061348c565b81518110611629576116296132bf565b602002602001015181526020018b8152602001600081526020018360018551611652919061348c565b81518110611662576116626132bf565b6020026020010151866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cc91906134a3565b6116d790600a6135a4565b6116e1908e6133c0565b6116eb91906133df565b90528154600181810184556000938452602093849020835160049093020191825592820151928101929092556040810151600283015560600151600390910155611736600584612a6e565b61176257611745600584612a90565b50611751600784612a6e565b61176257611760600784612a90565b505b7fdc8ab43f84fa54103e17414173534455b5fde004965801b361a399086dc37069838260018451611793919061348c565b815181106117a3576117a36132bf565b60200260200101518b600160096000896001600160a01b03166001600160a01b03168152602001908152602001600020805490506117e1919061348c565b604080516001600160a01b039095168552602085019390935291830152606082015260800160405180910390a1806001825161181d919061348c565b8151811061182d5761182d6132bf565b602002602001015195505050505050600180559392505050565b6000611852816126bc565b6001600160a01b0382166118a85760405162461bcd60e51b815260206004820152601c60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720696e70757400000000604482015260640161053a565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156118ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191391906132a6565b9050801561097b576001600160a01b038316600090815260096020526040812061193c91612e58565b61097b83611948612755565b83612930565b6060610e326007612a5a565b600082815260208190526040902060010154611975816126bc565b61097b838361277e565b600061198a816126bc565b8151516001600160a01b0316158015906119b157506020820151516001600160a01b031615155b6119fd5760405162461bcd60e51b815260206004820152601f60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720726563656976657200604482015260640161053a565b602082810151810151835190910151606491611a18916135b3565b60ff161115611a695760405162461bcd60e51b815260206004820152601f60248201527f556e696d6f6f6e54726561737572793a2077726f6e672070657263656e747300604482015260640161053a565b5080518051600380546020938401516001600160a01b039384166001600160a81b031992831617600160a01b60ff928316810291909117909355948401518051600480549290960151941691161791909316909202919091179055565b6000600080516020613740833981519152611ae0816126bc565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da6001600160a01b0316906370a0823190602401602060405180830381865afa158015611b47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6b91906132a6565b90508015611d84576040805160028082526060820183526000926020830190803683370190505090507f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da81600081518110611bc857611bc86132bf565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881600181518110611c1c57611c1c6132bf565b60200260200101906001600160a01b031690816001600160a01b031681525050611c877f00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84612801565b6040516338ed173960e01b81526000906001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d16906338ed173990611cde9086908590879030904290600401613419565b6000604051808303816000875af1158015611cfd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d2591908101906132f6565b9050611d547f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860036000610d65565b611d817f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860036001610de4565b50505b600260015403611da65760405162461bcd60e51b815260040161053a90613455565b600260019081558751118015611e1357507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b03168760018951611df0919061348c565b81518110611e0057611e006132bf565b60200260200101516001600160a01b0316145b611e5f5760405162461bcd60e51b815260206004820152601b60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720706174680000000000604482015260640161053a565b600087600081518110611e7457611e746132bf565b602002602001015190508660096000836001600160a01b03166001600160a01b031681526020019081526020016000208054905011611ef55760405162461bcd60e51b815260206004820152601960248201527f556e696d6f6f6e54726561737572793a2077726f6e6720696400000000000000604482015260640161053a565b6001600160a01b0381166000908152600960205260408120805489908110611f1f57611f1f6132bf565b6000918252602082206004909102019150606460ff89161015611f6e576002820154825460649160ff8b1691611f55919061348c565b611f5f91906133c0565b611f6991906133df565b611f7f565b60028201548254611f7f919061348c565b9050600081118015611ff957506040516370a0823160e01b815230600482015281906001600160a01b038516906370a0823190602401602060405180830381865afa158015611fd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff691906132a6565b10155b6120455760405162461bcd60e51b815260206004820152601d60248201527f556e696d6f6f6e54726561737572793a2077726f6e6720616d6f756e74000000604482015260640161053a565b612070837f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d83612801565b604080516002808252606080830184529260208301908036833701905050905081816000815181106120a4576120a46132bf565b60209081029190910101526040516370a0823160e01b81523060048201526000907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa158015612116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213a91906132a6565b90507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316635c11d795848b8f30426040518663ffffffff1660e01b8152600401612190959493929190613419565b600060405180830381600087803b1580156121aa57600080fd5b505af11580156121be573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201528392507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b031691506370a0823190602401602060405180830381865afa158015612228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224c91906132a6565b612256919061348c565b82600181518110612269576122696132bf565b60200260200101818152505081600081518110612288576122886132bf565b60200260200101518460020160008282546122a39190613401565b925050819055506000856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230e91906134a3565b61231990600a6135a4565b84866003015461232991906133c0565b61233391906133df565b90506000818460018151811061234b5761234b6132bf565b6020026020010151111561259557818460018151811061236d5761236d6132bf565b602002602001015161237f919061348c565b90506000807f0000000000000000000000008a798d4a63c98e261cac6331b90e60ef532d9a456001600160a01b031663699fe9f16040518163ffffffff1660e01b81526004016040805180830381865afa1580156123e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240591906135d8565b915091506000821180156124195750600081115b80156124305750600254600160a01b900460ff1615155b15612592576124c27f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb487f0000000000000000000000008a798d4a63c98e261cac6331b90e60ef532d9a45606460ff16600260149054906101000a900460ff1660ff16888b6001815181106124a6576124a66132bf565b60200260200101516124b8919061348c565b610dac91906133c0565b60025486516001600160a01b037f0000000000000000000000008a798d4a63c98e261cac6331b90e60ef532d9a45169163193132b291606491600160a01b900460ff169088908b90600190811061251b5761251b6132bf565b602002602001015161252d919061348c565b61253791906133c0565b61254191906133df565b6040518263ffffffff1660e01b815260040161255f91815260200190565b600060405180830381600087803b15801561257957600080fd5b505af115801561258d573d6000803e3d6000fd5b505050505b50505b6040516370a0823160e01b81523060048201526001600160a01b038816906370a0823190602401602060405180830381865afa1580156125d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125fd91906132a6565b6000036126115761260f600588612aa5565b505b7f268863020aa1fa9fc39efe7e7b98fa24d702d4a98464214740ec242239eff22c878e8787600181518110612648576126486132bf565b602090810291909101810151604080516001600160a01b0390961686529185019390935283015260608201526080810183905260a00160405180910390a183600181518110612699576126996132bf565b6020026020010151995050505050505050505060018055949350505050565b3390565b6126cd816126c8612755565b612aba565b50565b6126da8282610f1a565b610a0a576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612711612755565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600254600090336001600160a01b0390911603612779575060131936013560601c90565b503390565b6127888282610f1a565b15610a0a576000828152602081815260408083206001600160a01b03851684529091529020805460ff191690556127bd612755565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169161285d919061362c565b6000604051808303816000865af19150503d806000811461289a576040519150601f19603f3d011682016040523d82523d6000602084013e61289f565b606091505b50915091508180156128c95750805115806128c95750808060200190518101906128c99190613648565b6129295760405162461bcd60e51b815260206004820152602b60248201527f5472616e7366657248656c7065723a3a73616665417070726f76653a2061707060448201526a1c9bdd994819985a5b195960aa1b606482015260840161053a565b5050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161298c919061362c565b6000604051808303816000865af19150503d80600081146129c9576040519150601f19603f3d011682016040523d82523d6000602084013e6129ce565b606091505b50915091508180156129f85750805115806129f85750808060200190518101906129f89190613648565b6129295760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201526c185b9cd9995c8819985a5b1959609a1b606482015260840161053a565b60606000612a6783612b1e565b9392505050565b6001600160a01b03811660009081526001830160205260408120541515612a67565b6000612a67836001600160a01b038416612b7a565b6000612a67836001600160a01b038416612bc9565b612ac48282610f1a565b610a0a57612adc816001600160a01b03166014612cbc565b612ae7836020612cbc565b604051602001612af892919061366a565b60408051601f198184030181529082905262461bcd60e51b825261053a916004016136df565b606081600001805480602002602001604051908101604052809291908181526020018280548015612b6e57602002820191906000526020600020905b815481526020019060010190808311612b5a575b50505050509050919050565b6000818152600183016020526040812054612bc1575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104d9565b5060006104d9565b60008181526001830160205260408120548015612cb2576000612bed60018361348c565b8554909150600090612c019060019061348c565b9050818114612c66576000866000018281548110612c2157612c216132bf565b9060005260206000200154905080876000018481548110612c4457612c446132bf565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612c7757612c77613712565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104d9565b60009150506104d9565b60606000612ccb8360026133c0565b612cd6906002613401565b67ffffffffffffffff811115612cee57612cee613058565b6040519080825280601f01601f191660200182016040528015612d18576020820181803683370190505b509050600360fc1b81600081518110612d3357612d336132bf565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d6257612d626132bf565b60200101906001600160f81b031916908160001a9053506000612d868460026133c0565b612d91906001613401565b90505b6001811115612e09576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612dc557612dc56132bf565b1a60f81b828281518110612ddb57612ddb6132bf565b60200101906001600160f81b031916908160001a90535060049490941c93612e0281613728565b9050612d94565b508315612a675760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161053a565b50805460008255600402906000526020600020908101906126cd91905b80821115612e9d57600080825560018201819055600282018190556003820155600401612e75565b5090565b600060208284031215612eb357600080fd5b81356001600160e01b031981168114612a6757600080fd5b60ff811681146126cd57600080fd5b600060208284031215612eec57600080fd5b8135612a6781612ecb565b600060208284031215612f0957600080fd5b5035919050565b80356001600160a01b0381168114612f2757600080fd5b919050565b600060208284031215612f3e57600080fd5b612a6782612f10565b60008060408385031215612f5a57600080fd5b82359150612f6a60208401612f10565b90509250929050565b600081518084526020808501945080840160005b83811015612fac5781516001600160a01b031687529582019590820190600101612f87565b509495945050505050565b602081526000612a676020830184612f73565b60008060408385031215612fdd57600080fd5b612fe683612f10565b946020939093013593505050565b602080825282518282018190526000919060409081850190868401855b8281101561304b57815180518552868101518786015285810151868601526060908101519085015260809093019290850190600101613011565b5091979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561309157613091613058565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156130c0576130c0613058565b604052919050565b600067ffffffffffffffff8211156130e2576130e2613058565b5060051b60200190565b600082601f8301126130fd57600080fd5b8135602061311261310d836130c8565b613097565b82815260059290921b8401810191818101908684111561313157600080fd5b8286015b848110156131535761314681612f10565b8352918301918301613135565b509695505050505050565b60008060006060848603121561317357600080fd5b8335925060208401359150604084013567ffffffffffffffff81111561319857600080fd5b6131a4868287016130ec565b9150509250925092565b6000608082840312156131c057600080fd5b82601f8301126131cf57600080fd5b6131d761306e565b8060808401858111156131e957600080fd5b845b8181101561323a57604081880312156132045760008081fd5b61320c61306e565b61321582612f10565b815260208083013561322681612ecb565b8282015290855293909301926040016131eb565b509095945050505050565b6000806000806080858703121561325b57600080fd5b843567ffffffffffffffff81111561327257600080fd5b61327e878288016130ec565b94505060208501359250604085013561329681612ecb565b9396929550929360600135925050565b6000602082840312156132b857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b8281526040602082015260006132ee6040830184612f73565b949350505050565b6000602080838503121561330957600080fd5b825167ffffffffffffffff81111561332057600080fd5b8301601f8101851361333157600080fd5b805161333f61310d826130c8565b81815260059190911b8201830190838101908783111561335e57600080fd5b928401925b8284101561337c57835182529284019290840190613363565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8416808210156133b7576133b7613387565b90039392505050565b60008160001904831182151516156133da576133da613387565b500290565b6000826133fc57634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561341457613414613387565b500190565b85815284602082015260a06040820152600061343860a0830186612f73565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008282101561349e5761349e613387565b500390565b6000602082840312156134b557600080fd5b8151612a6781612ecb565b600181815b808511156134fb5781600019048211156134e1576134e1613387565b808516156134ee57918102915b93841c93908002906134c5565b509250929050565b600082613512575060016104d9565b8161351f575060006104d9565b8160018114613535576002811461353f5761355b565b60019150506104d9565b60ff84111561355057613550613387565b50506001821b6104d9565b5060208310610133831016604e8410600b841016171561357e575081810a6104d9565b61358883836134c0565b806000190482111561359c5761359c613387565b029392505050565b6000612a6760ff841683613503565b600060ff821660ff84168060ff038211156135d0576135d0613387565b019392505050565b600080604083850312156135eb57600080fd5b505080516020909101519092909150565b60005b838110156136175781810151838201526020016135ff565b83811115613626576000848401525b50505050565b6000825161363e8184602087016135fc565b9190910192915050565b60006020828403121561365a57600080fd5b81518015158114612a6757600080fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516136a28160178501602088016135fc565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516136d38160288401602088016135fc565b01602801949350505050565b60208152600082518060208401526136fe8160408501602087016135fc565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603160045260246000fd5b60008161373757613737613387565b50600019019056fe25cf2b509f2a7f322675b2a5322b182f44ad2c03ac941a0af17c9b178f5d5d5fa2646970667358221220dc0fe87b119b5bb3096b298f5ab4c2fc8a122b23a72b14602d5815257b9d4efb64736f6c634300080d0033

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

0000000000000000000000000000000000000000000000000000000000000032000000000000000000000000ed9ec4fa62ce9492ef05c067f8f5fccc724a9b66000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000004527147f079957171b6fe34f6b0e7ec0e3d9aab600000000000000000000000000000000000000000000000000000000000000280000000000000000000000002c30803cc56589a46fff3ef92f7d2f7f47b3f431000000000000000000000000876ae0ea1166b5f0c93629bdf710c3ba2118fe9a00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000008a798d4a63c98e261cac6331b90e60ef532d9a45

-----Decoded View---------------
Arg [0] : _stakingProfitPerc (uint8): 50
Arg [1] : _feeDistribution (tuple[2]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [2] : _addresses (address[6]): 0x2c30803CC56589a46ffF3ef92F7D2f7f47b3f431,0x876aE0EA1166b5f0C93629BDf710c3Ba2118Fe9A,0x71de2285ec83BB6517D2B3eC8DEb2A6c44D8C5da,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D,0x8a798d4A63c98E261Cac6331b90E60EF532D9a45

-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [1] : 000000000000000000000000ed9ec4fa62ce9492ef05c067f8f5fccc724a9b66
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [3] : 0000000000000000000000004527147f079957171b6fe34f6b0e7ec0e3d9aab6
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000028
Arg [5] : 0000000000000000000000002c30803cc56589a46fff3ef92f7d2f7f47b3f431
Arg [6] : 000000000000000000000000876ae0ea1166b5f0c93629bdf710c3ba2118fe9a
Arg [7] : 00000000000000000000000071de2285ec83bb6517d2b3ec8deb2a6c44d8c5da
Arg [8] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [9] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [10] : 0000000000000000000000008a798d4a63c98e261cac6331b90e60ef532d9a45


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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