GLMR Price: $0.314124 (+3.88%)
Gas: 125 GWei

Token

Staked GLINT (stGLINT)

Overview

Max Total Supply

633,056,687.390025107910863227 stGLINT

Holders

1,342 ( -0.373%)

Total Transfers

-

Market

Price

$0.0006 @ 0.001785 GLMR (+4.19%)

Onchain Market Cap

$354,891.58

Circulating Supply Market Cap

$1,053,121.00

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Decentralized exchange (DEX) with an automated market maker (AMM), providing liquidity and peer-to-peer transactions, built on the Moonbeam network.

Market

Volume (24H):$8,680.85
Market Capitalization:$1,053,121.00
Circulating Supply:1,881,147,961.00 stGLINT
Market Data Source: Coinmarketcap

Contract Source Code Verified (Exact Match)

Contract Name:
StakedGlint

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 12 : StakedGlint.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "./interfaces/IstGlint.sol";
import "./interfaces/IstGlintUsage.sol";

/*
 * stGLINT is Beamswap's escrowed governance token obtainable by converting GLINT to it
 * It's non-transferable, except from/to whitelisted addresses
 * It can be converted back to GLINT through a vesting process
 * This contract is made to receive stGLINT deposits from users in order to allocate them to Usages contracts
 */
contract StakedGlint is
    Ownable,
    ReentrancyGuard,
    ERC20("Staked GLINT", "stGLINT"),
    IstGlint
{
    using Address for address;
    using EnumerableSet for EnumerableSet.AddressSet;
    using SafeERC20 for IERC20;

    struct stGlintBalance {
        uint256 allocatedAmount; // Amount of stGLINT allocated to a Usage
        uint256 redeemingAmount; // Total amount of stGLINT currently being redeemed
    }

    struct RedeemInfo {
        uint256 glintAmount; // GLINT amount to receive when vesting has ended
        uint256 stGlintAmount; // stGLINT amount to redeem
        uint256 endTime; // end time of redeeming if left for the desired duration
        IstGlintUsage stakingAddress;
        uint256 stakingAllocation; // Share of redeeming stGLINT to allocate to the Staking Usage contract
        uint256 startTime; // start time of redeem action
    }

    IERC20 public immutable glint; // GLINT token to convert to/from
    IstGlintUsage public stakingAddress; // Staking contract address

    EnumerableSet.AddressSet private _transferWhitelist; // addresses allowed to send/receive stGLINT

    mapping(address => mapping(address => uint256)) public usageApprovals; // Usage approvals to allocate stGLINT
    mapping(address => mapping(address => uint256))
        public
        override usageAllocations; // Active stGLINT allocations to usages

    uint256 public constant MAX_DEALLOCATION_FEE = 200; // 2%
    mapping(address => uint256) public usagesDeallocationFee; // Fee paid when deallocating stGLINT

    uint256 public constant MAX_FIXED_RATIO = 1 ether; // 100%

    // Redeeming min/max settings
    uint256 public minRedeemRatio = MAX_FIXED_RATIO / 2; // 1:0.5 precision is 1**18
    uint256 public maxRedeemRatio = MAX_FIXED_RATIO; // 1:1 precision is 1**18
    uint256 public minRedeemDuration = 15 days;
    uint256 public maxRedeemDuration = 90 days;
    // Adjusted staking rewards for redeeming stGLINT
    uint256 public redeemStakingAdjustment = MAX_FIXED_RATIO / 2; // 50% precision is 1**18

    // burn address
    address internal constant BURN_ADDRESS =
        0x000000000000000000000000000000000000dEaD;

    mapping(address => stGlintBalance) public stGlintBalances; // User's stGLINT balances
    mapping(address => RedeemInfo[]) public userRedeems; // User's redeeming instances

    constructor(IERC20 _glint) {
        glint = _glint;
        _transferWhitelist.add(address(this));
    }

    event ApproveUsage(
        address indexed userAddress,
        address indexed usageAddress,
        uint256 amount
    );
    event Convert(address indexed from, address to, uint256 amount);
    event UpdateRedeemSettings(
        uint256 minRedeemRatio,
        uint256 maxRedeemRatio,
        uint256 minRedeemDuration,
        uint256 maxRedeemDuration,
        uint256 redeemStakingAdjustment
    );
    event UpdateStakingAddress(
        address previousStakingAddress,
        address newStakingAddress
    );
    event UpdateDeallocationFee(address indexed usageAddress, uint256 fee);
    event SetTransferWhitelist(address account, bool add);
    event Redeem(
        address indexed userAddress,
        uint256 stGlintAmount,
        uint256 glintAmount,
        uint256 duration
    );
    event FinalizeRedeem(
        address indexed userAddress,
        uint256 stGlintAmount,
        uint256 glintAmount
    );
    event CancelRedeem(address indexed userAddress, uint256 stGlintAmount);
    event UpdateRedeemStakingAddress(
        address indexed userAddress,
        uint256 redeemIndex,
        address previousStakingAddress,
        address newStakingAddress
    );
    event Allocate(
        address indexed userAddress,
        address indexed usageAddress,
        uint256 amount
    );
    event Deallocate(
        address indexed userAddress,
        address indexed usageAddress,
        uint256 amount,
        uint256 fee
    );

    /***********************************************/
    /****************** MODIFIERS ******************/
    /***********************************************/

    /*
     * @dev Check if a redeem entry exists
     */
    modifier validateRedeem(address userAddress, uint256 redeemIndex) {
        require(
            redeemIndex < userRedeems[userAddress].length,
            "validateRedeem: redeem entry does not exist"
        );
        _;
    }

    /**************************************************/
    /****************** PUBLIC VIEWS ******************/
    /**************************************************/

    /*
     * @dev Returns user's stGLINT balances
     */
    function getStGlintBalance(
        address userAddress
    ) external view returns (uint256 allocatedAmount, uint256 redeemingAmount) {
        stGlintBalance storage balance = stGlintBalances[userAddress];
        return (balance.allocatedAmount, balance.redeemingAmount);
    }

    /*
     * @dev returns redeemable GLINT for "amount" of stGLINT vested for "duration" seconds
     */
    function getGlintByVestingDuration(
        uint256 amount,
        uint256 duration
    ) public view returns (uint256) {
        if (duration < minRedeemDuration) {
            return 0;
        }

        // capped to maxRedeemDuration
        if (duration > maxRedeemDuration) {
            return (amount * maxRedeemRatio) / MAX_FIXED_RATIO;
        }

        uint256 ratio = minRedeemRatio +
            ((duration - minRedeemDuration) *
                (maxRedeemRatio - minRedeemRatio)) /
            (maxRedeemDuration - minRedeemDuration);

        return (amount * ratio) / MAX_FIXED_RATIO;
    }

    /**
     * @dev returns quantity of "userAddress" pending redeems
     */
    function getUserRedeemsLength(
        address userAddress
    ) external view returns (uint256) {
        return userRedeems[userAddress].length;
    }

    /**
     * @dev returns "userAddress" info for a pending redeem identified by "redeemIndex"
     */
    function getUserRedeem(
        address userAddress,
        uint256 redeemIndex
    )
        external
        view
        validateRedeem(userAddress, redeemIndex)
        returns (
            uint256 glintAmount,
            uint256 stGlintAmount,
            uint256 endTime,
            address stakingContract,
            uint256 stakingAllocation,
            uint256 startTime
        )
    {
        RedeemInfo storage _redeem = userRedeems[userAddress][redeemIndex];
        return (
            _redeem.glintAmount,
            _redeem.stGlintAmount,
            _redeem.endTime,
            address(_redeem.stakingAddress),
            _redeem.stakingAllocation,
            _redeem.startTime
        );
    }

    /**
     * @dev returns approved xToken to allocate from "userAddress" to "usageAddress"
     */
    function getUsageApproval(
        address userAddress,
        address usageAddress
    ) external view returns (uint256) {
        return usageApprovals[userAddress][usageAddress];
    }

    /**
     * @dev returns allocated xToken from "userAddress" to "usageAddress"
     */
    function getUsageAllocation(
        address userAddress,
        address usageAddress
    ) external view returns (uint256) {
        return usageAllocations[userAddress][usageAddress];
    }

    /**
     * @dev returns length of transferWhitelist array
     */
    function transferWhitelistLength() external view returns (uint256) {
        return _transferWhitelist.length();
    }

    /**
     * @dev returns transferWhitelist array item's address for "index"
     */
    function transferWhitelist(uint256 index) external view returns (address) {
        return _transferWhitelist.at(index);
    }

    /**
     * @dev returns if "account" is allowed to send/receive stGLINT
     */
    function isTransferWhitelisted(
        address account
    ) external view override returns (bool) {
        return _transferWhitelist.contains(account);
    }

    /*******************************************************/
    /****************** OWNABLE FUNCTIONS ******************/
    /*******************************************************/

    /**
     * @dev Updates all redeem ratios and durations
     *
     * Must only be called by owner
     */
    function updateRedeemSettings(
        uint256 minRedeemRatio_,
        uint256 maxRedeemRatio_,
        uint256 minRedeemDuration_,
        uint256 maxRedeemDuration_,
        uint256 redeemStakingAdjustment_
    ) external onlyOwner {
        require(
            minRedeemRatio_ <= maxRedeemRatio_,
            "updateRedeemSettings: wrong ratio values"
        );
        require(
            minRedeemDuration_ < maxRedeemDuration_,
            "updateRedeemSettings: wrong duration values"
        );
        // should never exceed 100%
        require(
            maxRedeemRatio_ <= MAX_FIXED_RATIO &&
                redeemStakingAdjustment_ <= MAX_FIXED_RATIO,
            "updateRedeemSettings: wrong ratio values"
        );

        minRedeemRatio = minRedeemRatio_;
        maxRedeemRatio = maxRedeemRatio_;
        minRedeemDuration = minRedeemDuration_;
        maxRedeemDuration = maxRedeemDuration_;
        redeemStakingAdjustment = redeemStakingAdjustment_;

        emit UpdateRedeemSettings(
            minRedeemRatio_,
            maxRedeemRatio_,
            minRedeemDuration_,
            maxRedeemDuration_,
            redeemStakingAdjustment_
        );
    }

    /**
     * @dev Updates staking contract address
     *
     * Must only be called by owner
     */
    function updateStakingAddress(
        IstGlintUsage stakingAddress_
    ) external onlyOwner {
        // if set to 0, also set divs earnings while redeeming to 0
        if (address(stakingAddress_) == address(0)) {
            redeemStakingAdjustment = 0;
        }

        emit UpdateStakingAddress(
            address(stakingAddress),
            address(stakingAddress_)
        );
        stakingAddress = stakingAddress_;
    }

    /**
     * @dev Updates fee paid by users when deallocating from "usageAddress"
     */
    function updateDeallocationFee(
        address usageAddress,
        uint256 fee
    ) external onlyOwner {
        require(fee <= MAX_DEALLOCATION_FEE, "updateDeallocationFee: too high");

        usagesDeallocationFee[usageAddress] = fee;
        emit UpdateDeallocationFee(usageAddress, fee);
    }

    /**
     * @dev Adds or removes addresses from the transferWhitelist
     */
    function updateTransferWhitelist(
        address account,
        bool add
    ) external onlyOwner {
        require(
            account != address(this),
            "updateTransferWhitelist: Cannot remove xToken from whitelist"
        );

        if (add) _transferWhitelist.add(account);
        else _transferWhitelist.remove(account);

        emit SetTransferWhitelist(account, add);
    }

    /*****************************************************************/
    /******************  EXTERNAL PUBLIC FUNCTIONS  ******************/
    /*****************************************************************/

    /**
     * @dev Approves "usage" address to get allocations up to "amount" of stGLINT from msg.sender
     */
    function approveUsage(
        IstGlintUsage usage,
        uint256 amount
    ) external nonReentrant {
        require(
            address(usage) != address(0),
            "approveUsage: approve to the zero address"
        );

        usageApprovals[msg.sender][address(usage)] = amount;
        emit ApproveUsage(msg.sender, address(usage), amount);
    }

    /**
     * @dev Convert caller's "amount" of GLINT to stGLINT
     */
    function convert(uint256 amount) external nonReentrant {
        _convert(amount, msg.sender);
    }

    /**
     * @dev Convert caller's "amount" of GLINT to stGLINT to "to" address
     */
    function convertTo(
        address to,
        uint256 amount
    ) external override nonReentrant {
        require(address(msg.sender).isContract(), "convertTo: not allowed");
        _convert(amount, to);
    }

    /**
     * @dev Initiates redeem process (stGLINT to GLINT)
     *
     * Handles staking' compensation allocation during the vesting process if needed
     */
    function redeem(
        uint256 stGlintAmount,
        uint256 duration
    ) external nonReentrant {
        require(stGlintAmount > 0, "redeem: stGlintAmount cannot be null");
        require(duration >= minRedeemDuration, "redeem: duration too low");

        _transfer(msg.sender, address(this), stGlintAmount);
        stGlintBalance storage balance = stGlintBalances[msg.sender];

        // get corresponding GLINT amount
        uint256 glintAmount = getGlintByVestingDuration(
            stGlintAmount,
            duration
        );
        emit Redeem(msg.sender, stGlintAmount, glintAmount, duration);

        // if redeeming is not immediate, go through vesting process
        if (duration > 0) {
            // add to SBT total
            balance.redeemingAmount += stGlintAmount;

            // handle staking during the vesting process dynamically based on the duration
            uint256 stakingAllocation = glintAmount;

            // only if compensation is active
            if (stakingAllocation > 0) {
                // allocate to staking
                stakingAddress.allocate(
                    msg.sender,
                    stakingAllocation,
                    new bytes(0)
                );
            }

            // add redeeming entry
            userRedeems[msg.sender].push(
                RedeemInfo(
                    glintAmount,
                    stGlintAmount,
                    _currentBlockTimestamp() + duration,
                    stakingAddress,
                    stakingAllocation,
                    _currentBlockTimestamp()
                )
            );
        } else {
            // immediately redeem for GLINT
            _finalizeRedeem(msg.sender, stGlintAmount, glintAmount);
        }
    }

    /**
     * @dev Finalizes redeem process when vesting duration has been reached
     *
     * Can only be called by the redeem entry owner
     */
    function finalizeRedeem(
        uint256 redeemIndex
    ) external nonReentrant validateRedeem(msg.sender, redeemIndex) {
        stGlintBalance storage balance = stGlintBalances[msg.sender];
        RedeemInfo storage _redeem = userRedeems[msg.sender][redeemIndex];
        require(
            _currentBlockTimestamp() >= _redeem.startTime + minRedeemDuration,
            "finalizeRedeem: min duration before redeem"
        );

        // remove from SBT total
        balance.redeemingAmount -= _redeem.stGlintAmount;

        uint256 duration = _currentBlockTimestamp() - _redeem.startTime;
        uint256 glintAmount = getGlintByVestingDuration(
            _redeem.stGlintAmount,
            duration
        );
        _finalizeRedeem(msg.sender, _redeem.stGlintAmount, glintAmount);

        // handle staking compensation if any was active
        if (_redeem.stakingAllocation > 0) {
            // deallocate from staking
            IstGlintUsage(_redeem.stakingAddress).deallocate(
                msg.sender,
                _redeem.stakingAllocation,
                new bytes(0)
            );
        }

        // remove redeem entry
        _deleteRedeemEntry(redeemIndex);
    }

    /**
     * @dev Updates staking address for an existing active redeeming process
     *
     * Can only be called by the involved user
     * Should only be used if staking contract was to be migrated
     */
    function updateRedeemStakingAddress(
        uint256 redeemIndex
    ) external nonReentrant validateRedeem(msg.sender, redeemIndex) {
        RedeemInfo storage _redeem = userRedeems[msg.sender][redeemIndex];

        // only if the active staking contract is not the same anymore
        if (
            stakingAddress != _redeem.stakingAddress &&
            address(stakingAddress) != address(0)
        ) {
            if (_redeem.stakingAllocation > 0) {
                // deallocate from old staking contract
                _redeem.stakingAddress.deallocate(
                    msg.sender,
                    _redeem.stakingAllocation,
                    new bytes(0)
                );
                // allocate to new used staking contract
                stakingAddress.allocate(
                    msg.sender,
                    _redeem.stakingAllocation,
                    new bytes(0)
                );
            }

            emit UpdateRedeemStakingAddress(
                msg.sender,
                redeemIndex,
                address(_redeem.stakingAddress),
                address(stakingAddress)
            );
            _redeem.stakingAddress = stakingAddress;
        }
    }

    /**
     * @dev Cancels an ongoing redeem entry
     *
     * Can only be called by its owner
     */
    function cancelRedeem(
        uint256 redeemIndex
    ) external nonReentrant validateRedeem(msg.sender, redeemIndex) {
        stGlintBalance storage balance = stGlintBalances[msg.sender];
        RedeemInfo storage _redeem = userRedeems[msg.sender][redeemIndex];

        // make redeeming stGLINT available again
        balance.redeemingAmount -= _redeem.stGlintAmount;

        _transfer(address(this), msg.sender, _redeem.stGlintAmount);

        // handle staking compensation if any was active
        if (_redeem.stakingAllocation > 0) {
            // deallocate from staking
            IstGlintUsage(_redeem.stakingAddress).deallocate(
                msg.sender,
                _redeem.stakingAllocation,
                new bytes(0)
            );
        }

        emit CancelRedeem(msg.sender, _redeem.stGlintAmount);

        // remove redeem entry
        _deleteRedeemEntry(redeemIndex);
    }

    /**
     * @dev Allocates caller's "amount" of available stGLINT to "usageAddress" contract
     *
     * args specific to usage contract must be passed into "usageData"
     */
    function allocate(
        address usageAddress,
        uint256 amount,
        bytes calldata usageData
    ) external nonReentrant {
        _allocate(msg.sender, usageAddress, amount);

        // allocates stGLINT to usageContract
        IstGlintUsage(usageAddress).allocate(msg.sender, amount, usageData);
    }

    /**
     * @dev Allocates "amount" of available stGLINT from "userAddress" to caller (ie usage contract)
     *
     * Caller must have an allocation approval for the required xToken stGLINT from "userAddress"
     */
    function allocateFromUsage(
        address userAddress,
        uint256 amount
    ) external override nonReentrant {
        _allocate(userAddress, msg.sender, amount);
    }

    /**
     * @dev Deallocates caller's "amount" of available stGLINT from "usageAddress" contract
     *
     * args specific to usage contract must be passed into "usageData"
     */
    function deallocate(
        address usageAddress,
        uint256 amount,
        bytes calldata usageData
    ) external nonReentrant {
        _deallocate(msg.sender, usageAddress, amount);

        // deallocate stGLINT into usageContract
        IstGlintUsage(usageAddress).deallocate(msg.sender, amount, usageData);
    }

    /**
     * @dev Deallocates "amount" of allocated stGLINT belonging to "userAddress" from caller (ie usage contract)
     *
     * Caller can only deallocate stGLINT from itself
     */
    function deallocateFromUsage(
        address userAddress,
        uint256 amount
    ) external override nonReentrant {
        _deallocate(userAddress, msg.sender, amount);
    }

    /********************************************************/
    /****************** INTERNAL FUNCTIONS ******************/
    /********************************************************/

    /**
     * @dev Convert caller's "amount" of GLINT into stGLINT to "to"
     */
    function _convert(uint256 amount, address to) internal {
        require(amount != 0, "convert: amount cannot be null");

        // mint new stGLINT
        _mint(to, amount);

        emit Convert(msg.sender, to, amount);
        glint.safeTransferFrom(msg.sender, address(this), amount);
    }

    /**
     * @dev Finalizes the redeeming process for "userAddress" by transferring him "glintAmount" and removing "stGlintAmount" from supply
     *
     * Any vesting check should be ran before calling this
     * GLINT excess is automatically burnt
     */
    function _finalizeRedeem(
        address userAddress,
        uint256 stGlintAmount,
        uint256 glintAmount
    ) internal {
        uint256 glintExcess = stGlintAmount - glintAmount;

        // sends due GLINT tokens
        glint.safeTransfer(userAddress, glintAmount);

        // burns GLINT excess if any
        if (glintExcess > 0) {
            glint.safeTransfer(BURN_ADDRESS, glintExcess);
        }

        _burn(address(this), stGlintAmount);

        emit FinalizeRedeem(userAddress, stGlintAmount, glintAmount);
    }

    /**
     * @dev Allocates "userAddress" user's "amount" of available stGLINT to "usageAddress" contract
     *
     */
    function _allocate(
        address userAddress,
        address usageAddress,
        uint256 amount
    ) internal {
        require(amount > 0, "allocate: amount cannot be null");

        stGlintBalance storage balance = stGlintBalances[userAddress];

        // approval checks if allocation request amount has been approved by userAddress to be allocated to this usageAddress
        uint256 approvedStGlint = usageApprovals[userAddress][usageAddress];
        require(approvedStGlint >= amount, "allocate: non authorized amount");

        // remove allocated amount from usage's approved amount
        usageApprovals[userAddress][usageAddress] = approvedStGlint - amount;

        // update usage's allocatedAmount for userAddress
        usageAllocations[userAddress][usageAddress] =
            usageAllocations[userAddress][usageAddress] +
            amount;

        // adjust user's stGLINT balances
        balance.allocatedAmount = balance.allocatedAmount + amount;
        _transfer(userAddress, address(this), amount);

        emit Allocate(userAddress, usageAddress, amount);
    }

    /**
     * @dev Deallocates "amount" of available stGLINT to "usageAddress" contract
     *
     * args specific to usage contract must be passed into "usageData"
     */
    function _deallocate(
        address userAddress,
        address usageAddress,
        uint256 amount
    ) internal {
        require(amount > 0, "deallocate: amount cannot be null");

        // check if there is enough allocated stGLINT to this usage to deallocate
        uint256 allocatedAmount = usageAllocations[userAddress][usageAddress];
        require(allocatedAmount >= amount, "deallocate: non authorized amount");

        // remove deallocated amount from usage's allocation
        usageAllocations[userAddress][usageAddress] = allocatedAmount - amount;

        uint256 deallocationFeeAmount = (amount *
            usagesDeallocationFee[usageAddress]) / 10000;

        // adjust user's stGLINT balances
        stGlintBalance storage balance = stGlintBalances[userAddress];
        balance.allocatedAmount -= amount;

        _transfer(address(this), userAddress, amount - deallocationFeeAmount);
        // burn corresponding GLINT and stGLINT
        glint.safeTransfer(BURN_ADDRESS, deallocationFeeAmount);
        _burn(address(this), deallocationFeeAmount);

        emit Deallocate(
            userAddress,
            usageAddress,
            amount,
            deallocationFeeAmount
        );
    }

    function _deleteRedeemEntry(uint256 index) internal {
        userRedeems[msg.sender][index] = userRedeems[msg.sender][
            userRedeems[msg.sender].length - 1
        ];
        userRedeems[msg.sender].pop();
    }

    /**
     * @dev Hook override to forbid transfers except from whitelisted addresses and minting
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 /*amount*/
    ) internal view override {
        require(
            from == address(0) ||
                _transferWhitelist.contains(from) ||
                _transferWhitelist.contains(to),
            "transfer: not allowed"
        );
    }

    /**
     * @dev Utility function to get the current block timestamp
     */
    function _currentBlockTimestamp() internal view virtual returns (uint256) {
        /* solhint-disable not-rely-on-time */
        return block.timestamp;
    }
}

File 2 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 4 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.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}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * 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.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * 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 override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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 value {ERC20} uses, unless this function is
     * 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 override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override 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 `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` 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 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        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 `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * 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.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` 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.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 5 of 12 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
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 6 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

File 7 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../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;

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

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

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

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

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

    /**
     * @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, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

File 10 of 12 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }
}

File 11 of 12 : IstGlint.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IstGlint is IERC20 {
  function usageAllocations(address userAddress, address usageAddress) external view returns (uint256 allocation);

  function allocateFromUsage(address userAddress, uint256 amount) external;
  function convertTo(address to,uint256 amount ) external;
  function deallocateFromUsage(address userAddress, uint256 amount) external;

  function isTransferWhitelisted(address account) external view returns (bool);
}

File 12 of 12 : IstGlintUsage.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

interface IstGlintUsage {
    function allocate(address userAddress, uint256 amount, bytes calldata data) external;
    function deallocate(address userAddress, uint256 amount, bytes calldata data) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_glint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":true,"internalType":"address","name":"usageAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Allocate","type":"event"},{"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":"userAddress","type":"address"},{"indexed":true,"internalType":"address","name":"usageAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ApproveUsage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"stGlintAmount","type":"uint256"}],"name":"CancelRedeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Convert","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":true,"internalType":"address","name":"usageAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Deallocate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"stGlintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"glintAmount","type":"uint256"}],"name":"FinalizeRedeem","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":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"stGlintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"glintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"add","type":"bool"}],"name":"SetTransferWhitelist","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":"usageAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"UpdateDeallocationFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minRedeemRatio","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxRedeemRatio","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minRedeemDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxRedeemDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redeemStakingAdjustment","type":"uint256"}],"name":"UpdateRedeemSettings","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"redeemIndex","type":"uint256"},{"indexed":false,"internalType":"address","name":"previousStakingAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newStakingAddress","type":"address"}],"name":"UpdateRedeemStakingAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousStakingAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newStakingAddress","type":"address"}],"name":"UpdateStakingAddress","type":"event"},{"inputs":[],"name":"MAX_DEALLOCATION_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FIXED_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usageAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"usageData","type":"bytes"}],"name":"allocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allocateFromUsage","outputs":[],"stateMutability":"nonpayable","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":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IstGlintUsage","name":"usage","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approveUsage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"cancelRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"convert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"convertTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usageAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"usageData","type":"bytes"}],"name":"deallocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deallocateFromUsage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"finalizeRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"getGlintByVestingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"getStGlintBalance","outputs":[{"internalType":"uint256","name":"allocatedAmount","type":"uint256"},{"internalType":"uint256","name":"redeemingAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"address","name":"usageAddress","type":"address"}],"name":"getUsageAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"address","name":"usageAddress","type":"address"}],"name":"getUsageApproval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"getUserRedeem","outputs":[{"internalType":"uint256","name":"glintAmount","type":"uint256"},{"internalType":"uint256","name":"stGlintAmount","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"stakingContract","type":"address"},{"internalType":"uint256","name":"stakingAllocation","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"getUserRedeemsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"glint","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isTransferWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRedeemDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRedeemRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minRedeemDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minRedeemRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"internalType":"uint256","name":"stGlintAmount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemStakingAdjustment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stGlintBalances","outputs":[{"internalType":"uint256","name":"allocatedAmount","type":"uint256"},{"internalType":"uint256","name":"redeemingAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingAddress","outputs":[{"internalType":"contract IstGlintUsage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"amount","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":"amount","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":"uint256","name":"index","type":"uint256"}],"name":"transferWhitelist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferWhitelistLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usageAddress","type":"address"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"updateDeallocationFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minRedeemRatio_","type":"uint256"},{"internalType":"uint256","name":"maxRedeemRatio_","type":"uint256"},{"internalType":"uint256","name":"minRedeemDuration_","type":"uint256"},{"internalType":"uint256","name":"maxRedeemDuration_","type":"uint256"},{"internalType":"uint256","name":"redeemStakingAdjustment_","type":"uint256"}],"name":"updateRedeemSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"updateRedeemStakingAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IstGlintUsage","name":"stakingAddress_","type":"address"}],"name":"updateStakingAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"add","type":"bool"}],"name":"updateTransferWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"usageAllocations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"usageApprovals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"usagesDeallocationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userRedeems","outputs":[{"internalType":"uint256","name":"glintAmount","type":"uint256"},{"internalType":"uint256","name":"stGlintAmount","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"contract IstGlintUsage","name":"stakingAddress","type":"address"},{"internalType":"uint256","name":"stakingAllocation","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a0604052620000196002670de0b6b3a7640000620001eb565b600d55670de0b6b3a7640000600e556213c680600f556276a7006010556002670de0b6b3a76400006200004d9190620001eb565b6011553480156200005d57600080fd5b5060405162003c3438038062003c3483398101604081905262000080916200020e565b6040518060400160405280600c81526020016b14dd185ad9590811d312539560a21b815250604051806040016040528060078152602001661cdd11d312539560ca1b815250620000df620000d96200012560201b60201c565b62000129565b600180556005620000f18382620002e5565b506006620001008282620002e5565b5050506001600160a01b0381166080526200011d60083062000179565b5050620003b1565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062000190836001600160a01b03841662000199565b90505b92915050565b6000818152600183016020526040812054620001e25750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000193565b50600062000193565b6000826200020957634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156200022157600080fd5b81516001600160a01b03811681146200023957600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200026b57607f821691505b6020821081036200028c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002e057600081815260208120601f850160051c81016020861015620002bb5750805b601f850160051c820191505b81811015620002dc57828155600101620002c7565b5050505b505050565b81516001600160401b0381111562000301576200030162000240565b620003198162000312845462000256565b8462000292565b602080601f831160018114620003515760008415620003385750858301515b600019600386901b1c1916600185901b178555620002dc565b600085815260208120601f198616915b82811015620003825788860151825594840194600190910190840162000361565b5085821015620003a15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805161384b620003e96000396000818161064d015281816129e701528181612ae301528181612b1d0152612c6f015261384b6000f3fe608060405234801561001057600080fd5b506004361061034c5760003560e01c8063618c3bdc116101bd578063a9059cbb116100f9578063c4b10766116100a2578063dd62ed3e1161007c578063dd62ed3e14610807578063e3a2950b14610840578063e9ed87f814610849578063f2fde38b1461085257600080fd5b8063c4b10766146107d8578063cc6c5423146107e1578063d7b4be24146107f457600080fd5b8063bd8e5ca0116100d3578063bd8e5ca0146107a9578063c12cce4f146107bc578063c360ed1c146107c557600080fd5b8063a9059cbb1461075a578063aff6cbf11461076d578063b90c2b521461078057600080fd5b80638975f918116101665780639bfa5181116101405780639bfa51811461070e578063a0bdc7cb14610721578063a3908e1b14610734578063a457c2d71461074757600080fd5b80638975f918146106d55780638da5cb5b146106f557806395d89b411461070657600080fd5b8063715018a611610197578063715018a6146106a75780637cbc2373146106af57806389083654146106c257600080fd5b8063618c3bdc14610648578063619ac95b1461066f57806370a082311461067e57600080fd5b80632cc2f5ce1161028c578063488c830311610235578063539ffb771161020f578063539ffb77146105fc57806353cab6d01461060f578063549230c9146106225780635b06a1d11461063557600080fd5b8063488c83031461055d5780634b359d38146105885780634f62b7ec146105b357600080fd5b8063332e044911610266578063332e04491461051057806339509351146105375780633b90f9a01461054a57600080fd5b80632cc2f5ce1461049d5780632e9a76e4146104c8578063313ce5671461050157600080fd5b8063161aab43116102f95780631c75e369116102d35780631c75e3691461042b5780631eee7e601461043e57806323b872dd146104515780632b4896791461046457600080fd5b8063161aab431461041257806318160ddd1461041a5780631c3526791461042257600080fd5b8063095ea7b31161032a578063095ea7b3146103965780630ca5b476146103b95780630f7d3a69146103ff57600080fd5b806302f91e551461035157806306fdde031461036c578063093220b714610381575b600080fd5b61035960c881565b6040519081526020015b60405180910390f35b610374610865565b6040516103639190613444565b61039461038f366004613457565b6108f7565b005b6103a96103a43660046134a7565b610b18565b6040519015158152602001610363565b6103ea6103c73660046134d3565b6001600160a01b0316600090815260126020526040902080546001909101549091565b60408051928352602083019190915201610363565b61039461040d3660046134a7565b610b32565b610359610c36565b600454610359565b610359600d5481565b6103946104393660046134f0565b610c47565b6103a961044c3660046134d3565b610d05565b6103a961045f366004613579565b610d12565b6103596104723660046135ba565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205490565b6103596104ab3660046135ba565b600b60209081526000928352604080842090915290825290205481565b6103596104d63660046135ba565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b60405160128152602001610363565b6103ea61051e3660046134d3565b6012602052600090815260409020805460019091015482565b6103a96105453660046134a7565b610d38565b6103946105583660046134a7565b610d77565b61035961056b3660046135ba565b600a60209081526000928352604080842090915290825290205481565b61059b6105963660046135f3565b610dcf565b6040516001600160a01b039091168152602001610363565b6105c66105c13660046134a7565b610ddc565b604080519687526020870195909552938501929092526001600160a01b03166060840152608083015260a082015260c001610363565b61039461060a3660046135f3565b610e3a565b61039461061d3660046135f3565b611031565b6103946106303660046134f0565b6112d0565b6103946106433660046134d3565b611352565b61059b7f000000000000000000000000000000000000000000000000000000000000000081565b610359670de0b6b3a764000081565b61035961068c3660046134d3565b6001600160a01b031660009081526002602052604090205490565b610394611429565b6103946106bd36600461360c565b61148f565b6103946106d036600461363c565b61176e565b6103596106e33660046134d3565b600c6020526000908152604090205481565b6000546001600160a01b031661059b565b6103746118b1565b61039461071c3660046134a7565b6118c0565b61039461072f3660046134a7565b61195d565b6103946107423660046135f3565b6119ad565b6103a96107553660046134a7565b611a03565b6103a96107683660046134a7565b611ab8565b61039461077b3660046135f3565b611ac6565b61035961078e3660046134d3565b6001600160a01b031660009081526013602052604090205490565b6103596107b736600461360c565b611d30565b61035960115481565b6103946107d33660046134a7565b611ded565b610359600f5481565b6105c66107ef3660046134a7565b611f11565b60075461059b906001600160a01b031681565b6103596108153660046135ba565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b610359600e5481565b61035960105481565b6103946108603660046134d3565b612015565b6060600580546108749061366a565b80601f01602080910402602001604051908101604052809291908181526020018280546108a09061366a565b80156108ed5780601f106108c2576101008083540402835291602001916108ed565b820191906000526020600020905b8154815290600101906020018083116108d057829003601f168201915b5050505050905090565b6000546001600160a01b031633146109565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b838511156109b75760405162461bcd60e51b815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e6720726174696044820152676f2076616c75657360c01b606482015260840161094d565b818310610a2c5760405162461bcd60e51b815260206004820152602b60248201527f75706461746552656465656d53657474696e67733a2077726f6e67206475726160448201527f74696f6e2076616c756573000000000000000000000000000000000000000000606482015260840161094d565b670de0b6b3a76400008411158015610a4c5750670de0b6b3a76400008111155b610aa95760405162461bcd60e51b815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e6720726174696044820152676f2076616c75657360c01b606482015260840161094d565b600d859055600e849055600f83905560108290556011819055604080518681526020810186905290810184905260608101839052608081018290527f5b37d10782e41a6539b50d59366d4112a880236e4187e85b6d1514d20e07d9b89060a00160405180910390a15050505050565b600033610b268185856120f7565b60019150505b92915050565b6000546001600160a01b03163314610b8c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161094d565b60c8811115610bdd5760405162461bcd60e51b815260206004820152601f60248201527f7570646174654465616c6c6f636174696f6e4665653a20746f6f206869676800604482015260640161094d565b6001600160a01b0382166000818152600c602052604090819020839055517f6ff024152fc2cd8071bc701f966036513eb03e243863f21d8218646faac0eaef90610c2a9084815260200190565b60405180910390a25050565b6000610c42600861224f565b905090565b600260015403610c875760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b6002600155610c97338585612259565b604051631c75e36960e01b81526001600160a01b03851690631c75e36990610cc99033908790879087906004016136a4565b600060405180830381600087803b158015610ce357600080fd5b505af1158015610cf7573d6000803e3d6000fd5b505060018055505050505050565b6000610b2c60088361240f565b600033610d20858285612431565b610d2b8585856124c3565b60019150505b9392505050565b3360008181526003602090815260408083206001600160a01b0387168452909152812054909190610b269082908690610d72908790613700565b6120f7565b600260015403610db75760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b6002600155610dc7823383612259565b505060018055565b6000610b2c6008836126e5565b60136020528160005260406000208181548110610df857600080fd5b6000918252602090912060069091020180546001820154600283015460038401546004850154600590950154939650919450926001600160a01b039091169186565b600260015403610e7a5760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b60026001553360008181526013602052604090205482908110610ef35760405162461bcd60e51b815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201526a1cc81b9bdd08195e1a5cdd60aa1b606482015260840161094d565b33600090815260126020908152604080832060139092528220805491929186908110610f2157610f21613713565b906000526020600020906006020190508060010154826001016000828254610f499190613729565b92505081905550610f5f303383600101546124c3565b600481015415610fe357600381015460048201546040805160008152602081019182905263549230c960e01b9091526001600160a01b039092169163549230c991610fb0913391906024810161373c565b600060405180830381600087803b158015610fca57600080fd5b505af1158015610fde573d6000803e3d6000fd5b505050505b600181015460405190815233907f56d7520e387607a8daa892e3fed116badc2a636307bdc794b1c1aed97ae203f49060200160405180910390a2611026856126f1565b505060018055505050565b6002600154036110715760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b600260015533600081815260136020526040902054829081106110ea5760405162461bcd60e51b815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201526a1cc81b9bdd08195e1a5cdd60aa1b606482015260840161094d565b33600090815260136020526040812080548590811061110b5761110b613713565b6000918252602090912060069091020160038101546007549192506001600160a01b0390811691161480159061114b57506007546001600160a01b031615155b156112c65760048101541561124b57600381015460048201546040805160008152602081019182905263549230c960e01b9091526001600160a01b039092169163549230c9916111a1913391906024810161373c565b600060405180830381600087803b1580156111bb57600080fd5b505af11580156111cf573d6000803e3d6000fd5b5050600754600484015460408051600081526020810191829052631c75e36960e01b9091526001600160a01b039092169350631c75e3699250611218913391906024810161373c565b600060405180830381600087803b15801561123257600080fd5b505af1158015611246573d6000803e3d6000fd5b505050505b6003810154600754604080518781526001600160a01b039384166020820152929091169082015233907f1722d7f73801c03b55a079c8c256b660968ff22cf5ae3f27ab18dec06d5069ab9060600160405180910390a26007546003820180546001600160a01b0319166001600160a01b039092169190911790555b5050600180555050565b6002600154036113105760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b600260015561132033858561282c565b60405163549230c960e01b81526001600160a01b0385169063549230c990610cc99033908790879087906004016136a4565b6000546001600160a01b031633146113ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161094d565b6001600160a01b0381166113c05760006011555b600754604080516001600160a01b03928316815291831660208301527f68bd81fc46af7a513e76fb97ea071cc4f0de980578f4a5c0ba4024529a745ec6910160405180910390a1600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146114835760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161094d565b61148d6000612a78565b565b6002600154036114cf5760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b6002600155816115465760405162461bcd60e51b8152602060048201526024808201527f72656465656d3a207374476c696e74416d6f756e742063616e6e6f742062652060448201527f6e756c6c00000000000000000000000000000000000000000000000000000000606482015260840161094d565b600f548110156115985760405162461bcd60e51b815260206004820152601860248201527f72656465656d3a206475726174696f6e20746f6f206c6f770000000000000000604482015260640161094d565b6115a33330846124c3565b336000908152601260205260408120906115bd8484611d30565b604080518681526020810183905290810185905290915033907fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469060600160405180910390a28215611763578382600101600082825461161d9190613700565b90915550819050801561169e5760075460408051600081526020810191829052631c75e36960e01b9091526001600160a01b0390911690631c75e3699061166b90339085906024810161373c565b600060405180830381600087803b15801561168557600080fd5b505af1158015611699573d6000803e3d6000fd5b505050505b33600090815260136020908152604091829020825160c0810184528581529182018890529181016116cf8742613700565b81526007546001600160a01b03166020820152604081018490526060014290528154600180820184556000938452602093849020835160069093020191825592820151928101929092556040810151600283015560608101516003830180546001600160a01b0319166001600160a01b039092169190911790556080810151600483015560a00151600590910155506112c6565b6112c6338583612ac8565b6000546001600160a01b031633146117c85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161094d565b306001600160a01b038316036118465760405162461bcd60e51b815260206004820152603c60248201527f7570646174655472616e7366657257686974656c6973743a2043616e6e6f742060448201527f72656d6f76652078546f6b656e2066726f6d2077686974656c69737400000000606482015260840161094d565b801561185d57611857600883612b9a565b5061186a565b611868600883612baf565b505b604080516001600160a01b038416815282151560208201527f3a34209cb941a5d23a56dea730a13738454bc7daefd4bb32e8d7df58c1bd920d910160405180910390a15050565b6060600680546108749061366a565b6002600154036119005760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b6002600155333b6119535760405162461bcd60e51b815260206004820152601660248201527f636f6e76657274546f3a206e6f7420616c6c6f77656400000000000000000000604482015260640161094d565b610dc78183612bc4565b60026001540361199d5760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b6002600155610dc782338361282c565b6002600154036119ed5760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b60026001556119fc8133612bc4565b5060018055565b3360008181526003602090815260408083206001600160a01b038716845290915281205490919083811015611aa05760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161094d565b611aad82868684036120f7565b506001949350505050565b600033610b268185856124c3565b600260015403611b065760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b60026001553360008181526013602052604090205482908110611b7f5760405162461bcd60e51b815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201526a1cc81b9bdd08195e1a5cdd60aa1b606482015260840161094d565b33600090815260126020908152604080832060139092528220805491929186908110611bad57611bad613713565b90600052602060002090600602019050600f548160050154611bcf9190613700565b421015611c445760405162461bcd60e51b815260206004820152602a60248201527f66696e616c697a6552656465656d3a206d696e206475726174696f6e2062656660448201527f6f72652072656465656d00000000000000000000000000000000000000000000606482015260840161094d565b8060010154826001016000828254611c5c9190613729565b90915550506005810154600090611c739042613729565b90506000611c85836001015483611d30565b9050611c9633846001015483612ac8565b600483015415611d1a57600383015460048401546040805160008152602081019182905263549230c960e01b9091526001600160a01b039092169163549230c991611ce7913391906024810161373c565b600060405180830381600087803b158015611d0157600080fd5b505af1158015611d15573d6000803e3d6000fd5b505050505b611d23876126f1565b5050600180555050505050565b6000600f54821015611d4457506000610b2c565b601054821115611d7657670de0b6b3a7640000600e5484611d65919061376d565b611d6f9190613784565b9050610b2c565b6000600f54601054611d889190613729565b600d54600e54611d989190613729565b600f54611da59086613729565b611daf919061376d565b611db99190613784565b600d54611dc69190613700565b9050670de0b6b3a7640000611ddb828661376d565b611de59190613784565b949350505050565b600260015403611e2d5760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b60026001556001600160a01b038216611eae5760405162461bcd60e51b815260206004820152602960248201527f617070726f766555736167653a20617070726f766520746f20746865207a657260448201527f6f20616464726573730000000000000000000000000000000000000000000000606482015260840161094d565b336000818152600a602090815260408083206001600160a01b03871680855290835292819020859055518481529192917fe75ec259c38e4601f24580968665ec00b21cca4f996689b260ec598aec5c08db910160405180910390a3505060018055565b6001600160a01b03821660009081526013602052604081205481908190819081908190889088908110611f9a5760405162461bcd60e51b815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201526a1cc81b9bdd08195e1a5cdd60aa1b606482015260840161094d565b6001600160a01b038a16600090815260136020526040812080548b908110611fc457611fc4613713565b6000918252602090912060069091020180546001820154600283015460038401546004850154600590950154939d50919b5099506001600160a01b0316975090955093505050509295509295509295565b6000546001600160a01b0316331461206f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161094d565b6001600160a01b0381166120eb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161094d565b6120f481612a78565b50565b6001600160a01b0383166121725760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b0382166121ee5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610b2c825490565b600081116122a95760405162461bcd60e51b815260206004820152601f60248201527f616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c6c00604482015260640161094d565b6001600160a01b038084166000908152601260209081526040808320600a8352818420948716845293909152902054828110156123285760405162461bcd60e51b815260206004820152601f60248201527f616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e7400604482015260640161094d565b6123328382613729565b6001600160a01b038087166000818152600a60209081526040808320948a1680845294825280832095909555918152600b8252838120928152919052205461237b908490613700565b6001600160a01b038087166000908152600b602090815260408083209389168352929052205581546123ae908490613700565b82556123bb8530856124c3565b836001600160a01b0316856001600160a01b03167f5168bfb88d6125d4580e2b91ecb103a730312c3e8b0be9c4031a0fc794e2cd5f8560405161240091815260200190565b60405180910390a35050505050565b6001600160a01b03811660009081526001830160205260408120541515610d31565b6001600160a01b0383811660009081526003602090815260408083209386168352929052205460001981146124bd57818110156124b05760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161094d565b6124bd84848484036120f7565b50505050565b6001600160a01b03831661253f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b0382166125bb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161094d565b6125c6838383612c9b565b6001600160a01b038316600090815260026020526040902054818110156126555760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b0380851660009081526002602052604080822085850390559185168152908120805484929061268c908490613700565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516126d891815260200190565b60405180910390a36124bd565b6000610d318383612d19565b336000908152601360205260409020805461270e90600190613729565b8154811061271e5761271e613713565b906000526020600020906006020160136000336001600160a01b03166001600160a01b03168152602001908152602001600020828154811061276257612762613713565b600091825260208083208454600690930201918255600180850154908301556002808501549083015560038085015490830180546001600160a01b0319166001600160a01b039092169190911790556004808501549083015560059384015493909101929092553381526013909152604090208054806127e4576127e46137a6565b60008281526020812060066000199093019283020181815560018101829055600281018290556003810180546001600160a01b03191690556004810182905560050155905550565b600081116128a25760405162461bcd60e51b815260206004820152602160248201527f6465616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c60448201527f6c00000000000000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b038084166000908152600b60209081526040808320938616835292905220548181101561293e5760405162461bcd60e51b815260206004820152602160248201527f6465616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e60448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161094d565b6129488282613729565b6001600160a01b038086166000908152600b60209081526040808320938816835292815282822093909355600c90925281205461271090612989908561376d565b6129939190613784565b6001600160a01b0386166000908152601260205260408120805492935091859183916129c0908490613729565b909155506129da905030876129d58588613729565b6124c3565b612a106001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661dead84612d43565b612a1a3083612dec565b846001600160a01b0316866001600160a01b03167f7d613f7bd1a777aeeefdd38ae61201003086575188df50618d02482220f5c1478685604051612a68929190918252602082015260400190565b60405180910390a3505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000612ad48284613729565b9050612b0a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168584612d43565b8015612b4657612b466001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661dead83612d43565b612b503084612dec565b60408051848152602081018490526001600160a01b038616917f0da072ebd7a5649099f43a3776eb0cda17aca79426ee9f28aae203f5dfa04eda910160405180910390a250505050565b6000610d31836001600160a01b038416612f7d565b6000610d31836001600160a01b038416612fcc565b81600003612c145760405162461bcd60e51b815260206004820152601e60248201527f636f6e766572743a20616d6f756e742063616e6e6f74206265206e756c6c0000604482015260640161094d565b612c1e81836130bf565b604080516001600160a01b03831681526020810184905233917fccfaeb3043a96a967dc036ab72e078a9632af809671bc2a1ac30a8043645f89e910160405180910390a2612c976001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330856131aa565b5050565b6001600160a01b0383161580612cb75750612cb760088461240f565b80612cc85750612cc860088361240f565b612d145760405162461bcd60e51b815260206004820152601560248201527f7472616e736665723a206e6f7420616c6c6f7765640000000000000000000000604482015260640161094d565b505050565b6000826000018281548110612d3057612d30613713565b9060005260206000200154905092915050565b6040516001600160a01b038316602482015260448101829052612d149084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526131fb565b6001600160a01b038216612e685760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161094d565b612e7482600083612c9b565b6001600160a01b03821660009081526002602052604090205481811015612f035760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b0383166000908152600260205260408120838303905560048054849290612f32908490613729565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000818152600183016020526040812054612fc457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610b2c565b506000610b2c565b600081815260018301602052604081205480156130b5576000612ff0600183613729565b855490915060009061300490600190613729565b905081811461306957600086600001828154811061302457613024613713565b906000526020600020015490508087600001848154811061304757613047613713565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061307a5761307a6137a6565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610b2c565b6000915050610b2c565b6001600160a01b0382166131155760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161094d565b61312160008383612c9b565b80600460008282546131339190613700565b90915550506001600160a01b03821660009081526002602052604081208054839290613160908490613700565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526124bd9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612d88565b6000613250826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132e09092919063ffffffff16565b805190915015612d14578080602001905181019061326e91906137bc565b612d145760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161094d565b6060611de58484600085856001600160a01b0385163b6133425760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161094d565b600080866001600160a01b0316858760405161335e91906137d9565b60006040518083038185875af1925050503d806000811461339b576040519150601f19603f3d011682016040523d82523d6000602084013e6133a0565b606091505b50915091506133b08282866133bb565b979650505050505050565b606083156133ca575081610d31565b8251156133da5782518084602001fd5b8160405162461bcd60e51b815260040161094d9190613444565b60005b8381101561340f5781810151838201526020016133f7565b50506000910152565b600081518084526134308160208601602086016133f4565b601f01601f19169290920160200192915050565b602081526000610d316020830184613418565b600080600080600060a0868803121561346f57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6001600160a01b03811681146120f457600080fd5b600080604083850312156134ba57600080fd5b82356134c581613492565b946020939093013593505050565b6000602082840312156134e557600080fd5b8135610d3181613492565b6000806000806060858703121561350657600080fd5b843561351181613492565b935060208501359250604085013567ffffffffffffffff8082111561353557600080fd5b818701915087601f83011261354957600080fd5b81358181111561355857600080fd5b88602082850101111561356a57600080fd5b95989497505060200194505050565b60008060006060848603121561358e57600080fd5b833561359981613492565b925060208401356135a981613492565b929592945050506040919091013590565b600080604083850312156135cd57600080fd5b82356135d881613492565b915060208301356135e881613492565b809150509250929050565b60006020828403121561360557600080fd5b5035919050565b6000806040838503121561361f57600080fd5b50508035926020909101359150565b80151581146120f457600080fd5b6000806040838503121561364f57600080fd5b823561365a81613492565b915060208301356135e88161362e565b600181811c9082168061367e57607f821691505b60208210810361369e57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b2c57610b2c6136ea565b634e487b7160e01b600052603260045260246000fd5b81810381811115610b2c57610b2c6136ea565b6001600160a01b03841681528260208201526060604082015260006137646060830184613418565b95945050505050565b8082028115828204841417610b2c57610b2c6136ea565b6000826137a157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b6000602082840312156137ce57600080fd5b8151610d318161362e565b600082516137eb8184602087016133f4565b919091019291505056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c00a2646970667358221220ca75954cf7d99040b84596319df3c04de09e26b722d890141a206386230a27e064736f6c63430008130033000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061034c5760003560e01c8063618c3bdc116101bd578063a9059cbb116100f9578063c4b10766116100a2578063dd62ed3e1161007c578063dd62ed3e14610807578063e3a2950b14610840578063e9ed87f814610849578063f2fde38b1461085257600080fd5b8063c4b10766146107d8578063cc6c5423146107e1578063d7b4be24146107f457600080fd5b8063bd8e5ca0116100d3578063bd8e5ca0146107a9578063c12cce4f146107bc578063c360ed1c146107c557600080fd5b8063a9059cbb1461075a578063aff6cbf11461076d578063b90c2b521461078057600080fd5b80638975f918116101665780639bfa5181116101405780639bfa51811461070e578063a0bdc7cb14610721578063a3908e1b14610734578063a457c2d71461074757600080fd5b80638975f918146106d55780638da5cb5b146106f557806395d89b411461070657600080fd5b8063715018a611610197578063715018a6146106a75780637cbc2373146106af57806389083654146106c257600080fd5b8063618c3bdc14610648578063619ac95b1461066f57806370a082311461067e57600080fd5b80632cc2f5ce1161028c578063488c830311610235578063539ffb771161020f578063539ffb77146105fc57806353cab6d01461060f578063549230c9146106225780635b06a1d11461063557600080fd5b8063488c83031461055d5780634b359d38146105885780634f62b7ec146105b357600080fd5b8063332e044911610266578063332e04491461051057806339509351146105375780633b90f9a01461054a57600080fd5b80632cc2f5ce1461049d5780632e9a76e4146104c8578063313ce5671461050157600080fd5b8063161aab43116102f95780631c75e369116102d35780631c75e3691461042b5780631eee7e601461043e57806323b872dd146104515780632b4896791461046457600080fd5b8063161aab431461041257806318160ddd1461041a5780631c3526791461042257600080fd5b8063095ea7b31161032a578063095ea7b3146103965780630ca5b476146103b95780630f7d3a69146103ff57600080fd5b806302f91e551461035157806306fdde031461036c578063093220b714610381575b600080fd5b61035960c881565b6040519081526020015b60405180910390f35b610374610865565b6040516103639190613444565b61039461038f366004613457565b6108f7565b005b6103a96103a43660046134a7565b610b18565b6040519015158152602001610363565b6103ea6103c73660046134d3565b6001600160a01b0316600090815260126020526040902080546001909101549091565b60408051928352602083019190915201610363565b61039461040d3660046134a7565b610b32565b610359610c36565b600454610359565b610359600d5481565b6103946104393660046134f0565b610c47565b6103a961044c3660046134d3565b610d05565b6103a961045f366004613579565b610d12565b6103596104723660046135ba565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205490565b6103596104ab3660046135ba565b600b60209081526000928352604080842090915290825290205481565b6103596104d63660046135ba565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b60405160128152602001610363565b6103ea61051e3660046134d3565b6012602052600090815260409020805460019091015482565b6103a96105453660046134a7565b610d38565b6103946105583660046134a7565b610d77565b61035961056b3660046135ba565b600a60209081526000928352604080842090915290825290205481565b61059b6105963660046135f3565b610dcf565b6040516001600160a01b039091168152602001610363565b6105c66105c13660046134a7565b610ddc565b604080519687526020870195909552938501929092526001600160a01b03166060840152608083015260a082015260c001610363565b61039461060a3660046135f3565b610e3a565b61039461061d3660046135f3565b611031565b6103946106303660046134f0565b6112d0565b6103946106433660046134d3565b611352565b61059b7f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d5881565b610359670de0b6b3a764000081565b61035961068c3660046134d3565b6001600160a01b031660009081526002602052604090205490565b610394611429565b6103946106bd36600461360c565b61148f565b6103946106d036600461363c565b61176e565b6103596106e33660046134d3565b600c6020526000908152604090205481565b6000546001600160a01b031661059b565b6103746118b1565b61039461071c3660046134a7565b6118c0565b61039461072f3660046134a7565b61195d565b6103946107423660046135f3565b6119ad565b6103a96107553660046134a7565b611a03565b6103a96107683660046134a7565b611ab8565b61039461077b3660046135f3565b611ac6565b61035961078e3660046134d3565b6001600160a01b031660009081526013602052604090205490565b6103596107b736600461360c565b611d30565b61035960115481565b6103946107d33660046134a7565b611ded565b610359600f5481565b6105c66107ef3660046134a7565b611f11565b60075461059b906001600160a01b031681565b6103596108153660046135ba565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b610359600e5481565b61035960105481565b6103946108603660046134d3565b612015565b6060600580546108749061366a565b80601f01602080910402602001604051908101604052809291908181526020018280546108a09061366a565b80156108ed5780601f106108c2576101008083540402835291602001916108ed565b820191906000526020600020905b8154815290600101906020018083116108d057829003601f168201915b5050505050905090565b6000546001600160a01b031633146109565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b838511156109b75760405162461bcd60e51b815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e6720726174696044820152676f2076616c75657360c01b606482015260840161094d565b818310610a2c5760405162461bcd60e51b815260206004820152602b60248201527f75706461746552656465656d53657474696e67733a2077726f6e67206475726160448201527f74696f6e2076616c756573000000000000000000000000000000000000000000606482015260840161094d565b670de0b6b3a76400008411158015610a4c5750670de0b6b3a76400008111155b610aa95760405162461bcd60e51b815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e6720726174696044820152676f2076616c75657360c01b606482015260840161094d565b600d859055600e849055600f83905560108290556011819055604080518681526020810186905290810184905260608101839052608081018290527f5b37d10782e41a6539b50d59366d4112a880236e4187e85b6d1514d20e07d9b89060a00160405180910390a15050505050565b600033610b268185856120f7565b60019150505b92915050565b6000546001600160a01b03163314610b8c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161094d565b60c8811115610bdd5760405162461bcd60e51b815260206004820152601f60248201527f7570646174654465616c6c6f636174696f6e4665653a20746f6f206869676800604482015260640161094d565b6001600160a01b0382166000818152600c602052604090819020839055517f6ff024152fc2cd8071bc701f966036513eb03e243863f21d8218646faac0eaef90610c2a9084815260200190565b60405180910390a25050565b6000610c42600861224f565b905090565b600260015403610c875760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b6002600155610c97338585612259565b604051631c75e36960e01b81526001600160a01b03851690631c75e36990610cc99033908790879087906004016136a4565b600060405180830381600087803b158015610ce357600080fd5b505af1158015610cf7573d6000803e3d6000fd5b505060018055505050505050565b6000610b2c60088361240f565b600033610d20858285612431565b610d2b8585856124c3565b60019150505b9392505050565b3360008181526003602090815260408083206001600160a01b0387168452909152812054909190610b269082908690610d72908790613700565b6120f7565b600260015403610db75760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b6002600155610dc7823383612259565b505060018055565b6000610b2c6008836126e5565b60136020528160005260406000208181548110610df857600080fd5b6000918252602090912060069091020180546001820154600283015460038401546004850154600590950154939650919450926001600160a01b039091169186565b600260015403610e7a5760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b60026001553360008181526013602052604090205482908110610ef35760405162461bcd60e51b815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201526a1cc81b9bdd08195e1a5cdd60aa1b606482015260840161094d565b33600090815260126020908152604080832060139092528220805491929186908110610f2157610f21613713565b906000526020600020906006020190508060010154826001016000828254610f499190613729565b92505081905550610f5f303383600101546124c3565b600481015415610fe357600381015460048201546040805160008152602081019182905263549230c960e01b9091526001600160a01b039092169163549230c991610fb0913391906024810161373c565b600060405180830381600087803b158015610fca57600080fd5b505af1158015610fde573d6000803e3d6000fd5b505050505b600181015460405190815233907f56d7520e387607a8daa892e3fed116badc2a636307bdc794b1c1aed97ae203f49060200160405180910390a2611026856126f1565b505060018055505050565b6002600154036110715760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b600260015533600081815260136020526040902054829081106110ea5760405162461bcd60e51b815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201526a1cc81b9bdd08195e1a5cdd60aa1b606482015260840161094d565b33600090815260136020526040812080548590811061110b5761110b613713565b6000918252602090912060069091020160038101546007549192506001600160a01b0390811691161480159061114b57506007546001600160a01b031615155b156112c65760048101541561124b57600381015460048201546040805160008152602081019182905263549230c960e01b9091526001600160a01b039092169163549230c9916111a1913391906024810161373c565b600060405180830381600087803b1580156111bb57600080fd5b505af11580156111cf573d6000803e3d6000fd5b5050600754600484015460408051600081526020810191829052631c75e36960e01b9091526001600160a01b039092169350631c75e3699250611218913391906024810161373c565b600060405180830381600087803b15801561123257600080fd5b505af1158015611246573d6000803e3d6000fd5b505050505b6003810154600754604080518781526001600160a01b039384166020820152929091169082015233907f1722d7f73801c03b55a079c8c256b660968ff22cf5ae3f27ab18dec06d5069ab9060600160405180910390a26007546003820180546001600160a01b0319166001600160a01b039092169190911790555b5050600180555050565b6002600154036113105760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b600260015561132033858561282c565b60405163549230c960e01b81526001600160a01b0385169063549230c990610cc99033908790879087906004016136a4565b6000546001600160a01b031633146113ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161094d565b6001600160a01b0381166113c05760006011555b600754604080516001600160a01b03928316815291831660208301527f68bd81fc46af7a513e76fb97ea071cc4f0de980578f4a5c0ba4024529a745ec6910160405180910390a1600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146114835760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161094d565b61148d6000612a78565b565b6002600154036114cf5760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b6002600155816115465760405162461bcd60e51b8152602060048201526024808201527f72656465656d3a207374476c696e74416d6f756e742063616e6e6f742062652060448201527f6e756c6c00000000000000000000000000000000000000000000000000000000606482015260840161094d565b600f548110156115985760405162461bcd60e51b815260206004820152601860248201527f72656465656d3a206475726174696f6e20746f6f206c6f770000000000000000604482015260640161094d565b6115a33330846124c3565b336000908152601260205260408120906115bd8484611d30565b604080518681526020810183905290810185905290915033907fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469060600160405180910390a28215611763578382600101600082825461161d9190613700565b90915550819050801561169e5760075460408051600081526020810191829052631c75e36960e01b9091526001600160a01b0390911690631c75e3699061166b90339085906024810161373c565b600060405180830381600087803b15801561168557600080fd5b505af1158015611699573d6000803e3d6000fd5b505050505b33600090815260136020908152604091829020825160c0810184528581529182018890529181016116cf8742613700565b81526007546001600160a01b03166020820152604081018490526060014290528154600180820184556000938452602093849020835160069093020191825592820151928101929092556040810151600283015560608101516003830180546001600160a01b0319166001600160a01b039092169190911790556080810151600483015560a00151600590910155506112c6565b6112c6338583612ac8565b6000546001600160a01b031633146117c85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161094d565b306001600160a01b038316036118465760405162461bcd60e51b815260206004820152603c60248201527f7570646174655472616e7366657257686974656c6973743a2043616e6e6f742060448201527f72656d6f76652078546f6b656e2066726f6d2077686974656c69737400000000606482015260840161094d565b801561185d57611857600883612b9a565b5061186a565b611868600883612baf565b505b604080516001600160a01b038416815282151560208201527f3a34209cb941a5d23a56dea730a13738454bc7daefd4bb32e8d7df58c1bd920d910160405180910390a15050565b6060600680546108749061366a565b6002600154036119005760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b6002600155333b6119535760405162461bcd60e51b815260206004820152601660248201527f636f6e76657274546f3a206e6f7420616c6c6f77656400000000000000000000604482015260640161094d565b610dc78183612bc4565b60026001540361199d5760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b6002600155610dc782338361282c565b6002600154036119ed5760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b60026001556119fc8133612bc4565b5060018055565b3360008181526003602090815260408083206001600160a01b038716845290915281205490919083811015611aa05760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161094d565b611aad82868684036120f7565b506001949350505050565b600033610b268185856124c3565b600260015403611b065760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b60026001553360008181526013602052604090205482908110611b7f5760405162461bcd60e51b815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201526a1cc81b9bdd08195e1a5cdd60aa1b606482015260840161094d565b33600090815260126020908152604080832060139092528220805491929186908110611bad57611bad613713565b90600052602060002090600602019050600f548160050154611bcf9190613700565b421015611c445760405162461bcd60e51b815260206004820152602a60248201527f66696e616c697a6552656465656d3a206d696e206475726174696f6e2062656660448201527f6f72652072656465656d00000000000000000000000000000000000000000000606482015260840161094d565b8060010154826001016000828254611c5c9190613729565b90915550506005810154600090611c739042613729565b90506000611c85836001015483611d30565b9050611c9633846001015483612ac8565b600483015415611d1a57600383015460048401546040805160008152602081019182905263549230c960e01b9091526001600160a01b039092169163549230c991611ce7913391906024810161373c565b600060405180830381600087803b158015611d0157600080fd5b505af1158015611d15573d6000803e3d6000fd5b505050505b611d23876126f1565b5050600180555050505050565b6000600f54821015611d4457506000610b2c565b601054821115611d7657670de0b6b3a7640000600e5484611d65919061376d565b611d6f9190613784565b9050610b2c565b6000600f54601054611d889190613729565b600d54600e54611d989190613729565b600f54611da59086613729565b611daf919061376d565b611db99190613784565b600d54611dc69190613700565b9050670de0b6b3a7640000611ddb828661376d565b611de59190613784565b949350505050565b600260015403611e2d5760405162461bcd60e51b815260206004820152601f60248201526000805160206137f6833981519152604482015260640161094d565b60026001556001600160a01b038216611eae5760405162461bcd60e51b815260206004820152602960248201527f617070726f766555736167653a20617070726f766520746f20746865207a657260448201527f6f20616464726573730000000000000000000000000000000000000000000000606482015260840161094d565b336000818152600a602090815260408083206001600160a01b03871680855290835292819020859055518481529192917fe75ec259c38e4601f24580968665ec00b21cca4f996689b260ec598aec5c08db910160405180910390a3505060018055565b6001600160a01b03821660009081526013602052604081205481908190819081908190889088908110611f9a5760405162461bcd60e51b815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201526a1cc81b9bdd08195e1a5cdd60aa1b606482015260840161094d565b6001600160a01b038a16600090815260136020526040812080548b908110611fc457611fc4613713565b6000918252602090912060069091020180546001820154600283015460038401546004850154600590950154939d50919b5099506001600160a01b0316975090955093505050509295509295509295565b6000546001600160a01b0316331461206f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161094d565b6001600160a01b0381166120eb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161094d565b6120f481612a78565b50565b6001600160a01b0383166121725760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b0382166121ee5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610b2c825490565b600081116122a95760405162461bcd60e51b815260206004820152601f60248201527f616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c6c00604482015260640161094d565b6001600160a01b038084166000908152601260209081526040808320600a8352818420948716845293909152902054828110156123285760405162461bcd60e51b815260206004820152601f60248201527f616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e7400604482015260640161094d565b6123328382613729565b6001600160a01b038087166000818152600a60209081526040808320948a1680845294825280832095909555918152600b8252838120928152919052205461237b908490613700565b6001600160a01b038087166000908152600b602090815260408083209389168352929052205581546123ae908490613700565b82556123bb8530856124c3565b836001600160a01b0316856001600160a01b03167f5168bfb88d6125d4580e2b91ecb103a730312c3e8b0be9c4031a0fc794e2cd5f8560405161240091815260200190565b60405180910390a35050505050565b6001600160a01b03811660009081526001830160205260408120541515610d31565b6001600160a01b0383811660009081526003602090815260408083209386168352929052205460001981146124bd57818110156124b05760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161094d565b6124bd84848484036120f7565b50505050565b6001600160a01b03831661253f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b0382166125bb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161094d565b6125c6838383612c9b565b6001600160a01b038316600090815260026020526040902054818110156126555760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b0380851660009081526002602052604080822085850390559185168152908120805484929061268c908490613700565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516126d891815260200190565b60405180910390a36124bd565b6000610d318383612d19565b336000908152601360205260409020805461270e90600190613729565b8154811061271e5761271e613713565b906000526020600020906006020160136000336001600160a01b03166001600160a01b03168152602001908152602001600020828154811061276257612762613713565b600091825260208083208454600690930201918255600180850154908301556002808501549083015560038085015490830180546001600160a01b0319166001600160a01b039092169190911790556004808501549083015560059384015493909101929092553381526013909152604090208054806127e4576127e46137a6565b60008281526020812060066000199093019283020181815560018101829055600281018290556003810180546001600160a01b03191690556004810182905560050155905550565b600081116128a25760405162461bcd60e51b815260206004820152602160248201527f6465616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c60448201527f6c00000000000000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b038084166000908152600b60209081526040808320938616835292905220548181101561293e5760405162461bcd60e51b815260206004820152602160248201527f6465616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e60448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161094d565b6129488282613729565b6001600160a01b038086166000908152600b60209081526040808320938816835292815282822093909355600c90925281205461271090612989908561376d565b6129939190613784565b6001600160a01b0386166000908152601260205260408120805492935091859183916129c0908490613729565b909155506129da905030876129d58588613729565b6124c3565b612a106001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d581661dead84612d43565b612a1a3083612dec565b846001600160a01b0316866001600160a01b03167f7d613f7bd1a777aeeefdd38ae61201003086575188df50618d02482220f5c1478685604051612a68929190918252602082015260400190565b60405180910390a3505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000612ad48284613729565b9050612b0a6001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58168584612d43565b8015612b4657612b466001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d581661dead83612d43565b612b503084612dec565b60408051848152602081018490526001600160a01b038616917f0da072ebd7a5649099f43a3776eb0cda17aca79426ee9f28aae203f5dfa04eda910160405180910390a250505050565b6000610d31836001600160a01b038416612f7d565b6000610d31836001600160a01b038416612fcc565b81600003612c145760405162461bcd60e51b815260206004820152601e60248201527f636f6e766572743a20616d6f756e742063616e6e6f74206265206e756c6c0000604482015260640161094d565b612c1e81836130bf565b604080516001600160a01b03831681526020810184905233917fccfaeb3043a96a967dc036ab72e078a9632af809671bc2a1ac30a8043645f89e910160405180910390a2612c976001600160a01b037f000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58163330856131aa565b5050565b6001600160a01b0383161580612cb75750612cb760088461240f565b80612cc85750612cc860088361240f565b612d145760405162461bcd60e51b815260206004820152601560248201527f7472616e736665723a206e6f7420616c6c6f7765640000000000000000000000604482015260640161094d565b505050565b6000826000018281548110612d3057612d30613713565b9060005260206000200154905092915050565b6040516001600160a01b038316602482015260448101829052612d149084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526131fb565b6001600160a01b038216612e685760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161094d565b612e7482600083612c9b565b6001600160a01b03821660009081526002602052604090205481811015612f035760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161094d565b6001600160a01b0383166000908152600260205260408120838303905560048054849290612f32908490613729565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000818152600183016020526040812054612fc457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610b2c565b506000610b2c565b600081815260018301602052604081205480156130b5576000612ff0600183613729565b855490915060009061300490600190613729565b905081811461306957600086600001828154811061302457613024613713565b906000526020600020015490508087600001848154811061304757613047613713565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061307a5761307a6137a6565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610b2c565b6000915050610b2c565b6001600160a01b0382166131155760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161094d565b61312160008383612c9b565b80600460008282546131339190613700565b90915550506001600160a01b03821660009081526002602052604081208054839290613160908490613700565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526124bd9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612d88565b6000613250826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132e09092919063ffffffff16565b805190915015612d14578080602001905181019061326e91906137bc565b612d145760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161094d565b6060611de58484600085856001600160a01b0385163b6133425760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161094d565b600080866001600160a01b0316858760405161335e91906137d9565b60006040518083038185875af1925050503d806000811461339b576040519150601f19603f3d011682016040523d82523d6000602084013e6133a0565b606091505b50915091506133b08282866133bb565b979650505050505050565b606083156133ca575081610d31565b8251156133da5782518084602001fd5b8160405162461bcd60e51b815260040161094d9190613444565b60005b8381101561340f5781810151838201526020016133f7565b50506000910152565b600081518084526134308160208601602086016133f4565b601f01601f19169290920160200192915050565b602081526000610d316020830184613418565b600080600080600060a0868803121561346f57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6001600160a01b03811681146120f457600080fd5b600080604083850312156134ba57600080fd5b82356134c581613492565b946020939093013593505050565b6000602082840312156134e557600080fd5b8135610d3181613492565b6000806000806060858703121561350657600080fd5b843561351181613492565b935060208501359250604085013567ffffffffffffffff8082111561353557600080fd5b818701915087601f83011261354957600080fd5b81358181111561355857600080fd5b88602082850101111561356a57600080fd5b95989497505060200194505050565b60008060006060848603121561358e57600080fd5b833561359981613492565b925060208401356135a981613492565b929592945050506040919091013590565b600080604083850312156135cd57600080fd5b82356135d881613492565b915060208301356135e881613492565b809150509250929050565b60006020828403121561360557600080fd5b5035919050565b6000806040838503121561361f57600080fd5b50508035926020909101359150565b80151581146120f457600080fd5b6000806040838503121561364f57600080fd5b823561365a81613492565b915060208301356135e88161362e565b600181811c9082168061367e57607f821691505b60208210810361369e57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b2c57610b2c6136ea565b634e487b7160e01b600052603260045260246000fd5b81810381811115610b2c57610b2c6136ea565b6001600160a01b03841681528260208201526060604082015260006137646060830184613418565b95945050505050565b8082028115828204841417610b2c57610b2c6136ea565b6000826137a157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b6000602082840312156137ce57600080fd5b8151610d318161362e565b600082516137eb8184602087016133f4565b919091019291505056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c00a2646970667358221220ca75954cf7d99040b84596319df3c04de09e26b722d890141a206386230a27e064736f6c63430008130033

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

000000000000000000000000cd3b51d98478d53f4515a306be565c6eebef1d58

-----Decoded View---------------
Arg [0] : _glint (address): 0xcd3B51D98478D53F4515A306bE565c6EebeF1D58

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


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.