ETH Price: $2,959.10 (+0.08%)

Token

Staked Zyber Token (sZYB)

Overview

Max Total Supply

1,436,757.188020133787102693 sZYB

Holders

685 (0.00%)

Market

Price

$0.0005 @ 0.000000 ETH (+0.40%)

Onchain Market Cap

-

Circulating Supply Market Cap

$7,864.14

Other Info

Token Contract (WITH 18 Decimals)

Balance
0.497552371833869503 sZYB

Value
$0.00 ( ~0 ETH) [0.0000%]
0xdb70eed3578f12929eae82e0f13e51ca01216789
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Community-driven and governed DEX on Arbitrum with lots of utility on its native token ZYBER.

Market

Volume (24H):$2.18
Market Capitalization:$7,864.14
Circulating Supply:15,495,036.00 sZYB
Market Data Source: Coinmarketcap

Contract Source Code Verified (Exact Match)

Contract Name:
sZyberToken

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

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 "./interfaces//IZyberTokenV2.sol";
import "./interfaces/IXZyberToken.sol";
import "./interfaces/IXZyberTokenUsage.sol";

/*
 * sZYB is Zyberswaps escrowed governance token obtainable by converting ZYB to it
 * It's non-transferable, except from/to whitelisted addresses
 * It can be converted back to ZYB through a vesting process
 * This contract is made to receive sZYB deposits from users in order to allocate them to Usages (plugins) contracts
 */
contract sZyberToken is
    Ownable,
    ReentrancyGuard,
    ERC20("Staked Zyber Token", "sZYB"),
    IXZyberToken
{
    using Address for address;
    using EnumerableSet for EnumerableSet.AddressSet;
    using SafeERC20 for IZyberTokenV2;

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

    struct RedeemInfo {
        uint256 zybAmount; // ZYB amount to receive when vesting has ended
        uint256 xZyberAmount; // sZYB amount to redeem
        uint256 endTime; // end time of redeeming if left for the desired duration
        IXZyberTokenUsage dividendsAddress;
        uint256 dividendsAllocation; // Share of redeeming sZYB to allocate to the Dividends Usage contract
        uint256 startTime; // start time of redeem action
    }

    IZyberTokenV2 public immutable zybToken; // ZYB token to convert to/from
    IXZyberTokenUsage public dividendsAddress; // Zyberswap dividends contract

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

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

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

    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 = 14 days;
    uint256 public maxRedeemDuration = 180 days;
    // Adjusted dividends rewards for redeeming sZYB
    uint256 public redeemDividendsAdjustment = MAX_FIXED_RATIO / 2; // 50% precision is 1**18

    address internal constant BURN_ADDRESS =
        0x000000000000000000000000000000000000dEaD;

    mapping(address => XZyberBalance) public xZyberBalances; // User's sZYB balances
    mapping(address => RedeemInfo[]) public userRedeems; // User's redeeming instances

    constructor(IZyberTokenV2 _zybToken) {
        zybToken = _zybToken;
        _transferWhitelist.add(address(this));
    }

    /********************************************/
    /****************** EVENTS ******************/
    /********************************************/

    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 redeemDividendsAdjustment
    );
    event UpdateDividendsAddress(
        address previousDividendsAddress,
        address newDividendsAddress
    );
    event UpdateDeallocationFee(address indexed usageAddress, uint256 fee);
    event SetTransferWhitelist(address account, bool add);
    event Redeem(
        address indexed userAddress,
        uint256 xZyberAmount,
        uint256 zybAmount,
        uint256 duration
    );
    event FinalizeRedeem(
        address indexed userAddress,
        uint256 xZyberAmount,
        uint256 zybAmount
    );
    event CancelRedeem(address indexed userAddress, uint256 xZyberAmount);
    event UpdateRedeemDividendsAddress(
        address indexed userAddress,
        uint256 redeemIndex,
        address previousDividendsAddress,
        address newDividendsAddress
    );
    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 sZYB balances
     */
    function getXZyberBalance(
        address userAddress
    ) external view returns (uint256 allocatedAmount, uint256 redeemingAmount) {
        XZyberBalance storage balance = xZyberBalances[userAddress];
        return (balance.allocatedAmount, balance.redeemingAmount);
    }

    /*
     * @dev returns redeemable ZYB for "amount" of sZYB vested for "duration" seconds
     */
    function getZyberByVestingDuration(
        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 zybAmount,
            uint256 xZyberAmount,
            uint256 endTime,
            address dividendsContract,
            uint256 dividendsAllocation
        )
    {
        RedeemInfo storage _redeem = userRedeems[userAddress][redeemIndex];
        return (
            _redeem.zybAmount,
            _redeem.xZyberAmount,
            _redeem.endTime,
            address(_redeem.dividendsAddress),
            _redeem.dividendsAllocation
        );
    }

    /**
     * @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 sZYB
     */
    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 redeemDividendsAdjustment_
    ) 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 &&
                redeemDividendsAdjustment_ <= MAX_FIXED_RATIO,
            "updateRedeemSettings: wrong ratio values"
        );

        minRedeemRatio = minRedeemRatio_;
        maxRedeemRatio = maxRedeemRatio_;
        minRedeemDuration = minRedeemDuration_;
        maxRedeemDuration = maxRedeemDuration_;
        redeemDividendsAdjustment = redeemDividendsAdjustment_;

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

    /**
     * @dev Updates dividends contract address
     *
     * Must only be called by owner
     */
    function updateDividendsAddress(
        IXZyberTokenUsage dividendsAddress_
    ) external onlyOwner {
        // if set to 0, also set divs earnings while redeeming to 0
        if (address(dividendsAddress_) == address(0)) {
            redeemDividendsAdjustment = 0;
        }

        emit UpdateDividendsAddress(
            address(dividendsAddress),
            address(dividendsAddress_)
        );
        dividendsAddress = dividendsAddress_;
    }

    /**
     * @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 sZYB from msg.sender
     */
    function approveUsage(
        IXZyberTokenUsage 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 ZYB to sZYB
     */
    function convert(uint256 amount) external nonReentrant {
        _convert(amount, msg.sender);
    }

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

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

        _transfer(msg.sender, address(this), xZyberAmount);
        XZyberBalance storage balance = xZyberBalances[msg.sender];

        // get corresponding ZYB amount
        uint256 zybAmount = getZyberByVestingDuration(xZyberAmount, duration);
        emit Redeem(msg.sender, xZyberAmount, zybAmount, duration);

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

            // handle dividends during the vesting process
            uint256 dividendsAllocation = (xZyberAmount *
                redeemDividendsAdjustment) / MAX_FIXED_RATIO;

            // only if compensation is active
            if (dividendsAllocation > 0) {
                // allocate to dividends
                dividendsAddress.allocate(
                    msg.sender,
                    dividendsAllocation,
                    new bytes(0)
                );
            }

            // add redeeming entry
            userRedeems[msg.sender].push(
                RedeemInfo(
                    zybAmount,
                    xZyberAmount,
                    _currentBlockTimestamp() + duration,
                    dividendsAddress,
                    dividendsAllocation,
                    _currentBlockTimestamp()
                )
            );
        } else {
            // immediately redeem for ZYB
            _finalizeRedeem(msg.sender, xZyberAmount, zybAmount);
        }
    }

    /**
     * @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) {
        XZyberBalance storage balance = xZyberBalances[msg.sender];
        RedeemInfo storage _redeem = userRedeems[msg.sender][redeemIndex];
        require(
            _currentBlockTimestamp() >= _redeem.startTime + minRedeemDuration,
            "finalizeRedeem: min duration before redeem"
        );

        // remove from total
        balance.redeemingAmount -= _redeem.xZyberAmount;

        uint256 duration = _currentBlockTimestamp() - _redeem.startTime;
        uint256 zybAmount = getZyberByVestingDuration(
            _redeem.xZyberAmount,
            duration
        );
        _finalizeRedeem(msg.sender, _redeem.xZyberAmount, zybAmount);

        // handle dividends compensation if any was active
        if (_redeem.dividendsAllocation > 0) {
            // deallocate from dividends
            IXZyberTokenUsage(_redeem.dividendsAddress).deallocate(
                msg.sender,
                _redeem.dividendsAllocation,
                new bytes(0)
            );
        }

        // remove redeem entry
        _deleteRedeemEntry(redeemIndex);
    }

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

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

            emit UpdateRedeemDividendsAddress(
                msg.sender,
                redeemIndex,
                address(_redeem.dividendsAddress),
                address(dividendsAddress)
            );
            _redeem.dividendsAddress = dividendsAddress;
        }
    }

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

        // make redeeming sZYB available again
        balance.redeemingAmount -= _redeem.xZyberAmount;

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

        // handle dividends compensation if any was active
        if (_redeem.dividendsAllocation > 0) {
            // deallocate from dividends
            IXZyberTokenUsage(_redeem.dividendsAddress).deallocate(
                msg.sender,
                _redeem.dividendsAllocation,
                new bytes(0)
            );
        }

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

        // remove redeem entry
        _deleteRedeemEntry(redeemIndex);
    }

    /**
     * @dev Allocates caller's "amount" of available sZYB 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 sZYB to usageContract
        IXZyberTokenUsage(usageAddress).allocate(msg.sender, amount, usageData);
    }

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

    /**
     * @dev Deallocates caller's "amount" of available sZYB 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 sZYB into usageContract
        IXZyberTokenUsage(usageAddress).deallocate(
            msg.sender,
            amount,
            usageData
        );
    }

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

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

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

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

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

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

        // sends due ZYB tokens
        zybToken.safeTransfer(userAddress, zybAmount);

        // burns ZYB excess if any
        if (zybExcess > 0) {
            zybToken.safeTransfer(BURN_ADDRESS, zybExcess);
        }

        _burn(address(this), xZyberAmount);

        emit FinalizeRedeem(userAddress, xZyberAmount, zybAmount);
    }

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

        XZyberBalance storage balance = xZyberBalances[userAddress];

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

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

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

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

        emit Allocate(userAddress, usageAddress, amount);
    }

    /**
     * @dev Deallocates "amount" of available sZYB 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 sZYB 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 sZYB balances
        XZyberBalance storage balance = xZyberBalances[userAddress];
        balance.allocatedAmount -= amount;

        _transfer(address(this), userAddress, amount - deallocationFeeAmount);
        // burn corresponding ZYB and XSYNTH
        zybToken.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;
    }
}

// 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 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

// 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 {}
}

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

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

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

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

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

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

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

File 13 of 13 : IZyberTokenV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

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

interface IZyberTokenV2 is IERC20 {

}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IZyberTokenV2","name":"_zybToken","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":"xZyberAmount","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":"xZyberAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"zybAmount","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":"xZyberAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"zybAmount","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":"address","name":"previousDividendsAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newDividendsAddress","type":"address"}],"name":"UpdateDividendsAddress","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":"previousDividendsAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newDividendsAddress","type":"address"}],"name":"UpdateRedeemDividendsAddress","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":"redeemDividendsAdjustment","type":"uint256"}],"name":"UpdateRedeemSettings","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 IXZyberTokenUsage","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":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"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":[],"name":"dividendsAddress","outputs":[{"internalType":"contract IXZyberTokenUsage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"finalizeRedeem","outputs":[],"stateMutability":"nonpayable","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":"zybAmount","type":"uint256"},{"internalType":"uint256","name":"xZyberAmount","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"dividendsContract","type":"address"},{"internalType":"uint256","name":"dividendsAllocation","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":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"getXZyberBalance","outputs":[{"internalType":"uint256","name":"allocatedAmount","type":"uint256"},{"internalType":"uint256","name":"redeemingAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"getZyberByVestingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"xZyberAmount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemDividendsAdjustment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"contract IXZyberTokenUsage","name":"dividendsAddress_","type":"address"}],"name":"updateDividendsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemIndex","type":"uint256"}],"name":"updateRedeemDividendsAddress","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":"redeemDividendsAdjustment_","type":"uint256"}],"name":"updateRedeemSettings","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":"zybAmount","type":"uint256"},{"internalType":"uint256","name":"xZyberAmount","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"contract IXZyberTokenUsage","name":"dividendsAddress","type":"address"},{"internalType":"uint256","name":"dividendsAllocation","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"xZyberBalances","outputs":[{"internalType":"uint256","name":"allocatedAmount","type":"uint256"},{"internalType":"uint256","name":"redeemingAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"zybToken","outputs":[{"internalType":"contract IZyberTokenV2","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a0604052620000196002670de0b6b3a7640000620001fa565b600d55670de0b6b3a7640000600e5562127500600f5562ed4e006010556002670de0b6b3a76400006200004d9190620001fa565b6011553480156200005d57600080fd5b5060405162004a0f38038062004a0f83398101604081905262000080916200021d565b6040518060400160405280601281526020017129ba30b5b2b2102d3cb132b9102a37b5b2b760711b8152506040518060400160405280600481526020016339ad2ca160e11b815250620000e2620000dc6200013460201b60201c565b62000138565b600180556005620000f48382620002f4565b506006620001038282620002f4565b5050506001600160a01b0381166080526200012c60083062000188602090811b6200291217901c565b5050620003c0565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006200019f836001600160a01b038416620001a8565b90505b92915050565b6000818152600183016020526040812054620001f157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001a2565b506000620001a2565b6000826200021857634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156200023057600080fd5b81516001600160a01b03811681146200024857600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200027a57607f821691505b6020821081036200029b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002ef57600081815260208120601f850160051c81016020861015620002ca5750805b601f850160051c820191505b81811015620002eb57828155600101620002d6565b5050505b505050565b81516001600160401b038111156200031057620003106200024f565b620003288162000321845462000265565b84620002a1565b602080601f831160018114620003605760008415620003475750858301515b600019600386901b1c1916600185901b178555620002eb565b600085815260208120601f198616915b82811015620003915788860151825594840194600190910190840162000370565b5085821015620003b05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b608051614617620003f86000396000818161082b015281816134bf0152818161364901528181613712015261375901526146176000f3fe608060405234801561001057600080fd5b506004361061034c5760003560e01c8063539ffb77116101bd578063a3908e1b116100f9578063c360ed1c116100a2578063dd62ed3e1161007c578063dd62ed3e146108ba578063e3a2950b14610900578063e9ed87f814610909578063f2fde38b1461091257600080fd5b8063c360ed1c1461084d578063c4b1076614610860578063cc6c54231461086957600080fd5b8063aff6cbf1116100d3578063aff6cbf1146107dd578063b90c2b52146107f0578063c3323feb1461082657600080fd5b8063a3908e1b146107a4578063a457c2d7146107b7578063a9059cbb146107ca57600080fd5b80637305b962116101665780638975f918116101405780638975f9181461074b5780638da5cb5b1461076b57806395d89b4114610789578063a0bdc7cb1461079157600080fd5b80637305b962146106fe5780637cbc237314610725578063890836541461073857600080fd5b8063619ac95b11610197578063619ac95b146106b157806370a08231146106c0578063715018a6146106f657600080fd5b8063539ffb7714610678578063549230c91461068b5780635a1d34dc1461069e57600080fd5b80632b4896791161028c5780633950935111610235578063497965ee1161020f578063497965ee146105c15780634a5b406e146106065780634b359d381461060f5780634f62b7ec1461062257600080fd5b806339509351146105705780633b90f9a014610583578063488c83031461059657600080fd5b80632e9a76e4116102665780632e9a76e41461050857806331124ce31461054e578063313ce5671461056157600080fd5b80632b489679146104845780632caad3a0146104ca5780632cc2f5ce146104dd57600080fd5b80630f7d3a69116102f95780631c352679116102d35780631c352679146104425780631c75e3691461044b5780631eee7e601461045e57806323b872dd1461047157600080fd5b80630f7d3a691461041f578063161aab431461043257806318160ddd1461043a57600080fd5b8063074dd1571161032a578063074dd15714610396578063093220b7146103e9578063095ea7b3146103fc57600080fd5b806302f91e551461035157806306045a211461036c57806306fdde0314610381575b600080fd5b61035960c881565b6040519081526020015b60405180910390f35b61037f61037a3660046140fd565b610925565b005b610389610a67565b6040516103639190614188565b6103d46103a43660046140fd565b73ffffffffffffffffffffffffffffffffffffffff16600090815260126020526040902080546001909101549091565b60408051928352602083019190915201610363565b61037f6103f736600461419b565b610af9565b61040f61040a3660046141d6565b610db4565b6040519015158152602001610363565b61037f61042d3660046141d6565b610dce565b610359610f20565b600454610359565b610359600d5481565b61037f610459366004614202565b610f31565b61040f61046c3660046140fd565b611041565b61040f61047f36600461428b565b61104e565b6103596104923660046142cc565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b6103596104d8366004614305565b611074565b6103596104eb3660046142cc565b600b60209081526000928352604080842090915290825290205481565b6103596105163660046142cc565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600b6020908152604080832093909416825291909152205490565b61037f61055c366004614327565b611131565b60405160128152602001610363565b61040f61057e3660046141d6565b6114c0565b61037f6105913660046141d6565b61150c565b6103596105a43660046142cc565b600a60209081526000928352604080842090915290825290205481565b6007546105e19073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610363565b61035960115481565b6105e161061d366004614327565b611590565b6106356106303660046141d6565b61159d565b6040805196875260208701959095529385019290925273ffffffffffffffffffffffffffffffffffffffff166060840152608083015260a082015260c001610363565b61037f610686366004614327565b611608565b61037f610699366004614202565b61187d565b61037f6106ac366004614340565b611951565b610359670de0b6b3a764000081565b6103596106ce3660046140fd565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b61037f611a34565b6103d461070c3660046140fd565b6012602052600090815260409020805460019091015482565b61037f610733366004614305565b611ac1565b61037f610746366004614373565b611e7d565b6103596107593660046140fd565b600c6020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff166105e1565b61038961201b565b61037f61079f3660046141d6565b61202a565b61037f6107b2366004614327565b6120a6565b61040f6107c53660046141d6565b612128565b61040f6107d83660046141d6565b612204565b61037f6107eb366004614327565b612212565b6103596107fe3660046140fd565b73ffffffffffffffffffffffffffffffffffffffff1660009081526013602052604090205490565b6105e17f000000000000000000000000000000000000000000000000000000000000000081565b61037f61085b3660046141d6565b612514565b610359600f5481565b61087c6108773660046141d6565b612698565b6040805195865260208601949094529284019190915273ffffffffffffffffffffffffffffffffffffffff166060830152608082015260a001610363565b6103596108c83660046142cc565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260036020908152604080832093909416825291909152205490565b610359600e5481565b61035960105481565b61037f6109203660046140fd565b6127e2565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166109cc5760006011555b6007546040805173ffffffffffffffffffffffffffffffffffffffff928316815291831660208301527f044c75b8fa43ce72364b4c23fdb8451beafbda46505bf44c76f0853a01ed4ade910160405180910390a1600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606060058054610a76906143a1565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa2906143a1565b8015610aef5780601f10610ac457610100808354040283529160200191610aef565b820191906000526020600020905b815481529060010190602001808311610ad257829003601f168201915b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a2565b83851115610c0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109a2565b818310610c99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f75706461746552656465656d53657474696e67733a2077726f6e67206475726160448201527f74696f6e2076616c75657300000000000000000000000000000000000000000060648201526084016109a2565b670de0b6b3a76400008411158015610cb95750670de0b6b3a76400008111155b610d45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109a2565b600d859055600e849055600f83905560108290556011819055604080518681526020810186905290810184905260608101839052608081018290527f5b37d10782e41a6539b50d59366d4112a880236e4187e85b6d1514d20e07d9b89060a00160405180910390a15050505050565b600033610dc2818585612934565b60019150505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a2565b60c8811115610eba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f7570646174654465616c6c6f636174696f6e4665653a20746f6f20686967680060448201526064016109a2565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600c602052604090819020839055517f6ff024152fc2cd8071bc701f966036513eb03e243863f21d8218646faac0eaef90610f149084815260200190565b60405180910390a25050565b6000610f2c6008612ae7565b905090565b600260015403610f9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b6002600155610fad338585612af1565b6040517f1c75e36900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851690631c75e369906110059033908790879087906004016143f4565b600060405180830381600087803b15801561101f57600080fd5b505af1158015611033573d6000803e3d6000fd5b505060018055505050505050565b6000610dc8600883612d1c565b60003361105c858285612d4b565b611067858585612e22565b60019150505b9392505050565b6000600f5482101561108857506000610dc8565b6010548211156110ba57670de0b6b3a7640000600e54846110a99190614494565b6110b391906144ab565b9050610dc8565b6000600f546010546110cc91906144e6565b600d54600e546110dc91906144e6565b600f546110e990866144e6565b6110f39190614494565b6110fd91906144ab565b600d5461110a91906144f9565b9050670de0b6b3a764000061111f8286614494565b61112991906144ab565b949350505050565b60026001540361119d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b60026001553360008181526013602052604090205482908110611242576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109a2565b3360009081526013602052604081208054859081106112635761126361450c565b60009182526020909120600690910201600381015460075491925073ffffffffffffffffffffffffffffffffffffffff9081169116148015906112bd575060075473ffffffffffffffffffffffffffffffffffffffff1615155b156114b6576004810154156114095760038101546004820154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c991611339913391906024810161453b565b600060405180830381600087803b15801561135357600080fd5b505af1158015611367573d6000803e3d6000fd5b50506007546004840154604080516000815260208101918290527f1c75e3690000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169350631c75e36992506113d6913391906024810161453b565b600060405180830381600087803b1580156113f057600080fd5b505af1158015611404573d6000803e3d6000fd5b505050505b60038101546007546040805187815273ffffffffffffffffffffffffffffffffffffffff9384166020820152929091169082015233907fa60c8f9118be22c9277a8129333d64ffda3de44ca7a5831d077a3127f1237a189060600160405180910390a26007546003820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790555b5050600180555050565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190610dc290829086906115079087906144f9565b612934565b600260015403611578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b6002600155611588823383612af1565b505060018055565b6000610dc86008836130e0565b601360205281600052604060002081815481106115b957600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501549396509194509273ffffffffffffffffffffffffffffffffffffffff9091169186565b600260015403611674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b60026001553360008181526013602052604090205482908110611719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109a2565b336000908152601260209081526040808320601390925282208054919291869081106117475761174761450c565b90600052602060002090600602019050806001015482600101600082825461176f91906144e6565b9250508190555061178530338360010154612e22565b60048101541561182f5760038101546004820154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c9916117fc913391906024810161453b565b600060405180830381600087803b15801561181657600080fd5b505af115801561182a573d6000803e3d6000fd5b505050505b600181015460405190815233907f56d7520e387607a8daa892e3fed116badc2a636307bdc794b1c1aed97ae203f49060200160405180910390a2611872856130ec565b505060018055505050565b6002600154036118e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b60026001556118f933858561329c565b6040517f549230c900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063549230c9906110059033908790879087906004016143f4565b6002600154036119bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b6002600155333b611a2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f636f6e76657274546f3a206e6f7420616c6c6f7765640000000000000000000060448201526064016109a2565b611588828261356a565b60005473ffffffffffffffffffffffffffffffffffffffff163314611ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a2565b611abf6000613675565b565b600260015403611b2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b600260015581611bbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f72656465656d3a20785a79626572416d6f756e742063616e6e6f74206265206e60448201527f756c6c000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b600f54811015611c2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f72656465656d3a206475726174696f6e20746f6f206c6f77000000000000000060448201526064016109a2565b611c36333084612e22565b33600090815260126020526040812090611c508484611074565b604080518681526020810183905290810185905290915033907fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469060600160405180910390a28215611e725783826001016000828254611cb091906144f9565b9091555050601154600090670de0b6b3a764000090611ccf9087614494565b611cd991906144ab565b90508015611d7b57600754604080516000815260208101918290527f1c75e3690000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff90911690631c75e36990611d4890339085906024810161453b565b600060405180830381600087803b158015611d6257600080fd5b505af1158015611d76573d6000803e3d6000fd5b505050505b33600090815260136020908152604091829020825160c081018452858152918201889052918101611dac87426144f9565b815260075473ffffffffffffffffffffffffffffffffffffffff166020820152604081018490526060014290528154600180820184556000938452602093849020835160069093020191825592820151928101929092556040810151600283015560608101516003830180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556080810151600483015560a00151600590910155506114b6565b6114b63385836136ea565b60005473ffffffffffffffffffffffffffffffffffffffff163314611efe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a2565b3073ffffffffffffffffffffffffffffffffffffffff831603611fa3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f7570646174655472616e7366657257686974656c6973743a2043616e6e6f742060448201527f72656d6f76652078546f6b656e2066726f6d2077686974656c6973740000000060648201526084016109a2565b8015611fba57611fb4600883612912565b50611fc7565b611fc56008836137e3565b505b6040805173ffffffffffffffffffffffffffffffffffffffff8416815282151560208201527f3a34209cb941a5d23a56dea730a13738454bc7daefd4bb32e8d7df58c1bd920d910160405180910390a15050565b606060068054610a76906143a1565b600260015403612096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b600260015561158882338361329c565b600260015403612112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b6002600155612121813361356a565b5060018055565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190838110156121ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016109a2565b6121f98286868403612934565b506001949350505050565b600033610dc2818585612e22565b60026001540361227e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b60026001553360008181526013602052604090205482908110612323576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109a2565b336000908152601260209081526040808320601390925282208054919291869081106123515761235161450c565b90600052602060002090600602019050600f54816005015461237391906144f9565b421015612402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f66696e616c697a6552656465656d3a206d696e206475726174696f6e2062656660448201527f6f72652072656465656d0000000000000000000000000000000000000000000060648201526084016109a2565b806001015482600101600082825461241a91906144e6565b9091555050600581015460009061243190426144e6565b90506000612443836001015483611074565b9050612454338460010154836136ea565b6004830154156124fe5760038301546004840154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c9916124cb913391906024810161453b565b600060405180830381600087803b1580156124e557600080fd5b505af11580156124f9573d6000803e3d6000fd5b505050505b612507876130ec565b5050600180555050505050565b600260015403612580576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b600260015573ffffffffffffffffffffffffffffffffffffffff8216612628576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f617070726f766555736167653a20617070726f766520746f20746865207a657260448201527f6f2061646472657373000000000000000000000000000000000000000000000060648201526084016109a2565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff871680855290835292819020859055518481529192917fe75ec259c38e4601f24580968665ec00b21cca4f996689b260ec598aec5c08db910160405180910390a3505060018055565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601360205260408120548190819081908190879087908110612758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff8916600090815260136020526040812080548a90811061278f5761278f61450c565b600091825260209091206006909102018054600182015460028301546003840154600490940154929e919d509b5073ffffffffffffffffffffffffffffffffffffffff9092169950975095505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a2565b73ffffffffffffffffffffffffffffffffffffffff8116612906576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109a2565b61290f81613675565b50565b600061106d8373ffffffffffffffffffffffffffffffffffffffff8416613805565b73ffffffffffffffffffffffffffffffffffffffff83166129d6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff8216612a79576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610dc8825490565b60008111612b5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c6c0060448201526064016109a2565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152601260209081526040808320600a835281842094871684529390915290205482811015612c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e740060448201526064016109a2565b612c0b83826144e6565b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600a60209081526040808320948a1680845294825280832095909555918152600b82528381209281529190522054612c619084906144f9565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600b60209081526040808320938916835292905220558154612ca19084906144f9565b8255612cae853085612e22565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5168bfb88d6125d4580e2b91ecb103a730312c3e8b0be9c4031a0fc794e2cd5f85604051612d0d91815260200190565b60405180910390a35050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561106d565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600360209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114612e1c5781811015612e0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016109a2565b612e1c8484848403612934565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316612ec5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff8216612f68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b612f73838383613854565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604090205481811015613029576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526002602052604080822085850390559185168152908120805484929061306d9084906144f9565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516130d391815260200190565b60405180910390a3612e1c565b600061106d83836138f9565b3360009081526013602052604090208054613109906001906144e6565b815481106131195761311961450c565b9060005260206000209060060201601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106131775761317761450c565b600091825260208083208454600690930201918255600180850154908301556002808501549083015560038085015490830180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560048085015490830155600593840154939091019290925533815260139091526040902080548061321e5761321e614579565b60008281526020812060067fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019283020181815560018101829055600281018290556003810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556004810182905560050155905550565b6000811161332c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6465616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c60448201527f6c0000000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600b6020908152604080832093861683529290522054818110156133ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6465616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e60448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b6133f982826144e6565b73ffffffffffffffffffffffffffffffffffffffff8086166000908152600b60209081526040808320938816835292815282822093909355600c909252812054612710906134479085614494565b61345191906144ab565b73ffffffffffffffffffffffffffffffffffffffff861660009081526012602052604081208054929350918591839161348b9084906144e6565b909155506134a5905030876134a085886144e6565b612e22565b6134e873ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001661dead84613923565b6134f230836139f7565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f7d613f7bd1a777aeeefdd38ae61201003086575188df50618d02482220f5c147868560405161355a929190918252602082015260400190565b60405180910390a3505050505050565b816000036135d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f636f6e766572743a20616d6f756e742063616e6e6f74206265206e756c6c000060448201526064016109a2565b6135de8183613bf0565b6040805173ffffffffffffffffffffffffffffffffffffffff831681526020810184905233917fccfaeb3043a96a967dc036ab72e078a9632af809671bc2a1ac30a8043645f89e910160405180910390a261367173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333085613d1c565b5050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006136f682846144e6565b905061373973ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168584613923565b80156137825761378273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001661dead83613923565b61378c30846139f7565b604080518481526020810184905273ffffffffffffffffffffffffffffffffffffffff8616917f0da072ebd7a5649099f43a3776eb0cda17aca79426ee9f28aae203f5dfa04eda910160405180910390a250505050565b600061106d8373ffffffffffffffffffffffffffffffffffffffff8416613d7a565b600081815260018301602052604081205461384c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610dc8565b506000610dc8565b73ffffffffffffffffffffffffffffffffffffffff8316158061387d575061387d600884612d1c565b8061388e575061388e600883612d1c565b6138f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f7472616e736665723a206e6f7420616c6c6f776564000000000000000000000060448201526064016109a2565b505050565b60008260000182815481106139105761391061450c565b9060005260206000200154905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526138f49084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152613e6d565b73ffffffffffffffffffffffffffffffffffffffff8216613a9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b613aa682600083613854565b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205481811015613b5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600260205260408120838303905560048054849290613b989084906144e6565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8216613c6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109a2565b613c7960008383613854565b8060046000828254613c8b91906144f9565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604081208054839290613cc59084906144f9565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052612e1c9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613975565b60008181526001830160205260408120548015613e63576000613d9e6001836144e6565b8554909150600090613db2906001906144e6565b9050818114613e17576000866000018281548110613dd257613dd261450c565b9060005260206000200154905080876000018481548110613df557613df561450c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613e2857613e28614579565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610dc8565b6000915050610dc8565b6000613ecf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613f799092919063ffffffff16565b8051909150156138f45780806020019051810190613eed91906145a8565b6138f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109a2565b606061112984846000858573ffffffffffffffffffffffffffffffffffffffff85163b614002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109a2565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161402b91906145c5565b60006040518083038185875af1925050503d8060008114614068576040519150601f19603f3d011682016040523d82523d6000602084013e61406d565b606091505b509150915061407d828286614088565b979650505050505050565b6060831561409757508161106d565b8251156140a75782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a29190614188565b73ffffffffffffffffffffffffffffffffffffffff8116811461290f57600080fd5b60006020828403121561410f57600080fd5b813561106d816140db565b60005b8381101561413557818101518382015260200161411d565b50506000910152565b6000815180845261415681602086016020860161411a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061106d602083018461413e565b600080600080600060a086880312156141b357600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080604083850312156141e957600080fd5b82356141f4816140db565b946020939093013593505050565b6000806000806060858703121561421857600080fd5b8435614223816140db565b935060208501359250604085013567ffffffffffffffff8082111561424757600080fd5b818701915087601f83011261425b57600080fd5b81358181111561426a57600080fd5b88602082850101111561427c57600080fd5b95989497505060200194505050565b6000806000606084860312156142a057600080fd5b83356142ab816140db565b925060208401356142bb816140db565b929592945050506040919091013590565b600080604083850312156142df57600080fd5b82356142ea816140db565b915060208301356142fa816140db565b809150509250929050565b6000806040838503121561431857600080fd5b50508035926020909101359150565b60006020828403121561433957600080fd5b5035919050565b6000806040838503121561435357600080fd5b8235915060208301356142fa816140db565b801515811461290f57600080fd5b6000806040838503121561438657600080fd5b8235614391816140db565b915060208301356142fa81614365565b600181811c908216806143b557607f821691505b6020821081036143ee577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610dc857610dc8614465565b6000826144e1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b81810381811115610dc857610dc8614465565b80820180821115610dc857610dc8614465565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201526000614570606083018461413e565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000602082840312156145ba57600080fd5b815161106d81614365565b600082516145d781846020870161411a565b919091019291505056fea264697066735822122070740dc4b56642870eb477cd39223e625151b812ff2d63ad9221968b07ab6ef364736f6c634300081100330000000000000000000000003b475f6f2f41853706afc9fa6a6b8c5df1a2724c

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061034c5760003560e01c8063539ffb77116101bd578063a3908e1b116100f9578063c360ed1c116100a2578063dd62ed3e1161007c578063dd62ed3e146108ba578063e3a2950b14610900578063e9ed87f814610909578063f2fde38b1461091257600080fd5b8063c360ed1c1461084d578063c4b1076614610860578063cc6c54231461086957600080fd5b8063aff6cbf1116100d3578063aff6cbf1146107dd578063b90c2b52146107f0578063c3323feb1461082657600080fd5b8063a3908e1b146107a4578063a457c2d7146107b7578063a9059cbb146107ca57600080fd5b80637305b962116101665780638975f918116101405780638975f9181461074b5780638da5cb5b1461076b57806395d89b4114610789578063a0bdc7cb1461079157600080fd5b80637305b962146106fe5780637cbc237314610725578063890836541461073857600080fd5b8063619ac95b11610197578063619ac95b146106b157806370a08231146106c0578063715018a6146106f657600080fd5b8063539ffb7714610678578063549230c91461068b5780635a1d34dc1461069e57600080fd5b80632b4896791161028c5780633950935111610235578063497965ee1161020f578063497965ee146105c15780634a5b406e146106065780634b359d381461060f5780634f62b7ec1461062257600080fd5b806339509351146105705780633b90f9a014610583578063488c83031461059657600080fd5b80632e9a76e4116102665780632e9a76e41461050857806331124ce31461054e578063313ce5671461056157600080fd5b80632b489679146104845780632caad3a0146104ca5780632cc2f5ce146104dd57600080fd5b80630f7d3a69116102f95780631c352679116102d35780631c352679146104425780631c75e3691461044b5780631eee7e601461045e57806323b872dd1461047157600080fd5b80630f7d3a691461041f578063161aab431461043257806318160ddd1461043a57600080fd5b8063074dd1571161032a578063074dd15714610396578063093220b7146103e9578063095ea7b3146103fc57600080fd5b806302f91e551461035157806306045a211461036c57806306fdde0314610381575b600080fd5b61035960c881565b6040519081526020015b60405180910390f35b61037f61037a3660046140fd565b610925565b005b610389610a67565b6040516103639190614188565b6103d46103a43660046140fd565b73ffffffffffffffffffffffffffffffffffffffff16600090815260126020526040902080546001909101549091565b60408051928352602083019190915201610363565b61037f6103f736600461419b565b610af9565b61040f61040a3660046141d6565b610db4565b6040519015158152602001610363565b61037f61042d3660046141d6565b610dce565b610359610f20565b600454610359565b610359600d5481565b61037f610459366004614202565b610f31565b61040f61046c3660046140fd565b611041565b61040f61047f36600461428b565b61104e565b6103596104923660046142cc565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b6103596104d8366004614305565b611074565b6103596104eb3660046142cc565b600b60209081526000928352604080842090915290825290205481565b6103596105163660046142cc565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600b6020908152604080832093909416825291909152205490565b61037f61055c366004614327565b611131565b60405160128152602001610363565b61040f61057e3660046141d6565b6114c0565b61037f6105913660046141d6565b61150c565b6103596105a43660046142cc565b600a60209081526000928352604080842090915290825290205481565b6007546105e19073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610363565b61035960115481565b6105e161061d366004614327565b611590565b6106356106303660046141d6565b61159d565b6040805196875260208701959095529385019290925273ffffffffffffffffffffffffffffffffffffffff166060840152608083015260a082015260c001610363565b61037f610686366004614327565b611608565b61037f610699366004614202565b61187d565b61037f6106ac366004614340565b611951565b610359670de0b6b3a764000081565b6103596106ce3660046140fd565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b61037f611a34565b6103d461070c3660046140fd565b6012602052600090815260409020805460019091015482565b61037f610733366004614305565b611ac1565b61037f610746366004614373565b611e7d565b6103596107593660046140fd565b600c6020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff166105e1565b61038961201b565b61037f61079f3660046141d6565b61202a565b61037f6107b2366004614327565b6120a6565b61040f6107c53660046141d6565b612128565b61040f6107d83660046141d6565b612204565b61037f6107eb366004614327565b612212565b6103596107fe3660046140fd565b73ffffffffffffffffffffffffffffffffffffffff1660009081526013602052604090205490565b6105e17f0000000000000000000000003b475f6f2f41853706afc9fa6a6b8c5df1a2724c81565b61037f61085b3660046141d6565b612514565b610359600f5481565b61087c6108773660046141d6565b612698565b6040805195865260208601949094529284019190915273ffffffffffffffffffffffffffffffffffffffff166060830152608082015260a001610363565b6103596108c83660046142cc565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260036020908152604080832093909416825291909152205490565b610359600e5481565b61035960105481565b61037f6109203660046140fd565b6127e2565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166109cc5760006011555b6007546040805173ffffffffffffffffffffffffffffffffffffffff928316815291831660208301527f044c75b8fa43ce72364b4c23fdb8451beafbda46505bf44c76f0853a01ed4ade910160405180910390a1600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606060058054610a76906143a1565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa2906143a1565b8015610aef5780601f10610ac457610100808354040283529160200191610aef565b820191906000526020600020905b815481529060010190602001808311610ad257829003601f168201915b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a2565b83851115610c0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109a2565b818310610c99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f75706461746552656465656d53657474696e67733a2077726f6e67206475726160448201527f74696f6e2076616c75657300000000000000000000000000000000000000000060648201526084016109a2565b670de0b6b3a76400008411158015610cb95750670de0b6b3a76400008111155b610d45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f75706461746552656465656d53657474696e67733a2077726f6e67207261746960448201527f6f2076616c75657300000000000000000000000000000000000000000000000060648201526084016109a2565b600d859055600e849055600f83905560108290556011819055604080518681526020810186905290810184905260608101839052608081018290527f5b37d10782e41a6539b50d59366d4112a880236e4187e85b6d1514d20e07d9b89060a00160405180910390a15050505050565b600033610dc2818585612934565b60019150505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a2565b60c8811115610eba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f7570646174654465616c6c6f636174696f6e4665653a20746f6f20686967680060448201526064016109a2565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600c602052604090819020839055517f6ff024152fc2cd8071bc701f966036513eb03e243863f21d8218646faac0eaef90610f149084815260200190565b60405180910390a25050565b6000610f2c6008612ae7565b905090565b600260015403610f9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b6002600155610fad338585612af1565b6040517f1c75e36900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851690631c75e369906110059033908790879087906004016143f4565b600060405180830381600087803b15801561101f57600080fd5b505af1158015611033573d6000803e3d6000fd5b505060018055505050505050565b6000610dc8600883612d1c565b60003361105c858285612d4b565b611067858585612e22565b60019150505b9392505050565b6000600f5482101561108857506000610dc8565b6010548211156110ba57670de0b6b3a7640000600e54846110a99190614494565b6110b391906144ab565b9050610dc8565b6000600f546010546110cc91906144e6565b600d54600e546110dc91906144e6565b600f546110e990866144e6565b6110f39190614494565b6110fd91906144ab565b600d5461110a91906144f9565b9050670de0b6b3a764000061111f8286614494565b61112991906144ab565b949350505050565b60026001540361119d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b60026001553360008181526013602052604090205482908110611242576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109a2565b3360009081526013602052604081208054859081106112635761126361450c565b60009182526020909120600690910201600381015460075491925073ffffffffffffffffffffffffffffffffffffffff9081169116148015906112bd575060075473ffffffffffffffffffffffffffffffffffffffff1615155b156114b6576004810154156114095760038101546004820154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c991611339913391906024810161453b565b600060405180830381600087803b15801561135357600080fd5b505af1158015611367573d6000803e3d6000fd5b50506007546004840154604080516000815260208101918290527f1c75e3690000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169350631c75e36992506113d6913391906024810161453b565b600060405180830381600087803b1580156113f057600080fd5b505af1158015611404573d6000803e3d6000fd5b505050505b60038101546007546040805187815273ffffffffffffffffffffffffffffffffffffffff9384166020820152929091169082015233907fa60c8f9118be22c9277a8129333d64ffda3de44ca7a5831d077a3127f1237a189060600160405180910390a26007546003820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790555b5050600180555050565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190610dc290829086906115079087906144f9565b612934565b600260015403611578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b6002600155611588823383612af1565b505060018055565b6000610dc86008836130e0565b601360205281600052604060002081815481106115b957600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501549396509194509273ffffffffffffffffffffffffffffffffffffffff9091169186565b600260015403611674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b60026001553360008181526013602052604090205482908110611719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109a2565b336000908152601260209081526040808320601390925282208054919291869081106117475761174761450c565b90600052602060002090600602019050806001015482600101600082825461176f91906144e6565b9250508190555061178530338360010154612e22565b60048101541561182f5760038101546004820154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c9916117fc913391906024810161453b565b600060405180830381600087803b15801561181657600080fd5b505af115801561182a573d6000803e3d6000fd5b505050505b600181015460405190815233907f56d7520e387607a8daa892e3fed116badc2a636307bdc794b1c1aed97ae203f49060200160405180910390a2611872856130ec565b505060018055505050565b6002600154036118e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b60026001556118f933858561329c565b6040517f549230c900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063549230c9906110059033908790879087906004016143f4565b6002600154036119bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b6002600155333b611a2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f636f6e76657274546f3a206e6f7420616c6c6f7765640000000000000000000060448201526064016109a2565b611588828261356a565b60005473ffffffffffffffffffffffffffffffffffffffff163314611ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a2565b611abf6000613675565b565b600260015403611b2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b600260015581611bbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f72656465656d3a20785a79626572416d6f756e742063616e6e6f74206265206e60448201527f756c6c000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b600f54811015611c2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f72656465656d3a206475726174696f6e20746f6f206c6f77000000000000000060448201526064016109a2565b611c36333084612e22565b33600090815260126020526040812090611c508484611074565b604080518681526020810183905290810185905290915033907fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469060600160405180910390a28215611e725783826001016000828254611cb091906144f9565b9091555050601154600090670de0b6b3a764000090611ccf9087614494565b611cd991906144ab565b90508015611d7b57600754604080516000815260208101918290527f1c75e3690000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff90911690631c75e36990611d4890339085906024810161453b565b600060405180830381600087803b158015611d6257600080fd5b505af1158015611d76573d6000803e3d6000fd5b505050505b33600090815260136020908152604091829020825160c081018452858152918201889052918101611dac87426144f9565b815260075473ffffffffffffffffffffffffffffffffffffffff166020820152604081018490526060014290528154600180820184556000938452602093849020835160069093020191825592820151928101929092556040810151600283015560608101516003830180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556080810151600483015560a00151600590910155506114b6565b6114b63385836136ea565b60005473ffffffffffffffffffffffffffffffffffffffff163314611efe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a2565b3073ffffffffffffffffffffffffffffffffffffffff831603611fa3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f7570646174655472616e7366657257686974656c6973743a2043616e6e6f742060448201527f72656d6f76652078546f6b656e2066726f6d2077686974656c6973740000000060648201526084016109a2565b8015611fba57611fb4600883612912565b50611fc7565b611fc56008836137e3565b505b6040805173ffffffffffffffffffffffffffffffffffffffff8416815282151560208201527f3a34209cb941a5d23a56dea730a13738454bc7daefd4bb32e8d7df58c1bd920d910160405180910390a15050565b606060068054610a76906143a1565b600260015403612096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b600260015561158882338361329c565b600260015403612112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b6002600155612121813361356a565b5060018055565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909190838110156121ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016109a2565b6121f98286868403612934565b506001949350505050565b600033610dc2818585612e22565b60026001540361227e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b60026001553360008181526013602052604090205482908110612323576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109a2565b336000908152601260209081526040808320601390925282208054919291869081106123515761235161450c565b90600052602060002090600602019050600f54816005015461237391906144f9565b421015612402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f66696e616c697a6552656465656d3a206d696e206475726174696f6e2062656660448201527f6f72652072656465656d0000000000000000000000000000000000000000000060648201526084016109a2565b806001015482600101600082825461241a91906144e6565b9091555050600581015460009061243190426144e6565b90506000612443836001015483611074565b9050612454338460010154836136ea565b6004830154156124fe5760038301546004840154604080516000815260208101918290527f549230c90000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff9092169163549230c9916124cb913391906024810161453b565b600060405180830381600087803b1580156124e557600080fd5b505af11580156124f9573d6000803e3d6000fd5b505050505b612507876130ec565b5050600180555050505050565b600260015403612580576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a2565b600260015573ffffffffffffffffffffffffffffffffffffffff8216612628576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f617070726f766555736167653a20617070726f766520746f20746865207a657260448201527f6f2061646472657373000000000000000000000000000000000000000000000060648201526084016109a2565b336000818152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff871680855290835292819020859055518481529192917fe75ec259c38e4601f24580968665ec00b21cca4f996689b260ec598aec5c08db910160405180910390a3505060018055565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601360205260408120548190819081908190879087908110612758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f76616c696461746552656465656d3a2072656465656d20656e74727920646f6560448201527f73206e6f7420657869737400000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff8916600090815260136020526040812080548a90811061278f5761278f61450c565b600091825260209091206006909102018054600182015460028301546003840154600490940154929e919d509b5073ffffffffffffffffffffffffffffffffffffffff9092169950975095505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a2565b73ffffffffffffffffffffffffffffffffffffffff8116612906576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109a2565b61290f81613675565b50565b600061106d8373ffffffffffffffffffffffffffffffffffffffff8416613805565b73ffffffffffffffffffffffffffffffffffffffff83166129d6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff8216612a79576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610dc8825490565b60008111612b5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c6c0060448201526064016109a2565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152601260209081526040808320600a835281842094871684529390915290205482811015612c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e740060448201526064016109a2565b612c0b83826144e6565b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600a60209081526040808320948a1680845294825280832095909555918152600b82528381209281529190522054612c619084906144f9565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600b60209081526040808320938916835292905220558154612ca19084906144f9565b8255612cae853085612e22565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5168bfb88d6125d4580e2b91ecb103a730312c3e8b0be9c4031a0fc794e2cd5f85604051612d0d91815260200190565b60405180910390a35050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561106d565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600360209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114612e1c5781811015612e0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016109a2565b612e1c8484848403612934565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316612ec5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff8216612f68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b612f73838383613854565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604090205481811015613029576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526002602052604080822085850390559185168152908120805484929061306d9084906144f9565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516130d391815260200190565b60405180910390a3612e1c565b600061106d83836138f9565b3360009081526013602052604090208054613109906001906144e6565b815481106131195761311961450c565b9060005260206000209060060201601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106131775761317761450c565b600091825260208083208454600690930201918255600180850154908301556002808501549083015560038085015490830180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560048085015490830155600593840154939091019290925533815260139091526040902080548061321e5761321e614579565b60008281526020812060067fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019283020181815560018101829055600281018290556003810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556004810182905560050155905550565b6000811161332c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6465616c6c6f636174653a20616d6f756e742063616e6e6f74206265206e756c60448201527f6c0000000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600b6020908152604080832093861683529290522054818110156133ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f6465616c6c6f636174653a206e6f6e20617574686f72697a656420616d6f756e60448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b6133f982826144e6565b73ffffffffffffffffffffffffffffffffffffffff8086166000908152600b60209081526040808320938816835292815282822093909355600c909252812054612710906134479085614494565b61345191906144ab565b73ffffffffffffffffffffffffffffffffffffffff861660009081526012602052604081208054929350918591839161348b9084906144e6565b909155506134a5905030876134a085886144e6565b612e22565b6134e873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003b475f6f2f41853706afc9fa6a6b8c5df1a2724c1661dead84613923565b6134f230836139f7565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f7d613f7bd1a777aeeefdd38ae61201003086575188df50618d02482220f5c147868560405161355a929190918252602082015260400190565b60405180910390a3505050505050565b816000036135d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f636f6e766572743a20616d6f756e742063616e6e6f74206265206e756c6c000060448201526064016109a2565b6135de8183613bf0565b6040805173ffffffffffffffffffffffffffffffffffffffff831681526020810184905233917fccfaeb3043a96a967dc036ab72e078a9632af809671bc2a1ac30a8043645f89e910160405180910390a261367173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003b475f6f2f41853706afc9fa6a6b8c5df1a2724c16333085613d1c565b5050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006136f682846144e6565b905061373973ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003b475f6f2f41853706afc9fa6a6b8c5df1a2724c168584613923565b80156137825761378273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003b475f6f2f41853706afc9fa6a6b8c5df1a2724c1661dead83613923565b61378c30846139f7565b604080518481526020810184905273ffffffffffffffffffffffffffffffffffffffff8616917f0da072ebd7a5649099f43a3776eb0cda17aca79426ee9f28aae203f5dfa04eda910160405180910390a250505050565b600061106d8373ffffffffffffffffffffffffffffffffffffffff8416613d7a565b600081815260018301602052604081205461384c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610dc8565b506000610dc8565b73ffffffffffffffffffffffffffffffffffffffff8316158061387d575061387d600884612d1c565b8061388e575061388e600883612d1c565b6138f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f7472616e736665723a206e6f7420616c6c6f776564000000000000000000000060448201526064016109a2565b505050565b60008260000182815481106139105761391061450c565b9060005260206000200154905092915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526138f49084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152613e6d565b73ffffffffffffffffffffffffffffffffffffffff8216613a9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b613aa682600083613854565b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205481811015613b5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016109a2565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600260205260408120838303905560048054849290613b989084906144e6565b909155505060405182815260009073ffffffffffffffffffffffffffffffffffffffff8516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8216613c6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109a2565b613c7960008383613854565b8060046000828254613c8b91906144f9565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604081208054839290613cc59084906144f9565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052612e1c9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401613975565b60008181526001830160205260408120548015613e63576000613d9e6001836144e6565b8554909150600090613db2906001906144e6565b9050818114613e17576000866000018281548110613dd257613dd261450c565b9060005260206000200154905080876000018481548110613df557613df561450c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613e2857613e28614579565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610dc8565b6000915050610dc8565b6000613ecf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613f799092919063ffffffff16565b8051909150156138f45780806020019051810190613eed91906145a8565b6138f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109a2565b606061112984846000858573ffffffffffffffffffffffffffffffffffffffff85163b614002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109a2565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161402b91906145c5565b60006040518083038185875af1925050503d8060008114614068576040519150601f19603f3d011682016040523d82523d6000602084013e61406d565b606091505b509150915061407d828286614088565b979650505050505050565b6060831561409757508161106d565b8251156140a75782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a29190614188565b73ffffffffffffffffffffffffffffffffffffffff8116811461290f57600080fd5b60006020828403121561410f57600080fd5b813561106d816140db565b60005b8381101561413557818101518382015260200161411d565b50506000910152565b6000815180845261415681602086016020860161411a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061106d602083018461413e565b600080600080600060a086880312156141b357600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080604083850312156141e957600080fd5b82356141f4816140db565b946020939093013593505050565b6000806000806060858703121561421857600080fd5b8435614223816140db565b935060208501359250604085013567ffffffffffffffff8082111561424757600080fd5b818701915087601f83011261425b57600080fd5b81358181111561426a57600080fd5b88602082850101111561427c57600080fd5b95989497505060200194505050565b6000806000606084860312156142a057600080fd5b83356142ab816140db565b925060208401356142bb816140db565b929592945050506040919091013590565b600080604083850312156142df57600080fd5b82356142ea816140db565b915060208301356142fa816140db565b809150509250929050565b6000806040838503121561431857600080fd5b50508035926020909101359150565b60006020828403121561433957600080fd5b5035919050565b6000806040838503121561435357600080fd5b8235915060208301356142fa816140db565b801515811461290f57600080fd5b6000806040838503121561438657600080fd5b8235614391816140db565b915060208301356142fa81614365565b600181811c908216806143b557607f821691505b6020821081036143ee577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610dc857610dc8614465565b6000826144e1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b81810381811115610dc857610dc8614465565b80820180821115610dc857610dc8614465565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201526000614570606083018461413e565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000602082840312156145ba57600080fd5b815161106d81614365565b600082516145d781846020870161411a565b919091019291505056fea264697066735822122070740dc4b56642870eb477cd39223e625151b812ff2d63ad9221968b07ab6ef364736f6c63430008110033

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

0000000000000000000000003b475f6f2f41853706afc9fa6a6b8c5df1a2724c

-----Decoded View---------------
Arg [0] : _zybToken (address): 0x3B475F6f2f41853706afc9Fa6a6b8C5dF1a2724c

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003b475f6f2f41853706afc9fa6a6b8c5df1a2724c


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

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