ETH Price: $3,336.21 (-3.50%)
 

Overview

Max Total Supply

33,426.170444 QRT

Holders

68 (0.00%)

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 6 Decimals)

Balance
2.076513 QRT

Value
$0.00
0xfa9f5c5712f9716db45fe3f1e26cb87b85883e25
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

AQTIS is a Smart liquidity protocol powered by Quant-Tech, driven by #I. We're building a sustainable, powerful and smart real yield ecosystem.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Qrt

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion, MIT license
File 1 of 18 : Qrt.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

/**
 * @title Quant Reserve Token Contract
 * @author A Q T I S / @AQTIS-Team
 * @notice This contract handles tokenomics for QRT
 */


import {AbstractLST} from "./AbstractLST.sol";
import {ITokenPriceCalculator} from "../interfaces/ITokenPriceCalculator.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {QrtRewards} from "./rewards/QrtRewards.sol";

// ======= QRT Contract ======= //
contract Qrt is AbstractLST, QrtRewards {
    using SafeERC20 for IERC20;

    // ======= Constants ======= //
    uint constant public QRT_PRICE = 10;

    // ======= Dependencies ======= //
    address public immutable usdAddress;

    constructor(address _usd)
        // (name, symbol, totalMaxSupply, 17.5 %apy, 2.5% aqtisApy)
        AbstractLST("Quant Reserve Token", "QRT", 100_000_000 * 1e6)
        QrtRewards(175, 25)
    {
        usdAddress = _usd;
    }

    function decimals() public view virtual override returns (uint8) {
        return 6;
    }

    function buyTokensWithEth() external override payable onlyBuyActive onlyWhitelist {
        uint tokensToMint = calculateTokensToMintWithEth(msg.value);

        // validate buy
        require(!_exceedsCap(tokensToMint), "Qrt: Buy exceeds cap");
        require(msg.value >= minAmountBuy, "Qrt: Insufficient buy amount");

        // execute buy
        _mint(msg.sender, tokensToMint);
        _forwardEth(msg.value);
        _afterBuy(msg.sender, tokensToMint);
    }

    function buyTokens(uint amount) external override onlyBuyActive onlyWhitelist {
        uint tokensToMint = calculateTokensToMintWithUSD(amount);

        // validate buy
        require(!_exceedsCap(tokensToMint), "Qrt: Buy exceeds cap");
        require(amount >= minAmountBuy, "Qrt: Insufficient buy amount");

        // transfer USD from user to contract
        IERC20(usdAddress).safeTransferFrom(msg.sender, address(this), amount);

        // execute buy
        _mint(msg.sender, tokensToMint);
        _forwardERC20(usdAddress, amount);
        _afterBuy(msg.sender, tokensToMint);
    }

    // ======= Permissioned Functions ======= //
    function mint(uint amount) external override onlyRewards {
        _mint(msg.sender, amount);
    }

    function mintWithCap(uint amount) external override onlyRewards {
        require(!_exceedsCap(amount), "Qrt: Mint exceeds cap");
        _mint(msg.sender, amount);
    }

    function setRewardsAddress(address _rewardsAddress) external override onlyOwner {
        _setRewardsAddress(_rewardsAddress);
    }

    function setContractRewardsWhitelist(address _contract, bool _whitelisted) external onlyOwner {
        _setWhitelistedContract(_contract, _whitelisted);
    }

    function setTokenPriceCalculator(address _tokenPriceCalculator) external override onlyOwner {
        _setTokenPriceCalculator(_tokenPriceCalculator);
    }

    // ======= Public View Functions ======= //
    function calculateTokensToMintWithUSD(uint amount) public view returns (uint) {
        uint usdPrice = tokenPriceCalculator.getLatestUsdPrice();
        return (amount * usdPrice) / (QRT_PRICE * 1e8);
    }

    function calculateTokensToMintWithEth(uint ethAmount) public view returns (uint) {
        uint ethPrice = tokenPriceCalculator.getLatestEthPrice();
        return (ethAmount * ethPrice) / (QRT_PRICE * 1e8 * 1e12);
    }

    // ======= Override Functions ======= //
    function _update(address from, address to, uint256 value) internal virtual override {
        super._update(from, to, value);

        _updateRecord(from, value, Update.FROM);
        _updateRecord(to, value, Update.TO);
    }
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 18 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

        emit Transfer(from, to, value);
    }

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

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

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

File 6 of 18 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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

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

pragma solidity ^0.8.20;

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

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

    uint256 private _status;

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

    constructor() {
        _status = NOT_ENTERED;
    }

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

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

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

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

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

File 12 of 18 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.20;

/**
 * @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.
 *
 * ```solidity
 * 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 is the index of the value in the `values` array plus 1.
        // Position 0 is used to mean a value is not in the set.
        mapping(bytes32 value => uint256) _positions;
    }

    /**
     * @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._positions[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 cache the value's position to prevent multiple reads from the same storage slot
        uint256 position = set._positions[value];

        if (position != 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 valueIndex = position - 1;
            uint256 lastIndex = set._values.length - 1;

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

                // Move the lastValue to the index where the value to delete is
                set._values[valueIndex] = lastValue;
                // Update the tracked position of the lastValue (that was just moved)
                set._positions[lastValue] = position;
            }

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

            // Delete the tracked position for the deleted slot
            delete set._positions[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._positions[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) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

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

        return result;
    }

    // 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 in 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 13 of 18 : IRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

interface IRewards {
    struct RewardsDistribution {
        uint256 usdcRewards;
        uint256 ethRewards;
        uint256 aqtisRewards;
        uint256 cappedLSTRewards;
    }

    function getRewardsFor(address user) external view returns (RewardsDistribution memory);

    function resetUser(address user) external;

    function twaCircSupplySinceLastClaim(address user) external view returns (uint);

    function circulatingSupply() external view returns (uint);

    function cumulativeCirculatingSupply() external view returns (uint);

    function userTWAB(address user) external view returns (uint);

    function lastClaimTime(address user) external view returns (uint);
}

File 14 of 18 : ITokenPriceCalculator.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

/**
 * @title Token Price Calculator Interface
 * @notice Interface for token price calculator
 */
interface ITokenPriceCalculator {
    function update() external;

    function getAqtisPriceInWETH() external view returns (uint256);
    function getAqtisPriceInUSD() external view returns (uint256);

    function getLatestUsdPrice() external view returns (uint256);
    function getLatestEthPrice() external view returns (uint256);
}

File 15 of 18 : AbstractLST.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import {PseudoCappedERC20} from "../token/PseudoCappedERC20.sol";

/**
 * @title Abstract LSD Contract
 * @author A Q T I S / @AQTIS-Team
 * @notice This contract provides the LSD tokenomics
 */

abstract contract AbstractLST is PseudoCappedERC20, Ownable, ReentrancyGuard {
    using Address for address;
    using SafeERC20 for IERC20;

    // ======= Roles ======= //
    address public distributionAddress;

    // ======= State Variables ======= //
    bool public buyActive;
    bool public whitelistActive;
    uint256 public minAmountBuy;

    mapping(address => bool) public whitelist;

    // ======= Event Logs ======= //
    event BuyTokens(address indexed user, uint256 amount, uint256 newTotalSupply);
    event SoftMaxSupplyChanged(uint256 newSoftMaxSupply);

    event MinAmountBuyChanged(uint256 newMinAmountBuy);
    event BuyActivated(address indexed activator);
    event BuyDeactivated(address indexed deactivator);

    event WhitelistActivated(address indexed activator);
    event WhitelistDeactivated(address indexed deactivator);
    event WhitelistUpdated(address indexed addr, bool whitelisted);
    event DistributionAddressUpdated(address indexed newDistributionAddress);

    constructor(
        string memory _name,
        string memory _symbol,
        uint256 _totalMaxSupply
    ) PseudoCappedERC20(_name, _symbol, _totalMaxSupply) Ownable(msg.sender) {}

    // ======= Setters ======= //

    function setMinAmountBuy(uint256 _newMinAmountBuy) external onlyOwner {
        require(_newMinAmountBuy > 0, "Min amount buy must be greater than 0");
        minAmountBuy = _newMinAmountBuy;
        emit MinAmountBuyChanged(_newMinAmountBuy);
    }

    function setBuyActive(bool _buyActive) external onlyOwner {
        buyActive = _buyActive;
        if (_buyActive) {
            emit BuyActivated(msg.sender);
        } else {
            emit BuyDeactivated(msg.sender);
        }
    }

    function setWhitelistActive(bool _whitelistActive) external onlyOwner {
        whitelistActive = _whitelistActive;
        if (_whitelistActive) {
            emit WhitelistActivated(msg.sender);
        } else {
            emit WhitelistDeactivated(msg.sender);
        }
    }

    function updateWhitelist(address _addr, bool _whitelisted) external onlyOwner {
        whitelist[_addr] = _whitelisted;
        emit WhitelistUpdated(_addr, _whitelisted);
    }

    function setDistributionAddress(address _distributionAddress) external onlyOwner {
        distributionAddress = _distributionAddress;
        emit DistributionAddressUpdated(_distributionAddress);
    }

    function setCap(uint256 _newCap) external onlyOwner {
        _setCap(_newCap);
        emit SoftMaxSupplyChanged(_newCap);
    }

    // ======= Modifiers ======= //
    modifier onlyBuyActive() {
        require(buyActive, "Abstract LST: buy not active");
        _;
    }

    modifier onlyWhitelist() {
        if (whitelistActive) {
            require(whitelist[msg.sender], "Abstract LST: caller is not whitelisted");
        }
        _;
    }

    // ======= Abstract Functions ======= //
    function buyTokensWithEth() external virtual payable;

    function buyTokens(uint amount) external virtual;

    // only for rewards address
    function mint(uint amount) external virtual;
    function mintWithCap(uint amount) external virtual;

    function setRewardsAddress(address _rewardsAddress) external virtual;
    function setTokenPriceCalculator(address _tokenPriceCalculator) external virtual;

    // ======= Internal Functions ======= //
    function _forwardEth(uint256 _amount) internal {
        require(distributionAddress != address(0), "Abstract LST: distributor address not set");
        require(_amount > 0, "Abstract LST: amount must be greater than 0");

        Address.sendValue(payable(distributionAddress), _amount);
    }

    function _forwardERC20(address _token, uint256 _amount) internal {
        require(_token != address(0), "Abstract LST: token address cannot be the zero address");
        require(_amount > 0, "Abstract LST: amount must be greater than 0");
        IERC20(_token).safeTransfer(distributionAddress, _amount);
    }

    function _afterBuy(address _user, uint256 _amount) internal {
        emit BuyTokens(_user, _amount, totalSupply());
    }

    // ======= External Functions ======= //

    /// @notice Allows the owner to withdraw stuck ETH from the contract
    function withdrawETH() external onlyOwner {
        require(owner() != address(0), "AbstractLST: owner cannot be the zero address");
        Address.sendValue(payable(owner()), address(this).balance);
    }

    /// @notice Allows the owner to withdraw any ERC20 token from the contract
    /// @param token The address of the ERC20 token to withdraw
    function withdrawERC20(address token) external onlyOwner {
        require(owner() != address(0), "AbstractLST: owner cannot be the zero address");
        IERC20(token).safeTransfer(owner(), IERC20(token).balanceOf(address(this)));
    }
}

File 16 of 18 : AbstractRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {IRewards} from "../../interfaces/IRewards.sol";
import {ITokenPriceCalculator} from "../../interfaces/ITokenPriceCalculator.sol";

abstract contract AbstractRewards is IRewards {
    using EnumerableSet for EnumerableSet.AddressSet;
    enum Update {FROM, TO}

    struct UserRecord {
        uint256 userBalance;
        uint256 lastUpdateTime;
        uint256 cumulativeBalance;
        uint256 cumCirculatingSupplyLastClaim;
        uint256 lastClaimTime;
    }

    // ======= Dependencies ======= //
    address public rewardsAddress;
    ITokenPriceCalculator public tokenPriceCalculator;

    // ======= State Variables ======= //
    uint public immutable apy;
    uint public immutable aqtisApy;
    uint public constant DENOMINATOR = 1000;

    struct Supply {
        uint totalSupply;
        uint lastUpdateTime;
        uint currentCirculatingSupply;
        uint cumulativeCirculatingSupply;
    }

    Supply internal _supply;
    mapping(address => bool) public whitelistedContracts;

    constructor(uint _apy, uint _aqtisApy) {
        apy = _apy;
        aqtisApy = _aqtisApy;
    }

    modifier onlyRewards {
        require(msg.sender == rewardsAddress, "Rewards: Only rewards contract can call this function");
        _;
    }

    // ======= State Variables ======= //
    mapping(address => UserRecord) internal _userRecords;

    // ======= Setters Variables ======= //
    function _setRewardsAddress(address _rewardsAddress) internal {
        rewardsAddress = _rewardsAddress;
    }

    function _setTokenPriceCalculator(address _tokenPriceCalculator) internal {
        tokenPriceCalculator = ITokenPriceCalculator(_tokenPriceCalculator);
    }

    // ======= Abstract Functions ======= //

    function getRewardsFor(address user) external view virtual returns (RewardsDistribution memory);

    function _beforeUpdate(address user, uint256 value, Update updateType) internal virtual;

    function _beforeReset(address user) internal virtual;

    // ======= External Functions ======= //

    function resetUser(address user) external onlyRewards {
        _resetUser(user);
    }

    // ======= Internal Functions ======= //
    function _updateSupply(address user, uint256 value, Update updateType) internal {
        uint updateDiff = block.timestamp - _supply.lastUpdateTime;
        _supply.cumulativeCirculatingSupply += _supply.currentCirculatingSupply * updateDiff;

        // handle mint and burn
        if (user == address(0)) {
            if (updateType == Update.FROM) {
                _supply.totalSupply += value;
            } else if (updateType == Update.TO) {
                _supply.totalSupply -= value;
            }
        }

        bool userIsContract = isContract(user);
        if (userIsContract && _userRecords[user].userBalance != 0) {
            // adjust circulating supply by remaining contract balance
            if (updateType == Update.FROM)
                _supply.currentCirculatingSupply -= (_userRecords[user].userBalance - value);
            else if (updateType == Update.TO) {
                _supply.currentCirculatingSupply -= (_userRecords[user].userBalance + value);
            }
            delete _userRecords[user];
        } else if (updateType == Update.FROM && (user == address(0) || userIsContract)) {
            _supply.currentCirculatingSupply += value;
        } else if (updateType == Update.TO && (user == address(0) || userIsContract)) {
            _supply.currentCirculatingSupply -= value;
        }
        _supply.lastUpdateTime = block.timestamp;
    }

    function _updateRecord(address user, uint256 value, Update updateType) internal {
        _beforeUpdate(user, value, updateType);

        _updateSupply(user, value, updateType);

        if (user == address(0) || isContract(user)) {
            return;
        }

        UserRecord storage record = _userRecords[user];
        uint256 timeElapsed = 0;

        // First entry check
        if (record.lastUpdateTime == 0) {
            record.cumulativeBalance = 0;
            record.cumCirculatingSupplyLastClaim = _supply.cumulativeCirculatingSupply;
            record.lastClaimTime = block.timestamp;
        } else {
            timeElapsed = block.timestamp - record.lastUpdateTime;
            record.cumulativeBalance += record.userBalance * timeElapsed;
        }

        // Update balance and last update time
        if (updateType == Update.FROM) {
            record.userBalance -= value;
        } else {
            record.userBalance += value;
        }
        record.lastUpdateTime = block.timestamp;
    }

    function _getTWAB(address user) internal view returns (uint256) {
        UserRecord memory record = _userRecords[user];
        uint256 claimTime = block.timestamp - record.lastClaimTime;
        if (claimTime == 0) {
            return 0;
        }

        uint256 timeDifference = block.timestamp - record.lastUpdateTime;
        return (record.cumulativeBalance + (record.userBalance * timeDifference)) / claimTime;
    }

    function _resetUser(address user) internal {
        _beforeReset(user);
        UserRecord storage record = _userRecords[user];
        record.lastClaimTime = block.timestamp;
        record.lastUpdateTime = block.timestamp;
        record.cumulativeBalance = 0;
        record.cumCirculatingSupplyLastClaim = cumulativeCirculatingSupply();
    }

    function _setWhitelistedContract(address _contract, bool _isWhitelisted) internal {
        whitelistedContracts[_contract] = _isWhitelisted;
    }

    // ======= Public View Functions ======= //
    function twaCircSupplySinceLastClaim(address user) public view returns (uint) {
        UserRecord memory record = _userRecords[user];
        uint claimTime = block.timestamp - record.lastClaimTime;
        require(claimTime > 0, "Rewards: Claim time is 0");

        return (cumulativeCirculatingSupply() - record.cumCirculatingSupplyLastClaim) / claimTime;
    }

    function circulatingSupply() public view returns (uint) {
        return _supply.currentCirculatingSupply;
    }

    function cumulativeCirculatingSupply() public view returns (uint){
        uint updateDiff = block.timestamp - _supply.lastUpdateTime;
        return _supply.cumulativeCirculatingSupply + _supply.currentCirculatingSupply * updateDiff;
    }

    function userTWAB(address user) external view returns (uint) {
        return _getTWAB(user);
    }

    function lastClaimTime(address user) external view returns (uint) {
        return _userRecords[user].lastClaimTime;
    }

    // ======= Utils ======= //
    function isContract(address addr) internal view returns (bool) {
        if (whitelistedContracts[addr]) {
            return false;
        }
        uint size;
        assembly {
            size := extcodesize(addr)
        }
        return size > 0;
    }

}

File 17 of 18 : QrtRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

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

contract QrtRewards is AbstractRewards {

    mapping(address => uint) public cumSupplyLastClaim;
    uint public currentCumSupply;
    uint public lastSupplyUpdateTime;

    constructor(uint _apy, uint _aqtisApy) AbstractRewards(_apy, _aqtisApy){}

    function getRewardsFor(address user) external view override returns (RewardsDistribution memory) {
        uint256 twab = _getTWAB(user);
        uint timeSinceLastClaim = block.timestamp - _userRecords[user].lastClaimTime;
        uint qrtRewards = ((apy - aqtisApy) * _twaSupplySinceLastClaim(user) * twab * timeSinceLastClaim) / (DENOMINATOR * twaCircSupplySinceLastClaim(user) * 365 days);
        uint aqtisRewards = _getAqtisRewards(twab, timeSinceLastClaim);
        return RewardsDistribution(0, 0, aqtisRewards, qrtRewards);
    }

    function _beforeUpdate(address user, uint256 /*value*/, Update /*updateType*/) internal override {
        if (user == address(0)) {
            // this is either a burn or a mint, in either case, update cum supply
            uint timeDiff = block.timestamp - lastSupplyUpdateTime;
            currentCumSupply += _supply.totalSupply * timeDiff;
            lastSupplyUpdateTime = block.timestamp;
        } else if (cumSupplyLastClaim[user] == 0) {
            // this is just an initial update for the user
            cumSupplyLastClaim[user] = currentCumSupply;
        }
    }

    function _beforeReset(address user) internal override {
        cumSupplyLastClaim[user] = currentCumSupply;
    }

    function _currentCumulativeSupply() public view returns (uint) {
        uint timeDiff = block.timestamp - lastSupplyUpdateTime;
        return currentCumSupply + _supply.totalSupply * timeDiff;
    }

    function _twaSupplySinceLastClaim(address user) public view returns (uint) {
        uint timeDiff = block.timestamp - _userRecords[user].lastClaimTime;
        return (_currentCumulativeSupply() - cumSupplyLastClaim[user]) / timeDiff;
    }

    function _getAqtisRewards(uint twab, uint duration) internal view returns (uint) {
        uint aqtisPrice = tokenPriceCalculator.getAqtisPriceInUSD();
        // aqtisPrice is in 1e18 and twab is in 1e6 so we multiply by 1e18 and 1e12
        // to get 1e18 output
        return aqtisApy * 10 * twab * duration * 1e18 * 1e12 / (DENOMINATOR * aqtisPrice * 365 days);
    }
}

File 18 of 18 : PseudoCappedERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

/**
 * @title PseudoCappedERC20 Contract
 * @author A Q T I S / @AQTIS-Team
 * @notice This contract provides the base functionality for a soft-capped ERC20 token
 */

contract PseudoCappedERC20 is ERC20 {
    uint256 internal _cap;

    constructor(
        string memory __name,
        string memory __symbol,
        uint256 __cap
    )
        ERC20(__name, __symbol)
    {
        _cap = __cap;
    }

    function _setCap(uint256 __newCap) internal {
        _cap = __newCap;
    }

    function _exceedsCap(uint256 amount) internal view returns (bool) {
        return totalSupply() + amount > _cap;
    }

    function cap() external view returns (uint256) {
        return _cap;
    }
}

Settings
{
  "evmVersion": "paris",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_usd","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"activator","type":"address"}],"name":"BuyActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"deactivator","type":"address"}],"name":"BuyDeactivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalSupply","type":"uint256"}],"name":"BuyTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newDistributionAddress","type":"address"}],"name":"DistributionAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMinAmountBuy","type":"uint256"}],"name":"MinAmountBuyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newSoftMaxSupply","type":"uint256"}],"name":"SoftMaxSupplyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"activator","type":"address"}],"name":"WhitelistActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"deactivator","type":"address"}],"name":"WhitelistDeactivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"bool","name":"whitelisted","type":"bool"}],"name":"WhitelistUpdated","type":"event"},{"inputs":[],"name":"DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"QRT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_currentCumulativeSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"_twaSupplySinceLastClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"apy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aqtisApy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"buyTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyTokensWithEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"calculateTokensToMintWithEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"calculateTokensToMintWithUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"circulatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"cumSupplyLastClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cumulativeCirculatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentCumSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributionAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getRewardsFor","outputs":[{"components":[{"internalType":"uint256","name":"usdcRewards","type":"uint256"},{"internalType":"uint256","name":"ethRewards","type":"uint256"},{"internalType":"uint256","name":"aqtisRewards","type":"uint256"},{"internalType":"uint256","name":"cappedLSTRewards","type":"uint256"}],"internalType":"struct IRewards.RewardsDistribution","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"lastClaimTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastSupplyUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAmountBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintWithCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"resetUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_buyActive","type":"bool"}],"name":"setBuyActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCap","type":"uint256"}],"name":"setCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"bool","name":"_whitelisted","type":"bool"}],"name":"setContractRewardsWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_distributionAddress","type":"address"}],"name":"setDistributionAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMinAmountBuy","type":"uint256"}],"name":"setMinAmountBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsAddress","type":"address"}],"name":"setRewardsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenPriceCalculator","type":"address"}],"name":"setTokenPriceCalculator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_whitelistActive","type":"bool"}],"name":"setWhitelistActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPriceCalculator","outputs":[{"internalType":"contract ITokenPriceCalculator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"twaCircSupplySinceLastClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"bool","name":"_whitelisted","type":"bool"}],"name":"updateWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"userTWAB","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b50604051620031c0380380620031c0833981016040819052620000349162000173565b60af601981816040518060400160405280601381526020017f5175616e74205265736572766520546f6b656e000000000000000000000000008152506040518060400160405280600381526020016214549560ea1b815250655af3107a40003383838382828160039081620000aa91906200024c565b506004620000b982826200024c565b50505060055550506001600160a01b038116620000f057604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b620000fb8162000121565b50506001600755505060809190915260a05250506001600160a01b031660c05262000318565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200018657600080fd5b81516001600160a01b03811681146200019e57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001d057607f821691505b602082108103620001f157634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000247576000816000526020600020601f850160051c81016020861015620002225750805b601f850160051c820191505b8181101562000243578281556001016200022e565b5050505b505050565b81516001600160401b03811115620002685762000268620001a5565b6200028081620002798454620001bb565b84620001f7565b602080601f831160018114620002b857600084156200029f5750858301515b600019600386901b1c1916600185901b17855562000243565b600085815260208120601f198616915b82811015620002e957888601518255948401946001909101908401620002c8565b5085821015620003085787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c051612e556200036b60003960008181610774015281816110a801526110df01526000818161094f01528181610c750152611cfb0152600081816105bc0152610c960152612e556000f3fe6080604052600436106103605760003560e01c80639b19251a116101c6578063ccdfff53116100f7578063e347358011610095578063f2fde38b1161006f578063f2fde38b14610a4a578063f4f3b20014610a6a578063f89b764414610a8a578063fed1280b14610aaa57600080fd5b8063e3473580146109ea578063e7e5a93e14610a0a578063eb45261a14610a2a57600080fd5b8063d5c16dd3116100d1578063d5c16dd314610971578063d87744cf14610987578063dd62ed3e1461098f578063e086e5ec146109d557600080fd5b8063ccdfff5314610908578063d0bc41a914610928578063d34fd4121461093d57600080fd5b8063a9c8d48811610164578063b89fc89e1161013e578063b89fc89e14610892578063c0973eed146108b2578063c3b754dc146108d2578063cbd898a0146108f257600080fd5b8063a9c8d4881461080c578063af5e8ce81461082c578063b77cf9c61461085957600080fd5b8063a0712d68116101a0578063a0712d6814610796578063a11a1add146107b6578063a6f9d12e146107d7578063a9059cbb146107ec57600080fd5b80639b19251a1461071c5780639bdd940c1461074c5780639e1a86131461076257600080fd5b806337fb7e21116102a0578063715018a61161023e578063918f867411610218578063918f8674146106bc5780639358928b146106d257806393dd451e146106e757806395d89b411461070757600080fd5b8063715018a6146106695780638906758d1461067e5780638da5cb5b1461069e57600080fd5b806347786d371161027a57806347786d37146105de5780634fbee124146105fe5780636aae22031461061357806370a082311461063357600080fd5b806337fb7e2114610542578063391feebb1461057a5780633bcfc4b8146105aa57600080fd5b806323b872dd1161030d578063343959b4116102e7578063343959b4146104cd578063353d224b146104ed578063355274ea1461050d5780633610724e1461052257600080fd5b806323b872dd1461047157806328a6591014610491578063313ce567146104b157600080fd5b80630d392cd91161033e5780630d392cd9146103dd57806318160ddd146103ff5780632260b83e1461041e57600080fd5b806302ce58131461036557806306fdde031461039b578063095ea7b3146103bd575b600080fd5b34801561037157600080fd5b5060085461038690600160a81b900460ff1681565b60405190151581526020015b60405180910390f35b3480156103a757600080fd5b506103b0610aca565b6040516103929190612b8a565b3480156103c957600080fd5b506103866103d8366004612bd9565b610b5c565b3480156103e957600080fd5b506103fd6103f8366004612c11565b610b76565b005b34801561040b57600080fd5b506002545b604051908152602001610392565b34801561042a57600080fd5b5061043e610439366004612c48565b610bde565b60405161039291908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b34801561047d57600080fd5b5061038661048c366004612c63565b610d1c565b34801561049d57600080fd5b506104106104ac366004612c9f565b610d42565b3480156104bd57600080fd5b5060405160068152602001610392565b3480156104d957600080fd5b506103fd6104e8366004612c48565b610df0565b3480156104f957600080fd5b50610410610508366004612c9f565b610e81565b34801561051957600080fd5b50600554610410565b34801561052e57600080fd5b506103fd61053d366004612c9f565b610f0c565b34801561054e57600080fd5b50600854610562906001600160a01b031681565b6040516001600160a01b039091168152602001610392565b34801561058657600080fd5b50610386610595366004612c48565b60116020526000908152604090205460ff1681565b3480156105b657600080fd5b506104107f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ea57600080fd5b506103fd6105f9366004612c9f565b611112565b34801561060a57600080fd5b5061041061115a565b34801561061f57600080fd5b506103fd61062e366004612c48565b611190565b34801561063f57600080fd5b5061041061064e366004612c48565b6001600160a01b031660009081526020819052604090205490565b34801561067557600080fd5b506103fd6111c3565b34801561068a57600080fd5b506103fd610699366004612c48565b6111d7565b3480156106aa57600080fd5b506006546001600160a01b0316610562565b3480156106c857600080fd5b506104106103e881565b3480156106de57600080fd5b50600f54610410565b3480156106f357600080fd5b506103fd610702366004612c9f565b61120a565b34801561071357600080fd5b506103b06112ea565b34801561072857600080fd5b50610386610737366004612c48565b600a6020526000908152604090205460ff1681565b34801561075857600080fd5b5061041060095481565b34801561076e57600080fd5b506105627f000000000000000000000000000000000000000000000000000000000000000081565b3480156107a257600080fd5b506103fd6107b1366004612c9f565b6112f9565b3480156107c257600080fd5b5060085461038690600160a01b900460ff1681565b3480156107e357600080fd5b50610410600a81565b3480156107f857600080fd5b50610386610807366004612bd9565b611379565b34801561081857600080fd5b506103fd610827366004612c9f565b611387565b34801561083857600080fd5b50610410610847366004612c48565b60136020526000908152604090205481565b34801561086557600080fd5b50610410610874366004612c48565b6001600160a01b031660009081526012602052604090206004015490565b34801561089e57600080fd5b506103fd6108ad366004612c48565b61143a565b3480156108be57600080fd5b50600b54610562906001600160a01b031681565b3480156108de57600080fd5b506103fd6108ed366004612cb8565b611499565b3480156108fe57600080fd5b5061041060145481565b34801561091457600080fd5b506103fd610923366004612cb8565b61153a565b34801561093457600080fd5b506104106115db565b34801561094957600080fd5b506104107f000000000000000000000000000000000000000000000000000000000000000081565b34801561097d57600080fd5b5061041060155481565b6103fd61160a565b34801561099b57600080fd5b506104106109aa366004612cd5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156109e157600080fd5b506103fd6117b6565b3480156109f657600080fd5b50610410610a05366004612c48565b611859565b348015610a1657600080fd5b50610410610a25366004612c48565b611864565b348015610a3657600080fd5b506103fd610a45366004612c11565b6118bc565b348015610a5657600080fd5b506103fd610a65366004612c48565b6118ec565b348015610a7657600080fd5b506103fd610a85366004612c48565b611940565b348015610a9657600080fd5b50600c54610562906001600160a01b031681565b348015610ab657600080fd5b50610410610ac5366004612c48565b611a6f565b606060038054610ad990612d08565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0590612d08565b8015610b525780601f10610b2757610100808354040283529160200191610b52565b820191906000526020600020905b815481529060010190602001808311610b3557829003601f168201915b5050505050905090565b600033610b6a818585611b4b565b60019150505b92915050565b610b7e611b5d565b6001600160a01b0382166000818152600a6020908152604091829020805460ff191685151590811790915591519182527ff93f9a76c1bf3444d22400a00cb9fe990e6abe9dbb333fda48859cfee864543d91015b60405180910390a25050565b610c096040518060800160405280600081526020016000815260200160008152602001600081525090565b6000610c1483611ba3565b6001600160a01b03841660009081526012602052604081206004015491925090610c3e9042612d58565b90506000610c4b85611a6f565b610c57906103e8612d6b565b610c65906301e13380612d6b565b8284610c7088611864565b610cba7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612d58565b610cc49190612d6b565b610cce9190612d6b565b610cd89190612d6b565b610ce29190612d82565b90506000610cf08484611c5e565b604080516080810182526000808252602082015290810191909152606081019290925250949350505050565b600033610d2a858285611d56565b610d35858585611ded565b60019150505b9392505050565b600080600c60009054906101000a90046001600160a01b03166001600160a01b03166330c0b9ec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbc9190612da4565b9050610dcd600a6305f5e100612d6b565b610ddc9064e8d4a51000612d6b565b610de68285612d6b565b610d3b9190612d82565b600b546001600160a01b03163314610e755760405162461bcd60e51b815260206004820152603560248201527f526577617264733a204f6e6c79207265776172647320636f6e7472616374206360448201527f616e2063616c6c20746869732066756e6374696f6e000000000000000000000060648201526084015b60405180910390fd5b610e7e81611e65565b50565b600080600c60009054906101000a90046001600160a01b03166001600160a01b031663caafa6c16040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ed7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efb9190612da4565b9050610ddc600a6305f5e100612d6b565b600854600160a01b900460ff16610f655760405162461bcd60e51b815260206004820152601c60248201527f4162737472616374204c53543a20627579206e6f7420616374697665000000006044820152606401610e6c565b600854600160a81b900460ff1615610fe657336000908152600a602052604090205460ff16610fe65760405162461bcd60e51b815260206004820152602760248201527f4162737472616374204c53543a2063616c6c6572206973206e6f742077686974604482015266195b1a5cdd195960ca1b6064820152608401610e6c565b6000610ff182610e81565b9050610ffc81611eb4565b156110495760405162461bcd60e51b815260206004820152601460248201527f5172743a204275792065786365656473206361700000000000000000000000006044820152606401610e6c565b60095482101561109b5760405162461bcd60e51b815260206004820152601c60248201527f5172743a20496e73756666696369656e742062757920616d6f756e74000000006044820152606401610e6c565b6110d06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611ed4565b6110da3382611f50565b6111047f000000000000000000000000000000000000000000000000000000000000000083611f86565b61110e3382612080565b5050565b61111a611b5d565b61112381600555565b6040518181527fb42dbc56569dad594f79a8fa479f0b9b87b68602d1b8fc221d10b62bf703dbed906020015b60405180910390a150565b600e54600090819061116c9042612d58565b600f5490915061117d908290612d6b565b60105461118a9190612dbd565b91505090565b611198611b5d565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831617905550565b6111cb611b5d565b6111d560006120ca565b565b6111df611b5d565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831617905550565b600b546001600160a01b0316331461128a5760405162461bcd60e51b815260206004820152603560248201527f526577617264733a204f6e6c79207265776172647320636f6e7472616374206360448201527f616e2063616c6c20746869732066756e6374696f6e00000000000000000000006064820152608401610e6c565b61129381611eb4565b156112e05760405162461bcd60e51b815260206004820152601560248201527f5172743a204d696e7420657863656564732063617000000000000000000000006044820152606401610e6c565b610e7e3382611f50565b606060048054610ad990612d08565b600b546001600160a01b031633146112e05760405162461bcd60e51b815260206004820152603560248201527f526577617264733a204f6e6c79207265776172647320636f6e7472616374206360448201527f616e2063616c6c20746869732066756e6374696f6e00000000000000000000006064820152608401610e6c565b600033610b6a818585611ded565b61138f611b5d565b600081116114055760405162461bcd60e51b815260206004820152602560248201527f4d696e20616d6f756e7420627579206d7573742062652067726561746572207460448201527f68616e20300000000000000000000000000000000000000000000000000000006064820152608401610e6c565b60098190556040518181527f4d02ac2bfe90115b91d59c32ad6d07ea86d935aedb62055d844decbc0a6cb4719060200161114f565b611442611b5d565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f8125853d25d6f68e074fb323e9f6e68b582733c9f03a78a2fda62e81d5d594f490600090a250565b6114a1611b5d565b6008805482158015600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff9092169190911790915561150c5760405133907fe17ac05ff4095c2a1b270ddc6f70ea762311620bf4be3b1c2b0a9f4d5b16a53390600090a250565b60405133907f5a5fb1bb60b955fafbedf12a782cf1135ba3f37b851d547e79c04e55d1d9a2bb90600090a250565b611542611b5d565b6008805482158015600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179091556115ad5760405133907f414deba86f382e3da8ecf26ff472fe712d2e8489ed191afbb662b3d720cb4b4590600090a250565b60405133907fb474c7aee2343d3d4a0a18ecf7798a53688ce4d25cab70fbad7ea88866e881a590600090a250565b600080601554426115ec9190612d58565b600d549091506115fd908290612d6b565b60145461118a9190612dbd565b600854600160a01b900460ff166116635760405162461bcd60e51b815260206004820152601c60248201527f4162737472616374204c53543a20627579206e6f7420616374697665000000006044820152606401610e6c565b600854600160a81b900460ff16156116e457336000908152600a602052604090205460ff166116e45760405162461bcd60e51b815260206004820152602760248201527f4162737472616374204c53543a2063616c6c6572206973206e6f742077686974604482015266195b1a5cdd195960ca1b6064820152608401610e6c565b60006116ef34610d42565b90506116fa81611eb4565b156117475760405162461bcd60e51b815260206004820152601460248201527f5172743a204275792065786365656473206361700000000000000000000000006044820152606401610e6c565b6009543410156117995760405162461bcd60e51b815260206004820152601c60248201527f5172743a20496e73756666696369656e742062757920616d6f756e74000000006044820152606401610e6c565b6117a33382611f50565b6117ac34612129565b610e7e3382612080565b6117be611b5d565b60006117d26006546001600160a01b031690565b6001600160a01b03160361183e5760405162461bcd60e51b815260206004820152602d60248201527f41627374726163744c53543a206f776e65722063616e6e6f742062652074686560448201526c207a65726f206164647265737360981b6064820152608401610e6c565b6111d56118536006546001600160a01b031690565b4761221d565b6000610b7082611ba3565b6001600160a01b038116600090815260126020526040812060040154819061188c9042612d58565b6001600160a01b03841660009081526013602052604090205490915081906118b26115db565b610de69190612d58565b6118c4611b5d565b6001600160a01b0382166000908152601160205260409020805460ff19168215151790555050565b6118f4611b5d565b6001600160a01b038116611937576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610e6c565b610e7e816120ca565b611948611b5d565b600061195c6006546001600160a01b031690565b6001600160a01b0316036119c85760405162461bcd60e51b815260206004820152602d60248201527f41627374726163744c53543a206f776e65722063616e6e6f742062652074686560448201526c207a65726f206164647265737360981b6064820152608401610e6c565b610e7e6119dd6006546001600160a01b031690565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015611a3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a5e9190612da4565b6001600160a01b03841691906122b4565b6001600160a01b0381166000908152601260209081526040808320815160a081018352815481526001820154938101939093526002810154918301919091526003810154606083015260040154608082018190528290611acf9042612d58565b905060008111611b215760405162461bcd60e51b815260206004820152601860248201527f526577617264733a20436c61696d2074696d65206973203000000000000000006044820152606401610e6c565b808260600151611b2f61115a565b611b399190612d58565b611b439190612d82565b949350505050565b611b5883838360016122e5565b505050565b6006546001600160a01b031633146111d5576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610e6c565b6001600160a01b0381166000908152601260209081526040808320815160a081018352815481526001820154938101939093526002810154918301919091526003810154606083015260040154608082018190528290611c039042612d58565b905080600003611c17575060009392505050565b6000826020015142611c299190612d58565b905081818460000151611c3c9190612d6b565b8460400151611c4b9190612dbd565b611c559190612d82565b95945050505050565b600080600c60009054906101000a90046001600160a01b03166001600160a01b031663831f3eb86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd89190612da4565b9050611ce6816103e8612d6b565b611cf4906301e13380612d6b565b8385611d217f0000000000000000000000000000000000000000000000000000000000000000600a612d6b565b611d2b9190612d6b565b611d359190612d6b565b611d4790670de0b6b3a7640000612d6b565b611b399064e8d4a51000612d6b565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114611de75781811015611dd8576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610e6c565b611de7848484840360006122e5565b50505050565b6001600160a01b038316611e30576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610e6c565b6001600160a01b038216611e5a5760405163ec442f0560e01b815260006004820152602401610e6c565b611b588383836123ec565b6014546001600160a01b03821660009081526013602090815260408083209390935560129052908120426004820181905560018201556002810191909155611eab61115a565b60039091015550565b600060055482611ec360025490565b611ecd9190612dbd565b1192915050565b6040516001600160a01b038481166024830152838116604483015260648201839052611de79186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061240f565b6001600160a01b038216611f7a5760405163ec442f0560e01b815260006004820152602401610e6c565b61110e600083836123ec565b6001600160a01b0382166120025760405162461bcd60e51b815260206004820152603660248201527f4162737472616374204c53543a20746f6b656e20616464726573732063616e6e60448201527f6f7420626520746865207a65726f2061646472657373000000000000000000006064820152608401610e6c565b600081116120665760405162461bcd60e51b815260206004820152602b60248201527f4162737472616374204c53543a20616d6f756e74206d7573742062652067726560448201526a061746572207468616e20360ac1b6064820152608401610e6c565b60085461110e906001600160a01b038481169116836122b4565b816001600160a01b03167f0a37b72bb67eee30e09084cf386f8a17817c57f620c3ab95fb25d6a20356ec77826120b560025490565b60408051928352602083019190915201610bd2565b600680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6008546001600160a01b03166121a75760405162461bcd60e51b815260206004820152602960248201527f4162737472616374204c53543a206469737472696275746f722061646472657360448201527f73206e6f742073657400000000000000000000000000000000000000000000006064820152608401610e6c565b6000811161220b5760405162461bcd60e51b815260206004820152602b60248201527f4162737472616374204c53543a20616d6f756e74206d7573742062652067726560448201526a061746572207468616e20360ac1b6064820152608401610e6c565b600854610e7e906001600160a01b0316825b804710156122405760405163cd78605960e01b8152306004820152602401610e6c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461228d576040519150601f19603f3d011682016040523d82523d6000602084013e612292565b606091505b5050905080611b5857604051630a12f52160e11b815260040160405180910390fd5b6040516001600160a01b03838116602483015260448201839052611b5891859182169063a9059cbb90606401611f09565b6001600160a01b038416612328576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610e6c565b6001600160a01b03831661236b576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610e6c565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015611de757826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516123de91815260200190565b60405180910390a350505050565b6123f783838361248b565b612403838260006125ce565b611b58828260016125ce565b60006124246001600160a01b038416836126df565b905080516000141580156124495750808060200190518101906124479190612dd0565b155b15611b58576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610e6c565b6001600160a01b0383166124b65780600260008282546124ab9190612dbd565b909155506125419050565b6001600160a01b03831660009081526020819052604090205481811015612522576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401610e6c565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661255d5760028054829003905561257c565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516125c191815260200190565b60405180910390a3505050565b6125d98383836126ed565b6125e483838361277c565b6001600160a01b03831615806125fe57506125fe836129fb565b1561260857505050565b6001600160a01b03831660009081526012602052604081206001810154909190810361264857600060028301556010546003830155426004830155612680565b60018201546126579042612d58565b8254909150612667908290612d6b565b82600201600082825461267a9190612dbd565b90915550505b600083600181111561269457612694612ded565b036126b857838260000160008282546126ad9190612d58565b909155506126d29050565b838260000160008282546126cc9190612dbd565b90915550505b5042600190910155505050565b6060610d3b83836000612a2b565b6001600160a01b03831661273c5760006015544261270b9190612d58565b600d5490915061271c908290612d6b565b6014600082825461272d9190612dbd565b90915550504260155550505050565b6001600160a01b0383166000908152601360205260408120549003611b58576014546001600160a01b038416600090815260136020526040902055505050565b600e5460009061278c9042612d58565b600f5490915061279d908290612d6b565b601080546000906127af908490612dbd565b90915550506001600160a01b03841661282f5760008260018111156127d6576127d6612ded565b036127fb5782600d60000160008282546127f09190612dbd565b9091555061282f9050565b600182600181111561280f5761280f612ded565b0361282f5782600d60000160008282546128299190612d58565b90915550505b600061283a856129fb565b905080801561286057506001600160a01b03851660009081526012602052604090205415155b1561294d57600083600181111561287957612879612ded565b036128bf576001600160a01b0385166000908152601260205260409020546128a2908590612d58565b600f80546000906128b4908490612d58565b909155506129149050565b60018360018111156128d3576128d3612ded565b03612914576001600160a01b0385166000908152601260205260409020546128fc908590612dbd565b600f805460009061290e908490612d58565b90915550505b6001600160a01b0385166000908152601260205260408120818155600181018290556002810182905560038101829055600401556129f0565b600083600181111561296157612961612ded565b14801561297c57506001600160a01b038516158061297c5750805b156129a15783600d60020160008282546129969190612dbd565b909155506129f09050565b60018360018111156129b5576129b5612ded565b1480156129d057506001600160a01b03851615806129d05750805b156129f05783600d60020160008282546129ea9190612d58565b90915550505b505042600e55505050565b6001600160a01b03811660009081526011602052604081205460ff1615612a2457506000919050565b503b151590565b606081471015612a505760405163cd78605960e01b8152306004820152602401610e6c565b600080856001600160a01b03168486604051612a6c9190612e03565b60006040518083038185875af1925050503d8060008114612aa9576040519150601f19603f3d011682016040523d82523d6000602084013e612aae565b606091505b5091509150612abe868383612ac8565b9695505050505050565b606082612add57612ad882612b3d565b610d3b565b8151158015612af457506001600160a01b0384163b155b15612b36576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610e6c565b5080610d3b565b805115612b4d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60005b83811015612b81578181015183820152602001612b69565b50506000910152565b6020815260008251806020840152612ba9816040850160208701612b66565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114612bd457600080fd5b919050565b60008060408385031215612bec57600080fd5b612bf583612bbd565b946020939093013593505050565b8015158114610e7e57600080fd5b60008060408385031215612c2457600080fd5b612c2d83612bbd565b91506020830135612c3d81612c03565b809150509250929050565b600060208284031215612c5a57600080fd5b610d3b82612bbd565b600080600060608486031215612c7857600080fd5b612c8184612bbd565b9250612c8f60208501612bbd565b9150604084013590509250925092565b600060208284031215612cb157600080fd5b5035919050565b600060208284031215612cca57600080fd5b8135610d3b81612c03565b60008060408385031215612ce857600080fd5b612cf183612bbd565b9150612cff60208401612bbd565b90509250929050565b600181811c90821680612d1c57607f821691505b602082108103612d3c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b7057610b70612d42565b8082028115828204841417610b7057610b70612d42565b600082612d9f57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215612db657600080fd5b5051919050565b80820180821115610b7057610b70612d42565b600060208284031215612de257600080fd5b8151610d3b81612c03565b634e487b7160e01b600052602160045260246000fd5b60008251612e15818460208701612b66565b919091019291505056fea26469706673582212204e9abf27ae42d9730e3aa62a51b7ee3f5330430a3f323ebefc12aa5ffb02465464736f6c63430008170033000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

Deployed Bytecode

0x6080604052600436106103605760003560e01c80639b19251a116101c6578063ccdfff53116100f7578063e347358011610095578063f2fde38b1161006f578063f2fde38b14610a4a578063f4f3b20014610a6a578063f89b764414610a8a578063fed1280b14610aaa57600080fd5b8063e3473580146109ea578063e7e5a93e14610a0a578063eb45261a14610a2a57600080fd5b8063d5c16dd3116100d1578063d5c16dd314610971578063d87744cf14610987578063dd62ed3e1461098f578063e086e5ec146109d557600080fd5b8063ccdfff5314610908578063d0bc41a914610928578063d34fd4121461093d57600080fd5b8063a9c8d48811610164578063b89fc89e1161013e578063b89fc89e14610892578063c0973eed146108b2578063c3b754dc146108d2578063cbd898a0146108f257600080fd5b8063a9c8d4881461080c578063af5e8ce81461082c578063b77cf9c61461085957600080fd5b8063a0712d68116101a0578063a0712d6814610796578063a11a1add146107b6578063a6f9d12e146107d7578063a9059cbb146107ec57600080fd5b80639b19251a1461071c5780639bdd940c1461074c5780639e1a86131461076257600080fd5b806337fb7e21116102a0578063715018a61161023e578063918f867411610218578063918f8674146106bc5780639358928b146106d257806393dd451e146106e757806395d89b411461070757600080fd5b8063715018a6146106695780638906758d1461067e5780638da5cb5b1461069e57600080fd5b806347786d371161027a57806347786d37146105de5780634fbee124146105fe5780636aae22031461061357806370a082311461063357600080fd5b806337fb7e2114610542578063391feebb1461057a5780633bcfc4b8146105aa57600080fd5b806323b872dd1161030d578063343959b4116102e7578063343959b4146104cd578063353d224b146104ed578063355274ea1461050d5780633610724e1461052257600080fd5b806323b872dd1461047157806328a6591014610491578063313ce567146104b157600080fd5b80630d392cd91161033e5780630d392cd9146103dd57806318160ddd146103ff5780632260b83e1461041e57600080fd5b806302ce58131461036557806306fdde031461039b578063095ea7b3146103bd575b600080fd5b34801561037157600080fd5b5060085461038690600160a81b900460ff1681565b60405190151581526020015b60405180910390f35b3480156103a757600080fd5b506103b0610aca565b6040516103929190612b8a565b3480156103c957600080fd5b506103866103d8366004612bd9565b610b5c565b3480156103e957600080fd5b506103fd6103f8366004612c11565b610b76565b005b34801561040b57600080fd5b506002545b604051908152602001610392565b34801561042a57600080fd5b5061043e610439366004612c48565b610bde565b60405161039291908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b34801561047d57600080fd5b5061038661048c366004612c63565b610d1c565b34801561049d57600080fd5b506104106104ac366004612c9f565b610d42565b3480156104bd57600080fd5b5060405160068152602001610392565b3480156104d957600080fd5b506103fd6104e8366004612c48565b610df0565b3480156104f957600080fd5b50610410610508366004612c9f565b610e81565b34801561051957600080fd5b50600554610410565b34801561052e57600080fd5b506103fd61053d366004612c9f565b610f0c565b34801561054e57600080fd5b50600854610562906001600160a01b031681565b6040516001600160a01b039091168152602001610392565b34801561058657600080fd5b50610386610595366004612c48565b60116020526000908152604090205460ff1681565b3480156105b657600080fd5b506104107f00000000000000000000000000000000000000000000000000000000000000af81565b3480156105ea57600080fd5b506103fd6105f9366004612c9f565b611112565b34801561060a57600080fd5b5061041061115a565b34801561061f57600080fd5b506103fd61062e366004612c48565b611190565b34801561063f57600080fd5b5061041061064e366004612c48565b6001600160a01b031660009081526020819052604090205490565b34801561067557600080fd5b506103fd6111c3565b34801561068a57600080fd5b506103fd610699366004612c48565b6111d7565b3480156106aa57600080fd5b506006546001600160a01b0316610562565b3480156106c857600080fd5b506104106103e881565b3480156106de57600080fd5b50600f54610410565b3480156106f357600080fd5b506103fd610702366004612c9f565b61120a565b34801561071357600080fd5b506103b06112ea565b34801561072857600080fd5b50610386610737366004612c48565b600a6020526000908152604090205460ff1681565b34801561075857600080fd5b5061041060095481565b34801561076e57600080fd5b506105627f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b3480156107a257600080fd5b506103fd6107b1366004612c9f565b6112f9565b3480156107c257600080fd5b5060085461038690600160a01b900460ff1681565b3480156107e357600080fd5b50610410600a81565b3480156107f857600080fd5b50610386610807366004612bd9565b611379565b34801561081857600080fd5b506103fd610827366004612c9f565b611387565b34801561083857600080fd5b50610410610847366004612c48565b60136020526000908152604090205481565b34801561086557600080fd5b50610410610874366004612c48565b6001600160a01b031660009081526012602052604090206004015490565b34801561089e57600080fd5b506103fd6108ad366004612c48565b61143a565b3480156108be57600080fd5b50600b54610562906001600160a01b031681565b3480156108de57600080fd5b506103fd6108ed366004612cb8565b611499565b3480156108fe57600080fd5b5061041060145481565b34801561091457600080fd5b506103fd610923366004612cb8565b61153a565b34801561093457600080fd5b506104106115db565b34801561094957600080fd5b506104107f000000000000000000000000000000000000000000000000000000000000001981565b34801561097d57600080fd5b5061041060155481565b6103fd61160a565b34801561099b57600080fd5b506104106109aa366004612cd5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156109e157600080fd5b506103fd6117b6565b3480156109f657600080fd5b50610410610a05366004612c48565b611859565b348015610a1657600080fd5b50610410610a25366004612c48565b611864565b348015610a3657600080fd5b506103fd610a45366004612c11565b6118bc565b348015610a5657600080fd5b506103fd610a65366004612c48565b6118ec565b348015610a7657600080fd5b506103fd610a85366004612c48565b611940565b348015610a9657600080fd5b50600c54610562906001600160a01b031681565b348015610ab657600080fd5b50610410610ac5366004612c48565b611a6f565b606060038054610ad990612d08565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0590612d08565b8015610b525780601f10610b2757610100808354040283529160200191610b52565b820191906000526020600020905b815481529060010190602001808311610b3557829003601f168201915b5050505050905090565b600033610b6a818585611b4b565b60019150505b92915050565b610b7e611b5d565b6001600160a01b0382166000818152600a6020908152604091829020805460ff191685151590811790915591519182527ff93f9a76c1bf3444d22400a00cb9fe990e6abe9dbb333fda48859cfee864543d91015b60405180910390a25050565b610c096040518060800160405280600081526020016000815260200160008152602001600081525090565b6000610c1483611ba3565b6001600160a01b03841660009081526012602052604081206004015491925090610c3e9042612d58565b90506000610c4b85611a6f565b610c57906103e8612d6b565b610c65906301e13380612d6b565b8284610c7088611864565b610cba7f00000000000000000000000000000000000000000000000000000000000000197f00000000000000000000000000000000000000000000000000000000000000af612d58565b610cc49190612d6b565b610cce9190612d6b565b610cd89190612d6b565b610ce29190612d82565b90506000610cf08484611c5e565b604080516080810182526000808252602082015290810191909152606081019290925250949350505050565b600033610d2a858285611d56565b610d35858585611ded565b60019150505b9392505050565b600080600c60009054906101000a90046001600160a01b03166001600160a01b03166330c0b9ec6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbc9190612da4565b9050610dcd600a6305f5e100612d6b565b610ddc9064e8d4a51000612d6b565b610de68285612d6b565b610d3b9190612d82565b600b546001600160a01b03163314610e755760405162461bcd60e51b815260206004820152603560248201527f526577617264733a204f6e6c79207265776172647320636f6e7472616374206360448201527f616e2063616c6c20746869732066756e6374696f6e000000000000000000000060648201526084015b60405180910390fd5b610e7e81611e65565b50565b600080600c60009054906101000a90046001600160a01b03166001600160a01b031663caafa6c16040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ed7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efb9190612da4565b9050610ddc600a6305f5e100612d6b565b600854600160a01b900460ff16610f655760405162461bcd60e51b815260206004820152601c60248201527f4162737472616374204c53543a20627579206e6f7420616374697665000000006044820152606401610e6c565b600854600160a81b900460ff1615610fe657336000908152600a602052604090205460ff16610fe65760405162461bcd60e51b815260206004820152602760248201527f4162737472616374204c53543a2063616c6c6572206973206e6f742077686974604482015266195b1a5cdd195960ca1b6064820152608401610e6c565b6000610ff182610e81565b9050610ffc81611eb4565b156110495760405162461bcd60e51b815260206004820152601460248201527f5172743a204275792065786365656473206361700000000000000000000000006044820152606401610e6c565b60095482101561109b5760405162461bcd60e51b815260206004820152601c60248201527f5172743a20496e73756666696369656e742062757920616d6f756e74000000006044820152606401610e6c565b6110d06001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816333085611ed4565b6110da3382611f50565b6111047f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4883611f86565b61110e3382612080565b5050565b61111a611b5d565b61112381600555565b6040518181527fb42dbc56569dad594f79a8fa479f0b9b87b68602d1b8fc221d10b62bf703dbed906020015b60405180910390a150565b600e54600090819061116c9042612d58565b600f5490915061117d908290612d6b565b60105461118a9190612dbd565b91505090565b611198611b5d565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831617905550565b6111cb611b5d565b6111d560006120ca565b565b6111df611b5d565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831617905550565b600b546001600160a01b0316331461128a5760405162461bcd60e51b815260206004820152603560248201527f526577617264733a204f6e6c79207265776172647320636f6e7472616374206360448201527f616e2063616c6c20746869732066756e6374696f6e00000000000000000000006064820152608401610e6c565b61129381611eb4565b156112e05760405162461bcd60e51b815260206004820152601560248201527f5172743a204d696e7420657863656564732063617000000000000000000000006044820152606401610e6c565b610e7e3382611f50565b606060048054610ad990612d08565b600b546001600160a01b031633146112e05760405162461bcd60e51b815260206004820152603560248201527f526577617264733a204f6e6c79207265776172647320636f6e7472616374206360448201527f616e2063616c6c20746869732066756e6374696f6e00000000000000000000006064820152608401610e6c565b600033610b6a818585611ded565b61138f611b5d565b600081116114055760405162461bcd60e51b815260206004820152602560248201527f4d696e20616d6f756e7420627579206d7573742062652067726561746572207460448201527f68616e20300000000000000000000000000000000000000000000000000000006064820152608401610e6c565b60098190556040518181527f4d02ac2bfe90115b91d59c32ad6d07ea86d935aedb62055d844decbc0a6cb4719060200161114f565b611442611b5d565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f8125853d25d6f68e074fb323e9f6e68b582733c9f03a78a2fda62e81d5d594f490600090a250565b6114a1611b5d565b6008805482158015600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff9092169190911790915561150c5760405133907fe17ac05ff4095c2a1b270ddc6f70ea762311620bf4be3b1c2b0a9f4d5b16a53390600090a250565b60405133907f5a5fb1bb60b955fafbedf12a782cf1135ba3f37b851d547e79c04e55d1d9a2bb90600090a250565b611542611b5d565b6008805482158015600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179091556115ad5760405133907f414deba86f382e3da8ecf26ff472fe712d2e8489ed191afbb662b3d720cb4b4590600090a250565b60405133907fb474c7aee2343d3d4a0a18ecf7798a53688ce4d25cab70fbad7ea88866e881a590600090a250565b600080601554426115ec9190612d58565b600d549091506115fd908290612d6b565b60145461118a9190612dbd565b600854600160a01b900460ff166116635760405162461bcd60e51b815260206004820152601c60248201527f4162737472616374204c53543a20627579206e6f7420616374697665000000006044820152606401610e6c565b600854600160a81b900460ff16156116e457336000908152600a602052604090205460ff166116e45760405162461bcd60e51b815260206004820152602760248201527f4162737472616374204c53543a2063616c6c6572206973206e6f742077686974604482015266195b1a5cdd195960ca1b6064820152608401610e6c565b60006116ef34610d42565b90506116fa81611eb4565b156117475760405162461bcd60e51b815260206004820152601460248201527f5172743a204275792065786365656473206361700000000000000000000000006044820152606401610e6c565b6009543410156117995760405162461bcd60e51b815260206004820152601c60248201527f5172743a20496e73756666696369656e742062757920616d6f756e74000000006044820152606401610e6c565b6117a33382611f50565b6117ac34612129565b610e7e3382612080565b6117be611b5d565b60006117d26006546001600160a01b031690565b6001600160a01b03160361183e5760405162461bcd60e51b815260206004820152602d60248201527f41627374726163744c53543a206f776e65722063616e6e6f742062652074686560448201526c207a65726f206164647265737360981b6064820152608401610e6c565b6111d56118536006546001600160a01b031690565b4761221d565b6000610b7082611ba3565b6001600160a01b038116600090815260126020526040812060040154819061188c9042612d58565b6001600160a01b03841660009081526013602052604090205490915081906118b26115db565b610de69190612d58565b6118c4611b5d565b6001600160a01b0382166000908152601160205260409020805460ff19168215151790555050565b6118f4611b5d565b6001600160a01b038116611937576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610e6c565b610e7e816120ca565b611948611b5d565b600061195c6006546001600160a01b031690565b6001600160a01b0316036119c85760405162461bcd60e51b815260206004820152602d60248201527f41627374726163744c53543a206f776e65722063616e6e6f742062652074686560448201526c207a65726f206164647265737360981b6064820152608401610e6c565b610e7e6119dd6006546001600160a01b031690565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015611a3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a5e9190612da4565b6001600160a01b03841691906122b4565b6001600160a01b0381166000908152601260209081526040808320815160a081018352815481526001820154938101939093526002810154918301919091526003810154606083015260040154608082018190528290611acf9042612d58565b905060008111611b215760405162461bcd60e51b815260206004820152601860248201527f526577617264733a20436c61696d2074696d65206973203000000000000000006044820152606401610e6c565b808260600151611b2f61115a565b611b399190612d58565b611b439190612d82565b949350505050565b611b5883838360016122e5565b505050565b6006546001600160a01b031633146111d5576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610e6c565b6001600160a01b0381166000908152601260209081526040808320815160a081018352815481526001820154938101939093526002810154918301919091526003810154606083015260040154608082018190528290611c039042612d58565b905080600003611c17575060009392505050565b6000826020015142611c299190612d58565b905081818460000151611c3c9190612d6b565b8460400151611c4b9190612dbd565b611c559190612d82565b95945050505050565b600080600c60009054906101000a90046001600160a01b03166001600160a01b031663831f3eb86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd89190612da4565b9050611ce6816103e8612d6b565b611cf4906301e13380612d6b565b8385611d217f0000000000000000000000000000000000000000000000000000000000000019600a612d6b565b611d2b9190612d6b565b611d359190612d6b565b611d4790670de0b6b3a7640000612d6b565b611b399064e8d4a51000612d6b565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114611de75781811015611dd8576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610e6c565b611de7848484840360006122e5565b50505050565b6001600160a01b038316611e30576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610e6c565b6001600160a01b038216611e5a5760405163ec442f0560e01b815260006004820152602401610e6c565b611b588383836123ec565b6014546001600160a01b03821660009081526013602090815260408083209390935560129052908120426004820181905560018201556002810191909155611eab61115a565b60039091015550565b600060055482611ec360025490565b611ecd9190612dbd565b1192915050565b6040516001600160a01b038481166024830152838116604483015260648201839052611de79186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061240f565b6001600160a01b038216611f7a5760405163ec442f0560e01b815260006004820152602401610e6c565b61110e600083836123ec565b6001600160a01b0382166120025760405162461bcd60e51b815260206004820152603660248201527f4162737472616374204c53543a20746f6b656e20616464726573732063616e6e60448201527f6f7420626520746865207a65726f2061646472657373000000000000000000006064820152608401610e6c565b600081116120665760405162461bcd60e51b815260206004820152602b60248201527f4162737472616374204c53543a20616d6f756e74206d7573742062652067726560448201526a061746572207468616e20360ac1b6064820152608401610e6c565b60085461110e906001600160a01b038481169116836122b4565b816001600160a01b03167f0a37b72bb67eee30e09084cf386f8a17817c57f620c3ab95fb25d6a20356ec77826120b560025490565b60408051928352602083019190915201610bd2565b600680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6008546001600160a01b03166121a75760405162461bcd60e51b815260206004820152602960248201527f4162737472616374204c53543a206469737472696275746f722061646472657360448201527f73206e6f742073657400000000000000000000000000000000000000000000006064820152608401610e6c565b6000811161220b5760405162461bcd60e51b815260206004820152602b60248201527f4162737472616374204c53543a20616d6f756e74206d7573742062652067726560448201526a061746572207468616e20360ac1b6064820152608401610e6c565b600854610e7e906001600160a01b0316825b804710156122405760405163cd78605960e01b8152306004820152602401610e6c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461228d576040519150601f19603f3d011682016040523d82523d6000602084013e612292565b606091505b5050905080611b5857604051630a12f52160e11b815260040160405180910390fd5b6040516001600160a01b03838116602483015260448201839052611b5891859182169063a9059cbb90606401611f09565b6001600160a01b038416612328576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610e6c565b6001600160a01b03831661236b576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610e6c565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015611de757826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516123de91815260200190565b60405180910390a350505050565b6123f783838361248b565b612403838260006125ce565b611b58828260016125ce565b60006124246001600160a01b038416836126df565b905080516000141580156124495750808060200190518101906124479190612dd0565b155b15611b58576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610e6c565b6001600160a01b0383166124b65780600260008282546124ab9190612dbd565b909155506125419050565b6001600160a01b03831660009081526020819052604090205481811015612522576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401610e6c565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661255d5760028054829003905561257c565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516125c191815260200190565b60405180910390a3505050565b6125d98383836126ed565b6125e483838361277c565b6001600160a01b03831615806125fe57506125fe836129fb565b1561260857505050565b6001600160a01b03831660009081526012602052604081206001810154909190810361264857600060028301556010546003830155426004830155612680565b60018201546126579042612d58565b8254909150612667908290612d6b565b82600201600082825461267a9190612dbd565b90915550505b600083600181111561269457612694612ded565b036126b857838260000160008282546126ad9190612d58565b909155506126d29050565b838260000160008282546126cc9190612dbd565b90915550505b5042600190910155505050565b6060610d3b83836000612a2b565b6001600160a01b03831661273c5760006015544261270b9190612d58565b600d5490915061271c908290612d6b565b6014600082825461272d9190612dbd565b90915550504260155550505050565b6001600160a01b0383166000908152601360205260408120549003611b58576014546001600160a01b038416600090815260136020526040902055505050565b600e5460009061278c9042612d58565b600f5490915061279d908290612d6b565b601080546000906127af908490612dbd565b90915550506001600160a01b03841661282f5760008260018111156127d6576127d6612ded565b036127fb5782600d60000160008282546127f09190612dbd565b9091555061282f9050565b600182600181111561280f5761280f612ded565b0361282f5782600d60000160008282546128299190612d58565b90915550505b600061283a856129fb565b905080801561286057506001600160a01b03851660009081526012602052604090205415155b1561294d57600083600181111561287957612879612ded565b036128bf576001600160a01b0385166000908152601260205260409020546128a2908590612d58565b600f80546000906128b4908490612d58565b909155506129149050565b60018360018111156128d3576128d3612ded565b03612914576001600160a01b0385166000908152601260205260409020546128fc908590612dbd565b600f805460009061290e908490612d58565b90915550505b6001600160a01b0385166000908152601260205260408120818155600181018290556002810182905560038101829055600401556129f0565b600083600181111561296157612961612ded565b14801561297c57506001600160a01b038516158061297c5750805b156129a15783600d60020160008282546129969190612dbd565b909155506129f09050565b60018360018111156129b5576129b5612ded565b1480156129d057506001600160a01b03851615806129d05750805b156129f05783600d60020160008282546129ea9190612d58565b90915550505b505042600e55505050565b6001600160a01b03811660009081526011602052604081205460ff1615612a2457506000919050565b503b151590565b606081471015612a505760405163cd78605960e01b8152306004820152602401610e6c565b600080856001600160a01b03168486604051612a6c9190612e03565b60006040518083038185875af1925050503d8060008114612aa9576040519150601f19603f3d011682016040523d82523d6000602084013e612aae565b606091505b5091509150612abe868383612ac8565b9695505050505050565b606082612add57612ad882612b3d565b610d3b565b8151158015612af457506001600160a01b0384163b155b15612b36576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610e6c565b5080610d3b565b805115612b4d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60005b83811015612b81578181015183820152602001612b69565b50506000910152565b6020815260008251806020840152612ba9816040850160208701612b66565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114612bd457600080fd5b919050565b60008060408385031215612bec57600080fd5b612bf583612bbd565b946020939093013593505050565b8015158114610e7e57600080fd5b60008060408385031215612c2457600080fd5b612c2d83612bbd565b91506020830135612c3d81612c03565b809150509250929050565b600060208284031215612c5a57600080fd5b610d3b82612bbd565b600080600060608486031215612c7857600080fd5b612c8184612bbd565b9250612c8f60208501612bbd565b9150604084013590509250925092565b600060208284031215612cb157600080fd5b5035919050565b600060208284031215612cca57600080fd5b8135610d3b81612c03565b60008060408385031215612ce857600080fd5b612cf183612bbd565b9150612cff60208401612bbd565b90509250929050565b600181811c90821680612d1c57607f821691505b602082108103612d3c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b7057610b70612d42565b8082028115828204841417610b7057610b70612d42565b600082612d9f57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215612db657600080fd5b5051919050565b80820180821115610b7057610b70612d42565b600060208284031215612de257600080fd5b8151610d3b81612c03565b634e487b7160e01b600052602160045260246000fd5b60008251612e15818460208701612b66565b919091019291505056fea26469706673582212204e9abf27ae42d9730e3aa62a51b7ee3f5330430a3f323ebefc12aa5ffb02465464736f6c63430008170033

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

000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

-----Decoded View---------------
Arg [0] : _usd (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.