ETH Price: $1,822.75 (-14.98%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BaconCoin5

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 2000 runs

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

import "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "./../ERC20/ERC20UpgradeableFromERC777.sol";
import '../@openzeppelin/contracts/utils/math/SafeMath.sol';
import '../@openzeppelin/contracts/utils/math/SignedSafeMath.sol';

contract BaconCoin5 is Initializable, ERC20UpgradeableFromERC777 {
    using SignedSafeMath for int256;
    using SafeMath for uint256;

    address stakingContract;
    address airdropContract;

    /// @notice DEPRECATED  
    /// A record of votes checkpoints for each account, by index
    mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;

    /// @notice DEPRECATED  
    /// The number of checkpoints for each account
    mapping (address => uint32) public numCheckpoints;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    /// @notice A record of each accounts delegate
    mapping (address => address) public delegates;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    /// @notice The EIP-712 typehash for the permit struct used by the contract
    bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    /// @notice A record of states for signing / validating signatures
    mapping (address => uint) public nonces;

    /*****************************************************
    *       Variables added in BaconCoin1
    ******************************************************/

    /// @notice A record of votes checkpoints for a delegate's account, by index
    mapping (address => mapping (uint32 => Checkpoint)) public delegateCheckpoints;

    /// @notice The number of checkpoints for each account
    mapping (address => uint32) public numDelegateCheckpoints;

    /*****************************************************
    *       Variables added in BaconCoin4
    ******************************************************/

    bool private _paused;

    /*****************************************************
    *       Variables added in BaconCoin5
    ******************************************************/

    address private guardian;


    /*****************************************************
    *       EVENTS
    ******************************************************/
    
    /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);

    // @notice Emitted when the pause is triggered by `account`.
    event Paused(address account);

    // @notice Emitted when the unpause is triggered by `account`.
    event Unpaused(address account);


    /*****************************************************
    *       Pausing FUNCTIONS
    ******************************************************/

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() public whenNotPaused {
        require(isGuardian(), "invalid pause sender");
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() public whenPaused {
        require(isGuardian(), "invalid unpause sender");
        _paused = false;
        emit Unpaused(_msgSender());
    }

    /*****************************************************
    *       BASE FUNCTIONS
    ******************************************************/

    function setGuardian(address newGuardian) public {
        // Awfulness required to make the upgrade work. Will remove if/when BaconCoin6.
        require((
            (guardian == address(0) && msg.sender == 0xa42f6FB68607048dDe54FCd53D2195cc8ca5F486 && block.chainid == 1   ) ||
            (guardian == address(0) && msg.sender == 0xa7BB7afD67baFaf80DE3fAbE9D655d87e484AcEf && block.chainid == 5   ) ||
            (guardian == address(0) && msg.sender == 0xa3E73ae94fdbE8e92bf9078E9b4427cA7a520ea4 && block.chainid == 1337) ||
            isGuardian()
        ), "Invalid sender");
        guardian = newGuardian;
    }

    function isGuardian() internal view returns (bool){
        return (guardian != address(0)) && msg.sender == guardian;
    }

    // Transfer func must be overwritten to also moveDelegates when balance is transferred
    function transfer(address dst, uint amount) public override whenNotPaused returns (bool)  {
        require(super.transfer(dst, amount));
        _moveDelegates(delegates[msg.sender], delegates[dst], amount);
        return true;
    }

    // TransferFrom func must be overwritten to also moveDelegates when balance is transferred
    function transferFrom(address src, address dst, uint256 amount) public override whenNotPaused returns (bool) {
        require(super.transferFrom(src, dst, amount));
        _moveDelegates(delegates[src], delegates[dst], amount);
        return true;
    }

    function mint(address account, uint256 amount) public whenNotPaused {
        require(msg.sender == stakingContract || msg.sender == airdropContract, "Invalid mint sender");
        super._mint(account, amount);
        _moveDelegates(address(0), delegates[account], amount);
    }

    function burn(uint256 amount, bytes memory data) public whenNotPaused {
        super._burn(msg.sender, amount);
        _moveDelegates(delegates[msg.sender], address(0), amount);
    }

    function ownerBurn(uint256 amount, address user) public {
        require(isGuardian(), "invalid sender");
        super._burn(user, amount);
        _moveDelegates(delegates[user], address(0), amount);
    }

    /**  
    *   @dev Function version returns uint depending on what version the contract is on
    */
    function version() public pure returns (uint) {
        return 5;
    }
    
    function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }


    /********************************
    *     GOVERNANCE FUNCTIONS      *
    *********************************/

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public {
        bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), block.chainid, address(this)));
        bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));
        bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "BaconCoin: invalid signature");
        require(nonce == nonces[signatory]++, "BaconCoin: invalid nonce");
        require(block.timestamp <= expiry, "BaconCoin: signature expired");
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegatee The address to delegate votes to
     */
    function delegate(address delegatee) public {
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account) external view returns (uint256) {
        uint32 nCheckpoints = numDelegateCheckpoints[account];
        return nCheckpoints > 0 ? delegateCheckpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
    * @notice Determine the prior number of votes for an account as of a block number
    * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
    * @param account The address of the account to check
    * @param blockNumber The block number to get the vote balance at
    * @return The number of votes the account had as of the given block
    */
    function getPriorVotes(address account, uint blockNumber) public view returns (uint256) {
        require(blockNumber < block.number, "BaconCoin: not yet determined");

        uint32 nCheckpoints = numDelegateCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (delegateCheckpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return delegateCheckpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (delegateCheckpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = delegateCheckpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return delegateCheckpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee) internal {
        address currentDelegate = delegates[delegator];
        uint256 delegatorBalance = balanceOf(delegator);
        delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                uint32 srcRepNum = numDelegateCheckpoints[srcRep];
                uint256 srcRepOld = srcRepNum > 0 ? delegateCheckpoints[srcRep][srcRepNum - 1].votes : 0;
                uint256 srcRepNew = srcRepOld.sub(amount);
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                uint32 dstRepNum = numDelegateCheckpoints[dstRep];
                uint256 dstRepOld = dstRepNum > 0 ? delegateCheckpoints[dstRep][dstRepNum - 1].votes : 0;
                uint256 dstRepNew = dstRepOld.add(amount);
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint256 oldVotes, uint256 newVotes) internal {
      uint32 blockNumber = safe32(block.number, "BaconCoin: block number exceeds 32 bits");

      if (nCheckpoints > 0 && delegateCheckpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
          delegateCheckpoints[delegatee][nCheckpoints - 1].votes = newVotes;
      } else {
          delegateCheckpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
          numDelegateCheckpoints[delegatee] = nCheckpoints + 1;
      }

      emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

// import "./IERC20Upgradeable.sol";
// import "./extensions/IERC20MetadataUpgradeable.sol";
// import "../../utils/ContextUpgradeable.sol";
// import "../../proxy/utils/Initializable.sol";
// import "../../utils/introspection/IERC1820RegistryUpgradeable.sol";

import './../@openzeppelin/contracts-upgradeable/utils/introspection/IERC1820RegistryUpgradeable.sol';
import './../@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol';
import './../@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol';
import "./../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "./../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.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 ERC20UpgradeableFromERC777 is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {
/// ERC777 Storage
    using AddressUpgradeable for address;

    IERC1820RegistryUpgradeable internal constant _ERC1820_REGISTRY = IERC1820RegistryUpgradeable(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);

    mapping(address => uint256) private _balances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256("ERC777TokensSender");
    bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient");

    // This isn't ever read from - it's only used to respond to the defaultOperators query.
    address[] private _defaultOperatorsArray;

    // Immutable, but accounts may revoke them (tracked in __revokedDefaultOperators).
    mapping(address => bool) private _defaultOperators;

    // For each account, a mapping of its operators and revoked default operators.
    mapping(address => mapping(address => bool)) private _operators;
    mapping(address => mapping(address => bool)) private _revokedDefaultOperators;

    // ERC20-allowances
    mapping(address => mapping(address => uint256)) private _allowances;


/// ERC20 Code

    /**
     * @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.
     */
    function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __Context_init_unchained();
        __ERC20_init_unchained(name_, symbol_);
    }

    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
        _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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, 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}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), 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}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - 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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][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) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), 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:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, 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 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 {}

// ERC777 Storage
    uint256[41] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SignedSafeMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SignedSafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SignedSafeMath {
    /**
     * @dev Returns the multiplication of two signed integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(int256 a, int256 b) internal pure returns (int256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two signed integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(int256 a, int256 b) internal pure returns (int256) {
        return a / b;
    }

    /**
     * @dev Returns the subtraction of two signed integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(int256 a, int256 b) internal pure returns (int256) {
        return a - b;
    }

    /**
     * @dev Returns the addition of two signed integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(int256 a, int256 b) internal pure returns (int256) {
        return a + b;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Registry.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the global ERC1820 Registry, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register
 * implementers for interfaces in this registry, as well as query support.
 *
 * Implementers may be shared by multiple accounts, and can also implement more
 * than a single interface for each account. Contracts can implement interfaces
 * for themselves, but externally-owned accounts (EOA) must delegate this to a
 * contract.
 *
 * {IERC165} interfaces can also be queried via the registry.
 *
 * For an in-depth explanation and source code analysis, see the EIP text.
 */
interface IERC1820RegistryUpgradeable {
    /**
     * @dev Sets `newManager` as the manager for `account`. A manager of an
     * account is able to set interface implementers for it.
     *
     * By default, each account is its own manager. Passing a value of `0x0` in
     * `newManager` will reset the manager to this initial state.
     *
     * Emits a {ManagerChanged} event.
     *
     * Requirements:
     *
     * - the caller must be the current manager for `account`.
     */
    function setManager(address account, address newManager) external;

    /**
     * @dev Returns the manager for `account`.
     *
     * See {setManager}.
     */
    function getManager(address account) external view returns (address);

    /**
     * @dev Sets the `implementer` contract as ``account``'s implementer for
     * `interfaceHash`.
     *
     * `account` being the zero address is an alias for the caller's address.
     * The zero address can also be used in `implementer` to remove an old one.
     *
     * See {interfaceHash} to learn how these are created.
     *
     * Emits an {InterfaceImplementerSet} event.
     *
     * Requirements:
     *
     * - the caller must be the current manager for `account`.
     * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not
     * end in 28 zeroes).
     * - `implementer` must implement {IERC1820Implementer} and return true when
     * queried for support, unless `implementer` is the caller. See
     * {IERC1820Implementer-canImplementInterfaceForAddress}.
     */
    function setInterfaceImplementer(
        address account,
        bytes32 _interfaceHash,
        address implementer
    ) external;

    /**
     * @dev Returns the implementer of `interfaceHash` for `account`. If no such
     * implementer is registered, returns the zero address.
     *
     * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28
     * zeroes), `account` will be queried for support of it.
     *
     * `account` being the zero address is an alias for the caller's address.
     */
    function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address);

    /**
     * @dev Returns the interface hash for an `interfaceName`, as defined in the
     * corresponding
     * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP].
     */
    function interfaceHash(string calldata interfaceName) external pure returns (bytes32);

    /**
     * @notice Updates the cache with whether the contract implements an ERC165 interface or not.
     * @param account Address of the contract for which to update the cache.
     * @param interfaceId ERC165 interface for which to update the cache.
     */
    function updateERC165Cache(address account, bytes4 interfaceId) external;

    /**
     * @notice Checks whether a contract implements an ERC165 interface or not.
     * If the result is not cached a direct lookup on the contract address is performed.
     * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling
     * {updateERC165Cache} with the contract address.
     * @param account Address of the contract to check.
     * @param interfaceId ERC165 interface to check.
     * @return True if `account` implements `interfaceId`, false otherwise.
     */
    function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool);

    /**
     * @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.
     * @param account Address of the contract to check.
     * @param interfaceId ERC165 interface to check.
     * @return True if `account` implements `interfaceId`, false otherwise.
     */
    function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool);

    event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer);

    event ManagerChanged(address indexed account, address indexed newManager);
}

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

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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 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 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20MetadataUpgradeable is IERC20Upgradeable {
    /**
     * @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 v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 10 of 10 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

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

Contract Security Audit

Contract ABI

API
[{"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":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"_unpause","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":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint256","name":"votes","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":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"delegateCheckpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint256","name":"votes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","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"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numDelegateCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"ownerBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newGuardian","type":"address"}],"name":"setGuardian","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":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]

608060405234801561001057600080fd5b506121fa806100206000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c806370a082311161010f578063b4b5ea57116100a2578063e7a324dc11610071578063e7a324dc14610515578063f1127ed81461053c578063fc8234cb14610577578063fe9d93031461057f57600080fd5b8063b4b5ea57146104a3578063c3cda520146104b6578063dd62ed3e146104c9578063e610ed8d1461050257600080fd5b806395d89b41116100de57806395d89b411461044f578063a11c474114610457578063a457c2d71461047d578063a9059cbb1461049057600080fd5b806370a08231146103e0578063782d6fe1146104095780637ecebe001461041c5780638a0dac4a1461043c57600080fd5b80633950935111610187578063587cde1e11610156578063587cde1e146103465780635c19a95c146103875780635c975abb1461039a5780636fcfff45146103a557600080fd5b806339509351146102c257806340c10f19146102d5578063509c3ef0146102e857806354fd4d501461033f57600080fd5b806323b872dd116101c357806323b872dd1461026f57806330adf81f14610282578063313ce567146102a9578063320b2ad9146102b857600080fd5b806306fdde03146101f5578063095ea7b31461021357806318160ddd1461023657806320606b7014610248575b600080fd5b6101fd610592565b60405161020a9190611dad565b60405180910390f35b610226610221366004611e1e565b610624565b604051901515815260200161020a565b6034545b60405190815260200161020a565b61023a7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b61022661027d366004611e48565b61063b565b61023a7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6040516012815260200161020a565b6102c06106de565b005b6102266102d0366004611e1e565b6107ca565b6102c06102e3366004611e1e565b610806565b6103236102f6366004611e84565b606b6020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6040805163ffffffff909316835260208301919091520161020a565b600561023a565b61036f610354366004611ec4565b6069602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161020a565b6102c0610395366004611ec4565b6108ee565b606d5460ff16610226565b6103cb6103b3366004611ec4565b60686020526000908152604090205463ffffffff1681565b60405163ffffffff909116815260200161020a565b61023a6103ee366004611ec4565b6001600160a01b031660009081526033602052604090205490565b61023a610417366004611e1e565b6108fb565b61023a61042a366004611ec4565b606a6020526000908152604090205481565b6102c061044a366004611ec4565b610b50565b6101fd610cad565b6103cb610465366004611ec4565b606c6020526000908152604090205463ffffffff1681565b61022661048b366004611e1e565b610cbc565b61022661049e366004611e1e565b610d63565b61023a6104b1366004611ec4565b610df5565b6102c06104c4366004611edf565b610e6a565b61023a6104d7366004611f3f565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b6102c0610510366004611f72565b611121565b61023a7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b61032361054a366004611e84565b60676020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6102c06111a5565b6102c061058d366004611fab565b61127c565b6060603580546105a190612066565b80601f01602080910402602001604051908101604052809291908181526020018280546105cd90612066565b801561061a5780601f106105ef5761010080835404028352916020019161061a565b820191906000526020600020905b8154815290600101906020018083116105fd57829003601f168201915b5050505050905090565b60006106313384846112f2565b5060015b92915050565b6000610649606d5460ff1690565b1561068e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064015b60405180910390fd5b61069984848461144a565b6106a257600080fd5b6001600160a01b038085166000908152606960205260408082205486841683529120546106d492918216911684611509565b5060019392505050565b606d5460ff16156107245760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610685565b61072c61166d565b6107785760405162461bcd60e51b815260206004820152601460248201527f696e76616c69642070617573652073656e6465720000000000000000000000006044820152606401610685565b606d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586107ad3390565b6040516001600160a01b03909116815260200160405180910390a1565b336000818152603b602090815260408083206001600160a01b038716845290915281205490916106319185906108019086906120b7565b6112f2565b606d5460ff161561084c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610685565b6065546001600160a01b031633148061086f57506066546001600160a01b031633145b6108bb5760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206d696e742073656e646572000000000000000000000000006044820152606401610685565b6108c582826116a3565b6001600160a01b038083166000908152606960205260408120546108ea921683611509565b5050565b6108f83382611782565b50565b600043821061094c5760405162461bcd60e51b815260206004820152601d60248201527f4261636f6e436f696e3a206e6f74207965742064657465726d696e65640000006044820152606401610685565b6001600160a01b0383166000908152606c602052604090205463ffffffff168061097a576000915050610635565b6001600160a01b0384166000908152606b60205260408120849161099f6001856120cf565b63ffffffff90811682526020820192909252604001600020541611610a08576001600160a01b0384166000908152606b60205260408120906109e26001846120cf565b63ffffffff1663ffffffff16815260200190815260200160002060010154915050610635565b6001600160a01b0384166000908152606b6020908152604080832083805290915290205463ffffffff16831015610a43576000915050610635565b600080610a516001846120cf565b90505b8163ffffffff168163ffffffff161115610b195760006002610a7684846120cf565b610a8091906120f4565b610a8a90836120cf565b6001600160a01b0388166000908152606b6020908152604080832063ffffffff8086168552908352928190208151808301909252805490931680825260019093015491810191909152919250871415610aed576020015194506106359350505050565b805163ffffffff16871115610b0457819350610b12565b610b0f6001836120cf565b92505b5050610a54565b506001600160a01b0385166000908152606b6020908152604080832063ffffffff9094168352929052206001015491505092915050565b606d5461010090046001600160a01b0316158015610b81575073a42f6fb68607048dde54fcd53d2195cc8ca5f48633145b8015610b8d5750466001145b80610bd05750606d5461010090046001600160a01b0316158015610bc4575073a7bb7afd67bafaf80de3fabe9d655d87e484acef33145b8015610bd05750466005145b80610c145750606d5461010090046001600160a01b0316158015610c07575073a3e73ae94fdbe8e92bf9078e9b4427ca7a520ea433145b8015610c14575046610539145b80610c225750610c2261166d565b610c6e5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c69642073656e6465720000000000000000000000000000000000006044820152606401610685565b606d80546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b6060603680546105a190612066565b336000908152603b602090815260408083206001600160a01b038616845290915281205482811015610d565760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610685565b6106d433858584036112f2565b6000610d71606d5460ff1690565b15610db15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610685565b610dbb838361181a565b610dc457600080fd5b33600090815260696020526040808220546001600160a01b0386811684529190922054610631928216911684611509565b6001600160a01b0381166000908152606c602052604081205463ffffffff1680610e20576000610e63565b6001600160a01b0383166000908152606b6020526040812090610e446001846120cf565b63ffffffff1663ffffffff168152602001908152602001600020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866610e95610592565b8051602091820120604080518084019490945283810191909152466060840152306080808501919091528151808503909101815260a0840182528051908301207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08501526001600160a01b038b1660e085015261010084018a90526101208085018a9052825180860390910181526101408501909252815191909201207f190100000000000000000000000000000000000000000000000000000000000061016084015261016283018290526101828301819052909250906000906101a20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa158015610fe1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166110445760405162461bcd60e51b815260206004820152601c60248201527f4261636f6e436f696e3a20696e76616c6964207369676e6174757265000000006044820152606401610685565b6001600160a01b0381166000908152606a6020526040812080549161106883612125565b9190505589146110ba5760405162461bcd60e51b815260206004820152601860248201527f4261636f6e436f696e3a20696e76616c6964206e6f6e636500000000000000006044820152606401610685565b8742111561110a5760405162461bcd60e51b815260206004820152601c60248201527f4261636f6e436f696e3a207369676e61747572652065787069726564000000006044820152606401610685565b611114818b611782565b505050505b505050505050565b61112961166d565b6111755760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642073656e6465720000000000000000000000000000000000006044820152606401610685565b61117f8183611827565b6001600160a01b038082166000908152606960205260408120546108ea92169084611509565b606d5460ff166111f75760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610685565b6111ff61166d565b61124b5760405162461bcd60e51b815260206004820152601660248201527f696e76616c696420756e70617573652073656e646572000000000000000000006044820152606401610685565b606d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336107ad565b606d5460ff16156112c25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610685565b6112cc3383611827565b336000908152606960205260408120546108ea916001600160a01b039091169084611509565b6001600160a01b03831661136d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b0382166113e95760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b038381166000818152603b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006114578484846119ac565b6001600160a01b0384166000908152603b60209081526040808320338452909152902054828110156114f15760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e63650000000000000000000000000000000000000000000000006064820152608401610685565b6114fe85338584036112f2565b506001949350505050565b816001600160a01b0316836001600160a01b03161415801561152b5750600081115b15611668576001600160a01b038316156115ce576001600160a01b0383166000908152606c602052604081205463ffffffff16908161156b5760006115ae565b6001600160a01b0385166000908152606b602052604081209061158f6001856120cf565b63ffffffff1663ffffffff168152602001908152602001600020600101545b905060006115bc8285611bc3565b90506115ca86848484611bcf565b5050505b6001600160a01b03821615611668576001600160a01b0382166000908152606c602052604081205463ffffffff16908161160957600061164c565b6001600160a01b0384166000908152606b602052604081209061162d6001856120cf565b63ffffffff1663ffffffff168152602001908152602001600020600101545b9050600061165a8285611d71565b905061111985848484611bcf565b505050565b606d5460009061010090046001600160a01b03161580159061169e5750606d5461010090046001600160a01b031633145b905090565b6001600160a01b0382166116f95760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610685565b806034600082825461170b91906120b7565b90915550506001600160a01b038216600090815260336020526040812080548392906117389084906120b7565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b03828116600081815260696020818152604080842080546033845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611814828483611509565b50505050565b60006106313384846119ac565b6001600160a01b0382166118a35760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b038216600090815260336020526040902054818110156119325760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b038316600090815260336020526040812083830390556034805484929061196190849061215e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b038316611a285760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b038216611aa45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b03831660009081526033602052604090205481811015611b335760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290611b6a9084906120b7565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611bb691815260200190565b60405180910390a3611814565b6000610e63828461215e565b6000611bf34360405180606001604052806027815260200161219e60279139611d7d565b905060008463ffffffff16118015611c4d57506001600160a01b0385166000908152606b6020526040812063ffffffff831691611c316001886120cf565b63ffffffff908116825260208201929092526040016000205416145b15611c96576001600160a01b0385166000908152606b602052604081208391611c776001886120cf565b63ffffffff168152602081019190915260400160002060010155611d26565b60408051808201825263ffffffff838116825260208083018681526001600160a01b038a166000908152606b83528581208a851682529092529390209151825463ffffffff191691161781559051600191820155611cf5908590612175565b6001600160a01b0386166000908152606c60205260409020805463ffffffff191663ffffffff929092169190911790555b60408051848152602081018490526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6000610e6382846120b7565b6000816401000000008410611da55760405162461bcd60e51b81526004016106859190611dad565b509192915050565b600060208083528351808285015260005b81811015611dda57858101830151858201604001528201611dbe565b81811115611dec576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114611e1957600080fd5b919050565b60008060408385031215611e3157600080fd5b611e3a83611e02565b946020939093013593505050565b600080600060608486031215611e5d57600080fd5b611e6684611e02565b9250611e7460208501611e02565b9150604084013590509250925092565b60008060408385031215611e9757600080fd5b611ea083611e02565b9150602083013563ffffffff81168114611eb957600080fd5b809150509250929050565b600060208284031215611ed657600080fd5b610e6382611e02565b60008060008060008060c08789031215611ef857600080fd5b611f0187611e02565b95506020870135945060408701359350606087013560ff81168114611f2557600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215611f5257600080fd5b611f5b83611e02565b9150611f6960208401611e02565b90509250929050565b60008060408385031215611f8557600080fd5b82359150611f6960208401611e02565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611fbe57600080fd5b82359150602083013567ffffffffffffffff80821115611fdd57600080fd5b818501915085601f830112611ff157600080fd5b81358181111561200357612003611f95565b604051601f8201601f19908116603f0116810190838211818310171561202b5761202b611f95565b8160405282815288602084870101111561204457600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600181811c9082168061207a57607f821691505b6020821081141561209b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156120ca576120ca6120a1565b500190565b600063ffffffff838116908316818110156120ec576120ec6120a1565b039392505050565b600063ffffffff8084168061211957634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612157576121576120a1565b5060010190565b600082821015612170576121706120a1565b500390565b600063ffffffff808316818516808303821115612194576121946120a1565b0194935050505056fe4261636f6e436f696e3a20626c6f636b206e756d62657220657863656564732033322062697473a26469706673582212200907956fddb3ce3b7a692af580739183ffffad45f905380eb350ed0a273506bd64736f6c63430008090033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101f05760003560e01c806370a082311161010f578063b4b5ea57116100a2578063e7a324dc11610071578063e7a324dc14610515578063f1127ed81461053c578063fc8234cb14610577578063fe9d93031461057f57600080fd5b8063b4b5ea57146104a3578063c3cda520146104b6578063dd62ed3e146104c9578063e610ed8d1461050257600080fd5b806395d89b41116100de57806395d89b411461044f578063a11c474114610457578063a457c2d71461047d578063a9059cbb1461049057600080fd5b806370a08231146103e0578063782d6fe1146104095780637ecebe001461041c5780638a0dac4a1461043c57600080fd5b80633950935111610187578063587cde1e11610156578063587cde1e146103465780635c19a95c146103875780635c975abb1461039a5780636fcfff45146103a557600080fd5b806339509351146102c257806340c10f19146102d5578063509c3ef0146102e857806354fd4d501461033f57600080fd5b806323b872dd116101c357806323b872dd1461026f57806330adf81f14610282578063313ce567146102a9578063320b2ad9146102b857600080fd5b806306fdde03146101f5578063095ea7b31461021357806318160ddd1461023657806320606b7014610248575b600080fd5b6101fd610592565b60405161020a9190611dad565b60405180910390f35b610226610221366004611e1e565b610624565b604051901515815260200161020a565b6034545b60405190815260200161020a565b61023a7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b61022661027d366004611e48565b61063b565b61023a7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6040516012815260200161020a565b6102c06106de565b005b6102266102d0366004611e1e565b6107ca565b6102c06102e3366004611e1e565b610806565b6103236102f6366004611e84565b606b6020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6040805163ffffffff909316835260208301919091520161020a565b600561023a565b61036f610354366004611ec4565b6069602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161020a565b6102c0610395366004611ec4565b6108ee565b606d5460ff16610226565b6103cb6103b3366004611ec4565b60686020526000908152604090205463ffffffff1681565b60405163ffffffff909116815260200161020a565b61023a6103ee366004611ec4565b6001600160a01b031660009081526033602052604090205490565b61023a610417366004611e1e565b6108fb565b61023a61042a366004611ec4565b606a6020526000908152604090205481565b6102c061044a366004611ec4565b610b50565b6101fd610cad565b6103cb610465366004611ec4565b606c6020526000908152604090205463ffffffff1681565b61022661048b366004611e1e565b610cbc565b61022661049e366004611e1e565b610d63565b61023a6104b1366004611ec4565b610df5565b6102c06104c4366004611edf565b610e6a565b61023a6104d7366004611f3f565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b6102c0610510366004611f72565b611121565b61023a7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b61032361054a366004611e84565b60676020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6102c06111a5565b6102c061058d366004611fab565b61127c565b6060603580546105a190612066565b80601f01602080910402602001604051908101604052809291908181526020018280546105cd90612066565b801561061a5780601f106105ef5761010080835404028352916020019161061a565b820191906000526020600020905b8154815290600101906020018083116105fd57829003601f168201915b5050505050905090565b60006106313384846112f2565b5060015b92915050565b6000610649606d5460ff1690565b1561068e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064015b60405180910390fd5b61069984848461144a565b6106a257600080fd5b6001600160a01b038085166000908152606960205260408082205486841683529120546106d492918216911684611509565b5060019392505050565b606d5460ff16156107245760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610685565b61072c61166d565b6107785760405162461bcd60e51b815260206004820152601460248201527f696e76616c69642070617573652073656e6465720000000000000000000000006044820152606401610685565b606d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586107ad3390565b6040516001600160a01b03909116815260200160405180910390a1565b336000818152603b602090815260408083206001600160a01b038716845290915281205490916106319185906108019086906120b7565b6112f2565b606d5460ff161561084c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610685565b6065546001600160a01b031633148061086f57506066546001600160a01b031633145b6108bb5760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206d696e742073656e646572000000000000000000000000006044820152606401610685565b6108c582826116a3565b6001600160a01b038083166000908152606960205260408120546108ea921683611509565b5050565b6108f83382611782565b50565b600043821061094c5760405162461bcd60e51b815260206004820152601d60248201527f4261636f6e436f696e3a206e6f74207965742064657465726d696e65640000006044820152606401610685565b6001600160a01b0383166000908152606c602052604090205463ffffffff168061097a576000915050610635565b6001600160a01b0384166000908152606b60205260408120849161099f6001856120cf565b63ffffffff90811682526020820192909252604001600020541611610a08576001600160a01b0384166000908152606b60205260408120906109e26001846120cf565b63ffffffff1663ffffffff16815260200190815260200160002060010154915050610635565b6001600160a01b0384166000908152606b6020908152604080832083805290915290205463ffffffff16831015610a43576000915050610635565b600080610a516001846120cf565b90505b8163ffffffff168163ffffffff161115610b195760006002610a7684846120cf565b610a8091906120f4565b610a8a90836120cf565b6001600160a01b0388166000908152606b6020908152604080832063ffffffff8086168552908352928190208151808301909252805490931680825260019093015491810191909152919250871415610aed576020015194506106359350505050565b805163ffffffff16871115610b0457819350610b12565b610b0f6001836120cf565b92505b5050610a54565b506001600160a01b0385166000908152606b6020908152604080832063ffffffff9094168352929052206001015491505092915050565b606d5461010090046001600160a01b0316158015610b81575073a42f6fb68607048dde54fcd53d2195cc8ca5f48633145b8015610b8d5750466001145b80610bd05750606d5461010090046001600160a01b0316158015610bc4575073a7bb7afd67bafaf80de3fabe9d655d87e484acef33145b8015610bd05750466005145b80610c145750606d5461010090046001600160a01b0316158015610c07575073a3e73ae94fdbe8e92bf9078e9b4427ca7a520ea433145b8015610c14575046610539145b80610c225750610c2261166d565b610c6e5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c69642073656e6465720000000000000000000000000000000000006044820152606401610685565b606d80546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b6060603680546105a190612066565b336000908152603b602090815260408083206001600160a01b038616845290915281205482811015610d565760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610685565b6106d433858584036112f2565b6000610d71606d5460ff1690565b15610db15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610685565b610dbb838361181a565b610dc457600080fd5b33600090815260696020526040808220546001600160a01b0386811684529190922054610631928216911684611509565b6001600160a01b0381166000908152606c602052604081205463ffffffff1680610e20576000610e63565b6001600160a01b0383166000908152606b6020526040812090610e446001846120cf565b63ffffffff1663ffffffff168152602001908152602001600020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866610e95610592565b8051602091820120604080518084019490945283810191909152466060840152306080808501919091528151808503909101815260a0840182528051908301207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08501526001600160a01b038b1660e085015261010084018a90526101208085018a9052825180860390910181526101408501909252815191909201207f190100000000000000000000000000000000000000000000000000000000000061016084015261016283018290526101828301819052909250906000906101a20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa158015610fe1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166110445760405162461bcd60e51b815260206004820152601c60248201527f4261636f6e436f696e3a20696e76616c6964207369676e6174757265000000006044820152606401610685565b6001600160a01b0381166000908152606a6020526040812080549161106883612125565b9190505589146110ba5760405162461bcd60e51b815260206004820152601860248201527f4261636f6e436f696e3a20696e76616c6964206e6f6e636500000000000000006044820152606401610685565b8742111561110a5760405162461bcd60e51b815260206004820152601c60248201527f4261636f6e436f696e3a207369676e61747572652065787069726564000000006044820152606401610685565b611114818b611782565b505050505b505050505050565b61112961166d565b6111755760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642073656e6465720000000000000000000000000000000000006044820152606401610685565b61117f8183611827565b6001600160a01b038082166000908152606960205260408120546108ea92169084611509565b606d5460ff166111f75760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610685565b6111ff61166d565b61124b5760405162461bcd60e51b815260206004820152601660248201527f696e76616c696420756e70617573652073656e646572000000000000000000006044820152606401610685565b606d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336107ad565b606d5460ff16156112c25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610685565b6112cc3383611827565b336000908152606960205260408120546108ea916001600160a01b039091169084611509565b6001600160a01b03831661136d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b0382166113e95760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b038381166000818152603b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006114578484846119ac565b6001600160a01b0384166000908152603b60209081526040808320338452909152902054828110156114f15760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e63650000000000000000000000000000000000000000000000006064820152608401610685565b6114fe85338584036112f2565b506001949350505050565b816001600160a01b0316836001600160a01b03161415801561152b5750600081115b15611668576001600160a01b038316156115ce576001600160a01b0383166000908152606c602052604081205463ffffffff16908161156b5760006115ae565b6001600160a01b0385166000908152606b602052604081209061158f6001856120cf565b63ffffffff1663ffffffff168152602001908152602001600020600101545b905060006115bc8285611bc3565b90506115ca86848484611bcf565b5050505b6001600160a01b03821615611668576001600160a01b0382166000908152606c602052604081205463ffffffff16908161160957600061164c565b6001600160a01b0384166000908152606b602052604081209061162d6001856120cf565b63ffffffff1663ffffffff168152602001908152602001600020600101545b9050600061165a8285611d71565b905061111985848484611bcf565b505050565b606d5460009061010090046001600160a01b03161580159061169e5750606d5461010090046001600160a01b031633145b905090565b6001600160a01b0382166116f95760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610685565b806034600082825461170b91906120b7565b90915550506001600160a01b038216600090815260336020526040812080548392906117389084906120b7565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b03828116600081815260696020818152604080842080546033845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611814828483611509565b50505050565b60006106313384846119ac565b6001600160a01b0382166118a35760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b038216600090815260336020526040902054818110156119325760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b038316600090815260336020526040812083830390556034805484929061196190849061215e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b038316611a285760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b038216611aa45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b03831660009081526033602052604090205481811015611b335760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610685565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290611b6a9084906120b7565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611bb691815260200190565b60405180910390a3611814565b6000610e63828461215e565b6000611bf34360405180606001604052806027815260200161219e60279139611d7d565b905060008463ffffffff16118015611c4d57506001600160a01b0385166000908152606b6020526040812063ffffffff831691611c316001886120cf565b63ffffffff908116825260208201929092526040016000205416145b15611c96576001600160a01b0385166000908152606b602052604081208391611c776001886120cf565b63ffffffff168152602081019190915260400160002060010155611d26565b60408051808201825263ffffffff838116825260208083018681526001600160a01b038a166000908152606b83528581208a851682529092529390209151825463ffffffff191691161781559051600191820155611cf5908590612175565b6001600160a01b0386166000908152606c60205260409020805463ffffffff191663ffffffff929092169190911790555b60408051848152602081018490526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6000610e6382846120b7565b6000816401000000008410611da55760405162461bcd60e51b81526004016106859190611dad565b509192915050565b600060208083528351808285015260005b81811015611dda57858101830151858201604001528201611dbe565b81811115611dec576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114611e1957600080fd5b919050565b60008060408385031215611e3157600080fd5b611e3a83611e02565b946020939093013593505050565b600080600060608486031215611e5d57600080fd5b611e6684611e02565b9250611e7460208501611e02565b9150604084013590509250925092565b60008060408385031215611e9757600080fd5b611ea083611e02565b9150602083013563ffffffff81168114611eb957600080fd5b809150509250929050565b600060208284031215611ed657600080fd5b610e6382611e02565b60008060008060008060c08789031215611ef857600080fd5b611f0187611e02565b95506020870135945060408701359350606087013560ff81168114611f2557600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215611f5257600080fd5b611f5b83611e02565b9150611f6960208401611e02565b90509250929050565b60008060408385031215611f8557600080fd5b82359150611f6960208401611e02565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611fbe57600080fd5b82359150602083013567ffffffffffffffff80821115611fdd57600080fd5b818501915085601f830112611ff157600080fd5b81358181111561200357612003611f95565b604051601f8201601f19908116603f0116810190838211818310171561202b5761202b611f95565b8160405282815288602084870101111561204457600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600181811c9082168061207a57607f821691505b6020821081141561209b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156120ca576120ca6120a1565b500190565b600063ffffffff838116908316818110156120ec576120ec6120a1565b039392505050565b600063ffffffff8084168061211957634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612157576121576120a1565b5060010190565b600082821015612170576121706120a1565b500390565b600063ffffffff808316818516808303821115612194576121946120a1565b0194935050505056fe4261636f6e436f696e3a20626c6f636b206e756d62657220657863656564732033322062697473a26469706673582212200907956fddb3ce3b7a692af580739183ffffad45f905380eb350ed0a273506bd64736f6c63430008090033

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

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