ETH Price: $3,289.10 (-2.76%)

Contract

0x9eb610a70C6DCeb616DD3f703521d54113060630
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040159892102022-11-17 10:40:59736 days ago1668681659IN
 Create: AutoMinterERC20
0 ETH0.0379333620

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AutoMinterERC20

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : AutoMinterERC20.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.7.0 <0.9.0;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "./IAutoMinterFactory.sol";

contract AutoMinterERC20 is Initializable, ERC20Upgradeable, OwnableUpgradeable {
    
    // revenue supplied to the contract
    uint256 private revenue;

    // the signer address for verifying airdrops
    address private airdropSignerAddress;

    // the quantity of supply claimed in the airdrop
    uint256 private quantityClaimed;

    // the max supply to be claimed in the airdrop
    uint256 private airdropLimit;

    // the address of the staking contract
    address private stakingContract;

    // the address of the treasury, team, investor treasury fund contract
    address private fundsContract;

    // the amount that each account has claimed in the airdrop
    mapping(address => bool) public accountClaimed;
    
    // AutoMinter Factory contract to check valid collection addresses
    IAutoMinterFactory private autoMinterFactory;

    // the integer representing the current lock window
    uint256 public currentLockWindow;

    // is airdrop tradable
    bool public isAirdropTradable;

    struct LockInfo {
        uint256 lockWindow;
        uint256 totalLockAmount;
        uint256 currentLockWindowAmount;
        uint256 previousLockWindowAmount;
        uint256 lastLockWindowAmount;
        uint256 airdropAmount;
    }

    mapping(address => LockInfo) private accountLockedTokens;

    // the max supply reserved for strategic sale + liquidity provision
    uint256 private strategicLiquidityLimit;

    // the quantity of supply strategic liquidity released
    uint256 private strategicLiquidityReleased;

    // the address of the pro pass staking contract
    address proStakingContract;

    constructor() {}

    function initialize(address stakingContract_, address fundsContract_, address autoMinterFactoryContract_) public virtual initializer {
        __ERC20_init("AutoMinter", "AMR");
        _transferOwnership(msg.sender);
        airdropSignerAddress = msg.sender;
        stakingContract = stakingContract_;
        fundsContract = fundsContract_;
        airdropLimit = 20000000000000000000000000;
        strategicLiquidityLimit = 2000000000000000000000000;
        autoMinterFactory = IAutoMinterFactory(autoMinterFactoryContract_);
    }
    
    /**
     * @notice Claim the initil airdropped tokens
     * @dev Claim the initial allocation of tokens by providing the correct signature
     * @param amount the amount of tokens available to mint
     * @param signature the signature required to prove airdrop rights
     */
    function claim(uint256 amount, bytes calldata signature, address to) public
    {
        // check airdrop supply for a cap on how much can be claimed in the airdrop
        require(airdropLimit >= quantityClaimed + amount);

        // wallets can only claim 1 airdrop
        require(accountClaimed[to] == false);

        // Hash the content (amount, claimant) and verify the signature from the owner address
        address signer = ECDSA.recover(
                ECDSA.toEthSignedMessageHash(keccak256(abi.encodePacked(amount, to))),
                signature);

        // check signature is valid
        require(signer == owner() || signer == airdropSignerAddress, "The signature provided does not match");

        // set claimant claim status to true
        accountClaimed[to] = true;
        accountLockedTokens[to].airdropAmount = amount;

        // mint the provided number of tokens
        _mint(to, amount);
    }

    /**
     * @notice Mint new tokens
     * @dev Exchange ETH for tokens by sending revenue
     * @param to the address which tokens should be minted too
     */
    function mint(address to) payable public
    {
        // require contract caller to be a registered contract to avoid direct mints
        require(autoMinterFactory.isCollectionValid(msg.sender), "Tokens can only be minted via contracts created with AutoMinter");

        // get value exchanged for tokens (decreasing marginal amount)
        uint256 value = _getValueDeduction(msg.sender, msg.value);

        // get the new number of tokens to mint (based on allocation curve)
        uint256 currentSupply = _getTotalAllocation(revenue);
        uint256 newSupply = _getTotalAllocation(revenue + value);
        uint256 diff = newSupply - currentSupply;

        uint256 volumeRewardsQuantity = diff  * 350 / 980;
        uint256 stakingRewardsQuantity = diff  * 153 / 980;
        uint256 proStakingRewardsQuantity = diff  * 17 / 980;
        uint256 fundsQuantity = diff  * 460 / 980;

        // lock new volume reward tokens
        _updateLockedTokens(to, volumeRewardsQuantity);

        // mint tokens based on new allocation (getAllocation)
        _mint(to, volumeRewardsQuantity);
        _mint(fundsContract, fundsQuantity);
        _mint(stakingContract, stakingRewardsQuantity);
        _mint(proStakingContract, proStakingRewardsQuantity);

        // update revenue
        revenue = revenue + value;
    }

    /**
     * @notice Transfer funds from the contract
     * @dev Transfer funds from the contract
     */
    function transferFunds() onlyOwner() public
    {
        uint256 balance = address(this).balance;

        payable(owner()).transfer(balance);
    }

    /**
     * @notice update the signer address for claimable airdrop
     * @dev the signer is the address who signs the claimable airdrop required signature
     */
    function updateSigner(address signer) onlyOwner() public
    {
        airdropSignerAddress = signer;
    }

    /**
     * @notice update the signer address for claimable airdrop
     * @dev the signer is the address who signs the claimable airdrop required signature
     */
    function updateStakingContract(address stakingContract_) onlyOwner() public
    {
        stakingContract = stakingContract_;
    }

    /**
     * @notice update the pro pass staking contract address
     * @dev update the pro pass staking contract address
     */
    function updateProPassStakingContract(address proStakingContract_) onlyOwner() public
    {
        proStakingContract = proStakingContract_;
    }

    /**
     * @notice update the autominter factory address for validating source
     * @dev update the autominter factory address for validating source
     */
    function updateFactoryContract(address autoMinterFactoryContract_) onlyOwner() public
    {
        autoMinterFactory = IAutoMinterFactory(autoMinterFactoryContract_);
    }

    /**
     * @notice allow airdrop to be tradable
     * @dev allow airdropped tokens to be tradable and unlocked
     */
    function unlockAirdropTokens() onlyOwner() public
    {
        isAirdropTradable = true;
    }

    /**
     * @notice move the next lock window for users tokens to be unlocked
     * @dev move the next lock window period forward to unlock new tokens
     */
    function nextLockWindow() onlyOwner() public
    {
        currentLockWindow += 1;
    }
    
    /**
     * @notice check if wallet has claimed airdrop
     * @dev check if the provided wallet has already claimed the airdrop
     * @param account account to check claimed status
     */
    function hasClaimedAirdrop(address account) external view returns (bool)
    {
        return accountClaimed[account];
    }
    
    /**
     * @notice Move the strategic liquidity tokens
     * @dev The reserve of tokens reserved for liquidity provisioning and strategic sale
     * @param amount how much of the reserves to move in wei
     * @param to the address to send the reserves too
     */
    function moveStrategicLiquidityReserves(uint256 amount, address to) onlyOwner() public
    {
        airdropLimit = 20000000000000000000000000;
        
        // check airdrop supply for a cap on how much can be claimed in the airdrop
        require(strategicLiquidityLimit >= strategicLiquidityReleased + amount);

        strategicLiquidityReleased += amount;

        // mint the provided number of tokens
        _mint(to, amount);
    }


    /**
     * @notice get the number of locked tokens
     * @dev get the number of locked tokens for an account
     * @param account account to check locked token amount
     */
    function getLockedTokens(address account) external view returns (uint256)
    {
        return _getLockedTokens(account);
    }
    
    /**
     * @notice get the number of locked tokens
     * @dev get the number of locked tokens for an account
     * @param account account to check locked token amount
     */
    function _getLockedTokens(address account)  private view returns (uint256)
    {
        uint256 lockedAmount = 0;
        LockInfo storage lockInfo = accountLockedTokens[account];

        if(!isAirdropTradable){
            lockedAmount += lockInfo.airdropAmount;
        }
        
        uint256 windowsSkipped = currentLockWindow - lockInfo.lockWindow;

        if(windowsSkipped == 0){
            lockedAmount += lockInfo.currentLockWindowAmount + lockInfo.previousLockWindowAmount + lockInfo.lastLockWindowAmount;
        }
        else if(windowsSkipped == 1){
            lockedAmount += lockInfo.currentLockWindowAmount + lockInfo.previousLockWindowAmount;
        }
        else if(windowsSkipped == 2){
            lockedAmount += lockInfo.currentLockWindowAmount;
        }
        else{
            // ignore all lock measures
        }

        return lockedAmount;
    }

    /**
     * @notice update the number of locked tokens for a user
     * @dev update the number of locked tokens for a user
     * @param account account to lock tokens for
     * @param account new number of tokens to lock
     */
    function _updateLockedTokens(address account, uint256 amount) private
    {
        LockInfo storage lockInfo = accountLockedTokens[account];

        // do nothing if amount is 0 and lock window is the same
        if(lockInfo.lockWindow == currentLockWindow && amount == 0){
            return;
        }

        // if the lock window hasnt altered since the last update, update the lock amounts for the current window and total
        else if(lockInfo.lockWindow == currentLockWindow){
            accountLockedTokens[account].totalLockAmount += amount;
            accountLockedTokens[account].currentLockWindowAmount += amount;
            return;
        }

        // if the lock window has altered by 1, then unlock the oldest tokens, and move the rest
        else if(lockInfo.lockWindow + 1 == currentLockWindow){
            // update lock window
            accountLockedTokens[account].lockWindow = currentLockWindow;

            // move previous locked tokens to last
            accountLockedTokens[account].lastLockWindowAmount = lockInfo.previousLockWindowAmount;
            
            // move current tokens to previous
            accountLockedTokens[account].previousLockWindowAmount = lockInfo.currentLockWindowAmount;

            // update current locked tokens
            accountLockedTokens[account].currentLockWindowAmount = amount;

            // total count increass by new tokens, decreases by releasing the last lock window tokens
            accountLockedTokens[account].totalLockAmount += amount - lockInfo.lastLockWindowAmount;

            return;
        }

        // if the lock window has altered by 2, then unlock the oldest and previous tokens, and move the rest
        else if(lockInfo.lockWindow + 2 == currentLockWindow){
            // update lock window
            accountLockedTokens[account].lockWindow = currentLockWindow;

            // move current locked tokens to last
            accountLockedTokens[account].lastLockWindowAmount = lockInfo.currentLockWindowAmount;

            // update current locked tokens
            accountLockedTokens[account].currentLockWindowAmount = amount;

            // total count increass by new tokens, decreases by releasing the last lock window tokens and previous tokens
            accountLockedTokens[account].totalLockAmount += amount - lockInfo.lastLockWindowAmount - lockInfo.previousLockWindowAmount;

            return;
        }

        // if the lock window has altered by 3 or more, then unlock all tokens
        else{
            // update lock window
            accountLockedTokens[account].lockWindow = currentLockWindow;

            // move last locked tokens to last
            accountLockedTokens[account].lastLockWindowAmount = 0;

            // move previous locked tokens to last
            accountLockedTokens[account].previousLockWindowAmount = 0;

            // update current locked tokens
            accountLockedTokens[account].currentLockWindowAmount = amount;

            // total count increass by new tokens, decreases by releasing the last lock window tokens and previous tokens
            accountLockedTokens[account].totalLockAmount += amount;

            return;
        }
    }

    /**
     * @notice Get the number of tokens allocated based on revenue
     * @dev The allocation curve determines how many tokens are allocated in total
     * @param amount the revenue to determine the current value
     * @return uint256 the amount of tokens be exchanged
     */
    function _getTotalAllocation(uint256 amount) pure private returns (uint256)
    {
        // get the current token supply based on revenue
        uint256 supply = 20000000000000000000000000 + (980000000000000000000000000 * amount + 10000000000000000000000) / (amount + 5000000000000000000000);
        
        return supply;
    }

    /**
     * @notice Get the equivilent value of revenue paid to be exchanged for new tokens
     * @dev The more tokens are minted, the less marginally you will get next time
     * @param source the source of extraction
     * @param amount the amount to be exchanged
     * @return uint256 the equivilent value to be exchanged
     */
    function _getValueDeduction(address source, uint256 amount) pure private returns (uint256)
    {
        return amount;
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override(ERC20Upgradeable) {
        super._beforeTokenTransfer(from, to, amount);

        // _updateLockedTokens(from, 0);
        require(from == address(0) || super.balanceOf(from) - _getLockedTokens(from) >= amount, "AutoMinterERC20: Transfer amount exceeds unlocked token amount");
    }
}

File 2 of 11 : IAutoMinterFactory.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.7.0 <0.9.0;

interface IAutoMinterFactory
{
    /* Create an NFT Collection and pay the fee */
    function create(string memory name_,
        string memory symbol_,
        string memory baseURI_,
        string memory appId_,
        uint256 mintFee_,
        uint256 size_,
        bool mintSelectionEnabled_,
        bool mintRandomEnabled_,
        address whiteListSignerAddress_,
        uint256 mintLimit_,
        uint256 royaltyBasis_,
        string memory placeholderImage_) payable external;
    
    /* Create an NFT Collection and pay the fee */
    function createConsecutive(string memory name_,
        string memory symbol_,
        string memory baseURI_,
        string memory appId_,
        uint256 mintFee_,
        uint256 size_,
        address whiteListSignerAddress_,
        uint256 mintLimit_,
        uint256 royaltyBasis_,
        string memory placeholderImage_) payable external;
    
    /* Change the fee charged for creating contracts */
    function changeFee(uint256 newFee) external;
    function addExistingCollection(address collectionAddress, address owner, string memory appId) external;
    function transferBalance(address payable to, uint256 ammount) external;
    
    function version() external pure returns (string memory);

    function setERC721Implementation(address payable implementationContract) external;
    function setERC721AImplementation(address payable implementationContract) external;
    function isCollectionValid(address collectionAddress) external view returns (bool);
}

File 3 of 11 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 4 of 11 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 5 of 11 : ContextUpgradeable.sol
// 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;
}

File 6 of 11 : AddressUpgradeable.sol
// 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);
            }
        }
    }
}

File 7 of 11 : IERC20MetadataUpgradeable.sol
// 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);
}

File 8 of 11 : IERC20Upgradeable.sol
// 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 9 of 11 : ERC20Upgradeable.sol
// 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";

/**
 * @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 ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    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 {}
    uint256[45] private __gap;
}

File 10 of 11 : 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));
    }
}

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accountClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"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":"signature","type":"bytes"},{"internalType":"address","name":"to","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentLockWindow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getLockedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"hasClaimedAirdrop","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"stakingContract_","type":"address"},{"internalType":"address","name":"fundsContract_","type":"address"},{"internalType":"address","name":"autoMinterFactoryContract_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isAirdropTradable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"moveStrategicLiquidityReserves","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextLockWindow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockAirdropTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"autoMinterFactoryContract_","type":"address"}],"name":"updateFactoryContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proStakingContract_","type":"address"}],"name":"updateProPassStakingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"updateSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stakingContract_","type":"address"}],"name":"updateStakingContract","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50612159806100206000396000f3fe6080604052600436106101cd5760003560e01c80638da5cb5b116100f7578063bda36d8211610095578063dd62ed3e11610064578063dd62ed3e146104f4578063ed80aa2b1461053a578063f2fde38b1461056a578063f4cdda361461058a57600080fd5b8063bda36d8214610474578063c0c53b8b14610494578063c2fb538e146104b4578063d404a349146104d457600080fd5b8063a457c2d7116100d1578063a457c2d7146103fa578063a7ecd37e1461041a578063a9059cbb1461043a578063afd394c41461045a57600080fd5b80638da5cb5b1461039d57806395d89b41146103c55780639c6b9f8a146103da57600080fd5b80633572e4211161016f5780636b2d95d41161013e5780636b2d95d41461031d5780636b6146711461033d57806370a0823114610352578063715018a61461038857600080fd5b80633572e421146102c057806339509351146102d55780633c68eb81146102f55780636a6278421461030a57600080fd5b806323b872dd116101ab57806323b872dd1461024c5780632ba945491461026c578063313ce567146102825780633347e4d61461029e57600080fd5b806306fdde03146101d2578063095ea7b3146101fd57806318160ddd1461022d575b600080fd5b3480156101de57600080fd5b506101e76105c3565b6040516101f49190611d92565b60405180910390f35b34801561020957600080fd5b5061021d610218366004611e03565b610655565b60405190151581526020016101f4565b34801561023957600080fd5b506035545b6040519081526020016101f4565b34801561025857600080fd5b5061021d610267366004611e2d565b61066b565b34801561027857600080fd5b5061023e609f5481565b34801561028e57600080fd5b50604051601281526020016101f4565b3480156102aa57600080fd5b506102be6102b9366004611e69565b61071a565b005b3480156102cc57600080fd5b506102be610766565b3480156102e157600080fd5b5061021d6102f0366004611e03565b6107aa565b34801561030157600080fd5b506102be6107e6565b6102be610318366004611e69565b61085f565b34801561032957600080fd5b5061023e610338366004611e69565b610a5d565b34801561034957600080fd5b506102be610a6e565b34801561035e57600080fd5b5061023e61036d366004611e69565b6001600160a01b031660009081526033602052604090205490565b34801561039457600080fd5b506102be610aa7565b3480156103a957600080fd5b506065546040516001600160a01b0390911681526020016101f4565b3480156103d157600080fd5b506101e7610add565b3480156103e657600080fd5b506102be6103f5366004611e84565b610aec565b34801561040657600080fd5b5061021d610415366004611e03565b610cde565b34801561042657600080fd5b506102be610435366004611e69565b610d77565b34801561044657600080fd5b5061021d610455366004611e03565b610dc3565b34801561046657600080fd5b5060a05461021d9060ff1681565b34801561048057600080fd5b506102be61048f366004611e69565b610dd0565b3480156104a057600080fd5b506102be6104af366004611f11565b610e1c565b3480156104c057600080fd5b506102be6104cf366004611e69565b610f8c565b3480156104e057600080fd5b506102be6104ef366004611f54565b610fd8565b34801561050057600080fd5b5061023e61050f366004611f80565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561054657600080fd5b5061021d610555366004611e69565b609d6020526000908152604090205460ff1681565b34801561057657600080fd5b506102be610585366004611e69565b61104f565b34801561059657600080fd5b5061021d6105a5366004611e69565b6001600160a01b03166000908152609d602052604090205460ff1690565b6060603680546105d290611faa565b80601f01602080910402602001604051908101604052809291908181526020018280546105fe90611faa565b801561064b5780601f106106205761010080835404028352916020019161064b565b820191906000526020600020905b81548152906001019060200180831161062e57829003601f168201915b5050505050905090565b60006106623384846110ea565b50600192915050565b600061067884848461120e565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156107025760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61070f85338584036110ea565b506001949350505050565b6065546001600160a01b031633146107445760405162461bcd60e51b81526004016106f990611fe5565b609b80546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146107905760405162461bcd60e51b81526004016106f990611fe5565b6001609f60008282546107a39190612030565b9091555050565b3360008181526034602090815260408083206001600160a01b038716845290915281205490916106629185906107e1908690612030565b6110ea565b6065546001600160a01b031633146108105760405162461bcd60e51b81526004016106f990611fe5565b476108236065546001600160a01b031690565b6001600160a01b03166108fc829081150290604051600060405180830381858888f1935050505015801561085b573d6000803e3d6000fd5b5050565b609e54604051633d44b9bd60e01b81523360048201526001600160a01b0390911690633d44b9bd90602401602060405180830381865afa1580156108a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cb9190612048565b61093d5760405162461bcd60e51b815260206004820152603f60248201527f546f6b656e732063616e206f6e6c79206265206d696e7465642076696120636f60448201527f6e74726163747320637265617465642077697468204175746f4d696e7465720060648201526084016106f9565b6000349050600061094f6097546113e7565b90506000610969836097546109649190612030565b6113e7565b90506000610977838361206a565b905060006103d461098a8361015e612081565b61099491906120a0565b905060006103d46109a6846099612081565b6109b091906120a0565b905060006103d46109c2856011612081565b6109cc91906120a0565b905060006103d46109df866101cc612081565b6109e991906120a0565b90506109f5898561144e565b6109ff898561162f565b609c54610a15906001600160a01b03168261162f565b609b54610a2b906001600160a01b03168461162f565b60a454610a41906001600160a01b03168361162f565b87609754610a4f9190612030565b609755505050505050505050565b6000610a688261171a565b92915050565b6065546001600160a01b03163314610a985760405162461bcd60e51b81526004016106f990611fe5565b60a0805460ff19166001179055565b6065546001600160a01b03163314610ad15760405162461bcd60e51b81526004016106f990611fe5565b610adb60006117db565b565b6060603780546105d290611faa565b83609954610afa9190612030565b609a541015610b0857600080fd5b6001600160a01b0381166000908152609d602052604090205460ff1615610b2e57600080fd5b6000610c00610bc48684604051602001610b6492919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061182d92505050565b9050610c146065546001600160a01b031690565b6001600160a01b0316816001600160a01b03161480610c4057506098546001600160a01b038281169116145b610c9a5760405162461bcd60e51b815260206004820152602560248201527f546865207369676e61747572652070726f766964656420646f6573206e6f74206044820152640dac2e8c6d60db1b60648201526084016106f9565b6001600160a01b0382166000908152609d60209081526040808320805460ff1916600117905560a19091529020600501859055610cd7828661162f565b5050505050565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610d605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106f9565b610d6d33858584036110ea565b5060019392505050565b6065546001600160a01b03163314610da15760405162461bcd60e51b81526004016106f990611fe5565b609880546001600160a01b0319166001600160a01b0392909216919091179055565b600061066233848461120e565b6065546001600160a01b03163314610dfa5760405162461bcd60e51b81526004016106f990611fe5565b60a480546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16610e375760005460ff1615610e3b565b303b155b610e9e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f9565b600054610100900460ff16158015610ec0576000805461ffff19166101011790555b610f076040518060400160405280600a81526020016920baba37a6b4b73a32b960b11b8152506040518060400160405280600381526020016220a6a960e91b815250611851565b610f10336117db565b60988054336001600160a01b031991821617909155609b805482166001600160a01b0387811691909117909155609c805483168683161790556a108b2a2c28029094000000609a556a01a784379d99db4200000060a255609e80549092169084161790558015610f86576000805461ff00191690555b50505050565b6065546001600160a01b03163314610fb65760405162461bcd60e51b81526004016106f990611fe5565b609e80546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146110025760405162461bcd60e51b81526004016106f990611fe5565b6a108b2a2c28029094000000609a5560a35461101f908390612030565b60a254101561102d57600080fd5b8160a3600082825461103f9190612030565b9091555061085b9050818361162f565b6065546001600160a01b031633146110795760405162461bcd60e51b81526004016106f990611fe5565b6001600160a01b0381166110de5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f9565b6110e7816117db565b50565b6001600160a01b03831661114c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106f9565b6001600160a01b0382166111ad5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106f9565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166112725760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106f9565b6001600160a01b0382166112d45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106f9565b6112df83838361188a565b6001600160a01b038316600090815260336020526040902054818110156113575760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106f9565b6001600160a01b0380851660009081526033602052604080822085850390559185168152908120805484929061138e908490612030565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113da91815260200190565b60405180910390a3610f86565b6000806113fe8369010f0cf064dd59200000612030565b611414846b032aa31273a87dac54000000612081565b6114289069021e19e0c9bab2400000612030565b61143291906120a0565b611447906a108b2a2c28029094000000612030565b9392505050565b6001600160a01b038216600090815260a160205260409020609f548154148015611476575081155b1561148057505050565b609f54815414156114f0576001600160a01b038316600090815260a16020526040812060010180548492906114b6908490612030565b90915550506001600160a01b038316600090815260a16020526040812060020180548492906114e6908490612030565b9091555050505050565b609f548154611500906001612030565b141561157d57609f546001600160a01b038416600090815260a160205260409020908155600380830154600480840191909155600280850154928401929092559101839055810154611552908361206a565b6001600160a01b038416600090815260a16020526040812060010180549091906114e6908490612030565b609f54815461158d906002612030565b14156115e257609f546001600160a01b038416600090815260a16020526040902090815560028083015460048084019190915591018390556003820154908201546115d8908461206a565b611552919061206a565b609f546001600160a01b038416600090815260a160205260408120918255600482018190556003820181905560028201849055600190910180548492906114e6908490612030565b505050565b6001600160a01b0382166116855760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106f9565b6116916000838361188a565b80603560008282546116a39190612030565b90915550506001600160a01b038216600090815260336020526040812080548392906116d0908490612030565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038116600090815260a16020526040812060a05482919060ff1661175157600581015461174e9083612030565b91505b8054609f546000916117629161206a565b90508061179d578160040154826003015483600201546117829190612030565b61178c9190612030565b6117969084612030565b92506117d2565b80600114156117ba578160030154826002015461178c9190612030565b80600214156117d25760028201546117969084612030565b50909392505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080600061183c858561193d565b91509150611849816119ad565b509392505050565b600054610100900460ff166118785760405162461bcd60e51b81526004016106f9906120c2565b611880611b68565b61085b8282611b8f565b6001600160a01b03831615806118cb5750806118a58461171a565b6001600160a01b0385166000908152603360205260409020546118c8919061206a565b10155b61162a5760405162461bcd60e51b815260206004820152603e60248201527f4175746f4d696e74657245524332303a205472616e7366657220616d6f756e7460448201527f206578636565647320756e6c6f636b656420746f6b656e20616d6f756e74000060648201526084016106f9565b6000808251604114156119745760208301516040840151606085015160001a61196887828585611bdd565b945094505050506119a6565b82516040141561199e5760208301516040840151611993868383611cca565b9350935050506119a6565b506000905060025b9250929050565b60008160048111156119c1576119c161210d565b14156119ca5750565b60018160048111156119de576119de61210d565b1415611a2c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106f9565b6002816004811115611a4057611a4061210d565b1415611a8e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106f9565b6003816004811115611aa257611aa261210d565b1415611afb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106f9565b6004816004811115611b0f57611b0f61210d565b14156110e75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106f9565b600054610100900460ff16610adb5760405162461bcd60e51b81526004016106f9906120c2565b600054610100900460ff16611bb65760405162461bcd60e51b81526004016106f9906120c2565b8151611bc9906036906020850190611cf9565b50805161162a906037906020840190611cf9565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611c145750600090506003611cc1565b8460ff16601b14158015611c2c57508460ff16601c14155b15611c3d5750600090506004611cc1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611c91573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611cba57600060019250925050611cc1565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01611ceb87828885611bdd565b935093505050935093915050565b828054611d0590611faa565b90600052602060002090601f016020900481019282611d275760008555611d6d565b82601f10611d4057805160ff1916838001178555611d6d565b82800160010185558215611d6d579182015b82811115611d6d578251825591602001919060010190611d52565b50611d79929150611d7d565b5090565b5b80821115611d795760008155600101611d7e565b600060208083528351808285015260005b81811015611dbf57858101830151858201604001528201611da3565b81811115611dd1576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114611dfe57600080fd5b919050565b60008060408385031215611e1657600080fd5b611e1f83611de7565b946020939093013593505050565b600080600060608486031215611e4257600080fd5b611e4b84611de7565b9250611e5960208501611de7565b9150604084013590509250925092565b600060208284031215611e7b57600080fd5b61144782611de7565b60008060008060608587031215611e9a57600080fd5b84359350602085013567ffffffffffffffff80821115611eb957600080fd5b818701915087601f830112611ecd57600080fd5b813581811115611edc57600080fd5b886020828501011115611eee57600080fd5b602083019550809450505050611f0660408601611de7565b905092959194509250565b600080600060608486031215611f2657600080fd5b611f2f84611de7565b9250611f3d60208501611de7565b9150611f4b60408501611de7565b90509250925092565b60008060408385031215611f6757600080fd5b82359150611f7760208401611de7565b90509250929050565b60008060408385031215611f9357600080fd5b611f9c83611de7565b9150611f7760208401611de7565b600181811c90821680611fbe57607f821691505b60208210811415611fdf57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082198211156120435761204361201a565b500190565b60006020828403121561205a57600080fd5b8151801515811461144757600080fd5b60008282101561207c5761207c61201a565b500390565b600081600019048311821515161561209b5761209b61201a565b500290565b6000826120bd57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207e51c02879a7115236957f61cfc16dc40bf0927419129747fa6f3bc6112d897f64736f6c634300080a0033

Deployed Bytecode

0x6080604052600436106101cd5760003560e01c80638da5cb5b116100f7578063bda36d8211610095578063dd62ed3e11610064578063dd62ed3e146104f4578063ed80aa2b1461053a578063f2fde38b1461056a578063f4cdda361461058a57600080fd5b8063bda36d8214610474578063c0c53b8b14610494578063c2fb538e146104b4578063d404a349146104d457600080fd5b8063a457c2d7116100d1578063a457c2d7146103fa578063a7ecd37e1461041a578063a9059cbb1461043a578063afd394c41461045a57600080fd5b80638da5cb5b1461039d57806395d89b41146103c55780639c6b9f8a146103da57600080fd5b80633572e4211161016f5780636b2d95d41161013e5780636b2d95d41461031d5780636b6146711461033d57806370a0823114610352578063715018a61461038857600080fd5b80633572e421146102c057806339509351146102d55780633c68eb81146102f55780636a6278421461030a57600080fd5b806323b872dd116101ab57806323b872dd1461024c5780632ba945491461026c578063313ce567146102825780633347e4d61461029e57600080fd5b806306fdde03146101d2578063095ea7b3146101fd57806318160ddd1461022d575b600080fd5b3480156101de57600080fd5b506101e76105c3565b6040516101f49190611d92565b60405180910390f35b34801561020957600080fd5b5061021d610218366004611e03565b610655565b60405190151581526020016101f4565b34801561023957600080fd5b506035545b6040519081526020016101f4565b34801561025857600080fd5b5061021d610267366004611e2d565b61066b565b34801561027857600080fd5b5061023e609f5481565b34801561028e57600080fd5b50604051601281526020016101f4565b3480156102aa57600080fd5b506102be6102b9366004611e69565b61071a565b005b3480156102cc57600080fd5b506102be610766565b3480156102e157600080fd5b5061021d6102f0366004611e03565b6107aa565b34801561030157600080fd5b506102be6107e6565b6102be610318366004611e69565b61085f565b34801561032957600080fd5b5061023e610338366004611e69565b610a5d565b34801561034957600080fd5b506102be610a6e565b34801561035e57600080fd5b5061023e61036d366004611e69565b6001600160a01b031660009081526033602052604090205490565b34801561039457600080fd5b506102be610aa7565b3480156103a957600080fd5b506065546040516001600160a01b0390911681526020016101f4565b3480156103d157600080fd5b506101e7610add565b3480156103e657600080fd5b506102be6103f5366004611e84565b610aec565b34801561040657600080fd5b5061021d610415366004611e03565b610cde565b34801561042657600080fd5b506102be610435366004611e69565b610d77565b34801561044657600080fd5b5061021d610455366004611e03565b610dc3565b34801561046657600080fd5b5060a05461021d9060ff1681565b34801561048057600080fd5b506102be61048f366004611e69565b610dd0565b3480156104a057600080fd5b506102be6104af366004611f11565b610e1c565b3480156104c057600080fd5b506102be6104cf366004611e69565b610f8c565b3480156104e057600080fd5b506102be6104ef366004611f54565b610fd8565b34801561050057600080fd5b5061023e61050f366004611f80565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b34801561054657600080fd5b5061021d610555366004611e69565b609d6020526000908152604090205460ff1681565b34801561057657600080fd5b506102be610585366004611e69565b61104f565b34801561059657600080fd5b5061021d6105a5366004611e69565b6001600160a01b03166000908152609d602052604090205460ff1690565b6060603680546105d290611faa565b80601f01602080910402602001604051908101604052809291908181526020018280546105fe90611faa565b801561064b5780601f106106205761010080835404028352916020019161064b565b820191906000526020600020905b81548152906001019060200180831161062e57829003601f168201915b5050505050905090565b60006106623384846110ea565b50600192915050565b600061067884848461120e565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156107025760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61070f85338584036110ea565b506001949350505050565b6065546001600160a01b031633146107445760405162461bcd60e51b81526004016106f990611fe5565b609b80546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146107905760405162461bcd60e51b81526004016106f990611fe5565b6001609f60008282546107a39190612030565b9091555050565b3360008181526034602090815260408083206001600160a01b038716845290915281205490916106629185906107e1908690612030565b6110ea565b6065546001600160a01b031633146108105760405162461bcd60e51b81526004016106f990611fe5565b476108236065546001600160a01b031690565b6001600160a01b03166108fc829081150290604051600060405180830381858888f1935050505015801561085b573d6000803e3d6000fd5b5050565b609e54604051633d44b9bd60e01b81523360048201526001600160a01b0390911690633d44b9bd90602401602060405180830381865afa1580156108a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cb9190612048565b61093d5760405162461bcd60e51b815260206004820152603f60248201527f546f6b656e732063616e206f6e6c79206265206d696e7465642076696120636f60448201527f6e74726163747320637265617465642077697468204175746f4d696e7465720060648201526084016106f9565b6000349050600061094f6097546113e7565b90506000610969836097546109649190612030565b6113e7565b90506000610977838361206a565b905060006103d461098a8361015e612081565b61099491906120a0565b905060006103d46109a6846099612081565b6109b091906120a0565b905060006103d46109c2856011612081565b6109cc91906120a0565b905060006103d46109df866101cc612081565b6109e991906120a0565b90506109f5898561144e565b6109ff898561162f565b609c54610a15906001600160a01b03168261162f565b609b54610a2b906001600160a01b03168461162f565b60a454610a41906001600160a01b03168361162f565b87609754610a4f9190612030565b609755505050505050505050565b6000610a688261171a565b92915050565b6065546001600160a01b03163314610a985760405162461bcd60e51b81526004016106f990611fe5565b60a0805460ff19166001179055565b6065546001600160a01b03163314610ad15760405162461bcd60e51b81526004016106f990611fe5565b610adb60006117db565b565b6060603780546105d290611faa565b83609954610afa9190612030565b609a541015610b0857600080fd5b6001600160a01b0381166000908152609d602052604090205460ff1615610b2e57600080fd5b6000610c00610bc48684604051602001610b6492919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061182d92505050565b9050610c146065546001600160a01b031690565b6001600160a01b0316816001600160a01b03161480610c4057506098546001600160a01b038281169116145b610c9a5760405162461bcd60e51b815260206004820152602560248201527f546865207369676e61747572652070726f766964656420646f6573206e6f74206044820152640dac2e8c6d60db1b60648201526084016106f9565b6001600160a01b0382166000908152609d60209081526040808320805460ff1916600117905560a19091529020600501859055610cd7828661162f565b5050505050565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610d605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106f9565b610d6d33858584036110ea565b5060019392505050565b6065546001600160a01b03163314610da15760405162461bcd60e51b81526004016106f990611fe5565b609880546001600160a01b0319166001600160a01b0392909216919091179055565b600061066233848461120e565b6065546001600160a01b03163314610dfa5760405162461bcd60e51b81526004016106f990611fe5565b60a480546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16610e375760005460ff1615610e3b565b303b155b610e9e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f9565b600054610100900460ff16158015610ec0576000805461ffff19166101011790555b610f076040518060400160405280600a81526020016920baba37a6b4b73a32b960b11b8152506040518060400160405280600381526020016220a6a960e91b815250611851565b610f10336117db565b60988054336001600160a01b031991821617909155609b805482166001600160a01b0387811691909117909155609c805483168683161790556a108b2a2c28029094000000609a556a01a784379d99db4200000060a255609e80549092169084161790558015610f86576000805461ff00191690555b50505050565b6065546001600160a01b03163314610fb65760405162461bcd60e51b81526004016106f990611fe5565b609e80546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146110025760405162461bcd60e51b81526004016106f990611fe5565b6a108b2a2c28029094000000609a5560a35461101f908390612030565b60a254101561102d57600080fd5b8160a3600082825461103f9190612030565b9091555061085b9050818361162f565b6065546001600160a01b031633146110795760405162461bcd60e51b81526004016106f990611fe5565b6001600160a01b0381166110de5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f9565b6110e7816117db565b50565b6001600160a01b03831661114c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106f9565b6001600160a01b0382166111ad5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106f9565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166112725760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106f9565b6001600160a01b0382166112d45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106f9565b6112df83838361188a565b6001600160a01b038316600090815260336020526040902054818110156113575760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106f9565b6001600160a01b0380851660009081526033602052604080822085850390559185168152908120805484929061138e908490612030565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113da91815260200190565b60405180910390a3610f86565b6000806113fe8369010f0cf064dd59200000612030565b611414846b032aa31273a87dac54000000612081565b6114289069021e19e0c9bab2400000612030565b61143291906120a0565b611447906a108b2a2c28029094000000612030565b9392505050565b6001600160a01b038216600090815260a160205260409020609f548154148015611476575081155b1561148057505050565b609f54815414156114f0576001600160a01b038316600090815260a16020526040812060010180548492906114b6908490612030565b90915550506001600160a01b038316600090815260a16020526040812060020180548492906114e6908490612030565b9091555050505050565b609f548154611500906001612030565b141561157d57609f546001600160a01b038416600090815260a160205260409020908155600380830154600480840191909155600280850154928401929092559101839055810154611552908361206a565b6001600160a01b038416600090815260a16020526040812060010180549091906114e6908490612030565b609f54815461158d906002612030565b14156115e257609f546001600160a01b038416600090815260a16020526040902090815560028083015460048084019190915591018390556003820154908201546115d8908461206a565b611552919061206a565b609f546001600160a01b038416600090815260a160205260408120918255600482018190556003820181905560028201849055600190910180548492906114e6908490612030565b505050565b6001600160a01b0382166116855760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106f9565b6116916000838361188a565b80603560008282546116a39190612030565b90915550506001600160a01b038216600090815260336020526040812080548392906116d0908490612030565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038116600090815260a16020526040812060a05482919060ff1661175157600581015461174e9083612030565b91505b8054609f546000916117629161206a565b90508061179d578160040154826003015483600201546117829190612030565b61178c9190612030565b6117969084612030565b92506117d2565b80600114156117ba578160030154826002015461178c9190612030565b80600214156117d25760028201546117969084612030565b50909392505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080600061183c858561193d565b91509150611849816119ad565b509392505050565b600054610100900460ff166118785760405162461bcd60e51b81526004016106f9906120c2565b611880611b68565b61085b8282611b8f565b6001600160a01b03831615806118cb5750806118a58461171a565b6001600160a01b0385166000908152603360205260409020546118c8919061206a565b10155b61162a5760405162461bcd60e51b815260206004820152603e60248201527f4175746f4d696e74657245524332303a205472616e7366657220616d6f756e7460448201527f206578636565647320756e6c6f636b656420746f6b656e20616d6f756e74000060648201526084016106f9565b6000808251604114156119745760208301516040840151606085015160001a61196887828585611bdd565b945094505050506119a6565b82516040141561199e5760208301516040840151611993868383611cca565b9350935050506119a6565b506000905060025b9250929050565b60008160048111156119c1576119c161210d565b14156119ca5750565b60018160048111156119de576119de61210d565b1415611a2c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106f9565b6002816004811115611a4057611a4061210d565b1415611a8e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106f9565b6003816004811115611aa257611aa261210d565b1415611afb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106f9565b6004816004811115611b0f57611b0f61210d565b14156110e75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106f9565b600054610100900460ff16610adb5760405162461bcd60e51b81526004016106f9906120c2565b600054610100900460ff16611bb65760405162461bcd60e51b81526004016106f9906120c2565b8151611bc9906036906020850190611cf9565b50805161162a906037906020840190611cf9565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611c145750600090506003611cc1565b8460ff16601b14158015611c2c57508460ff16601c14155b15611c3d5750600090506004611cc1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611c91573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611cba57600060019250925050611cc1565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01611ceb87828885611bdd565b935093505050935093915050565b828054611d0590611faa565b90600052602060002090601f016020900481019282611d275760008555611d6d565b82601f10611d4057805160ff1916838001178555611d6d565b82800160010185558215611d6d579182015b82811115611d6d578251825591602001919060010190611d52565b50611d79929150611d7d565b5090565b5b80821115611d795760008155600101611d7e565b600060208083528351808285015260005b81811015611dbf57858101830151858201604001528201611da3565b81811115611dd1576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114611dfe57600080fd5b919050565b60008060408385031215611e1657600080fd5b611e1f83611de7565b946020939093013593505050565b600080600060608486031215611e4257600080fd5b611e4b84611de7565b9250611e5960208501611de7565b9150604084013590509250925092565b600060208284031215611e7b57600080fd5b61144782611de7565b60008060008060608587031215611e9a57600080fd5b84359350602085013567ffffffffffffffff80821115611eb957600080fd5b818701915087601f830112611ecd57600080fd5b813581811115611edc57600080fd5b886020828501011115611eee57600080fd5b602083019550809450505050611f0660408601611de7565b905092959194509250565b600080600060608486031215611f2657600080fd5b611f2f84611de7565b9250611f3d60208501611de7565b9150611f4b60408501611de7565b90509250925092565b60008060408385031215611f6757600080fd5b82359150611f7760208401611de7565b90509250929050565b60008060408385031215611f9357600080fd5b611f9c83611de7565b9150611f7760208401611de7565b600181811c90821680611fbe57607f821691505b60208210811415611fdf57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082198211156120435761204361201a565b500190565b60006020828403121561205a57600080fd5b8151801515811461144757600080fd5b60008282101561207c5761207c61201a565b500390565b600081600019048311821515161561209b5761209b61201a565b500290565b6000826120bd57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207e51c02879a7115236957f61cfc16dc40bf0927419129747fa6f3bc6112d897f64736f6c634300080a0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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.