ETH Price: $1,834.78 (-1.50%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

Transaction Hash
Method
Block
From
To
Public Sale Mint143078872022-03-02 13:27:181454 days ago1646227638IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0007755429.54803644
Public Sale Mint143072732022-03-02 11:21:101454 days ago1646220070IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0008874833.81278975
Public Sale Mint143072732022-03-02 11:21:101454 days ago1646220070IN
0x2AacffB2...021e6E1Eb
2 ETH0.0008874833.81278975
Presale Mint143025572022-03-01 17:42:541455 days ago1646156574IN
0x2AacffB2...021e6E1Eb
0.3 ETH0.0017114951.98797558
Public Sale Mint142946942022-02-28 12:39:141456 days ago1646051954IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0007764429.58210304
Public Sale Mint142935662022-02-28 8:33:561456 days ago1646037236IN
0x2AacffB2...021e6E1Eb
0.47 ETH0.0009805937.36035484
Public Sale Mint142894162022-02-27 16:49:491457 days ago1645980589IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0012546247.80069588
Public Sale Mint142891892022-02-27 16:00:161457 days ago1645977616IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0006537224.90684237
Public Sale Mint142891882022-02-27 16:00:111457 days ago1645977611IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0006824326.00053176
Public Sale Mint142891882022-02-27 16:00:111457 days ago1645977611IN
0x2AacffB2...021e6E1Eb
2 ETH0.0006824326.00053176
Public Sale Mint142891882022-02-27 16:00:111457 days ago1645977611IN
0x2AacffB2...021e6E1Eb
0.8 ETH0.0006824326.00053176
Public Sale Mint142891882022-02-27 16:00:111457 days ago1645977611IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0006824326.00053176
Public Sale Mint142891882022-02-27 16:00:111457 days ago1645977611IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0006824326.00053176
Public Sale Mint142891872022-02-27 16:00:091457 days ago1645977609IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.000721927.50430353
Public Sale Mint142891872022-02-27 16:00:091457 days ago1645977609IN
0x2AacffB2...021e6E1Eb
0.8 ETH0.000721927.50430353
Public Sale Mint142891872022-02-27 16:00:091457 days ago1645977609IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.000721927.50430353
Public Sale Mint142891862022-02-27 15:59:481457 days ago1645977588IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0022047825.70756218
Public Sale Mint142891862022-02-27 15:59:481457 days ago1645977588IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0026443825.70756218
Public Sale Mint142891862022-02-27 15:59:481457 days ago1645977588IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0026443825.70756218
Public Sale Mint142891862022-02-27 15:59:481457 days ago1645977588IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0026443825.70756218
Public Sale Mint142891862022-02-27 15:59:481457 days ago1645977588IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0022047825.70756218
Public Sale Mint142891862022-02-27 15:59:481457 days ago1645977588IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0022047825.70756218
Public Sale Mint142891862022-02-27 15:59:481457 days ago1645977588IN
0x2AacffB2...021e6E1Eb
0.8 ETH0.0028666725.70756218
Public Sale Mint142891862022-02-27 15:59:481457 days ago1645977588IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0026443825.70756218
Public Sale Mint142891862022-02-27 15:59:481457 days ago1645977588IN
0x2AacffB2...021e6E1Eb
0.4 ETH0.0026443825.70756218
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.8 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891862022-02-27 15:59:481457 days ago1645977588
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
1.6 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.8 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.4 ETH
-142891852022-02-27 15:59:441457 days ago1645977584
0x2AacffB2...021e6E1Eb
0.4 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
PECMintingFactory

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./PrimeEternalChampion.sol";

/**
 * @title The minting factory for Prime Eternal Champion NFTs
 * @notice This contract manages the minting of Prime Eternals to a buyer's address in two phases:
 * - A presale at a fixed price limited to a pre-determined list of addresses
 * - A public sale in a Dutch auction where the price declines over time from a fixed start price to a fixed end price.
 * @dev This contract should be given the MINTER_ROLE in the PrimeEternalChampion contract.
 * limits on the total number of Prime Eternals resides in the ERC721.
 */
contract PECMintingFactory is Pausable, AccessControl {
    event PrimeEternalsMinted(
        address to,
        uint256 number,
        uint256 extendedPrice,
        uint256 supply
    );
    event PresaleParametersSet(
        uint256 start,
        uint256 duration,
        bytes32 presaleMerkleRoot
    );
    event PublicSaleParametersSet(uint256 start, uint256 duration);

    error InsufficientFunds(
        uint256 units,
        uint256 unitPrice,
        uint256 valueOffered
    );

    // The PrimeEternalChampion ERC721 contract
    address public immutable nftAddress;

    // The account to receive the sales revenue
    address payable public immutable revenueReceiver;

    struct TimeSpan {
        uint256 start; // time of sale start in seconds since the epoch
        uint256 duration; // duration of sale in seconds
    }

    // Pre-sale parameters
    TimeSpan public presaleSpan;
    bytes32 public presaleRoot;

    uint256 public constant MAX_PRESALES_FOR_ADDRESS = 1; // maximum mintable in presale by an address
    uint256 public constant PRESALE_PRICE = 0.3 ether;

    mapping(address => uint256) public presalesForAddress; // number minted during presale to an address

    // Public sale parameters
    TimeSpan public publicSaleSpan;

    uint256 public constant MAX_PUBLIC_SALES_PER_TRANSACTION = 5; // maximum mintable in a single transaction
    uint256 public constant PUBLIC_SALE_START_PRICE = 1.0 ether;
    uint256 public constant PUBLIC_SALE_END_PRICE = 0.4 ether;
    uint256 public constant PUBLIC_SALE_PRICE_DECREASE_PER_STEP = 0.01 ether; // amount to decrease the price per step
    uint256 public constant PUBLIC_SALE_TIME_INTERVALS =
        (PUBLIC_SALE_START_PRICE - PUBLIC_SALE_END_PRICE) /
            PUBLIC_SALE_PRICE_DECREASE_PER_STEP;

    // Roles
    bytes32 public constant DEPLOYER_ROLE = keccak256("DEPLOYER_ROLE");
    bytes32 public constant SALE_ADMIN_ROLE = keccak256("SALE_ADMIN_ROLE");

    /**
     * @param _revenueReceiver address authorized to receive minting proceeds.
     *      This MUST NOT be set to a contract address that could call this contract's minting functions
     *      as this would lead re-entrancy in the _doMint() function.
     * @param _nftAddress address of the ERC721 contract
     */
    constructor(address payable _revenueReceiver, address _nftAddress) {
        require(_nftAddress != address(0), "_nftAddress is zero address");
        require(
            _revenueReceiver != address(0),
            "_revenueReceiver is zero address"
        );
        nftAddress = _nftAddress;
        revenueReceiver = _revenueReceiver;
        _setupRole(DEPLOYER_ROLE, msg.sender);
        _setupRole(SALE_ADMIN_ROLE, msg.sender);

        /**
         * @dev set deployer role as administrator of the sale admin role.
         * i.e. a member of DEPLOYER_ROLE can grant/revoke the SALE_ADMIN_ROLE to addresses
         */
        _setRoleAdmin(SALE_ADMIN_ROLE, DEPLOYER_ROLE);

        assert(PUBLIC_SALE_START_PRICE >= PUBLIC_SALE_END_PRICE);
    }

    /////////////////////////////////////////////////////////////////////////////
    // Sale Administration
    /////////////////////////////////////////////////////////////////////////////

    /**
     * @notice Disables minting for any sales (scheduled or in progress)
     * @dev Does not extend any sale duration to compensate for the time paused
     */
    function pause() external onlyRole(SALE_ADMIN_ROLE) {
        _pause();
    }

    /**
     * @notice Disables minting for any sales (scheduled or in progress)
     * @dev Does not extend any sale duration to compensate for the time paused
     */
    function unpause() external onlyRole(SALE_ADMIN_ROLE) {
        _unpause();
    }

    /**
     * @notice Set the parameters managing the presale.
     * @param _saleSpan the time span of the presale
     * @param _presaleMerkleRoot the root of the Merkle tree for the presale list
     */
    function setPresaleParameters(
        TimeSpan calldata _saleSpan,
        bytes32 _presaleMerkleRoot
    ) external onlyRole(SALE_ADMIN_ROLE) {
        presaleSpan = _saleSpan;
        presaleRoot = _presaleMerkleRoot;
        emit PresaleParametersSet(
            _saleSpan.start,
            _saleSpan.duration,
            _presaleMerkleRoot
        );
    }

    /**
     * @dev Set the parameters managing the public sale.
     */
    function setPublicSaleParameters(TimeSpan calldata saleSpan)
        external
        onlyRole(SALE_ADMIN_ROLE)
    {
        publicSaleSpan = saleSpan;
        emit PublicSaleParametersSet(saleSpan.start, saleSpan.duration);
    }

    /////////////////////////////////////////////////////////////////////////////
    // Presale
    /////////////////////////////////////////////////////////////////////////////

    function _presaleInitialized() internal view returns (bool) {
        return !(presaleSpan.start == 0 && presaleSpan.duration == 0);
    }

    function presaleActive() public view returns (bool) {
        if (!_presaleInitialized()) return false;
        uint256 _now = block.timestamp;
        return
            presaleSpan.start < _now &&
            _now < (presaleSpan.start + presaleSpan.duration);
    }

    modifier whenPresaleActive() {
        require(presaleActive(), "presale must be active");
        _;
    }

    function _leaf(address mintTo) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked(mintTo));
    }

    function _verify(bytes32 leaf, bytes32[] memory proof)
        internal
        view
        returns (bool)
    {
        return MerkleProof.verify(proof, presaleRoot, leaf);
    }

    function isInPresale(address _address, bytes32[] calldata _proof)
        external
        view
        returns (bool)
    {
        return _verify(_leaf(_address), _proof);
    }

    function presaleMint(uint256 numToMint, bytes32[] calldata proof)
        public
        payable
        whenPresaleActive
    {
        require(_verify(_leaf(msg.sender), proof), "invalid merkle proof");
        if (msg.value < PRESALE_PRICE * numToMint)
            revert InsufficientFunds(numToMint, PRESALE_PRICE, msg.value);

        presalesForAddress[msg.sender] += numToMint;
        require(
            presalesForAddress[msg.sender] <= MAX_PRESALES_FOR_ADDRESS,
            "exceeds limit on presale for this address"
        );

        _doMint(msg.sender, numToMint);
    }

    /////////////////////////////////////////////////////////////////////////////
    // Public Sale
    /////////////////////////////////////////////////////////////////////////////

    function _publicSaleInitialized() internal view returns (bool) {
        return !(publicSaleSpan.start == 0 && publicSaleSpan.duration == 0);
    }

    function publicSaleActive() public view returns (bool) {
        if (!_publicSaleInitialized()) return false;
        uint256 _now = block.timestamp;
        return
            publicSaleSpan.start < _now &&
            _now < (publicSaleSpan.start + publicSaleSpan.duration);
    }

    modifier whenPublicSaleInitialized() {
        require(_publicSaleInitialized(), "public sale not scheduled");
        _;
    }

    modifier whenPublicSaleActive() {
        require(publicSaleActive(), "public sale must be active");
        _;
    }

    function currentPublicSalePrice() public view returns (uint256) {
        return publicSalePriceAt(block.timestamp);
    }

    /**
     * Compute the public sale price at a given time.
     * @dev The staring price must be the same or higher than the ending price. I.e. the public sale is a Dutch Auction.
     * @dev The price declines in equal (except the last) discrete price decreases.
     * There are N price levels over the course of the sale, and the duration of the sale
     * is divided into equal time steps. The price for the first step is the start price, and the price for the last
     * step is the end price. So there are likewise N time intervals but the price decreases only N-1 times.
     *
     * @param _time the time in epoch seconds
     */
    function publicSalePriceAt(uint256 _time)
        public
        view
        whenPublicSaleInitialized
        returns (uint256)
    {
        // assuming: assert(PUBLIC_SALE_START_PRICE >= PUBLIC_SALE_END_PRICE);
        if (_time <= publicSaleSpan.start) {
            return PUBLIC_SALE_START_PRICE;
        }
        if (publicSaleSpan.start + publicSaleSpan.duration <= _time) {
            return PUBLIC_SALE_END_PRICE;
        }

        uint256 stepSecs = publicSaleSpan.duration / PUBLIC_SALE_TIME_INTERVALS;
        uint256 currentStep = (_time - publicSaleSpan.start) / stepSecs;
        uint256 price;
        if (currentStep == 0) {
            // first step
            price = PUBLIC_SALE_START_PRICE;
        } else if (currentStep >= PUBLIC_SALE_TIME_INTERVALS - 1) {
            // last step
            price = PUBLIC_SALE_END_PRICE;
        } else {
            price =
                PUBLIC_SALE_START_PRICE -
                currentStep *
                PUBLIC_SALE_PRICE_DECREASE_PER_STEP;
        }
        require(
            PUBLIC_SALE_END_PRICE <= price && price <= PUBLIC_SALE_START_PRICE
        );
        return price;
    }

    /**
     * The public sale minting function to be called by the buyer.
     * @dev The message sender becomes the owner of the minted NFT.
     */
    function publicSaleMint(uint256 numToMint)
        external
        payable
        whenPublicSaleActive
    {
        require(
            numToMint <= MAX_PUBLIC_SALES_PER_TRANSACTION,
            "exceeds maximum per transaction"
        );
        uint256 currentPrice = currentPublicSalePrice();
        if (msg.value < currentPrice * numToMint)
            revert InsufficientFunds(numToMint, currentPrice, msg.value);
        _doMint(msg.sender, numToMint);
    }

    /////////////////////////////////////////////////////////////////////////////
    // Internal functions
    /////////////////////////////////////////////////////////////////////////////

    function _doMint(address to, uint256 numToMint) private whenNotPaused {
        // The revenueReceiver is stipulated to not be a contract that calls this
        // contract's minting functions as that would lead to this function being called re-entrantly.
        Address.sendValue(revenueReceiver, msg.value);
        PrimeEternalChampion pec = PrimeEternalChampion(nftAddress);
        uint256 supply = pec.totalSupply();
        pec.safeMint(to, numToMint);
        emit PrimeEternalsMinted(to, numToMint, msg.value, supply);
    }

    function selfDestruct() external onlyRole(DEPLOYER_ROLE) {
        selfdestruct(revenueReceiver);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

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

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

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

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

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

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` 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 tokenId
    ) internal virtual {}
}

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

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 7 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

// 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 Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

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

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

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }
        return computedHash;
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";

contract PrimeEternalChampion is ERC721, Pausable, AccessControl {
    using Counters for Counters.Counter;

    uint256 public constant MAX_PRIME_ETERNALS = 10000;

    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    Counters.Counter private _tokenIdCounter;

    constructor() ERC721("PrimeEternalChampion", "PEC") {
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(PAUSER_ROLE, msg.sender);
    }

    function tokenURI(uint256 _tokenId)
        public
        pure
        override
        returns (string memory)
    {
        return
            string(
                abi.encodePacked(
                    "https://champions.io/champions/nfts/",
                    Strings.toString(_tokenId)
                )
            );
    }

    /**
        Returns the total tokens minted so far.
     */
    function totalSupply() public view returns (uint256) {
        return _tokenIdCounter.current();
    }

    function pause() external onlyRole(PAUSER_ROLE) {
        _pause();
    }

    function unpause() external onlyRole(PAUSER_ROLE) {
        _unpause();
    }

    function safeMint(address to, uint256 numberToMint)
        external
        whenNotPaused
        onlyRole(MINTER_ROLE)
    {
        require(
            totalSupply() + numberToMint <= MAX_PRIME_ETERNALS,
            "minting cannot exceed maximum supply"
        );
        for (uint256 i = 0; i < numberToMint; i++) {
            _tokenIdCounter.increment();
            uint256 tokenId = _tokenIdCounter.current();
            _safeMint(to, tokenId);
        }
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override(ERC721) whenNotPaused {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    // The following functions are overrides required by Solidity.

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, AccessControl)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address payable","name":"_revenueReceiver","type":"address"},{"internalType":"address","name":"_nftAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"units","type":"uint256"},{"internalType":"uint256","name":"unitPrice","type":"uint256"},{"internalType":"uint256","name":"valueOffered","type":"uint256"}],"name":"InsufficientFunds","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"}],"name":"PresaleParametersSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"number","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"extendedPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"supply","type":"uint256"}],"name":"PrimeEternalsMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"PublicSaleParametersSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPLOYER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PRESALES_FOR_ADDRESS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PUBLIC_SALES_PER_TRANSACTION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_SALE_END_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_SALE_PRICE_DECREASE_PER_STEP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_SALE_START_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_SALE_TIME_INTERVALS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPublicSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"isInPresale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numToMint","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleSpan","outputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presalesForAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numToMint","type":"uint256"}],"name":"publicSaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"publicSalePriceAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleSpan","outputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revenueReceiver","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"selfDestruct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"internalType":"struct PECMintingFactory.TimeSpan","name":"_saleSpan","type":"tuple"},{"internalType":"bytes32","name":"_presaleMerkleRoot","type":"bytes32"}],"name":"setPresaleParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"internalType":"struct PECMintingFactory.TimeSpan","name":"saleSpan","type":"tuple"}],"name":"setPublicSaleParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b5060405162001d8d38038062001d8d83398101604081905262000034916200026b565b6000805460ff191690556001600160a01b0381166200009a5760405162461bcd60e51b815260206004820152601b60248201527f5f6e667441646472657373206973207a65726f2061646472657373000000000060448201526064015b60405180910390fd5b6001600160a01b038216620000f25760405162461bcd60e51b815260206004820181905260248201527f5f726576656e75655265636569766572206973207a65726f2061646472657373604482015260640162000091565b6001600160a01b03808216608052821660a0526200012060008051602062001d6d833981519152336200016d565b6200013b60008051602062001d4d833981519152336200016d565b6200016560008051602062001d4d83398151915260008051602062001d6d8339815191526200017d565b5050620002aa565b620001798282620001ca565b5050565b6000828152600160208190526040808320909101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620001795760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6001600160a01b03811681146200026857600080fd5b50565b600080604083850312156200027f57600080fd5b82516200028c8162000252565b60208401519092506200029f8162000252565b809150509250929050565b60805160a051611a68620002e56000396000818161049501528181610acb015261117b01526000818161034b01526111a40152611a686000f3fe6080604052600436106102045760003560e01c806391f679cb11610118578063dc082869116100a0578063ecd002611161006f578063ecd00261146105aa578063f04b52a3146105de578063f84dbacb146105f9578063fce141af14610626578063fda035ce1461064657600080fd5b8063dc0828691461054b578063dd5b5a2e14610560578063dec2ffb914610582578063e3e1e8ef1461059757600080fd5b8063b1c74793116100e7578063b1c74793146104b7578063b2da21f0146104d3578063b3ab66b014610503578063bc8893b414610516578063d547741f1461052b57600080fd5b806391f679cb146104395780639cb8a26a14610459578063a217fddf1461046e578063ae52e04a1461048357600080fd5b806353135ca01161019b578063763976241161016a57806376397624146103b95780638456cb59146103ce57806385449697146103e35780638cde6f0d146103f957806391d148541461041957600080fd5b806353135ca0146103245780635bf8633a146103395780635c975abb1461038557806362dc6e211461039d57600080fd5b8063248a9ca3116101d7578063248a9ca31461029c5780632f2ff15d146102cd57806336568abe146102ef5780633f4ba83a1461030f57600080fd5b806301ffc9a714610209578063044331581461023e57806318c4b64b14610267578063207a553e14610287575b600080fd5b34801561021557600080fd5b5061022961022436600461166b565b610662565b60405190151581526020015b60405180910390f35b34801561024a57600080fd5b50610259662386f26fc1000081565b604051908152602001610235565b34801561027357600080fd5b50610259610282366004611695565b610699565b34801561029357600080fd5b5061025961084a565b3480156102a857600080fd5b506102596102b7366004611695565b6000908152600160208190526040909120015490565b3480156102d957600080fd5b506102ed6102e83660046116c5565b610879565b005b3480156102fb57600080fd5b506102ed61030a3660046116c5565b6108a5565b34801561031b57600080fd5b506102ed610923565b34801561033057600080fd5b50610229610947565b34801561034557600080fd5b5061036d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610235565b34801561039157600080fd5b5060005460ff16610229565b3480156103a957600080fd5b50610259670429d069189e000081565b3480156103c557600080fd5b50610259610982565b3480156103da57600080fd5b506102ed610992565b3480156103ef57600080fd5b5061025960045481565b34801561040557600080fd5b5061022961041436600461173d565b6109b3565b34801561042557600080fd5b506102296104343660046116c5565b610a02565b34801561044557600080fd5b506102ed6104543660046117a8565b610a2d565b34801561046557600080fd5b506102ed610a9e565b34801561047a57600080fd5b50610259600081565b34801561048f57600080fd5b5061036d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c357600080fd5b50610259670de0b6b3a764000081565b3480156104df57600080fd5b506002546003546104ee919082565b60408051928352602083019190915201610235565b6102ed610511366004611695565b610af5565b34801561052257600080fd5b50610229610bea565b34801561053757600080fd5b506102ed6105463660046116c5565b610c1c565b34801561055757600080fd5b50610259600581565b34801561056c57600080fd5b50610259600080516020611a1383398151915281565b34801561058e57600080fd5b50610259600181565b6102ed6105a53660046117d3565b610c43565b3480156105b657600080fd5b506102597ffc425f2263d0df187444b70e47283d622c70181c5baebb1306a01edba1ce184c81565b3480156105ea57600080fd5b506006546007546104ee919082565b34801561060557600080fd5b50610259610614366004611806565b60056020526000908152604090205481565b34801561063257600080fd5b506102ed610641366004611821565b610e01565b34801561065257600080fd5b5061025967058d15e17628000081565b60006001600160e01b03198216637965db0b60e01b148061069357506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006106a3610e67565b6106f45760405162461bcd60e51b815260206004820152601960248201527f7075626c69632073616c65206e6f74207363686564756c65640000000000000060448201526064015b60405180910390fd5b600654821161070c5750670de0b6b3a7640000919050565b600754600654839161071d91611853565b11610731575067058d15e176280000919050565b6000662386f26fc1000061075567058d15e176280000670de0b6b3a764000061186b565b61075f9190611882565b60075461076c9190611882565b905060008160066000015485610782919061186b565b61078c9190611882565b90506000816107a45750670de0b6b3a7640000610817565b6001662386f26fc100006107c867058d15e176280000670de0b6b3a764000061186b565b6107d29190611882565b6107dc919061186b565b82106107f1575067058d15e176280000610817565b610802662386f26fc10000836118a4565b61081490670de0b6b3a764000061186b565b90505b8067058d15e176280000111580156108375750670de0b6b3a76400008111155b61084057600080fd5b925050505b919050565b662386f26fc1000061086c67058d15e176280000670de0b6b3a764000061186b565b6108769190611882565b81565b600082815260016020819052604090912001546108968133610e80565b6108a08383610ee4565b505050565b6001600160a01b03811633146109155760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106eb565b61091f8282610f4f565b5050565b600080516020611a1383398151915261093c8133610e80565b610944610fb6565b50565b6000610951611049565b61095b5750600090565b60025442908111801561097c57506003546002546109799190611853565b81105b91505090565b600061098d42610699565b905090565b600080516020611a138339815191526109ab8133610e80565b610944611060565b60006109fa6109c1856110db565b84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061111a92505050565b949350505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020611a13833981519152610a468133610e80565b82356002819055602080850135600381905560048590556040805193845291830152818101849052517f44cf824322632924621b225f6413bc5cc1256973ce4d2a6765fa30152e0718669181900360600190a1505050565b7ffc425f2263d0df187444b70e47283d622c70181c5baebb1306a01edba1ce184c610ac98133610e80565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316ff5b610afd610bea565b610b495760405162461bcd60e51b815260206004820152601a60248201527f7075626c69632073616c65206d7573742062652061637469766500000000000060448201526064016106eb565b6005811115610b9a5760405162461bcd60e51b815260206004820152601f60248201527f65786365656473206d6178696d756d20706572207472616e73616374696f6e0060448201526064016106eb565b6000610ba4610982565b9050610bb082826118a4565b341015610be057604051637ab11db960e11b815260048101839052602481018290523460448201526064016106eb565b61091f3383611130565b6000610bf4610e67565b610bfe5750600090565b60065442908111801561097c57506007546006546109799190611853565b60008281526001602081905260409091200154610c398133610e80565b6108a08383610f4f565b610c4b610947565b610c905760405162461bcd60e51b815260206004820152601660248201527570726573616c65206d7573742062652061637469766560501b60448201526064016106eb565b610cd5610c9c336110db565b83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061111a92505050565b610d185760405162461bcd60e51b815260206004820152601460248201527334b73b30b634b21036b2b935b63290383937b7b360611b60448201526064016106eb565b610d2a83670429d069189e00006118a4565b341015610d6157604051637ab11db960e11b815260048101849052670429d069189e000060248201523460448201526064016106eb565b3360009081526005602052604081208054859290610d80908490611853565b90915550503360009081526005602052604090205460011015610df75760405162461bcd60e51b815260206004820152602960248201527f65786365656473206c696d6974206f6e2070726573616c6520666f722074686960448201526873206164647265737360b81b60648201526084016106eb565b6108a03384611130565b600080516020611a13833981519152610e1a8133610e80565b813560068190556020808401356007819055604080519384529183015280517f2f13f415eb05174ed479d923314d6e4b22fc4cda88fa72f6e00cf4a3fb2634189281900390910190a15050565b600654600090158015610e7a5750600754155b15905090565b610e8a8282610a02565b61091f57610ea2816001600160a01b031660146112f4565b610ead8360206112f4565b604051602001610ebe9291906118f3565b60408051601f198184030181529082905262461bcd60e51b82526106eb91600401611968565b610eee8282610a02565b61091f5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610f598282610a02565b1561091f5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60005460ff16610fff5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106eb565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600254600090158015610e7a575050600354151590565b60005460ff16156110a65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106eb565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861102c3390565b6040516bffffffffffffffffffffffff19606083901b166020820152600090603401604051602081830303815290604052805190602001209050919050565b60006111298260045485611490565b9392505050565b60005460ff16156111765760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106eb565b6111a07f0000000000000000000000000000000000000000000000000000000000000000346114a6565b60007f000000000000000000000000000000000000000000000000000000000000000090506000816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561120057600080fd5b505afa158015611214573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611238919061199b565b604051632851206560e21b81526001600160a01b038681166004830152602482018690529192509083169063a144819490604401600060405180830381600087803b15801561128657600080fd5b505af115801561129a573d6000803e3d6000fd5b5050604080516001600160a01b03881681526020810187905234818301526060810185905290517f0505d59806a490ca7ef89d142cd1ad5abef54a129541949b70ef5b5ef45aa25c9350908190036080019150a150505050565b606060006113038360026118a4565b61130e906002611853565b67ffffffffffffffff811115611326576113266119b4565b6040519080825280601f01601f191660200182016040528015611350576020820181803683370190505b509050600360fc1b8160008151811061136b5761136b6119ca565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061139a5761139a6119ca565b60200101906001600160f81b031916908160001a90535060006113be8460026118a4565b6113c9906001611853565b90505b6001811115611441576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113fd576113fd6119ca565b1a60f81b828281518110611413576114136119ca565b60200101906001600160f81b031916908160001a90535060049490941c9361143a816119e0565b90506113cc565b5083156111295760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106eb565b60008261149d85846115bf565b14949350505050565b804710156114f65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016106eb565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611543576040519150601f19603f3d011682016040523d82523d6000602084013e611548565b606091505b50509050806108a05760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016106eb565b600081815b84518110156116635760008582815181106115e1576115e16119ca565b60200260200101519050808311611623576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250611650565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061165b816119f7565b9150506115c4565b509392505050565b60006020828403121561167d57600080fd5b81356001600160e01b03198116811461112957600080fd5b6000602082840312156116a757600080fd5b5035919050565b80356001600160a01b038116811461084557600080fd5b600080604083850312156116d857600080fd5b823591506116e8602084016116ae565b90509250929050565b60008083601f84011261170357600080fd5b50813567ffffffffffffffff81111561171b57600080fd5b6020830191508360208260051b850101111561173657600080fd5b9250929050565b60008060006040848603121561175257600080fd5b61175b846116ae565b9250602084013567ffffffffffffffff81111561177757600080fd5b611783868287016116f1565b9497909650939450505050565b6000604082840312156117a257600080fd5b50919050565b600080606083850312156117bb57600080fd5b6117c58484611790565b946040939093013593505050565b6000806000604084860312156117e857600080fd5b83359250602084013567ffffffffffffffff81111561177757600080fd5b60006020828403121561181857600080fd5b611129826116ae565b60006040828403121561183357600080fd5b6111298383611790565b634e487b7160e01b600052601160045260246000fd5b600082198211156118665761186661183d565b500190565b60008282101561187d5761187d61183d565b500390565b60008261189f57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156118be576118be61183d565b500290565b60005b838110156118de5781810151838201526020016118c6565b838111156118ed576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161192b8160178501602088016118c3565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161195c8160288401602088016118c3565b01602801949350505050565b60208152600082518060208401526119878160408501602087016118c3565b601f01601f19169190910160400192915050565b6000602082840312156119ad57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816119ef576119ef61183d565b506000190190565b6000600019821415611a0b57611a0b61183d565b506001019056fe27a0624e64a794e52337524177801654db9a21fcd4c18d902036cf6ff01b0159a2646970667358221220fe5f329086941584913d6481fd277224228a6299e68d3f86d867944f3e9c675364736f6c6343000809003327a0624e64a794e52337524177801654db9a21fcd4c18d902036cf6ff01b0159fc425f2263d0df187444b70e47283d622c70181c5baebb1306a01edba1ce184c0000000000000000000000000365b988af781d19e410fd2bbf21fbba695568cf00000000000000000000000013d15d8b7b2bf48cbaf144c5c50e67b6b635b5cd

Deployed Bytecode

0x6080604052600436106102045760003560e01c806391f679cb11610118578063dc082869116100a0578063ecd002611161006f578063ecd00261146105aa578063f04b52a3146105de578063f84dbacb146105f9578063fce141af14610626578063fda035ce1461064657600080fd5b8063dc0828691461054b578063dd5b5a2e14610560578063dec2ffb914610582578063e3e1e8ef1461059757600080fd5b8063b1c74793116100e7578063b1c74793146104b7578063b2da21f0146104d3578063b3ab66b014610503578063bc8893b414610516578063d547741f1461052b57600080fd5b806391f679cb146104395780639cb8a26a14610459578063a217fddf1461046e578063ae52e04a1461048357600080fd5b806353135ca01161019b578063763976241161016a57806376397624146103b95780638456cb59146103ce57806385449697146103e35780638cde6f0d146103f957806391d148541461041957600080fd5b806353135ca0146103245780635bf8633a146103395780635c975abb1461038557806362dc6e211461039d57600080fd5b8063248a9ca3116101d7578063248a9ca31461029c5780632f2ff15d146102cd57806336568abe146102ef5780633f4ba83a1461030f57600080fd5b806301ffc9a714610209578063044331581461023e57806318c4b64b14610267578063207a553e14610287575b600080fd5b34801561021557600080fd5b5061022961022436600461166b565b610662565b60405190151581526020015b60405180910390f35b34801561024a57600080fd5b50610259662386f26fc1000081565b604051908152602001610235565b34801561027357600080fd5b50610259610282366004611695565b610699565b34801561029357600080fd5b5061025961084a565b3480156102a857600080fd5b506102596102b7366004611695565b6000908152600160208190526040909120015490565b3480156102d957600080fd5b506102ed6102e83660046116c5565b610879565b005b3480156102fb57600080fd5b506102ed61030a3660046116c5565b6108a5565b34801561031b57600080fd5b506102ed610923565b34801561033057600080fd5b50610229610947565b34801561034557600080fd5b5061036d7f00000000000000000000000013d15d8b7b2bf48cbaf144c5c50e67b6b635b5cd81565b6040516001600160a01b039091168152602001610235565b34801561039157600080fd5b5060005460ff16610229565b3480156103a957600080fd5b50610259670429d069189e000081565b3480156103c557600080fd5b50610259610982565b3480156103da57600080fd5b506102ed610992565b3480156103ef57600080fd5b5061025960045481565b34801561040557600080fd5b5061022961041436600461173d565b6109b3565b34801561042557600080fd5b506102296104343660046116c5565b610a02565b34801561044557600080fd5b506102ed6104543660046117a8565b610a2d565b34801561046557600080fd5b506102ed610a9e565b34801561047a57600080fd5b50610259600081565b34801561048f57600080fd5b5061036d7f0000000000000000000000000365b988af781d19e410fd2bbf21fbba695568cf81565b3480156104c357600080fd5b50610259670de0b6b3a764000081565b3480156104df57600080fd5b506002546003546104ee919082565b60408051928352602083019190915201610235565b6102ed610511366004611695565b610af5565b34801561052257600080fd5b50610229610bea565b34801561053757600080fd5b506102ed6105463660046116c5565b610c1c565b34801561055757600080fd5b50610259600581565b34801561056c57600080fd5b50610259600080516020611a1383398151915281565b34801561058e57600080fd5b50610259600181565b6102ed6105a53660046117d3565b610c43565b3480156105b657600080fd5b506102597ffc425f2263d0df187444b70e47283d622c70181c5baebb1306a01edba1ce184c81565b3480156105ea57600080fd5b506006546007546104ee919082565b34801561060557600080fd5b50610259610614366004611806565b60056020526000908152604090205481565b34801561063257600080fd5b506102ed610641366004611821565b610e01565b34801561065257600080fd5b5061025967058d15e17628000081565b60006001600160e01b03198216637965db0b60e01b148061069357506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006106a3610e67565b6106f45760405162461bcd60e51b815260206004820152601960248201527f7075626c69632073616c65206e6f74207363686564756c65640000000000000060448201526064015b60405180910390fd5b600654821161070c5750670de0b6b3a7640000919050565b600754600654839161071d91611853565b11610731575067058d15e176280000919050565b6000662386f26fc1000061075567058d15e176280000670de0b6b3a764000061186b565b61075f9190611882565b60075461076c9190611882565b905060008160066000015485610782919061186b565b61078c9190611882565b90506000816107a45750670de0b6b3a7640000610817565b6001662386f26fc100006107c867058d15e176280000670de0b6b3a764000061186b565b6107d29190611882565b6107dc919061186b565b82106107f1575067058d15e176280000610817565b610802662386f26fc10000836118a4565b61081490670de0b6b3a764000061186b565b90505b8067058d15e176280000111580156108375750670de0b6b3a76400008111155b61084057600080fd5b925050505b919050565b662386f26fc1000061086c67058d15e176280000670de0b6b3a764000061186b565b6108769190611882565b81565b600082815260016020819052604090912001546108968133610e80565b6108a08383610ee4565b505050565b6001600160a01b03811633146109155760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106eb565b61091f8282610f4f565b5050565b600080516020611a1383398151915261093c8133610e80565b610944610fb6565b50565b6000610951611049565b61095b5750600090565b60025442908111801561097c57506003546002546109799190611853565b81105b91505090565b600061098d42610699565b905090565b600080516020611a138339815191526109ab8133610e80565b610944611060565b60006109fa6109c1856110db565b84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061111a92505050565b949350505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020611a13833981519152610a468133610e80565b82356002819055602080850135600381905560048590556040805193845291830152818101849052517f44cf824322632924621b225f6413bc5cc1256973ce4d2a6765fa30152e0718669181900360600190a1505050565b7ffc425f2263d0df187444b70e47283d622c70181c5baebb1306a01edba1ce184c610ac98133610e80565b7f0000000000000000000000000365b988af781d19e410fd2bbf21fbba695568cf6001600160a01b0316ff5b610afd610bea565b610b495760405162461bcd60e51b815260206004820152601a60248201527f7075626c69632073616c65206d7573742062652061637469766500000000000060448201526064016106eb565b6005811115610b9a5760405162461bcd60e51b815260206004820152601f60248201527f65786365656473206d6178696d756d20706572207472616e73616374696f6e0060448201526064016106eb565b6000610ba4610982565b9050610bb082826118a4565b341015610be057604051637ab11db960e11b815260048101839052602481018290523460448201526064016106eb565b61091f3383611130565b6000610bf4610e67565b610bfe5750600090565b60065442908111801561097c57506007546006546109799190611853565b60008281526001602081905260409091200154610c398133610e80565b6108a08383610f4f565b610c4b610947565b610c905760405162461bcd60e51b815260206004820152601660248201527570726573616c65206d7573742062652061637469766560501b60448201526064016106eb565b610cd5610c9c336110db565b83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061111a92505050565b610d185760405162461bcd60e51b815260206004820152601460248201527334b73b30b634b21036b2b935b63290383937b7b360611b60448201526064016106eb565b610d2a83670429d069189e00006118a4565b341015610d6157604051637ab11db960e11b815260048101849052670429d069189e000060248201523460448201526064016106eb565b3360009081526005602052604081208054859290610d80908490611853565b90915550503360009081526005602052604090205460011015610df75760405162461bcd60e51b815260206004820152602960248201527f65786365656473206c696d6974206f6e2070726573616c6520666f722074686960448201526873206164647265737360b81b60648201526084016106eb565b6108a03384611130565b600080516020611a13833981519152610e1a8133610e80565b813560068190556020808401356007819055604080519384529183015280517f2f13f415eb05174ed479d923314d6e4b22fc4cda88fa72f6e00cf4a3fb2634189281900390910190a15050565b600654600090158015610e7a5750600754155b15905090565b610e8a8282610a02565b61091f57610ea2816001600160a01b031660146112f4565b610ead8360206112f4565b604051602001610ebe9291906118f3565b60408051601f198184030181529082905262461bcd60e51b82526106eb91600401611968565b610eee8282610a02565b61091f5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610f598282610a02565b1561091f5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60005460ff16610fff5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106eb565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600254600090158015610e7a575050600354151590565b60005460ff16156110a65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106eb565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861102c3390565b6040516bffffffffffffffffffffffff19606083901b166020820152600090603401604051602081830303815290604052805190602001209050919050565b60006111298260045485611490565b9392505050565b60005460ff16156111765760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106eb565b6111a07f0000000000000000000000000365b988af781d19e410fd2bbf21fbba695568cf346114a6565b60007f00000000000000000000000013d15d8b7b2bf48cbaf144c5c50e67b6b635b5cd90506000816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561120057600080fd5b505afa158015611214573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611238919061199b565b604051632851206560e21b81526001600160a01b038681166004830152602482018690529192509083169063a144819490604401600060405180830381600087803b15801561128657600080fd5b505af115801561129a573d6000803e3d6000fd5b5050604080516001600160a01b03881681526020810187905234818301526060810185905290517f0505d59806a490ca7ef89d142cd1ad5abef54a129541949b70ef5b5ef45aa25c9350908190036080019150a150505050565b606060006113038360026118a4565b61130e906002611853565b67ffffffffffffffff811115611326576113266119b4565b6040519080825280601f01601f191660200182016040528015611350576020820181803683370190505b509050600360fc1b8160008151811061136b5761136b6119ca565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061139a5761139a6119ca565b60200101906001600160f81b031916908160001a90535060006113be8460026118a4565b6113c9906001611853565b90505b6001811115611441576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113fd576113fd6119ca565b1a60f81b828281518110611413576114136119ca565b60200101906001600160f81b031916908160001a90535060049490941c9361143a816119e0565b90506113cc565b5083156111295760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106eb565b60008261149d85846115bf565b14949350505050565b804710156114f65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016106eb565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611543576040519150601f19603f3d011682016040523d82523d6000602084013e611548565b606091505b50509050806108a05760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016106eb565b600081815b84518110156116635760008582815181106115e1576115e16119ca565b60200260200101519050808311611623576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250611650565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061165b816119f7565b9150506115c4565b509392505050565b60006020828403121561167d57600080fd5b81356001600160e01b03198116811461112957600080fd5b6000602082840312156116a757600080fd5b5035919050565b80356001600160a01b038116811461084557600080fd5b600080604083850312156116d857600080fd5b823591506116e8602084016116ae565b90509250929050565b60008083601f84011261170357600080fd5b50813567ffffffffffffffff81111561171b57600080fd5b6020830191508360208260051b850101111561173657600080fd5b9250929050565b60008060006040848603121561175257600080fd5b61175b846116ae565b9250602084013567ffffffffffffffff81111561177757600080fd5b611783868287016116f1565b9497909650939450505050565b6000604082840312156117a257600080fd5b50919050565b600080606083850312156117bb57600080fd5b6117c58484611790565b946040939093013593505050565b6000806000604084860312156117e857600080fd5b83359250602084013567ffffffffffffffff81111561177757600080fd5b60006020828403121561181857600080fd5b611129826116ae565b60006040828403121561183357600080fd5b6111298383611790565b634e487b7160e01b600052601160045260246000fd5b600082198211156118665761186661183d565b500190565b60008282101561187d5761187d61183d565b500390565b60008261189f57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156118be576118be61183d565b500290565b60005b838110156118de5781810151838201526020016118c6565b838111156118ed576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161192b8160178501602088016118c3565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161195c8160288401602088016118c3565b01602801949350505050565b60208152600082518060208401526119878160408501602087016118c3565b601f01601f19169190910160400192915050565b6000602082840312156119ad57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816119ef576119ef61183d565b506000190190565b6000600019821415611a0b57611a0b61183d565b506001019056fe27a0624e64a794e52337524177801654db9a21fcd4c18d902036cf6ff01b0159a2646970667358221220fe5f329086941584913d6481fd277224228a6299e68d3f86d867944f3e9c675364736f6c63430008090033

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

0000000000000000000000000365b988af781d19e410fd2bbf21fbba695568cf00000000000000000000000013d15d8b7b2bf48cbaf144c5c50e67b6b635b5cd

-----Decoded View---------------
Arg [0] : _revenueReceiver (address): 0x0365B988af781D19e410FD2BbF21fBba695568CF
Arg [1] : _nftAddress (address): 0x13d15d8B7B2bF48CBAF144c5C50E67b6B635b5cd

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000365b988af781d19e410fd2bbf21fbba695568cf
Arg [1] : 00000000000000000000000013d15d8b7b2bf48cbaf144c5c50e67b6b635b5cd


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.