ETH Price: $3,622.60 (+4.97%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Heterosis167808982023-03-08 3:33:47667 days ago1678246427IN
0x2d16c337...3Ce28675B
0 ETH0.0007031123.12344055

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
167760992023-03-07 11:22:47668 days ago1678188167  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Minter

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 150 runs

Other Settings:
default evmVersion
File 1 of 14 : Minter.sol
// contracts/Minter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./lib/Waitlist.sol";

interface IToken {
    function mint(address owner, uint256 quantity, uint256 setId, uint256[] calldata options) external;
    function minterMint(address owner, uint256 quantity, uint256 setId, uint256[] calldata options) external;
    function totalSupply() external view returns (uint256);
}

interface IHeterosis {
    function mint(uint256 tokenId, uint8 amount) external returns (Breed[] memory);
}

struct Breed {
    uint256 idUniq;
    uint256 mainDna;
    uint256 shadowDna;
}

contract Minter is Pausable, AccessControl {
    enum Stage{ CLOSED, PRIVATE, PUBLIC, PRESALE }

    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE");
    uint256 public price;
    uint256 public erc20price;
    mapping(address => uint32) public privateMinted;
    mapping(address => uint32) public publicMinted;
    address public tokenAddress;
    address public forwarderAddress;
    address public erc20Address;
    IHeterosis public heterosisContract;
    bytes32 private domainSeparator;
    uint32 public maxPublicMintedPerAccount;
    Stage public stage;

    // Additional events for logging
    event ChangeStage(Stage _stage);
    event ChangePrice(uint256 _price);
    event ChangeERC20Price(uint256 _price);
    event ChangeERC20Address(address _address);
    event ChangeHeterosisAddress(address _address);
    event ChangeMaxPublicMintedPerAccount(uint32 _value);

    constructor(
        uint256 _price,
        uint256 _erc20price,
        uint32  _maxPublicMinted,
        address _tokenAddress,
        address _forwarderAddress,
        address _erc20Address,
        address _heterosisAddress,
        string memory _appName,
        string memory _version
    ) {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);

        tokenAddress = _tokenAddress;
        forwarderAddress = _forwarderAddress;
        erc20Address = _erc20Address;
        heterosisContract = IHeterosis(_heterosisAddress);
        price = _price;
        maxPublicMintedPerAccount = _maxPublicMinted;
        erc20price = _erc20price;
        stage = Stage.CLOSED;

        domainSeparator = keccak256(abi.encode(
            keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
            keccak256(bytes(_appName)),
            keccak256(bytes(_version)),
            block.chainid,
            address(this)
        ));
    }

    function setAdmin(address _newAdmin) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(_newAdmin != address(0), 'empty address');

        _grantRole(DEFAULT_ADMIN_ROLE, _newAdmin);
        _revokeRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    function addMinter(address _minter) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _grantRole(MINTER_ROLE, _minter);
    }

    function addSigner(address _signer) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _grantRole(SIGNER_ROLE, _signer);
    }

    function setPrice(uint256 _price) external onlyRole(DEFAULT_ADMIN_ROLE) {
        price = _price;
        emit ChangePrice(_price);
    }

    function setERC20Price(uint256 _price) external onlyRole(DEFAULT_ADMIN_ROLE) {
        erc20price = _price;
        emit ChangeERC20Price(_price);
    }

    function setERC20Address(address _address) external onlyRole(DEFAULT_ADMIN_ROLE) {
        erc20Address = _address;
        emit ChangeERC20Address(_address);
    }

    function setHeterosis(address _address) external onlyRole(DEFAULT_ADMIN_ROLE) {
        heterosisContract = IHeterosis(_address);
        emit ChangeHeterosisAddress(_address);
    }

    function setMaxPublicMintedPerAccount(uint32 _maxPublicMintedPerAccount) external onlyRole(DEFAULT_ADMIN_ROLE) {
        maxPublicMintedPerAccount = _maxPublicMintedPerAccount;
        emit ChangeMaxPublicMintedPerAccount(_maxPublicMintedPerAccount);
    }

    function setStage(Stage _stage) public onlyRole(DEFAULT_ADMIN_ROLE) {
        stage = _stage;
        emit ChangeStage(_stage);
    }
    
    function pause() external onlyRole(DEFAULT_ADMIN_ROLE) {
        _pause();
    }

    function unPause() external onlyRole(DEFAULT_ADMIN_ROLE) {
        _unpause();
    }

    function withdraw(address _to) external onlyRole(DEFAULT_ADMIN_ROLE) {
        payable(_to).transfer(address(this).balance);
    }

    function withdrawERC20(address _to, address _tokenContract, uint256 _amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
        IERC20(_tokenContract).transfer(_to, _amount);
    }

    function withdrawERC721(address _to, address _tokenContract, uint256 _tokenId) external onlyRole(DEFAULT_ADMIN_ROLE) {
        IERC721(_tokenContract).transferFrom(address(this), _to, _tokenId);
    }

    function minterMint(address _owner, uint32 _amount, uint32 _setId, uint256[] calldata _options) external whenNotPaused onlyRole(MINTER_ROLE) passingStage(Stage.PRESALE) {
        uint256 startTokenId = IToken(tokenAddress).totalSupply();
        IToken(tokenAddress).minterMint(_owner, _amount, _setId, _options);

        _mintBreeds(startTokenId, _amount, _setId);
    }

    function privateMint(uint32 _amount, LibWaitlist.Waitlist calldata _waitlist, bytes calldata _signature, uint256[] calldata _options) external payable whenNotPaused passingStage(Stage.PRIVATE) {
        require(verifyTypedDataHash(domainSeparator, _waitlist, _signature), "bad sig");
        require(_waitlist.owner == msg.sender, "bad sender");
        require(msg.value >= _amount * price, "bad value");
        require(privateMinted[msg.sender] + _amount <= _waitlist.amount, "bad amount");

        privateMinted[msg.sender] += _amount;

        uint256 startTokenId = IToken(tokenAddress).totalSupply();
        IToken(tokenAddress).mint(msg.sender, _amount, _waitlist.setId, _options);

        _mintBreeds(startTokenId, _amount, _waitlist.setId);

        payable(forwarderAddress).transfer(msg.value);
    }

    // minterPrivateMint is used by owner for minting tokens that were bought for fiat money
    function minterPrivateMint(address _wallet, uint32 _amount, uint32 _maxAmount, uint32 _setId, uint256[] calldata _options) external onlyRole(MINTER_ROLE) whenNotPaused passingStage(Stage.PRIVATE) {
        require(privateMinted[_wallet] + _amount <= _maxAmount, "bad amount");

        privateMinted[_wallet] += _amount;

        uint256 startTokenId = IToken(tokenAddress).totalSupply();
        IToken(tokenAddress).mint(_wallet, _amount, _setId, _options);

        _mintBreeds(startTokenId, _amount, _setId);
    }

    function publicMint(uint32 _amount, uint256[] calldata _options) external payable whenNotPaused passingStage(Stage.PUBLIC) {
        require(msg.value >= _amount * price, "bad value");
        require(publicMinted[msg.sender] + _amount <= maxPublicMintedPerAccount, "bad amount");

        publicMinted[msg.sender] += _amount;

         uint256 startTokenId = IToken(tokenAddress).totalSupply();
        IToken(tokenAddress).mint(msg.sender, _amount, 0, _options);

        _mintBreeds(startTokenId, _amount, 0);

        payable(forwarderAddress).transfer(msg.value);
    }

    // minterPublicMint is used by owner for minting tokens that were bought for fiat money
    function minterPublicMint(address _wallet, uint32 _amount, uint256[] calldata _options) external onlyRole(MINTER_ROLE) whenNotPaused passingStage(Stage.PUBLIC) {
        require(publicMinted[_wallet] + _amount <= maxPublicMintedPerAccount, "bad amount");

        publicMinted[_wallet] += _amount;

        uint256 startTokenId = IToken(tokenAddress).totalSupply();
        IToken(tokenAddress).mint(_wallet, _amount, 0, _options);
        
        _mintBreeds(startTokenId, _amount, 0);
    }

    function privateMintERC20(uint32 _amount, LibWaitlist.Waitlist calldata _waitlist, bytes calldata _signature, uint256[] calldata _options) external whenNotPaused passingStage(Stage.PRIVATE) {
        require(erc20Address != address(0), 'erc20 disabled');
        require(verifyTypedDataHash(domainSeparator, _waitlist, _signature), "bad sig");
        require(_waitlist.owner == msg.sender, "bad sender");
        require(privateMinted[msg.sender] + _amount <= _waitlist.amount, "bad amount");

        privateMinted[msg.sender] += _amount;

        IERC20(erc20Address).transferFrom(msg.sender, forwarderAddress, _amount * erc20price);
        uint256 startTokenId = IToken(tokenAddress).totalSupply();
        IToken(tokenAddress).mint(msg.sender, _amount, _waitlist.setId, _options);

        _mintBreeds(startTokenId, _amount, _waitlist.setId);
    }             

    function publicMintERC20(uint32 _amount, uint256[] calldata _options) external whenNotPaused passingStage(Stage.PUBLIC) {
        require(erc20Address != address(0), 'erc20 disabled');
        require(publicMinted[msg.sender] +_amount <= maxPublicMintedPerAccount, "bad amount");

        publicMinted[msg.sender] += _amount;

        IERC20(erc20Address).transferFrom(msg.sender, forwarderAddress, _amount * erc20price);
        uint256 startTokenId = IToken(tokenAddress).totalSupply();
        IToken(tokenAddress).mint(msg.sender, _amount, 0, _options);

        _mintBreeds(startTokenId, _amount, 0);
    }    

    modifier passingStage(Stage _stage) {
        require(stage == _stage, "bad stage");

        _;
    }     

    function verifyTypedDataHash(bytes32 _domainSeparator, LibWaitlist.Waitlist calldata _waitlist, bytes calldata _signature) internal view returns (bool) {
        bytes32 digest = ECDSA.toTypedDataHash(_domainSeparator, LibWaitlist.hash(_waitlist));
        address signer = ECDSA.recover(digest, _signature);

        return hasRole(SIGNER_ROLE, signer);
    }

    function _mintBreeds(uint256 _startTokenId, uint256 _amount, uint32 _setId) internal {
        if (_setId > 0) {
            require(_amount > 1, "only 1 token");

            heterosisContract.mint(_startTokenId, uint8(_amount));
        } else {
            for (uint256 i = 0; i < _amount; ++i) {
                heterosisContract.mint(_startTokenId+i, 1);
            }
        }
    }
}

File 2 of 14 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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);
        _;
    }

    /**
     * @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 virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @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 virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " 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 virtual 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.
     *
     * May emit a {RoleGranted} event.
     */
    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.
     *
     * May emit a {RoleRevoked} event.
     */
    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`.
     *
     * May emit a {RoleRevoked} event.
     */
    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.
     *
     * May emit a {RoleGranted} event.
     *
     * [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.
     *
     * May emit a {RoleGranted} event.
     */
    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.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 14 : IAccessControl.sol
// 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;
}

File 4 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

File 5 of 14 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        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());
    }
}

File 6 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 7 of 14 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

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

pragma solidity ^0.8.0;

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

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

File 9 of 14 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

File 10 of 14 : ERC165.sol
// 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;
    }
}

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

File 12 of 14 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 13 of 14 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 14 of 14 : Waitlist.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

library LibWaitlist {
    bytes32 public constant TYPE_HASH = keccak256("Waitlist(address owner,uint32 amount,uint32 setId)");

    struct Waitlist {
        address owner;
        uint32 amount;
        uint32 setId;
    }

    function hash(Waitlist memory _waitlist) internal pure returns (bytes32) {
        return keccak256(abi.encode(TYPE_HASH, _waitlist.owner, _waitlist.amount, _waitlist.setId));
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_erc20price","type":"uint256"},{"internalType":"uint32","name":"_maxPublicMinted","type":"uint32"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_forwarderAddress","type":"address"},{"internalType":"address","name":"_erc20Address","type":"address"},{"internalType":"address","name":"_heterosisAddress","type":"address"},{"internalType":"string","name":"_appName","type":"string"},{"internalType":"string","name":"_version","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"ChangeERC20Address","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_price","type":"uint256"}],"name":"ChangeERC20Price","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"ChangeHeterosisAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"_value","type":"uint32"}],"name":"ChangeMaxPublicMintedPerAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_price","type":"uint256"}],"name":"ChangePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum Minter.Stage","name":"_stage","type":"uint8"}],"name":"ChangeStage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"addSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"erc20Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forwarderAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[],"name":"heterosisContract","outputs":[{"internalType":"contract IHeterosis","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPublicMintedPerAccount","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint32","name":"_amount","type":"uint32"},{"internalType":"uint32","name":"_setId","type":"uint32"},{"internalType":"uint256[]","name":"_options","type":"uint256[]"}],"name":"minterMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"uint32","name":"_amount","type":"uint32"},{"internalType":"uint32","name":"_maxAmount","type":"uint32"},{"internalType":"uint32","name":"_setId","type":"uint32"},{"internalType":"uint256[]","name":"_options","type":"uint256[]"}],"name":"minterPrivateMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"uint32","name":"_amount","type":"uint32"},{"internalType":"uint256[]","name":"_options","type":"uint256[]"}],"name":"minterPublicMint","outputs":[],"stateMutability":"nonpayable","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":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_amount","type":"uint32"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"amount","type":"uint32"},{"internalType":"uint32","name":"setId","type":"uint32"}],"internalType":"struct LibWaitlist.Waitlist","name":"_waitlist","type":"tuple"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"uint256[]","name":"_options","type":"uint256[]"}],"name":"privateMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_amount","type":"uint32"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"amount","type":"uint32"},{"internalType":"uint32","name":"setId","type":"uint32"}],"internalType":"struct LibWaitlist.Waitlist","name":"_waitlist","type":"tuple"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"uint256[]","name":"_options","type":"uint256[]"}],"name":"privateMintERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"privateMinted","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_amount","type":"uint32"},{"internalType":"uint256[]","name":"_options","type":"uint256[]"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_amount","type":"uint32"},{"internalType":"uint256[]","name":"_options","type":"uint256[]"}],"name":"publicMintERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"publicMinted","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"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":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setERC20Address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setERC20Price","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setHeterosis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_maxPublicMintedPerAccount","type":"uint32"}],"name":"setMaxPublicMintedPerAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum Minter.Stage","name":"_stage","type":"uint8"}],"name":"setStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stage","outputs":[{"internalType":"enum Minter.Stage","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_tokenContract","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_tokenContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162003371380380620033718339810160408190526200003491620002b8565b6000805460ff191681556200004a903362000136565b600680546001600160a01b03199081166001600160a01b0389811691909117909255600780548216888416179055600880548216878416179055600980549091169185169190911790556002899055600b805460038a905564ffffffffff191663ffffffff89161790558151602080840191909120825183830120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9481019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120600a819055505050505050505050506200039e565b62000142828262000146565b5050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620001425760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b80516001600160a01b0381168114620001e657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200021357600080fd5b81516001600160401b0380821115620002305762000230620001eb565b604051601f8301601f19908116603f011681019082821181831017156200025b576200025b620001eb565b816040528381526020925086838588010111156200027857600080fd5b600091505b838210156200029c57858201830151818301840152908201906200027d565b83821115620002ae5760008385830101525b9695505050505050565b60008060008060008060008060006101208a8c031215620002d857600080fd5b8951985060208a0151975060408a015163ffffffff81168114620002fb57600080fd5b96506200030b60608b01620001ce565b95506200031b60808b01620001ce565b94506200032b60a08b01620001ce565b93506200033b60c08b01620001ce565b60e08b01519093506001600160401b03808211156200035957600080fd5b620003678d838e0162000201565b93506101008c01519150808211156200037f57600080fd5b506200038e8c828d0162000201565b9150509295985092959850929598565b612fc380620003ae6000396000f3fe6080604052600436106102465760003560e01c806385eae37611610139578063b8e8d21f116100b6578063d547741f1161007a578063d547741f14610709578063e8dc9bd614610729578063eb12d61e14610749578063f7b188a514610769578063f94a4c671461077e578063f951f4f71461079e57600080fd5b8063b8e8d21f14610669578063c040e6b814610686578063c32fe85b146106b4578063ce3cd997146106c7578063d5391393146106e757600080fd5b80639d76ea58116100fd5780639d76ea58146105d7578063a035b1fe146105f7578063a1ebf35d1461060d578063a217fddf14610641578063b072d7381461065657600080fd5b806385eae3761461053757806391b7f5ed1461055757806391d14854146105775780639397a28414610597578063983b2d56146105b757600080fd5b806336568abe116101c75780635c975abb1161018b5780635c975abb146104aa57806363dab633146104c2578063704b6c02146104e25780637617ebdd146105025780638456cb591461052257600080fd5b806336568abe1461040a5780634025feb21461042a57806341bec0d21461044a57806344004cc11461046a57806351cff8d91461048a57600080fd5b80632062615c1161020e5780632062615c14610342578063248a9ca314610366578063276184ae146103975780632a7144f7146103b75780632f2ff15d146103ea57600080fd5b806301ffc9a71461024b5780631015805b1461028057806311a62bb3146102c8578063174ab889146103005780631e08836014610320575b600080fd5b34801561025757600080fd5b5061026b6102663660046126d7565b6107be565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102b361029b36600461271d565b60056020526000908152604090205463ffffffff1681565b60405163ffffffff9091168152602001610277565b3480156102d457600080fd5b506009546102e8906001600160a01b031681565b6040516001600160a01b039091168152602001610277565b34801561030c57600080fd5b506007546102e8906001600160a01b031681565b34801561032c57600080fd5b5061034061033b366004612790565b6107f5565b005b34801561034e57600080fd5b5061035860035481565b604051908152602001610277565b34801561037257600080fd5b50610358610381366004612805565b6000908152600160208190526040909120015490565b3480156103a357600080fd5b506008546102e8906001600160a01b031681565b3480156103c357600080fd5b506102b36103d236600461271d565b60046020526000908152604090205463ffffffff1681565b3480156103f657600080fd5b5061034061040536600461281e565b610950565b34801561041657600080fd5b5061034061042536600461281e565b61097b565b34801561043657600080fd5b5061034061044536600461284a565b6109f9565b34801561045657600080fd5b5061034061046536600461271d565b610a62565b34801561047657600080fd5b5061034061048536600461284a565b610ac3565b34801561049657600080fd5b506103406104a536600461271d565b610b48565b3480156104b657600080fd5b5060005460ff1661026b565b3480156104ce57600080fd5b506103406104dd366004612886565b610b88565b3480156104ee57600080fd5b506103406104fd36600461271d565b610e21565b34801561050e57600080fd5b5061034061051d366004612805565b610e88565b34801561052e57600080fd5b50610340610ec8565b34801561054357600080fd5b506103406105523660046128d8565b610ede565b34801561056357600080fd5b50610340610572366004612805565b6110dd565b34801561058357600080fd5b5061026b61059236600461281e565b61111d565b3480156105a357600080fd5b506103406105b2366004612938565b611148565b3480156105c357600080fd5b506103406105d236600461271d565b61119b565b3480156105e357600080fd5b506006546102e8906001600160a01b031681565b34801561060357600080fd5b5061035860025481565b34801561061957600080fd5b506103587fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7081565b34801561064d57600080fd5b50610358600081565b610340610664366004612953565b6111be565b34801561067557600080fd5b50600b546102b39063ffffffff1681565b34801561069257600080fd5b50600b546106a790600160201b900460ff1681565b6040516102779190612a33565b6103406106c2366004612886565b6114dc565b3480156106d357600080fd5b506103406106e2366004612a5b565b611737565b3480156106f357600080fd5b50610358600080516020612f6e83398151915281565b34801561071557600080fd5b5061034061072436600461281e565b61179c565b34801561073557600080fd5b50610340610744366004612a7c565b6117c2565b34801561075557600080fd5b5061034061076436600461271d565b6119b3565b34801561077557600080fd5b506103406119e8565b34801561078a57600080fd5b50610340610799366004612953565b6119fb565b3480156107aa57600080fd5b506103406107b936600461271d565b611d4f565b60006001600160e01b03198216637965db0b60e01b14806107ef57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6107fd611da8565b600080516020612f6e83398151915261081581611df0565b600380600b54600160201b900460ff16600381111561083657610836612a1d565b1461085c5760405162461bcd60e51b815260040161085390612aef565b60405180910390fd5b600654604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa1580156108a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ca9190612b12565b600654604051630dca6d7160e21b81529192506001600160a01b031690633729b5c490610903908b908b908b908b908b90600401612b61565b600060405180830381600087803b15801561091d57600080fd5b505af1158015610931573d6000803e3d6000fd5b50505050610946818863ffffffff1688611dfa565b5050505050505050565b6000828152600160208190526040909120015461096c81611df0565b6109768383611f6b565b505050565b6001600160a01b03811633146109eb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610853565b6109f58282611fd6565b5050565b6000610a0481611df0565b6040516323b872dd60e01b81526001600160a01b038416906323b872dd90610a3490309088908790600401612b9a565b600060405180830381600087803b158015610a4e57600080fd5b505af1158015610946573d6000803e3d6000fd5b6000610a6d81611df0565b600880546001600160a01b0319166001600160a01b0384169081179091556040519081527fb6d16f9d1240e3c1a2dc71c15426745edc5944c444b52da04542235b0cb99f5b906020015b60405180910390a15050565b6000610ace81611df0565b60405163a9059cbb60e01b81526001600160a01b0385811660048301526024820184905284169063a9059cbb906044016020604051808303816000875af1158015610b1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b419190612bbe565b5050505050565b6000610b5381611df0565b6040516001600160a01b038316904780156108fc02916000818181858888f19350505050158015610976573d6000803e3d6000fd5b610b90611da8565b600280600b54600160201b900460ff166003811115610bb157610bb1612a1d565b14610bce5760405162461bcd60e51b815260040161085390612aef565b6008546001600160a01b0316610c175760405162461bcd60e51b815260206004820152600e60248201526d195c98cc8c08191a5cd8589b195960921b6044820152606401610853565b600b543360009081526005602052604090205463ffffffff91821691610c3f91879116612bf6565b63ffffffff161115610c635760405162461bcd60e51b815260040161085390612c1e565b3360009081526005602052604081208054869290610c8890849063ffffffff16612bf6565b82546101009290920a63ffffffff8181021990931691831602179091556008546007546003546001600160a01b0392831694506323b872dd93339390921691610cd391908a16612c42565b6040518463ffffffff1660e01b8152600401610cf193929190612b9a565b6020604051808303816000875af1158015610d10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d349190612bbe565b50600654604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015610d7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da39190612b12565b600654604051630803d79760e21b81529192506001600160a01b03169063200f5e5c90610ddd90339089906000908a908a90600401612c61565b600060405180830381600087803b158015610df757600080fd5b505af1158015610e0b573d6000803e3d6000fd5b50505050610b41818663ffffffff166000611dfa565b6000610e2c81611df0565b6001600160a01b038216610e725760405162461bcd60e51b815260206004820152600d60248201526c656d707479206164647265737360981b6044820152606401610853565b610e7d600083611f6b565b6109f5600033611fd6565b6000610e9381611df0565b60038290556040518281527f1d67ee58cec9ec6d3de0643f069da3dca1e079d8675457e4f9fe3cd2275fd26290602001610ab7565b6000610ed381611df0565b610edb61203d565b50565b600080516020612f6e833981519152610ef681611df0565b610efe611da8565b600280600b54600160201b900460ff166003811115610f1f57610f1f612a1d565b14610f3c5760405162461bcd60e51b815260040161085390612aef565b600b546001600160a01b03871660009081526005602052604090205463ffffffff91821691610f6d91889116612bf6565b63ffffffff161115610f915760405162461bcd60e51b815260040161085390612c1e565b6001600160a01b03861660009081526005602052604081208054879290610fbf90849063ffffffff16612bf6565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000600660009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611032573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110569190612b12565b600654604051630803d79760e21b81529192506001600160a01b03169063200f5e5c90611090908a908a906000908b908b90600401612c61565b600060405180830381600087803b1580156110aa57600080fd5b505af11580156110be573d6000803e3d6000fd5b505050506110d4818763ffffffff166000611dfa565b50505050505050565b60006110e881611df0565b60028290556040518281527ffb92488ba7c255b32158331b4dd67ae708a8761b850ca51d1bbf57c177d35f8990602001610ab7565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600061115381611df0565b600b805463ffffffff191663ffffffff84169081179091556040519081527f87717f0de5df243b3ad7d794a85858de796db5f312ba8414d6295c0a80b736b790602001610ab7565b60006111a681611df0565b6109f5600080516020612f6e83398151915283611f6b565b6111c6611da8565b600180600b54600160201b900460ff1660038111156111e7576111e7612a1d565b146112045760405162461bcd60e51b815260040161085390612aef565b611212600a54878787612097565b6112485760405162461bcd60e51b81526020600482015260076024820152666261642073696760c81b6044820152606401610853565b33611256602088018861271d565b6001600160a01b0316146112995760405162461bcd60e51b815260206004820152600a6024820152693130b21039b2b73232b960b11b6044820152606401610853565b6002546112ac9063ffffffff8916612c42565b3410156112e75760405162461bcd60e51b81526020600482015260096024820152686261642076616c756560b81b6044820152606401610853565b6112f76040870160208801612938565b3360009081526004602052604090205463ffffffff9182169161131c918a9116612bf6565b63ffffffff1611156113405760405162461bcd60e51b815260040161085390612c1e565b336000908152600460205260408120805489929061136590849063ffffffff16612bf6565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000600660009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fc9190612b12565b6006549091506001600160a01b031663200f5e5c338a61142260608c0160408d01612938565b88886040518663ffffffff1660e01b8152600401611444959493929190612b61565b600060405180830381600087803b15801561145e57600080fd5b505af1158015611472573d6000803e3d6000fd5b5061149892508391505063ffffffff8a1661149360608b0160408c01612938565b611dfa565b6007546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156114d1573d6000803e3d6000fd5b505050505050505050565b6114e4611da8565b600280600b54600160201b900460ff16600381111561150557611505612a1d565b146115225760405162461bcd60e51b815260040161085390612aef565b6002546115359063ffffffff8616612c42565b3410156115705760405162461bcd60e51b81526020600482015260096024820152686261642076616c756560b81b6044820152606401610853565b600b543360009081526005602052604090205463ffffffff9182169161159891879116612bf6565b63ffffffff1611156115bc5760405162461bcd60e51b815260040161085390612c1e565b33600090815260056020526040812080548692906115e190849063ffffffff16612bf6565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000600660009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611654573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116789190612b12565b600654604051630803d79760e21b81529192506001600160a01b03169063200f5e5c906116b290339089906000908a908a90600401612c61565b600060405180830381600087803b1580156116cc57600080fd5b505af11580156116e0573d6000803e3d6000fd5b505050506116f6818663ffffffff166000611dfa565b6007546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561172f573d6000803e3d6000fd5b505050505050565b600061174281611df0565b600b805483919064ff000000001916600160201b83600381111561176857611768612a1d565b02179055507fd9cae27d4c24409b509a14bf857c9aef50e0559ee2d0d6b4bd6acc5aa6ddb09d82604051610ab79190612a33565b600082815260016020819052604090912001546117b881611df0565b6109768383611fd6565b600080516020612f6e8339815191526117da81611df0565b6117e2611da8565b600180600b54600160201b900460ff16600381111561180357611803612a1d565b146118205760405162461bcd60e51b815260040161085390612aef565b6001600160a01b03881660009081526004602052604090205463ffffffff8088169161184e918a9116612bf6565b63ffffffff1611156118725760405162461bcd60e51b815260040161085390612c1e565b6001600160a01b038816600090815260046020526040812080548992906118a090849063ffffffff16612bf6565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000600660009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611913573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119379190612b12565b600654604051630803d79760e21b81529192506001600160a01b03169063200f5e5c90611970908c908c908b908b908b90600401612b61565b600060405180830381600087803b15801561198a57600080fd5b505af115801561199e573d6000803e3d6000fd5b505050506114d1818963ffffffff1688611dfa565b60006119be81611df0565b6109f57fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7083611f6b565b60006119f381611df0565b610edb6121e0565b611a03611da8565b600180600b54600160201b900460ff166003811115611a2457611a24612a1d565b14611a415760405162461bcd60e51b815260040161085390612aef565b6008546001600160a01b0316611a8a5760405162461bcd60e51b815260206004820152600e60248201526d195c98cc8c08191a5cd8589b195960921b6044820152606401610853565b611a98600a54878787612097565b611ace5760405162461bcd60e51b81526020600482015260076024820152666261642073696760c81b6044820152606401610853565b33611adc602088018861271d565b6001600160a01b031614611b1f5760405162461bcd60e51b815260206004820152600a6024820152693130b21039b2b73232b960b11b6044820152606401610853565b611b2f6040870160208801612938565b3360009081526004602052604090205463ffffffff91821691611b54918a9116612bf6565b63ffffffff161115611b785760405162461bcd60e51b815260040161085390612c1e565b3360009081526004602052604081208054899290611b9d90849063ffffffff16612bf6565b82546101009290920a63ffffffff8181021990931691831602179091556008546007546003546001600160a01b0392831694506323b872dd93339390921691611be891908d16612c42565b6040518463ffffffff1660e01b8152600401611c0693929190612b9a565b6020604051808303816000875af1158015611c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c499190612bbe565b50600654604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611c94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cb89190612b12565b6006549091506001600160a01b031663200f5e5c338a611cde60608c0160408d01612938565b88886040518663ffffffff1660e01b8152600401611d00959493929190612b61565b600060405180830381600087803b158015611d1a57600080fd5b505af1158015611d2e573d6000803e3d6000fd5b5061094692508391505063ffffffff8a1661149360608b0160408c01612938565b6000611d5a81611df0565b600980546001600160a01b0319166001600160a01b0384169081179091556040519081527fe8bb4f6c907d6989b3d9dee0c5e349aa8df28ae64656a08117b35bf884b599cf90602001610ab7565b60005460ff1615611dee5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610853565b565b610edb8133612219565b63ffffffff811615611ec75760018211611e455760405162461bcd60e51b815260206004820152600c60248201526b37b7363c9018903a37b5b2b760a11b6044820152606401610853565b60095460405163fb2f1ffb60e01b81526004810185905260ff841660248201526001600160a01b039091169063fb2f1ffb906044016000604051808303816000875af1158015611e99573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ec19190810190612d03565b50505050565b60005b82811015611ec1576009546001600160a01b031663fb2f1ffb611eed8387612dd6565b6040516001600160e01b031960e084901b1681526004810191909152600160248201526044016000604051808303816000875af1158015611f32573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611f5a9190810190612d03565b50611f6481612dee565b9050611eca565b611f75828261111d565b6109f55760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b611fe0828261111d565b156109f55760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b612045611da8565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861207a3390565b6040516001600160a01b03909116815260200160405180910390a1565b600080612165866121256120b036899003890189612e07565b805160208083015160409384015184517f46005a0632aa795e20bc694a49ca5828d9bb02603636c1aa8841ef34163f30db818501526001600160a01b039094168486015263ffffffff9182166060850152166080808401919091528351808403909101815260a0909201909252805191012090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006121a98286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061227292505050565b90506121d57fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f708261111d565b979650505050505050565b6121e8612296565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361207a565b612223828261111d565b6109f557612230816122df565b61223b8360206122f1565b60405160200161224c929190612e9e565b60408051601f198184030181529082905262461bcd60e51b825261085391600401612f0d565b60008060006122818585612493565b9150915061228e816124d8565b509392505050565b60005460ff16611dee5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610853565b60606107ef6001600160a01b03831660145b60606000612300836002612c42565b61230b906002612dd6565b6001600160401b0381111561232257612322612c95565b6040519080825280601f01601f19166020018201604052801561234c576020820181803683370190505b509050600360fc1b8160008151811061236757612367612f40565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061239657612396612f40565b60200101906001600160f81b031916908160001a90535060006123ba846002612c42565b6123c5906001612dd6565b90505b600181111561243d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106123f9576123f9612f40565b1a60f81b82828151811061240f5761240f612f40565b60200101906001600160f81b031916908160001a90535060049490941c9361243681612f56565b90506123c8565b50831561248c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610853565b9392505050565b60008082516041036124c95760208301516040840151606085015160001a6124bd8782858561261d565b945094505050506124d1565b506000905060025b9250929050565b60008160048111156124ec576124ec612a1d565b036124f45750565b600181600481111561250857612508612a1d565b036125505760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610853565b600281600481111561256457612564612a1d565b036125b15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610853565b60038160048111156125c5576125c5612a1d565b03610edb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610853565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561264a57506000905060036126ce565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561269e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166126c7576000600192509250506126ce565b9150600090505b94509492505050565b6000602082840312156126e957600080fd5b81356001600160e01b03198116811461248c57600080fd5b80356001600160a01b038116811461271857600080fd5b919050565b60006020828403121561272f57600080fd5b61248c82612701565b803563ffffffff8116811461271857600080fd5b60008083601f84011261275e57600080fd5b5081356001600160401b0381111561277557600080fd5b6020830191508360208260051b85010111156124d157600080fd5b6000806000806000608086880312156127a857600080fd5b6127b186612701565b94506127bf60208701612738565b93506127cd60408701612738565b925060608601356001600160401b038111156127e857600080fd5b6127f48882890161274c565b969995985093965092949392505050565b60006020828403121561281757600080fd5b5035919050565b6000806040838503121561283157600080fd5b8235915061284160208401612701565b90509250929050565b60008060006060848603121561285f57600080fd5b61286884612701565b925061287660208501612701565b9150604084013590509250925092565b60008060006040848603121561289b57600080fd5b6128a484612738565b925060208401356001600160401b038111156128bf57600080fd5b6128cb8682870161274c565b9497909650939450505050565b600080600080606085870312156128ee57600080fd5b6128f785612701565b935061290560208601612738565b925060408501356001600160401b0381111561292057600080fd5b61292c8782880161274c565b95989497509550505050565b60006020828403121561294a57600080fd5b61248c82612738565b60008060008060008086880360c081121561296d57600080fd5b61297688612738565b96506060601f198201121561298a57600080fd5b5060208701945060808701356001600160401b03808211156129ab57600080fd5b818901915089601f8301126129bf57600080fd5b8135818111156129ce57600080fd5b8a60208285010111156129e057600080fd5b6020830196508095505060a08901359150808211156129fe57600080fd5b50612a0b89828a0161274c565b979a9699509497509295939492505050565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612a5557634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215612a6d57600080fd5b81356004811061248c57600080fd5b60008060008060008060a08789031215612a9557600080fd5b612a9e87612701565b9550612aac60208801612738565b9450612aba60408801612738565b9350612ac860608801612738565b925060808701356001600160401b03811115612ae357600080fd5b612a0b89828a0161274c565b60208082526009908201526862616420737461676560b81b604082015260600190565b600060208284031215612b2457600080fd5b5051919050565b81835260006001600160fb1b03831115612b4457600080fd5b8260051b8083602087013760009401602001938452509192915050565b6001600160a01b038616815263ffffffff8581166020830152841660408201526080606082018190526000906121d59083018486612b2b565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215612bd057600080fd5b8151801515811461248c57600080fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818516808303821115612c1557612c15612be0565b01949350505050565b6020808252600a908201526918985908185b5bdd5b9d60b21b604082015260600190565b6000816000190483118215151615612c5c57612c5c612be0565b500290565b60018060a01b038616815263ffffffff851660208201528360408201526080606082015260006121d5608083018486612b2b565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715612ccd57612ccd612c95565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612cfb57612cfb612c95565b604052919050565b60006020808385031215612d1657600080fd5b82516001600160401b0380821115612d2d57600080fd5b818501915085601f830112612d4157600080fd5b815181811115612d5357612d53612c95565b612d61848260051b01612cd3565b81815284810192506060918202840185019188831115612d8057600080fd5b938501935b82851015612dca5780858a031215612d9d5760008081fd5b612da5612cab565b8551815286860151878201526040808701519082015284529384019392850192612d85565b50979650505050505050565b60008219821115612de957612de9612be0565b500190565b600060018201612e0057612e00612be0565b5060010190565b600060608284031215612e1957600080fd5b604051606081018181106001600160401b0382111715612e3b57612e3b612c95565b604052612e4783612701565b8152612e5560208401612738565b6020820152612e6660408401612738565b60408201529392505050565b60005b83811015612e8d578181015183820152602001612e75565b83811115611ec15750506000910152565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351612ed0816017850160208801612e72565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612f01816028840160208801612e72565b01602801949350505050565b6020815260008251806020840152612f2c816040850160208701612e72565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b600081612f6557612f65612be0565b50600019019056fe9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122094f9dc1efefe436e13b2a746d13057942627d740762b22db58daaa23453cb0bc64736f6c634300080d003300000000000000000000000000000000000000000000000000f8b0a10e47000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000003000000000000000000000000ea1231fafc6180b249deab8faedec2620dc37bea000000000000000000000000c864cfb7d9607da20575f7a5e2d448744306c5a1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000079dc04494ce51c34ca9ec6dae643bfd8330df72300000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000b4f4720506c6174666f726d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013100000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102465760003560e01c806385eae37611610139578063b8e8d21f116100b6578063d547741f1161007a578063d547741f14610709578063e8dc9bd614610729578063eb12d61e14610749578063f7b188a514610769578063f94a4c671461077e578063f951f4f71461079e57600080fd5b8063b8e8d21f14610669578063c040e6b814610686578063c32fe85b146106b4578063ce3cd997146106c7578063d5391393146106e757600080fd5b80639d76ea58116100fd5780639d76ea58146105d7578063a035b1fe146105f7578063a1ebf35d1461060d578063a217fddf14610641578063b072d7381461065657600080fd5b806385eae3761461053757806391b7f5ed1461055757806391d14854146105775780639397a28414610597578063983b2d56146105b757600080fd5b806336568abe116101c75780635c975abb1161018b5780635c975abb146104aa57806363dab633146104c2578063704b6c02146104e25780637617ebdd146105025780638456cb591461052257600080fd5b806336568abe1461040a5780634025feb21461042a57806341bec0d21461044a57806344004cc11461046a57806351cff8d91461048a57600080fd5b80632062615c1161020e5780632062615c14610342578063248a9ca314610366578063276184ae146103975780632a7144f7146103b75780632f2ff15d146103ea57600080fd5b806301ffc9a71461024b5780631015805b1461028057806311a62bb3146102c8578063174ab889146103005780631e08836014610320575b600080fd5b34801561025757600080fd5b5061026b6102663660046126d7565b6107be565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102b361029b36600461271d565b60056020526000908152604090205463ffffffff1681565b60405163ffffffff9091168152602001610277565b3480156102d457600080fd5b506009546102e8906001600160a01b031681565b6040516001600160a01b039091168152602001610277565b34801561030c57600080fd5b506007546102e8906001600160a01b031681565b34801561032c57600080fd5b5061034061033b366004612790565b6107f5565b005b34801561034e57600080fd5b5061035860035481565b604051908152602001610277565b34801561037257600080fd5b50610358610381366004612805565b6000908152600160208190526040909120015490565b3480156103a357600080fd5b506008546102e8906001600160a01b031681565b3480156103c357600080fd5b506102b36103d236600461271d565b60046020526000908152604090205463ffffffff1681565b3480156103f657600080fd5b5061034061040536600461281e565b610950565b34801561041657600080fd5b5061034061042536600461281e565b61097b565b34801561043657600080fd5b5061034061044536600461284a565b6109f9565b34801561045657600080fd5b5061034061046536600461271d565b610a62565b34801561047657600080fd5b5061034061048536600461284a565b610ac3565b34801561049657600080fd5b506103406104a536600461271d565b610b48565b3480156104b657600080fd5b5060005460ff1661026b565b3480156104ce57600080fd5b506103406104dd366004612886565b610b88565b3480156104ee57600080fd5b506103406104fd36600461271d565b610e21565b34801561050e57600080fd5b5061034061051d366004612805565b610e88565b34801561052e57600080fd5b50610340610ec8565b34801561054357600080fd5b506103406105523660046128d8565b610ede565b34801561056357600080fd5b50610340610572366004612805565b6110dd565b34801561058357600080fd5b5061026b61059236600461281e565b61111d565b3480156105a357600080fd5b506103406105b2366004612938565b611148565b3480156105c357600080fd5b506103406105d236600461271d565b61119b565b3480156105e357600080fd5b506006546102e8906001600160a01b031681565b34801561060357600080fd5b5061035860025481565b34801561061957600080fd5b506103587fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7081565b34801561064d57600080fd5b50610358600081565b610340610664366004612953565b6111be565b34801561067557600080fd5b50600b546102b39063ffffffff1681565b34801561069257600080fd5b50600b546106a790600160201b900460ff1681565b6040516102779190612a33565b6103406106c2366004612886565b6114dc565b3480156106d357600080fd5b506103406106e2366004612a5b565b611737565b3480156106f357600080fd5b50610358600080516020612f6e83398151915281565b34801561071557600080fd5b5061034061072436600461281e565b61179c565b34801561073557600080fd5b50610340610744366004612a7c565b6117c2565b34801561075557600080fd5b5061034061076436600461271d565b6119b3565b34801561077557600080fd5b506103406119e8565b34801561078a57600080fd5b50610340610799366004612953565b6119fb565b3480156107aa57600080fd5b506103406107b936600461271d565b611d4f565b60006001600160e01b03198216637965db0b60e01b14806107ef57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6107fd611da8565b600080516020612f6e83398151915261081581611df0565b600380600b54600160201b900460ff16600381111561083657610836612a1d565b1461085c5760405162461bcd60e51b815260040161085390612aef565b60405180910390fd5b600654604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa1580156108a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ca9190612b12565b600654604051630dca6d7160e21b81529192506001600160a01b031690633729b5c490610903908b908b908b908b908b90600401612b61565b600060405180830381600087803b15801561091d57600080fd5b505af1158015610931573d6000803e3d6000fd5b50505050610946818863ffffffff1688611dfa565b5050505050505050565b6000828152600160208190526040909120015461096c81611df0565b6109768383611f6b565b505050565b6001600160a01b03811633146109eb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610853565b6109f58282611fd6565b5050565b6000610a0481611df0565b6040516323b872dd60e01b81526001600160a01b038416906323b872dd90610a3490309088908790600401612b9a565b600060405180830381600087803b158015610a4e57600080fd5b505af1158015610946573d6000803e3d6000fd5b6000610a6d81611df0565b600880546001600160a01b0319166001600160a01b0384169081179091556040519081527fb6d16f9d1240e3c1a2dc71c15426745edc5944c444b52da04542235b0cb99f5b906020015b60405180910390a15050565b6000610ace81611df0565b60405163a9059cbb60e01b81526001600160a01b0385811660048301526024820184905284169063a9059cbb906044016020604051808303816000875af1158015610b1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b419190612bbe565b5050505050565b6000610b5381611df0565b6040516001600160a01b038316904780156108fc02916000818181858888f19350505050158015610976573d6000803e3d6000fd5b610b90611da8565b600280600b54600160201b900460ff166003811115610bb157610bb1612a1d565b14610bce5760405162461bcd60e51b815260040161085390612aef565b6008546001600160a01b0316610c175760405162461bcd60e51b815260206004820152600e60248201526d195c98cc8c08191a5cd8589b195960921b6044820152606401610853565b600b543360009081526005602052604090205463ffffffff91821691610c3f91879116612bf6565b63ffffffff161115610c635760405162461bcd60e51b815260040161085390612c1e565b3360009081526005602052604081208054869290610c8890849063ffffffff16612bf6565b82546101009290920a63ffffffff8181021990931691831602179091556008546007546003546001600160a01b0392831694506323b872dd93339390921691610cd391908a16612c42565b6040518463ffffffff1660e01b8152600401610cf193929190612b9a565b6020604051808303816000875af1158015610d10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d349190612bbe565b50600654604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015610d7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da39190612b12565b600654604051630803d79760e21b81529192506001600160a01b03169063200f5e5c90610ddd90339089906000908a908a90600401612c61565b600060405180830381600087803b158015610df757600080fd5b505af1158015610e0b573d6000803e3d6000fd5b50505050610b41818663ffffffff166000611dfa565b6000610e2c81611df0565b6001600160a01b038216610e725760405162461bcd60e51b815260206004820152600d60248201526c656d707479206164647265737360981b6044820152606401610853565b610e7d600083611f6b565b6109f5600033611fd6565b6000610e9381611df0565b60038290556040518281527f1d67ee58cec9ec6d3de0643f069da3dca1e079d8675457e4f9fe3cd2275fd26290602001610ab7565b6000610ed381611df0565b610edb61203d565b50565b600080516020612f6e833981519152610ef681611df0565b610efe611da8565b600280600b54600160201b900460ff166003811115610f1f57610f1f612a1d565b14610f3c5760405162461bcd60e51b815260040161085390612aef565b600b546001600160a01b03871660009081526005602052604090205463ffffffff91821691610f6d91889116612bf6565b63ffffffff161115610f915760405162461bcd60e51b815260040161085390612c1e565b6001600160a01b03861660009081526005602052604081208054879290610fbf90849063ffffffff16612bf6565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000600660009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611032573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110569190612b12565b600654604051630803d79760e21b81529192506001600160a01b03169063200f5e5c90611090908a908a906000908b908b90600401612c61565b600060405180830381600087803b1580156110aa57600080fd5b505af11580156110be573d6000803e3d6000fd5b505050506110d4818763ffffffff166000611dfa565b50505050505050565b60006110e881611df0565b60028290556040518281527ffb92488ba7c255b32158331b4dd67ae708a8761b850ca51d1bbf57c177d35f8990602001610ab7565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600061115381611df0565b600b805463ffffffff191663ffffffff84169081179091556040519081527f87717f0de5df243b3ad7d794a85858de796db5f312ba8414d6295c0a80b736b790602001610ab7565b60006111a681611df0565b6109f5600080516020612f6e83398151915283611f6b565b6111c6611da8565b600180600b54600160201b900460ff1660038111156111e7576111e7612a1d565b146112045760405162461bcd60e51b815260040161085390612aef565b611212600a54878787612097565b6112485760405162461bcd60e51b81526020600482015260076024820152666261642073696760c81b6044820152606401610853565b33611256602088018861271d565b6001600160a01b0316146112995760405162461bcd60e51b815260206004820152600a6024820152693130b21039b2b73232b960b11b6044820152606401610853565b6002546112ac9063ffffffff8916612c42565b3410156112e75760405162461bcd60e51b81526020600482015260096024820152686261642076616c756560b81b6044820152606401610853565b6112f76040870160208801612938565b3360009081526004602052604090205463ffffffff9182169161131c918a9116612bf6565b63ffffffff1611156113405760405162461bcd60e51b815260040161085390612c1e565b336000908152600460205260408120805489929061136590849063ffffffff16612bf6565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000600660009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fc9190612b12565b6006549091506001600160a01b031663200f5e5c338a61142260608c0160408d01612938565b88886040518663ffffffff1660e01b8152600401611444959493929190612b61565b600060405180830381600087803b15801561145e57600080fd5b505af1158015611472573d6000803e3d6000fd5b5061149892508391505063ffffffff8a1661149360608b0160408c01612938565b611dfa565b6007546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156114d1573d6000803e3d6000fd5b505050505050505050565b6114e4611da8565b600280600b54600160201b900460ff16600381111561150557611505612a1d565b146115225760405162461bcd60e51b815260040161085390612aef565b6002546115359063ffffffff8616612c42565b3410156115705760405162461bcd60e51b81526020600482015260096024820152686261642076616c756560b81b6044820152606401610853565b600b543360009081526005602052604090205463ffffffff9182169161159891879116612bf6565b63ffffffff1611156115bc5760405162461bcd60e51b815260040161085390612c1e565b33600090815260056020526040812080548692906115e190849063ffffffff16612bf6565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000600660009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611654573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116789190612b12565b600654604051630803d79760e21b81529192506001600160a01b03169063200f5e5c906116b290339089906000908a908a90600401612c61565b600060405180830381600087803b1580156116cc57600080fd5b505af11580156116e0573d6000803e3d6000fd5b505050506116f6818663ffffffff166000611dfa565b6007546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561172f573d6000803e3d6000fd5b505050505050565b600061174281611df0565b600b805483919064ff000000001916600160201b83600381111561176857611768612a1d565b02179055507fd9cae27d4c24409b509a14bf857c9aef50e0559ee2d0d6b4bd6acc5aa6ddb09d82604051610ab79190612a33565b600082815260016020819052604090912001546117b881611df0565b6109768383611fd6565b600080516020612f6e8339815191526117da81611df0565b6117e2611da8565b600180600b54600160201b900460ff16600381111561180357611803612a1d565b146118205760405162461bcd60e51b815260040161085390612aef565b6001600160a01b03881660009081526004602052604090205463ffffffff8088169161184e918a9116612bf6565b63ffffffff1611156118725760405162461bcd60e51b815260040161085390612c1e565b6001600160a01b038816600090815260046020526040812080548992906118a090849063ffffffff16612bf6565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000600660009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611913573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119379190612b12565b600654604051630803d79760e21b81529192506001600160a01b03169063200f5e5c90611970908c908c908b908b908b90600401612b61565b600060405180830381600087803b15801561198a57600080fd5b505af115801561199e573d6000803e3d6000fd5b505050506114d1818963ffffffff1688611dfa565b60006119be81611df0565b6109f57fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7083611f6b565b60006119f381611df0565b610edb6121e0565b611a03611da8565b600180600b54600160201b900460ff166003811115611a2457611a24612a1d565b14611a415760405162461bcd60e51b815260040161085390612aef565b6008546001600160a01b0316611a8a5760405162461bcd60e51b815260206004820152600e60248201526d195c98cc8c08191a5cd8589b195960921b6044820152606401610853565b611a98600a54878787612097565b611ace5760405162461bcd60e51b81526020600482015260076024820152666261642073696760c81b6044820152606401610853565b33611adc602088018861271d565b6001600160a01b031614611b1f5760405162461bcd60e51b815260206004820152600a6024820152693130b21039b2b73232b960b11b6044820152606401610853565b611b2f6040870160208801612938565b3360009081526004602052604090205463ffffffff91821691611b54918a9116612bf6565b63ffffffff161115611b785760405162461bcd60e51b815260040161085390612c1e565b3360009081526004602052604081208054899290611b9d90849063ffffffff16612bf6565b82546101009290920a63ffffffff8181021990931691831602179091556008546007546003546001600160a01b0392831694506323b872dd93339390921691611be891908d16612c42565b6040518463ffffffff1660e01b8152600401611c0693929190612b9a565b6020604051808303816000875af1158015611c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c499190612bbe565b50600654604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611c94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cb89190612b12565b6006549091506001600160a01b031663200f5e5c338a611cde60608c0160408d01612938565b88886040518663ffffffff1660e01b8152600401611d00959493929190612b61565b600060405180830381600087803b158015611d1a57600080fd5b505af1158015611d2e573d6000803e3d6000fd5b5061094692508391505063ffffffff8a1661149360608b0160408c01612938565b6000611d5a81611df0565b600980546001600160a01b0319166001600160a01b0384169081179091556040519081527fe8bb4f6c907d6989b3d9dee0c5e349aa8df28ae64656a08117b35bf884b599cf90602001610ab7565b60005460ff1615611dee5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610853565b565b610edb8133612219565b63ffffffff811615611ec75760018211611e455760405162461bcd60e51b815260206004820152600c60248201526b37b7363c9018903a37b5b2b760a11b6044820152606401610853565b60095460405163fb2f1ffb60e01b81526004810185905260ff841660248201526001600160a01b039091169063fb2f1ffb906044016000604051808303816000875af1158015611e99573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ec19190810190612d03565b50505050565b60005b82811015611ec1576009546001600160a01b031663fb2f1ffb611eed8387612dd6565b6040516001600160e01b031960e084901b1681526004810191909152600160248201526044016000604051808303816000875af1158015611f32573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611f5a9190810190612d03565b50611f6481612dee565b9050611eca565b611f75828261111d565b6109f55760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b611fe0828261111d565b156109f55760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b612045611da8565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861207a3390565b6040516001600160a01b03909116815260200160405180910390a1565b600080612165866121256120b036899003890189612e07565b805160208083015160409384015184517f46005a0632aa795e20bc694a49ca5828d9bb02603636c1aa8841ef34163f30db818501526001600160a01b039094168486015263ffffffff9182166060850152166080808401919091528351808403909101815260a0909201909252805191012090565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b905060006121a98286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061227292505050565b90506121d57fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f708261111d565b979650505050505050565b6121e8612296565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361207a565b612223828261111d565b6109f557612230816122df565b61223b8360206122f1565b60405160200161224c929190612e9e565b60408051601f198184030181529082905262461bcd60e51b825261085391600401612f0d565b60008060006122818585612493565b9150915061228e816124d8565b509392505050565b60005460ff16611dee5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610853565b60606107ef6001600160a01b03831660145b60606000612300836002612c42565b61230b906002612dd6565b6001600160401b0381111561232257612322612c95565b6040519080825280601f01601f19166020018201604052801561234c576020820181803683370190505b509050600360fc1b8160008151811061236757612367612f40565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061239657612396612f40565b60200101906001600160f81b031916908160001a90535060006123ba846002612c42565b6123c5906001612dd6565b90505b600181111561243d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106123f9576123f9612f40565b1a60f81b82828151811061240f5761240f612f40565b60200101906001600160f81b031916908160001a90535060049490941c9361243681612f56565b90506123c8565b50831561248c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610853565b9392505050565b60008082516041036124c95760208301516040840151606085015160001a6124bd8782858561261d565b945094505050506124d1565b506000905060025b9250929050565b60008160048111156124ec576124ec612a1d565b036124f45750565b600181600481111561250857612508612a1d565b036125505760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610853565b600281600481111561256457612564612a1d565b036125b15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610853565b60038160048111156125c5576125c5612a1d565b03610edb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610853565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561264a57506000905060036126ce565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561269e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166126c7576000600192509250506126ce565b9150600090505b94509492505050565b6000602082840312156126e957600080fd5b81356001600160e01b03198116811461248c57600080fd5b80356001600160a01b038116811461271857600080fd5b919050565b60006020828403121561272f57600080fd5b61248c82612701565b803563ffffffff8116811461271857600080fd5b60008083601f84011261275e57600080fd5b5081356001600160401b0381111561277557600080fd5b6020830191508360208260051b85010111156124d157600080fd5b6000806000806000608086880312156127a857600080fd5b6127b186612701565b94506127bf60208701612738565b93506127cd60408701612738565b925060608601356001600160401b038111156127e857600080fd5b6127f48882890161274c565b969995985093965092949392505050565b60006020828403121561281757600080fd5b5035919050565b6000806040838503121561283157600080fd5b8235915061284160208401612701565b90509250929050565b60008060006060848603121561285f57600080fd5b61286884612701565b925061287660208501612701565b9150604084013590509250925092565b60008060006040848603121561289b57600080fd5b6128a484612738565b925060208401356001600160401b038111156128bf57600080fd5b6128cb8682870161274c565b9497909650939450505050565b600080600080606085870312156128ee57600080fd5b6128f785612701565b935061290560208601612738565b925060408501356001600160401b0381111561292057600080fd5b61292c8782880161274c565b95989497509550505050565b60006020828403121561294a57600080fd5b61248c82612738565b60008060008060008086880360c081121561296d57600080fd5b61297688612738565b96506060601f198201121561298a57600080fd5b5060208701945060808701356001600160401b03808211156129ab57600080fd5b818901915089601f8301126129bf57600080fd5b8135818111156129ce57600080fd5b8a60208285010111156129e057600080fd5b6020830196508095505060a08901359150808211156129fe57600080fd5b50612a0b89828a0161274c565b979a9699509497509295939492505050565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612a5557634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215612a6d57600080fd5b81356004811061248c57600080fd5b60008060008060008060a08789031215612a9557600080fd5b612a9e87612701565b9550612aac60208801612738565b9450612aba60408801612738565b9350612ac860608801612738565b925060808701356001600160401b03811115612ae357600080fd5b612a0b89828a0161274c565b60208082526009908201526862616420737461676560b81b604082015260600190565b600060208284031215612b2457600080fd5b5051919050565b81835260006001600160fb1b03831115612b4457600080fd5b8260051b8083602087013760009401602001938452509192915050565b6001600160a01b038616815263ffffffff8581166020830152841660408201526080606082018190526000906121d59083018486612b2b565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215612bd057600080fd5b8151801515811461248c57600080fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818516808303821115612c1557612c15612be0565b01949350505050565b6020808252600a908201526918985908185b5bdd5b9d60b21b604082015260600190565b6000816000190483118215151615612c5c57612c5c612be0565b500290565b60018060a01b038616815263ffffffff851660208201528360408201526080606082015260006121d5608083018486612b2b565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715612ccd57612ccd612c95565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612cfb57612cfb612c95565b604052919050565b60006020808385031215612d1657600080fd5b82516001600160401b0380821115612d2d57600080fd5b818501915085601f830112612d4157600080fd5b815181811115612d5357612d53612c95565b612d61848260051b01612cd3565b81815284810192506060918202840185019188831115612d8057600080fd5b938501935b82851015612dca5780858a031215612d9d5760008081fd5b612da5612cab565b8551815286860151878201526040808701519082015284529384019392850192612d85565b50979650505050505050565b60008219821115612de957612de9612be0565b500190565b600060018201612e0057612e00612be0565b5060010190565b600060608284031215612e1957600080fd5b604051606081018181106001600160401b0382111715612e3b57612e3b612c95565b604052612e4783612701565b8152612e5560208401612738565b6020820152612e6660408401612738565b60408201529392505050565b60005b83811015612e8d578181015183820152602001612e75565b83811115611ec15750506000910152565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351612ed0816017850160208801612e72565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612f01816028840160208801612e72565b01602801949350505050565b6020815260008251806020840152612f2c816040850160208701612e72565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b600081612f6557612f65612be0565b50600019019056fe9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122094f9dc1efefe436e13b2a746d13057942627d740762b22db58daaa23453cb0bc64736f6c634300080d0033

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

00000000000000000000000000000000000000000000000000f8b0a10e47000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000003000000000000000000000000ea1231fafc6180b249deab8faedec2620dc37bea000000000000000000000000c864cfb7d9607da20575f7a5e2d448744306c5a1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000079dc04494ce51c34ca9ec6dae643bfd8330df72300000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000b4f4720506c6174666f726d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013100000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _price (uint256): 70000000000000000
Arg [1] : _erc20price (uint256): 100
Arg [2] : _maxPublicMinted (uint32): 3
Arg [3] : _tokenAddress (address): 0xEa1231Fafc6180b249dEAB8FaEdEC2620dc37beA
Arg [4] : _forwarderAddress (address): 0xc864CfB7d9607da20575f7a5E2d448744306c5A1
Arg [5] : _erc20Address (address): 0x0000000000000000000000000000000000000000
Arg [6] : _heterosisAddress (address): 0x79DC04494CE51c34cA9EC6Dae643bfd8330Df723
Arg [7] : _appName (string): OG Platform
Arg [8] : _version (string): 1

-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000f8b0a10e470000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [3] : 000000000000000000000000ea1231fafc6180b249deab8faedec2620dc37bea
Arg [4] : 000000000000000000000000c864cfb7d9607da20575f7a5e2d448744306c5a1
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 00000000000000000000000079dc04494ce51c34ca9ec6dae643bfd8330df723
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [9] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [10] : 4f4720506c6174666f726d000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [12] : 3100000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.