ETH Price: $3,489.34 (+0.98%)

Token

Staked QWN (sQWN)
 

Overview

Max Total Supply

0 sQWN

Holders

619

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 9 Decimals)

Filtered by Token Holder
robib23.eth
Balance
132.436222356 sQWN

Value
$0.00
0x50a3ba1611b11995f557a0147d0729262bb5954d
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
sQWN

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : sQWN.sol
/*
        By Participating In 
       The Quantum Wealth Network 
     You Are Accelerating Your Wealth
With A Strong Network Of Beautiful Souls 

Telegram: https://t.me/+JsdS-pXyFXNlZTgx
Twitter: https://twitter.com/QuantumWN
*/

// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.19;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "../interface/IsQWN.sol";
import "../interface/IStaking.sol";

/// @title   sQWN
/// @notice  Staked QWN
contract sQWN is IsQWN, ERC20 {
    /// EVENTS ///

    event LogSupply(uint256 indexed epoch, uint256 totalSupply);
    event LogRebase(uint256 indexed epoch, uint256 rebase, uint256 index);
    event LogStakingContractUpdated(address stakingContract);

    /// MODIFIERS ///

    modifier onlyStakingContract() {
        require(
            msg.sender == stakingContract,
            "StakingContract:  call is not staking contract"
        );
        _;
    }

    /// DATA STRUCTURES ///

    struct Rebase {
        uint256 epoch;
        uint256 rebase; // 18 decimals
        uint256 totalStakedBefore;
        uint256 totalStakedAfter;
        uint256 amountRebased;
        uint256 index;
        uint256 blockNumberOccured;
    }

    /// STATE VARIABLES ///

    address internal initializer;
    address public treasury;
    address public stakingContract; // balance used to calc rebase

    uint256 internal _totalSupply;
    uint256 internal INDEX; // Index Gons - tracks rebase growth

    uint256 private constant MAX_UINT256 = type(uint256).max;
    uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 250_000 * 10 ** 9;

    // TOTAL_GONS is a multiple of INITIAL_FRAGMENTS_SUPPLY so that _gonsPerFragment is an integer.
    // Use the highest value that fits in a uint256 for max granularity.
    uint256 private constant TOTAL_GONS =
        MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);

    // MAX_SUPPLY = maximum integer < (sqrt(4*TOTAL_GONS + 1) - 1) / 2
    uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1

    uint256 private _gonsPerFragment;

    Rebase[] public rebases; // past rebase data

    mapping(address => uint256) private _gonBalances;

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

    /// CONSTRUCTOR ///

    constructor() ERC20("Staked QWN", "sQWN") {
        initializer = msg.sender;
        _totalSupply = INITIAL_FRAGMENTS_SUPPLY;
        _gonsPerFragment = TOTAL_GONS / _totalSupply;
    }

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

    /// INITIALIZATION ///

    /// @notice        Sets initial index
    /// @param _index  Initial index
    function setIndex(uint256 _index) external {
        require(
            msg.sender == initializer,
            "Initializer:  caller is not initializer"
        );
        require(INDEX == 0, "Cannot set INDEX again");
        INDEX = gonsForBalance(_index);
    }

    /// @notice                  Initialize contract
    /// @param _stakingContract  Address of staking contract
    /// @param _treasury         Address of treasury
    function initialize(address _stakingContract, address _treasury) external {
        require(
            msg.sender == initializer,
            "Initializer:  caller is not initializer"
        );

        require(_stakingContract != address(0), "Zero address: Staking");
        stakingContract = _stakingContract;
        _gonBalances[stakingContract] = TOTAL_GONS;

        require(_treasury != address(0), "Zero address: Treasury");
        treasury = _treasury;

        emit Transfer(address(0x0), stakingContract, _totalSupply);
        emit LogStakingContractUpdated(stakingContract);

        initializer = address(0);
    }

    /// REBASE ///

    /// @notice             Increases sQWN supply
    /// @param amount_      Amount to rebase for
    /// @param epoch_       Epoch number
    /// @return _newSupply  New total supply
    function rebase(
        uint256 amount_,
        uint256 epoch_
    ) public override onlyStakingContract returns (uint256 _newSupply) {
        uint256 rebaseAmount;
        uint256 circulatingSupply_ = circulatingSupply();
        if (amount_ == 0) {
            emit LogSupply(epoch_, _totalSupply);
            emit LogRebase(epoch_, 0, index());
            return _totalSupply;
        } else if (circulatingSupply_ > 0) {
            rebaseAmount = (amount_ * _totalSupply) / circulatingSupply_;
        } else {
            rebaseAmount = amount_;
        }

        _totalSupply = _totalSupply + rebaseAmount;

        if (_totalSupply > MAX_SUPPLY) {
            _totalSupply = MAX_SUPPLY;
        }

        _gonsPerFragment = TOTAL_GONS / _totalSupply;

        _storeRebase(circulatingSupply_, amount_, epoch_);

        return _totalSupply;
    }

    /// @notice                      Stores rebase
    /// @param previousCirculating_  Previous circ supply
    /// @param profit_               Amount of profic for epoch
    /// @param epoch_                Epoch number
    function _storeRebase(
        uint256 previousCirculating_,
        uint256 profit_,
        uint256 epoch_
    ) internal {
        uint256 rebasePercent;
        if (previousCirculating_ > 0)
            rebasePercent = (profit_ * 1e18) / previousCirculating_;
        rebases.push(
            Rebase({
                epoch: epoch_,
                rebase: rebasePercent, // 18 decimals
                totalStakedBefore: previousCirculating_,
                totalStakedAfter: circulatingSupply(),
                amountRebased: profit_,
                index: index(),
                blockNumberOccured: block.number
            })
        );

        emit LogSupply(epoch_, _totalSupply);
        emit LogRebase(epoch_, rebasePercent, index());
    }

    /// MUTATIVE FUNCTIONS ///

    /// @notice       Transfer sQWN from msg.sender
    /// @param to     Address sending sQWN to
    /// @param value  Amount of sQWN to send
    function transfer(
        address to,
        uint256 value
    ) public override(IERC20, ERC20) returns (bool) {
        uint256 gonValue = value * _gonsPerFragment;

        _gonBalances[msg.sender] = _gonBalances[msg.sender] - gonValue;
        _gonBalances[to] = _gonBalances[to] + gonValue;

        emit Transfer(msg.sender, to, value);
        return true;
    }

    /// @notice       Transfer sQWN
    /// @param from   Address sending sQWN from
    /// @param to     Address sending sQWN to
    /// @param value  Amount of sQWN to send
    function transferFrom(
        address from,
        address to,
        uint256 value
    ) public override(IERC20, ERC20) returns (bool) {
        _allowedValue[from][msg.sender] =
            _allowedValue[from][msg.sender] -
            value;
        emit Approval(from, msg.sender, _allowedValue[from][msg.sender]);

        uint256 gonValue = gonsForBalance(value);
        _gonBalances[from] = _gonBalances[from] - gonValue;
        _gonBalances[to] = _gonBalances[to] + gonValue;

        emit Transfer(from, to, value);
        return true;
    }

    function approve(
        address spender,
        uint256 value
    ) public override(IERC20, ERC20) returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

    function increaseAllowance(
        address spender,
        uint256 addedValue
    ) public override returns (bool) {
        _approve(
            msg.sender,
            spender,
            _allowedValue[msg.sender][spender] + addedValue
        );
        return true;
    }

    function decreaseAllowance(
        address spender,
        uint256 subtractedValue
    ) public override returns (bool) {
        uint256 oldValue = _allowedValue[msg.sender][spender];
        if (subtractedValue >= oldValue) {
            _approve(msg.sender, spender, 0);
        } else {
            _approve(msg.sender, spender, oldValue - subtractedValue);
        }
        return true;
    }

    /// INTERNAL FUNCTIONS ///

    function _approve(
        address owner,
        address spender,
        uint256 value
    ) internal virtual override {
        _allowedValue[owner][spender] = value;
        emit Approval(owner, spender, value);
    }

    /// VIEW FUNCTIONS ///

    /// @notice       Returns balance of an address
    /// @param who    Address of who to get balance from
    function balanceOf(
        address who
    ) public view override(IERC20, ERC20) returns (uint256) {
        return _gonBalances[who] / _gonsPerFragment;
    }

    /// @notice        Returns calculation of gons for amount of sQWN
    /// @param amount  Amount of sQWN to calculate gons for
    function gonsForBalance(
        uint256 amount
    ) public view override returns (uint256) {
        return amount * _gonsPerFragment;
    }

    /// @notice      Returns calculation of balance for gons amount
    /// @param gons  Amount of gons to calculate sQWN for
    function balanceForGons(
        uint256 gons
    ) public view override returns (uint256) {
        return gons / _gonsPerFragment;
    }

    /// @notice  Returns sQWN circulating supply (Total Supply - Staking Contract Balance)
    function circulatingSupply() public view override returns (uint256) {
        return _totalSupply - balanceOf(stakingContract);
    }

    /// @notice  Returns current sQWN index
    function index() public view override returns (uint256) {
        return balanceForGons(INDEX);
    }

    function allowance(
        address owner_,
        address spender
    ) public view override(IERC20, ERC20) returns (uint256) {
        return _allowedValue[owner_][spender];
    }
}

File 2 of 7 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * 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}.
     *
     * 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 default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual 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, allowance(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 = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * 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;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _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;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _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;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _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 Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 6 of 7 : IsQWN.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.19;

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

interface IsQWN is IERC20 {
    function rebase(uint256 amount_, uint epoch_) external returns (uint256);

    function circulatingSupply() external view returns (uint256);

    function gonsForBalance(uint amount) external view returns (uint);

    function balanceForGons(uint gons) external view returns (uint);

    function index() external view returns (uint);
}

File 7 of 7 : IStaking.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.19;

interface IStaking {
    function stake(address _to, uint256 _amount) external;

    function unstake(address _to, uint256 _amount) external;

    function rebase() external;

    function index() external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rebase","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"LogRebase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"stakingContract","type":"address"}],"name":"LogStakingContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"}],"name":"LogSupply","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"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gons","type":"uint256"}],"name":"balanceForGons","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"circulatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"gonsForBalance","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":[],"name":"index","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingContract","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"uint256","name":"epoch_","type":"uint256"}],"name":"rebase","outputs":[{"internalType":"uint256","name":"_newSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rebases","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"rebase","type":"uint256"},{"internalType":"uint256","name":"totalStakedBefore","type":"uint256"},{"internalType":"uint256","name":"totalStakedAfter","type":"uint256"},{"internalType":"uint256","name":"amountRebased","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"blockNumberOccured","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"setIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506040518060400160405280600a81526020017f5374616b65642051574e000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f7351574e0000000000000000000000000000000000000000000000000000000081525081600390816200008f9190620003e8565b508060049081620000a19190620003e8565b50505033600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555065e35fa931a00060088190555060085465e35fa931a0007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff620001299190620004fe565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff62000156919062000565565b620001629190620005a0565b600a81905550620005d8565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620001f057607f821691505b602082108103620002065762000205620001a8565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620002707fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000231565b6200027c868362000231565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620002c9620002c3620002bd8462000294565b6200029e565b62000294565b9050919050565b6000819050919050565b620002e583620002a8565b620002fd620002f482620002d0565b8484546200023e565b825550505050565b600090565b6200031462000305565b62000321818484620002da565b505050565b5b8181101562000349576200033d6000826200030a565b60018101905062000327565b5050565b601f821115620003985762000362816200020c565b6200036d8462000221565b810160208510156200037d578190505b620003956200038c8562000221565b83018262000326565b50505b505050565b600082821c905092915050565b6000620003bd600019846008026200039d565b1980831691505092915050565b6000620003d88383620003aa565b9150826002028217905092915050565b620003f3826200016e565b67ffffffffffffffff8111156200040f576200040e62000179565b5b6200041b8254620001d7565b620004288282856200034d565b600060209050601f8311600181146200046057600084156200044b578287015190505b620004578582620003ca565b865550620004c7565b601f19841662000470866200020c565b60005b828110156200049a5784890151825560018201915060208501945060208101905062000473565b86831015620004ba5784890151620004b6601f891682620003aa565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006200050b8262000294565b9150620005188362000294565b9250826200052b576200052a620004cf565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000620005728262000294565b91506200057f8362000294565b92508282039050818111156200059a576200059962000536565b5b92915050565b6000620005ad8262000294565b9150620005ba8362000294565b925082620005cd57620005cc620004cf565b5b828204905092915050565b61206880620005e86000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c8063485cc955116100b85780639358928b1161007c5780639358928b1461039057806395d89b41146103ae578063a457c2d7146103cc578063a9059cbb146103fc578063dd62ed3e1461042c578063ee99205c1461045c57610137565b8063485cc955146102c057806361d027b3146102dc57806370a08231146102fa57806373c69eb71461032a5780637965d56d1461036057610137565b806323b872dd116100ff57806323b872dd146102085780632986c0e514610238578063313ce56714610256578063395093511461027457806340a5737f146102a457610137565b8063058ecdb41461013c57806306fdde031461016c578063095ea7b31461018a57806318160ddd146101ba5780631bd39674146101d8575b600080fd5b610156600480360381019061015191906117bc565b61047a565b604051610163919061180b565b60405180910390f35b6101746106ad565b60405161018191906118b6565b60405180910390f35b6101a4600480360381019061019f9190611936565b61073f565b6040516101b19190611991565b60405180910390f35b6101c2610756565b6040516101cf919061180b565b60405180910390f35b6101f260048036038101906101ed91906119ac565b610760565b6040516101ff919061180b565b60405180910390f35b610222600480360381019061021d91906119d9565b610777565b60405161022f9190611991565b60405180910390f35b610240610afc565b60405161024d919061180b565b60405180910390f35b61025e610b0e565b60405161026b9190611a48565b60405180910390f35b61028e60048036038101906102899190611936565b610b17565b60405161029b9190611991565b60405180910390f35b6102be60048036038101906102b991906119ac565b610bb5565b005b6102da60048036038101906102d59190611a63565b610c9c565b005b6102e4611077565b6040516102f19190611ab2565b60405180910390f35b610314600480360381019061030f9190611acd565b61109d565b604051610321919061180b565b60405180910390f35b610344600480360381019061033f91906119ac565b6110f3565b6040516103579796959493929190611afa565b60405180910390f35b61037a600480360381019061037591906119ac565b611145565b604051610387919061180b565b60405180910390f35b61039861115c565b6040516103a5919061180b565b60405180910390f35b6103b661119b565b6040516103c391906118b6565b60405180910390f35b6103e660048036038101906103e19190611936565b61122d565b6040516103f39190611991565b60405180910390f35b61041660048036038101906104119190611936565b6112e9565b6040516104239190611991565b60405180910390f35b61044660048036038101906104419190611a63565b611488565b604051610453919061180b565b60405180910390f35b61046461150f565b6040516104719190611ab2565b60405180910390f35b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461050c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050390611bdb565b60405180910390fd5b60008061051761115c565b9050600085036105a957837f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf4600854604051610553919061180b565b60405180910390a2837f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb26000610587610afc565b604051610595929190611c40565b60405180910390a2600854925050506106a7565b60008111156105d25780600854866105c19190611c98565b6105cb9190611d09565b91506105d6565b8491505b816008546105e49190611d3a565b6008819055506000196fffffffffffffffffffffffffffffffff166008541115610624576000196fffffffffffffffffffffffffffffffff166008819055505b60085465e35fa931a0007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6106599190611d6e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6106849190611d9f565b61068e9190611d09565b600a8190555061069f818686611535565b600854925050505b92915050565b6060600380546106bc90611e02565b80601f01602080910402602001604051908101604052809291908181526020018280546106e890611e02565b80156107355780601f1061070a57610100808354040283529160200191610735565b820191906000526020600020905b81548152906001019060200180831161071857829003601f168201915b5050505050905090565b600061074c338484611696565b6001905092915050565b6000600254905090565b6000600a54826107709190611c98565b9050919050565b600081600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546108019190611d9f565b600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460405161095a919061180b565b60405180910390a3600061096d83610760565b905080600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546109ba9190611d9f565b600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a489190611d3a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051610ae8919061180b565b60405180910390a360019150509392505050565b6000610b09600954611145565b905090565b60006009905090565b6000610bab338484600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ba69190611d3a565b611696565b6001905092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3c90611ea5565b60405180910390fd5b600060095414610c8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8190611f11565b60405180910390fd5b610c9381610760565b60098190555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611ea5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9290611f7d565b60405180910390fd5b81600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555065e35fa931a0007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610e0e9190611d6e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610e399190611d9f565b600c6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0490611fe9565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600854604051610fd0919061180b565b60405180910390a37f817c653428858ed536dc085c5d8273734c517b55de44b55f5c5877a75e3373a1600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516110299190611ab2565b60405180910390a16000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600a54600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110ec9190611d09565b9050919050565b600b818154811061110357600080fd5b90600052602060002090600702016000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154905087565b6000600a54826111559190611d09565b9050919050565b6000611189600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661109d565b6008546111969190611d9f565b905090565b6060600480546111aa90611e02565b80601f01602080910402602001604051908101604052809291908181526020018280546111d690611e02565b80156112235780601f106111f857610100808354040283529160200191611223565b820191906000526020600020905b81548152906001019060200180831161120657829003601f168201915b5050505050905090565b600080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083106112c7576112c233856000611696565b6112de565b6112dd338585846112d89190611d9f565b611696565b5b600191505092915050565b600080600a54836112fa9190611c98565b905080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113479190611d9f565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113d59190611d3a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611475919061180b565b60405180910390a3600191505092915050565b6000600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808411156115615783670de0b6b3a7640000846115549190611c98565b61155e9190611d09565b90505b600b6040518060e0016040528084815260200183815260200186815260200161158861115c565b815260200185815260200161159b610afc565b8152602001438152509080600181540180825580915050600190039060005260206000209060070201600090919091909150600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c082015181600601555050817f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf4600854604051611647919061180b565b60405180910390a2817f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb28261167a610afc565b604051611688929190612009565b60405180910390a250505050565b80600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611774919061180b565b60405180910390a3505050565b600080fd5b6000819050919050565b61179981611786565b81146117a457600080fd5b50565b6000813590506117b681611790565b92915050565b600080604083850312156117d3576117d2611781565b5b60006117e1858286016117a7565b92505060206117f2858286016117a7565b9150509250929050565b61180581611786565b82525050565b600060208201905061182060008301846117fc565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611860578082015181840152602081019050611845565b60008484015250505050565b6000601f19601f8301169050919050565b600061188882611826565b6118928185611831565b93506118a2818560208601611842565b6118ab8161186c565b840191505092915050565b600060208201905081810360008301526118d0818461187d565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611903826118d8565b9050919050565b611913816118f8565b811461191e57600080fd5b50565b6000813590506119308161190a565b92915050565b6000806040838503121561194d5761194c611781565b5b600061195b85828601611921565b925050602061196c858286016117a7565b9150509250929050565b60008115159050919050565b61198b81611976565b82525050565b60006020820190506119a66000830184611982565b92915050565b6000602082840312156119c2576119c1611781565b5b60006119d0848285016117a7565b91505092915050565b6000806000606084860312156119f2576119f1611781565b5b6000611a0086828701611921565b9350506020611a1186828701611921565b9250506040611a22868287016117a7565b9150509250925092565b600060ff82169050919050565b611a4281611a2c565b82525050565b6000602082019050611a5d6000830184611a39565b92915050565b60008060408385031215611a7a57611a79611781565b5b6000611a8885828601611921565b9250506020611a9985828601611921565b9150509250929050565b611aac816118f8565b82525050565b6000602082019050611ac76000830184611aa3565b92915050565b600060208284031215611ae357611ae2611781565b5b6000611af184828501611921565b91505092915050565b600060e082019050611b0f600083018a6117fc565b611b1c60208301896117fc565b611b2960408301886117fc565b611b3660608301876117fc565b611b4360808301866117fc565b611b5060a08301856117fc565b611b5d60c08301846117fc565b98975050505050505050565b7f5374616b696e67436f6e74726163743a202063616c6c206973206e6f7420737460008201527f616b696e6720636f6e7472616374000000000000000000000000000000000000602082015250565b6000611bc5602e83611831565b9150611bd082611b69565b604082019050919050565b60006020820190508181036000830152611bf481611bb8565b9050919050565b6000819050919050565b6000819050919050565b6000611c2a611c25611c2084611bfb565b611c05565b611786565b9050919050565b611c3a81611c0f565b82525050565b6000604082019050611c556000830185611c31565b611c6260208301846117fc565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611ca382611786565b9150611cae83611786565b9250828202611cbc81611786565b91508282048414831517611cd357611cd2611c69565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611d1482611786565b9150611d1f83611786565b925082611d2f57611d2e611cda565b5b828204905092915050565b6000611d4582611786565b9150611d5083611786565b9250828201905080821115611d6857611d67611c69565b5b92915050565b6000611d7982611786565b9150611d8483611786565b925082611d9457611d93611cda565b5b828206905092915050565b6000611daa82611786565b9150611db583611786565b9250828203905081811115611dcd57611dcc611c69565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611e1a57607f821691505b602082108103611e2d57611e2c611dd3565b5b50919050565b7f496e697469616c697a65723a202063616c6c6572206973206e6f7420696e697460008201527f69616c697a657200000000000000000000000000000000000000000000000000602082015250565b6000611e8f602783611831565b9150611e9a82611e33565b604082019050919050565b60006020820190508181036000830152611ebe81611e82565b9050919050565b7f43616e6e6f742073657420494e44455820616761696e00000000000000000000600082015250565b6000611efb601683611831565b9150611f0682611ec5565b602082019050919050565b60006020820190508181036000830152611f2a81611eee565b9050919050565b7f5a65726f20616464726573733a205374616b696e670000000000000000000000600082015250565b6000611f67601583611831565b9150611f7282611f31565b602082019050919050565b60006020820190508181036000830152611f9681611f5a565b9050919050565b7f5a65726f20616464726573733a20547265617375727900000000000000000000600082015250565b6000611fd3601683611831565b9150611fde82611f9d565b602082019050919050565b6000602082019050818103600083015261200281611fc6565b9050919050565b600060408201905061201e60008301856117fc565b61202b60208301846117fc565b939250505056fea2646970667358221220d5949516b27ca874887f3e48e6e46a10648b4f535dad77b792bab0f9de885e5864736f6c63430008130033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101375760003560e01c8063485cc955116100b85780639358928b1161007c5780639358928b1461039057806395d89b41146103ae578063a457c2d7146103cc578063a9059cbb146103fc578063dd62ed3e1461042c578063ee99205c1461045c57610137565b8063485cc955146102c057806361d027b3146102dc57806370a08231146102fa57806373c69eb71461032a5780637965d56d1461036057610137565b806323b872dd116100ff57806323b872dd146102085780632986c0e514610238578063313ce56714610256578063395093511461027457806340a5737f146102a457610137565b8063058ecdb41461013c57806306fdde031461016c578063095ea7b31461018a57806318160ddd146101ba5780631bd39674146101d8575b600080fd5b610156600480360381019061015191906117bc565b61047a565b604051610163919061180b565b60405180910390f35b6101746106ad565b60405161018191906118b6565b60405180910390f35b6101a4600480360381019061019f9190611936565b61073f565b6040516101b19190611991565b60405180910390f35b6101c2610756565b6040516101cf919061180b565b60405180910390f35b6101f260048036038101906101ed91906119ac565b610760565b6040516101ff919061180b565b60405180910390f35b610222600480360381019061021d91906119d9565b610777565b60405161022f9190611991565b60405180910390f35b610240610afc565b60405161024d919061180b565b60405180910390f35b61025e610b0e565b60405161026b9190611a48565b60405180910390f35b61028e60048036038101906102899190611936565b610b17565b60405161029b9190611991565b60405180910390f35b6102be60048036038101906102b991906119ac565b610bb5565b005b6102da60048036038101906102d59190611a63565b610c9c565b005b6102e4611077565b6040516102f19190611ab2565b60405180910390f35b610314600480360381019061030f9190611acd565b61109d565b604051610321919061180b565b60405180910390f35b610344600480360381019061033f91906119ac565b6110f3565b6040516103579796959493929190611afa565b60405180910390f35b61037a600480360381019061037591906119ac565b611145565b604051610387919061180b565b60405180910390f35b61039861115c565b6040516103a5919061180b565b60405180910390f35b6103b661119b565b6040516103c391906118b6565b60405180910390f35b6103e660048036038101906103e19190611936565b61122d565b6040516103f39190611991565b60405180910390f35b61041660048036038101906104119190611936565b6112e9565b6040516104239190611991565b60405180910390f35b61044660048036038101906104419190611a63565b611488565b604051610453919061180b565b60405180910390f35b61046461150f565b6040516104719190611ab2565b60405180910390f35b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461050c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050390611bdb565b60405180910390fd5b60008061051761115c565b9050600085036105a957837f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf4600854604051610553919061180b565b60405180910390a2837f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb26000610587610afc565b604051610595929190611c40565b60405180910390a2600854925050506106a7565b60008111156105d25780600854866105c19190611c98565b6105cb9190611d09565b91506105d6565b8491505b816008546105e49190611d3a565b6008819055506000196fffffffffffffffffffffffffffffffff166008541115610624576000196fffffffffffffffffffffffffffffffff166008819055505b60085465e35fa931a0007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6106599190611d6e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6106849190611d9f565b61068e9190611d09565b600a8190555061069f818686611535565b600854925050505b92915050565b6060600380546106bc90611e02565b80601f01602080910402602001604051908101604052809291908181526020018280546106e890611e02565b80156107355780601f1061070a57610100808354040283529160200191610735565b820191906000526020600020905b81548152906001019060200180831161071857829003601f168201915b5050505050905090565b600061074c338484611696565b6001905092915050565b6000600254905090565b6000600a54826107709190611c98565b9050919050565b600081600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546108019190611d9f565b600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460405161095a919061180b565b60405180910390a3600061096d83610760565b905080600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546109ba9190611d9f565b600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a489190611d3a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051610ae8919061180b565b60405180910390a360019150509392505050565b6000610b09600954611145565b905090565b60006009905090565b6000610bab338484600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ba69190611d3a565b611696565b6001905092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3c90611ea5565b60405180910390fd5b600060095414610c8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8190611f11565b60405180910390fd5b610c9381610760565b60098190555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611ea5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9290611f7d565b60405180910390fd5b81600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555065e35fa931a0007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610e0e9190611d6e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610e399190611d9f565b600c6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0490611fe9565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600854604051610fd0919061180b565b60405180910390a37f817c653428858ed536dc085c5d8273734c517b55de44b55f5c5877a75e3373a1600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516110299190611ab2565b60405180910390a16000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600a54600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110ec9190611d09565b9050919050565b600b818154811061110357600080fd5b90600052602060002090600702016000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154905087565b6000600a54826111559190611d09565b9050919050565b6000611189600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661109d565b6008546111969190611d9f565b905090565b6060600480546111aa90611e02565b80601f01602080910402602001604051908101604052809291908181526020018280546111d690611e02565b80156112235780601f106111f857610100808354040283529160200191611223565b820191906000526020600020905b81548152906001019060200180831161120657829003601f168201915b5050505050905090565b600080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083106112c7576112c233856000611696565b6112de565b6112dd338585846112d89190611d9f565b611696565b5b600191505092915050565b600080600a54836112fa9190611c98565b905080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113479190611d9f565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113d59190611d3a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611475919061180b565b60405180910390a3600191505092915050565b6000600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808411156115615783670de0b6b3a7640000846115549190611c98565b61155e9190611d09565b90505b600b6040518060e0016040528084815260200183815260200186815260200161158861115c565b815260200185815260200161159b610afc565b8152602001438152509080600181540180825580915050600190039060005260206000209060070201600090919091909150600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c082015181600601555050817f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf4600854604051611647919061180b565b60405180910390a2817f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb28261167a610afc565b604051611688929190612009565b60405180910390a250505050565b80600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611774919061180b565b60405180910390a3505050565b600080fd5b6000819050919050565b61179981611786565b81146117a457600080fd5b50565b6000813590506117b681611790565b92915050565b600080604083850312156117d3576117d2611781565b5b60006117e1858286016117a7565b92505060206117f2858286016117a7565b9150509250929050565b61180581611786565b82525050565b600060208201905061182060008301846117fc565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611860578082015181840152602081019050611845565b60008484015250505050565b6000601f19601f8301169050919050565b600061188882611826565b6118928185611831565b93506118a2818560208601611842565b6118ab8161186c565b840191505092915050565b600060208201905081810360008301526118d0818461187d565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611903826118d8565b9050919050565b611913816118f8565b811461191e57600080fd5b50565b6000813590506119308161190a565b92915050565b6000806040838503121561194d5761194c611781565b5b600061195b85828601611921565b925050602061196c858286016117a7565b9150509250929050565b60008115159050919050565b61198b81611976565b82525050565b60006020820190506119a66000830184611982565b92915050565b6000602082840312156119c2576119c1611781565b5b60006119d0848285016117a7565b91505092915050565b6000806000606084860312156119f2576119f1611781565b5b6000611a0086828701611921565b9350506020611a1186828701611921565b9250506040611a22868287016117a7565b9150509250925092565b600060ff82169050919050565b611a4281611a2c565b82525050565b6000602082019050611a5d6000830184611a39565b92915050565b60008060408385031215611a7a57611a79611781565b5b6000611a8885828601611921565b9250506020611a9985828601611921565b9150509250929050565b611aac816118f8565b82525050565b6000602082019050611ac76000830184611aa3565b92915050565b600060208284031215611ae357611ae2611781565b5b6000611af184828501611921565b91505092915050565b600060e082019050611b0f600083018a6117fc565b611b1c60208301896117fc565b611b2960408301886117fc565b611b3660608301876117fc565b611b4360808301866117fc565b611b5060a08301856117fc565b611b5d60c08301846117fc565b98975050505050505050565b7f5374616b696e67436f6e74726163743a202063616c6c206973206e6f7420737460008201527f616b696e6720636f6e7472616374000000000000000000000000000000000000602082015250565b6000611bc5602e83611831565b9150611bd082611b69565b604082019050919050565b60006020820190508181036000830152611bf481611bb8565b9050919050565b6000819050919050565b6000819050919050565b6000611c2a611c25611c2084611bfb565b611c05565b611786565b9050919050565b611c3a81611c0f565b82525050565b6000604082019050611c556000830185611c31565b611c6260208301846117fc565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611ca382611786565b9150611cae83611786565b9250828202611cbc81611786565b91508282048414831517611cd357611cd2611c69565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611d1482611786565b9150611d1f83611786565b925082611d2f57611d2e611cda565b5b828204905092915050565b6000611d4582611786565b9150611d5083611786565b9250828201905080821115611d6857611d67611c69565b5b92915050565b6000611d7982611786565b9150611d8483611786565b925082611d9457611d93611cda565b5b828206905092915050565b6000611daa82611786565b9150611db583611786565b9250828203905081811115611dcd57611dcc611c69565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611e1a57607f821691505b602082108103611e2d57611e2c611dd3565b5b50919050565b7f496e697469616c697a65723a202063616c6c6572206973206e6f7420696e697460008201527f69616c697a657200000000000000000000000000000000000000000000000000602082015250565b6000611e8f602783611831565b9150611e9a82611e33565b604082019050919050565b60006020820190508181036000830152611ebe81611e82565b9050919050565b7f43616e6e6f742073657420494e44455820616761696e00000000000000000000600082015250565b6000611efb601683611831565b9150611f0682611ec5565b602082019050919050565b60006020820190508181036000830152611f2a81611eee565b9050919050565b7f5a65726f20616464726573733a205374616b696e670000000000000000000000600082015250565b6000611f67601583611831565b9150611f7282611f31565b602082019050919050565b60006020820190508181036000830152611f9681611f5a565b9050919050565b7f5a65726f20616464726573733a20547265617375727900000000000000000000600082015250565b6000611fd3601683611831565b9150611fde82611f9d565b602082019050919050565b6000602082019050818103600083015261200281611fc6565b9050919050565b600060408201905061201e60008301856117fc565b61202b60208301846117fc565b939250505056fea2646970667358221220d5949516b27ca874887f3e48e6e46a10648b4f535dad77b792bab0f9de885e5864736f6c63430008130033

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.