ETH Price: $2,954.72 (-5.32%)
Gas: 7 Gwei

Contract

0x420CBD9f1CB5351D347F4B5D44D83a91514C43b0
 

Overview

ETH Balance

1.9162 ETH

Eth Value

$5,661.83 (@ $2,954.72/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Mint200777472024-06-12 19:10:2322 days ago1718219423IN
0x420CBD9f...1514C43b0
0.1742 ETH0.0018187416.64980259
Set Approval For...199520032024-05-26 5:36:2340 days ago1716701783IN
0x420CBD9f...1514C43b0
0 ETH0.000142513.05473153
Mint198838442024-05-16 16:50:5949 days ago1715878259IN
0x420CBD9f...1514C43b0
0.1742 ETH0.00079447.27242358
Set Approval For...198275382024-05-08 19:51:2357 days ago1715197883IN
0x420CBD9f...1514C43b0
0 ETH0.000243995.23008378
Safe Transfer Fr...198267242024-05-08 17:07:4757 days ago1715188067IN
0x420CBD9f...1514C43b0
0 ETH0.000334135.6477823
Safe Transfer Fr...197994862024-05-04 21:40:4761 days ago1714858847IN
0x420CBD9f...1514C43b0
0 ETH0.000297785.03772679
Set Approval For...197857382024-05-02 23:33:4763 days ago1714692827IN
0x420CBD9f...1514C43b0
0 ETH0.000278445.96843455
Set Approval For...197834802024-05-02 15:57:5963 days ago1714665479IN
0x420CBD9f...1514C43b0
0 ETH0.0007136115.29626761
Safe Transfer Fr...197829592024-05-02 14:13:1164 days ago1714659191IN
0x420CBD9f...1514C43b0
0 ETH0.0007422212.54285677
Set Approval For...197285552024-04-24 23:38:1171 days ago1714001891IN
0x420CBD9f...1514C43b0
0 ETH0.000342637.34436596
Mint196824762024-04-18 12:55:1178 days ago1713444911IN
0x420CBD9f...1514C43b0
0.1742 ETH0.0013095211.98811088
Set Approval For...196699402024-04-16 18:50:5979 days ago1713293459IN
0x420CBD9f...1514C43b0
0 ETH0.0004951910.61435586
Mint196638372024-04-15 22:18:5980 days ago1713219539IN
0x420CBD9f...1514C43b0
0.1742 ETH0.0013083511.97747763
Mint196612722024-04-15 13:41:2381 days ago1713188483IN
0x420CBD9f...1514C43b0
0.1742 ETH0.002204820.18405519
Mint196438772024-04-13 3:08:1183 days ago1712977691IN
0x420CBD9f...1514C43b0
0.1742 ETH0.0015522214.20992361
Mint196399382024-04-12 13:50:5984 days ago1712929859IN
0x420CBD9f...1514C43b0
0.1742 ETH0.0034949731.99502655
Mint196285072024-04-10 23:27:2385 days ago1712791643IN
0x420CBD9f...1514C43b0
0.1742 ETH0.0017068915.62593021
Mint196143602024-04-08 23:56:5987 days ago1712620619IN
0x420CBD9f...1514C43b0
0.1742 ETH0.0016304414.92602293
Mint196127692024-04-08 18:35:5987 days ago1712601359IN
0x420CBD9f...1514C43b0
0.1742 ETH0.004767643.64536189
Mint195997342024-04-06 22:43:3589 days ago1712443415IN
0x420CBD9f...1514C43b0
0.1742 ETH0.001117810.23303129
Withdraw195575952024-04-01 1:01:4795 days ago1711933307IN
0x420CBD9f...1514C43b0
0 ETH0.000786919.16158278
Set Approval For...195339162024-03-28 17:00:5998 days ago1711645259IN
0x420CBD9f...1514C43b0
0 ETH0.0022036247.23437062
Mint195067852024-03-24 20:31:35102 days ago1711312295IN
0x420CBD9f...1514C43b0
0.1742 ETH0.0021350219.5452876
Set Approval For...195064202024-03-24 19:17:47102 days ago1711307867IN
0x420CBD9f...1514C43b0
0 ETH0.0005094420.59113087
Set Approval For...194970272024-03-23 11:33:35104 days ago1711193615IN
0x420CBD9f...1514C43b0
0 ETH0.0008511418.24418297
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
195575952024-04-01 1:01:4795 days ago1711933307
0x420CBD9f...1514C43b0
0.02613 ETH
195575952024-04-01 1:01:4795 days ago1711933307
0x420CBD9f...1514C43b0
0.84487 ETH
194558792024-03-17 16:54:11109 days ago1710694451
0x420CBD9f...1514C43b0
0.083616 ETH
194558792024-03-17 16:54:11109 days ago1710694451
0x420CBD9f...1514C43b0
2.703584 ETH
193579942024-03-03 23:42:59123 days ago1709509379
0x420CBD9f...1514C43b0
0.010452 ETH
193579942024-03-03 23:42:59123 days ago1709509379
0x420CBD9f...1514C43b0
0.337948 ETH
193185272024-02-27 11:15:35129 days ago1709032535
0x420CBD9f...1514C43b0
0.005226 ETH
193185272024-02-27 11:15:35129 days ago1709032535
0x420CBD9f...1514C43b0
0.168974 ETH
192577292024-02-18 22:46:11137 days ago1708296371
0x420CBD9f...1514C43b0
0.020904 ETH
192577292024-02-18 22:46:11137 days ago1708296371
0x420CBD9f...1514C43b0
0.675896 ETH
191113892024-01-29 9:48:23158 days ago1706521703
0x420CBD9f...1514C43b0
0.005226 ETH
191113892024-01-29 9:48:23158 days ago1706521703
0x420CBD9f...1514C43b0
0.168974 ETH
190931832024-01-26 20:33:47160 days ago1706301227
0x420CBD9f...1514C43b0
0.005226 ETH
190931832024-01-26 20:33:47160 days ago1706301227
0x420CBD9f...1514C43b0
0.168974 ETH
190626772024-01-22 13:50:23165 days ago1705931423
0x420CBD9f...1514C43b0
0.005226 ETH
190626772024-01-22 13:50:23165 days ago1705931423
0x420CBD9f...1514C43b0
0.168974 ETH
189716792024-01-09 20:07:23177 days ago1704830843
0x420CBD9f...1514C43b0
0.005226 ETH
189716792024-01-09 20:07:23177 days ago1704830843
0x420CBD9f...1514C43b0
0.168974 ETH
189486912024-01-06 14:15:23181 days ago1704550523
0x420CBD9f...1514C43b0
0.005226 ETH
189486912024-01-06 14:15:23181 days ago1704550523
0x420CBD9f...1514C43b0
0.168974 ETH
189345062024-01-04 14:16:11183 days ago1704377771
0x420CBD9f...1514C43b0
0.015678 ETH
189345062024-01-04 14:16:11183 days ago1704377771
0x420CBD9f...1514C43b0
0.506922 ETH
181166752023-09-12 0:26:23297 days ago1694478383
0x420CBD9f...1514C43b0
0.041808 ETH
181166752023-09-12 0:26:23297 days ago1694478383
0x420CBD9f...1514C43b0
1.351792 ETH
177142482023-07-17 16:44:11353 days ago1689612251
0x420CBD9f...1514C43b0
0.258 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OlimpoPass

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : OlimpoPass.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";

import "./interface/IOlimpoPass.sol";

error AddressNotFoundInAllowlist(address minter);
error AddressMintedInPhase(address minter);
error AddressUnauthorized(address sender);
error MismatchingPrice(uint256 amount);
error NonExistantTokenId(uint256 tokenId);
error PhaseDoesNotExist(uint256 phaseId);
error PhaseNotActive(uint256 phaseId);
error PhaseMustBeNamed();
error PurchaseExceedsMaxSupply();

/**
 *  ██████╗ ██╗     ██╗███╗   ███╗██████╗  ██████╗
 * ██╔═══██╗██║     ██║████╗ ████║██╔══██╗██╔═══██╗
 * ██║   ██║██║     ██║██╔████╔██║██████╔╝██║   ██║
 * ██║   ██║██║     ██║██║╚██╔╝██║██╔═══╝ ██║   ██║
 * ╚██████╔╝███████╗██║██║ ╚═╝ ██║██║     ╚██████╔╝
 *  ╚═════╝ ╚══════╝╚═╝╚═╝     ╚═╝╚═╝      ╚═════╝
 * ██╗  ██╗
 * ╚██╗██╔╝
 *  ╚███╔╝
 *  ██╔██╗
 * ██╔╝ ██╗
 * ╚═╝  ╚═╝
 * ██████╗ ██╗      ██████╗  ██████╗██╗  ██╗███████╗██╗   ██╗██╗
 * ██╔══██╗██║     ██╔═══██╗██╔════╝██║ ██╔╝██╔════╝██║   ██║██║
 * ██████╔╝██║     ██║   ██║██║     █████╔╝ █████╗  ██║   ██║██║
 * ██╔══██╗██║     ██║   ██║██║     ██╔═██╗ ██╔══╝  ██║   ██║██║
 * ██████╔╝███████╗╚██████╔╝╚██████╗██║  ██╗██║     ╚██████╔╝███████╗
 * ╚═════╝ ╚══════╝ ╚═════╝  ╚═════╝╚═╝  ╚═╝╚═╝      ╚═════╝ ╚══════╝
 *
 * @title Olimpo Pass
 * @author @0xneves | @Blockful_io - https://blockful.io
 * @dev Extends ERC721 Non-Fungible Token Standard
 */
contract OlimpoPass is IOlimpoPass, ERC721, ERC2981 {
    using Strings for uint256;

    // Counters for token IDs and phases
    uint256 public currentSupply;
    uint256 public phasesCount;

    // Contract details
    uint256 public constant totalSupply = 888;
    address public immutable treasury;
    address public immutable dev;
    address public immutable admin;

    // Mappings
    mapping(uint256 => MintPhases) private phases;
    mapping(uint256 => mapping(address => bool)) private mintedInPhase;

    /**
     * @dev Initializes the contract by setting the `name` and `symbol` to the token collection.
     */
    constructor(
        address _treasury,
        address _dev,
        address _admin
    ) ERC721("OLIMPO PASS", "OLP") {
        dev = _dev;
        treasury = _treasury;
        admin = _admin;
        _setDefaultRoyalty(address(this), 1000);
    }

    /**
     * @dev Throws if the sender is not the admin.
     */
    modifier onlyAdmin() {
        if (admin != msg.sender) {
            revert AddressUnauthorized(msg.sender);
        }
        _;
    }

    /**
     * @dev Safely mint `tokenId` to the `msg.sender`.
     *
     * `currentSupply` starts at 1 and increments every mint.
     *
     * This external function allows anyone to mint a token if the phase is active,
     * the currentSupply is less than the maximum, and the `msg.sender` has not
     * minted already. If the phase has an allowlist, the `msg.sender` must be in
     * the allowlist, otherwise anyone can mint.
     *
     * IMPORTANT! When the public mint starts, allowlists would not matter anymore.
     *
     * Requirements:
     *
     * - Phase `_id` and `msg.sender` must match all validation criteria.
     * - `currentSupply` must be less than maximum (1111).
     *
     * Emits a {IOlimpoPass-Minted} event.
     */
    function mint(
        uint256 _id,
        uint256 _addressIndex
    ) external payable returns (uint256) {
        // Verify minting process
        _safeCheck(_id, _addressIndex);

        // Check supply overflow
        if (currentSupply + 1 > totalSupply) {
            revert PurchaseExceedsMaxSupply();
        }

        // Increase supply
        unchecked {
            currentSupply++;
        }

        // Mint token and emit event
        _safeMint(msg.sender, currentSupply);
        emit Minted(msg.sender, currentSupply);

        return currentSupply;
    }

    /**
     * @dev This internal verification will validate the minting process and set
     * the `mintedInPhase` mapping to an address as true if the verification passes.
     *
     * Minting Phases are created by the admin and can be activated or deactivated.
     * When a phase is active, anyone can mint a token if the `msg.sender` is in the
     * allowlist, otherwise only the admin can mint.
     *
     * Requirements:
     * - Phase `_id` must be an active phase.
     * - `msg.value` must be equal to `mintPrice` settled in the phase.
     * - `msg.sender` must be in the `allowlist` if there is one.
     * - `msg.sender` cannot mint two tokens.
     */
    function _safeCheck(uint256 _id, uint256 _addressIndex) internal {
        MintPhases memory phase = phases[_id];

        if (!phase.isActive) {
            revert PhaseNotActive(_id);
        }

        if (msg.value != phase.mintPrice) {
            revert MismatchingPrice(msg.value);
        }

        if (
            phase.allowlist.length != 0 &&
            phase.allowlist[_addressIndex] != msg.sender
        ) {
            revert AddressNotFoundInAllowlist(msg.sender);
        }

        if (mintedInPhase[_id][msg.sender]) {
            revert AddressMintedInPhase(msg.sender);
        }

        mintedInPhase[_id][msg.sender] = true;
    }

    /**
     * @dev This function allows the admin to airdrop tokens to an array of addresses.
     *
     * Requirements:
     * - `currentSupply` must be less than maximum (1111).
     * - `msg.sender` must be the admin.
     *
     * @param _addrs Array of addresses to airdrop tokens to.
     */
    function airdrop(address[] calldata _addrs) public onlyAdmin {
        uint length = _addrs.length;

        if (currentSupply + length > totalSupply) {
            revert PurchaseExceedsMaxSupply();
        }

        for (uint i = 0; i < length; i++) {
            unchecked {
                currentSupply++;
            }

            address addr = _addrs[i];
            _safeMint(addr, currentSupply);
            emit Minted(addr, currentSupply);
        }
    }

    /**
     * @dev See {IOlimpoPass-createMintingPhase}.
     */
    function createMintingPhase(
        string memory _name,
        uint256 _price,
        address[] calldata _addresses
    ) external onlyAdmin {
        if (abi.encodePacked(_name).length == 0) {
            revert PhaseMustBeNamed();
        }

        unchecked {
            phasesCount++;
        }

        phases[phasesCount].phaseName = _name;
        phases[phasesCount].mintPrice = _price;
        phases[phasesCount].allowlist = _addresses;

        emit PhaseCreated(phasesCount, _name);
    }

    /**
     * @dev See {IOlimpoPass-createMintingPhase}.
     */
    function deletePhase(uint _id) external onlyAdmin {
        _phaseExists(_id);
        delete phases[_id];

        unchecked {
            phasesCount--;
        }

        emit PhaseDeleted(_id);
    }

    /**
     * @dev See {IOlimpoPass-changePhaseActiveState}.
     */
    function changePhaseActiveState(uint256 _id) external onlyAdmin {
        _phaseExists(_id);

        MintPhases memory phase = phases[_id];
        phases[_id].isActive = !phase.isActive;

        emit PhaseActivity(_id, phase.phaseName, !phase.isActive);
    }

    /**
     * @dev Overrides the the original baseURI to return what is set in the contract
     * @return The base URI for all tokens
     */
    function _baseURI() internal view virtual override returns (string memory) {
        return
            "ipfs://bafybeicfbuttpn6tdnfg4rfwycgoqf5vhy3ni5ejr5jnf6cruczijxr3ii/";
    }

    /**
     * @dev Returns the token URI for a given token ID
     * @param _tokenId The token ID to return the URI for
     * @return The token URI for the given token ID
     */
    function tokenURI(
        uint256 _tokenId
    ) public view override returns (string memory) {
        if (!_exists(_tokenId)) {
            revert NonExistantTokenId(_tokenId);
        }

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

    /**
     * @dev See {IOlimpoPass-getPhase}.
     */
    function getPhase(uint256 _id) public view returns (MintPhases memory) {
        _phaseExists(_id);
        return phases[_id];
    }

    /**
     * @dev See {IOlimpoPass-getMintedStatus}.
     */
    function getMintedStatus(
        uint256 _id,
        address _addr
    ) public view returns (bool) {
        _phaseExists(_id);
        return mintedInPhase[_id][_addr];
    }

    /**
     * @dev Returns the index of an address in a given phase `_id`
     *
     * Notice this is only used for the front/back to fetch the index
     * of an `address` before minting the NFT, which will be used to
     * determine if the user is whitelisted or not.
     *
     * `for` method, might have multiple loops. When called on-chain,
     * becomes very costly, so it's not present in the interface and
     * should only be called off-chain.
     *
     * Requirements:
     *
     * - Phase `_id` must exist.
     * - `msg.sender` must exist in the phase.
     *
     * @param _id The phase ID to search for the address
     * @param _addr The address to search for
     * @return The index of the address in the phase
     */
    function getIndexOfAddressInAllowlist(
        uint256 _id,
        address _addr
    ) public view returns (uint256) {
        _phaseExists(_id);

        MintPhases memory phase = phases[_id];

        for (uint i = 0; i < phase.allowlist.length; i++) {
            if (phase.allowlist[i] == _addr) {
                return i;
            }
        }

        revert AddressNotFoundInAllowlist(_addr);
    }

    /**
     * @dev See {IOlimpoPass-getRoyaltyInfo}.
     */
    function getRoyaltyInfo() external view returns (address, uint96) {
        return (address(this), 1000);
    }

    /**
     * @dev Returns the address of the current owner.
     * This is the `bytes4` recognized interface for Ownable.
     * Marketplaces like OpenSea will read this value to let
     * the returned address edit the page of the contract.
     *
     * @return The address of the current owner
     */
    function owner() public view virtual returns (address) {
        return admin;
    }

    /**
     * @dev This internal function is used to check if a given phase `_id` exists.
     */
    function _phaseExists(uint256 _id) internal view {
        if (abi.encodePacked(phases[_id].phaseName).length == 0) {
            revert PhaseDoesNotExist(_id);
        }
    }

    /**
     * @dev Supports interface
     * @param interfaceId The interface ID
     * @return True if the interface is supported
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view override(ERC721, ERC2981) returns (bool) {
        return
            interfaceId == 0x2a55205a || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IOlimpoPass-withdraw}.
     */
    function withdraw() external payable {
        uint256 balance = address(this).balance;
        uint256 treasuryAmount = (balance / 10000) * 9700; // 97%
        uint256 devAmount = address(this).balance - treasuryAmount; // 3%

        payable(treasury).call{value: treasuryAmount}("");

        payable(dev).call{value: devAmount}("");
    }

    /* Receive ETH */
    receive() external payable {}
}

File 2 of 15 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(
        uint256 tokenId,
        uint256 salePrice
    ) external view returns (address receiver, uint256 royaltyAmount);
}

File 3 of 15 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

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

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

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

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

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

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

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

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

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

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

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

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

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

        _afterTokenTransfer(address(0), to, tokenId, 1);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

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

        _afterTokenTransfer(owner, address(0), tokenId, 1);
    }

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

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

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

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

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

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

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
     * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
     * that `ownerOf(tokenId)` is `a`.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __unsafe_increaseBalance(address account, uint256 amount) internal {
        _balances[account] += amount;
    }
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 6 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 7 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 8 of 15 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 9 of 15 : 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 10 of 15 : 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 15 : 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 15 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 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 256, 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 << 3) < value ? 1 : 0);
        }
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

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

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

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

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 15 of 15 : IOlimpoPass.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IOlimpoPass {
    /* Mint Struct */
    struct MintPhases {
        string phaseName;
        uint256 mintPrice;
        address[] allowlist;
        bool isActive;
    }

    /**
     * @dev Emitted when `tokenId` is minted.
     */
    event Minted(address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when the minting phase is created.
     */
    event PhaseCreated(uint256 indexed phaseId, string phaseName);

    /**
     * @dev Emitted when the minting phase is deleted.
     */
    event PhaseDeleted(uint256 indexed phaseId);

    /**
     * @dev Emitted when the phase active status changes.
     */
    event PhaseActivity(
        uint256 indexed phaseId,
        string phaseName,
        bool isActive
    );

    /**
     * @dev Create a new `Mint Phase` regarding the input parameters and right
     * conditions for the allowlist.
     *
     * `id` starts at 0 and increments every new phase. This helps coordinating
     * the launch sequence with more ease.
     *
     * The phase is created with a `name`, `price` and an `allowlist`.
     * The `allowlist` is an array of addresses that are allowed to mint tokens
     * in the given phase. The `price` is the amount of ETH that the user has
     * to pay to mint a token.
     *
     * Notice that: phases can be switched on and off. This is done by the
     * `changePhaseActiveState` function. Phases can also be deleted by the
     * `deletePhase` function in case there are invalid inputs or compromised
     * wallets in the allowlist.
     *
     * Requirements:
     *
     * - `msg.sender` must be the contract admin.
     * - `_name` must not be empty to avoid non-existent phases.
     *
     * Emits a {PhaseCreated} event.
     */
    function createMintingPhase(
        string calldata _name,
        uint256 _price,
        address[] memory _addresses
    ) external;

    /**
     * @dev Deletes an existing phase regarding the given `phaseId`.
     *
     * This external function allows the contract admin to delete a minting
     * phase. The phase is deleted based on the provided `phaseId`.
     *
     * Notice that this feature is a storage management decision. To avoid
     * having phases that doesn`t not consent to the launch sequence.
     *
     * IMPORTANT! Watch when deleting phases. This action will remove the
     * phase from the array, but if data is already stored in the deleted
     * phase id mappings, it will remain there. This means that the phase
     * deletion will not remove the data from the mappings. Please do not
     * delete phases if you have already minted tokens in that phase. You
     * should deactivate the phase instead, or create an empty phase as
     * replacement.
     *
     * Requirements:
     *
     * - `msg.sender` must be the contract admin.
     * - `_id` must be a valid phase.
     *
     * Emits a {PhaseDeleted} event.
     */
    function deletePhase(uint256 _id) external;

    /**
     * @dev Changes the active state of a phase regarding the given `phaseId`.
     *
     * This external function allows the contract admin to trigger the active
     * state of a minting phase. The phase is deleted based on the provided
     * `phaseId`.
     *
     * This function will be activated by the contract admin when each launch
     * sequence is ready to rock or ready to kick its boots.
     *
     * Requirements:
     *
     * - `msg.sender` must be the contract admin.
     * - `_id` must be a valid phase.
     *
     * Emits a {PhaseDeleted} event.
     */
    function changePhaseActiveState(uint256 _id) external;

    /**
     * @dev Returns the current phase struct information.
     *
     * Requirements:
     *
     * - Phase `_id` must exist.
     */
    function getPhase(uint256 _id) external view returns (MintPhases memory);

    /**
     * @dev Returns a boolean value if the address `_addr` has already
     * minted a token in the phase `_id`.
     *
     * Requirements:
     *
     * - Phase `_id` must exist.
     */
    function getMintedStatus(
        uint256 _id,
        address _addr
    ) external view returns (bool);

    /**
     * @dev Returns royalty info registered within the ERC-2981 standard.
     *
     * Notice that the ERC-2981 don't have a direct way to get the royalty
     * info once it's stored in the contract. This function is a hardcoded
     * workaround.
     */
    function getRoyaltyInfo() external view returns (address, uint96);

    /**
     * @dev Withdraw funds from the contract to fixed contracts.
     */
    function withdraw() external payable;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_dev","type":"address"},{"internalType":"address","name":"_admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"AddressMintedInPhase","type":"error"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"AddressNotFoundInAllowlist","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"AddressUnauthorized","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MismatchingPrice","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NonExistantTokenId","type":"error"},{"inputs":[{"internalType":"uint256","name":"phaseId","type":"uint256"}],"name":"PhaseDoesNotExist","type":"error"},{"inputs":[],"name":"PhaseMustBeNamed","type":"error"},{"inputs":[{"internalType":"uint256","name":"phaseId","type":"uint256"}],"name":"PhaseNotActive","type":"error"},{"inputs":[],"name":"PurchaseExceedsMaxSupply","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"phaseId","type":"uint256"},{"indexed":false,"internalType":"string","name":"phaseName","type":"string"},{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"PhaseActivity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"phaseId","type":"uint256"},{"indexed":false,"internalType":"string","name":"phaseName","type":"string"}],"name":"PhaseCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"phaseId","type":"uint256"}],"name":"PhaseDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addrs","type":"address[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"changePhaseActiveState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"createMintingPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"deletePhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dev","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"address","name":"_addr","type":"address"}],"name":"getIndexOfAddressInAllowlist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"address","name":"_addr","type":"address"}],"name":"getMintedStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getPhase","outputs":[{"components":[{"internalType":"string","name":"phaseName","type":"string"},{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"address[]","name":"allowlist","type":"address[]"},{"internalType":"bool","name":"isActive","type":"bool"}],"internalType":"struct IOlimpoPass.MintPhases","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRoyaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_addressIndex","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phasesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e06040523480156200001157600080fd5b506040516200526938038062005269833981810160405281019062000037919062000399565b6040518060400160405280600b81526020017f4f4c494d504f20504153530000000000000000000000000000000000000000008152506040518060400160405280600381526020017f4f4c5000000000000000000000000000000000000000000000000000000000008152508160009081620000b491906200066f565b508060019081620000c691906200066f565b5050508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff168152505062000179306103e86200018260201b60201c565b50505062000871565b620001926200032560201b60201c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115620001f3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001ea90620007dd565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000265576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200025c906200084f565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600660008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000612710905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003618262000334565b9050919050565b620003738162000354565b81146200037f57600080fd5b50565b600081519050620003938162000368565b92915050565b600080600060608486031215620003b557620003b46200032f565b5b6000620003c58682870162000382565b9350506020620003d88682870162000382565b9250506040620003eb8682870162000382565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200047757607f821691505b6020821081036200048d576200048c6200042f565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620004f77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620004b8565b620005038683620004b8565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620005506200054a62000544846200051b565b62000525565b6200051b565b9050919050565b6000819050919050565b6200056c836200052f565b620005846200057b8262000557565b848454620004c5565b825550505050565b600090565b6200059b6200058c565b620005a881848462000561565b505050565b5b81811015620005d057620005c460008262000591565b600181019050620005ae565b5050565b601f8211156200061f57620005e98162000493565b620005f484620004a8565b8101602085101562000604578190505b6200061c6200061385620004a8565b830182620005ad565b50505b505050565b600082821c905092915050565b6000620006446000198460080262000624565b1980831691505092915050565b60006200065f838362000631565b9150826002028217905092915050565b6200067a82620003f5565b67ffffffffffffffff81111562000696576200069562000400565b5b620006a282546200045e565b620006af828285620005d4565b600060209050601f831160018114620006e75760008415620006d2578287015190505b620006de858262000651565b8655506200074e565b601f198416620006f78662000493565b60005b828110156200072157848901518255600182019150602085019450602081019050620006fa565b868310156200074157848901516200073d601f89168262000631565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000620007c5602a8362000756565b9150620007d28262000767565b604082019050919050565b60006020820190508181036000830152620007f881620007b6565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b60006200083760198362000756565b91506200084482620007ff565b602082019050919050565b600060208201905081810360008301526200086a8162000828565b9050919050565b60805160a05160c051614997620008d260003960008181610c3b0152818161126a015281816114f90152818161168001528181611bdc0152611d6c0152600081816111a501526116a601526000818161111c015261138101526149976000f3fe6080604052600436106101dc5760003560e01c80636352211e11610102578063a62929ba11610095578063c87b56dd11610064578063c87b56dd146106d7578063e985e9c514610714578063e9e2534b14610751578063f851a4401461077a576101e3565b8063a62929ba14610608578063a86a28d114610645578063b88d4fde14610671578063be2078051461069a576101e3565b80638da5cb5b116100d15780638da5cb5b1461055e57806391cca3db1461058957806395d89b41146105b4578063a22cb465146105df576101e3565b80636352211e1461049057806370a08231146104cd578063729ad39e1461050a578063771282f614610533576101e3565b80631b2ef1ca1161017a5780633ccfd60b116101495780633ccfd60b1461040957806342842e0e146104135780635c86a0091461043c57806361d027b314610465576101e3565b80631b2ef1ca146103495780632013a7361461037957806323b872dd146103a25780632a55205a146103cb576101e3565b8063095ea7b3116101b6578063095ea7b31461028d57806316ef376b146102b657806317bd650a146102f357806318160ddd1461031e576101e3565b806301ffc9a7146101e857806306fdde0314610225578063081812fc14610250576101e3565b366101e357005b600080fd5b3480156101f457600080fd5b5061020f600480360381019061020a91906132a1565b6107a5565b60405161021c91906132e9565b60405180910390f35b34801561023157600080fd5b5061023a6107e7565b6040516102479190613394565b60405180910390f35b34801561025c57600080fd5b50610277600480360381019061027291906133ec565b610879565b604051610284919061345a565b60405180910390f35b34801561029957600080fd5b506102b460048036038101906102af91906134a1565b6108bf565b005b3480156102c257600080fd5b506102dd60048036038101906102d891906133ec565b6109d6565b6040516102ea9190613671565b60405180910390f35b3480156102ff57600080fd5b50610308610b51565b60405161031591906136a2565b60405180910390f35b34801561032a57600080fd5b50610333610b57565b60405161034091906136a2565b60405180910390f35b610363600480360381019061035e91906136bd565b610b5d565b60405161037091906136a2565b60405180910390f35b34801561038557600080fd5b506103a0600480360381019061039b91906133ec565b610c22565b005b3480156103ae57600080fd5b506103c960048036038101906103c491906136fd565b610e9c565b005b3480156103d757600080fd5b506103f260048036038101906103ed91906136bd565b610efc565b604051610400929190613750565b60405180910390f35b6104116110e6565b005b34801561041f57600080fd5b5061043a600480360381019061043591906136fd565b611231565b005b34801561044857600080fd5b50610463600480360381019061045e91906133ec565b611251565b005b34801561047157600080fd5b5061047a61137f565b604051610487919061345a565b60405180910390f35b34801561049c57600080fd5b506104b760048036038101906104b291906133ec565b6113a3565b6040516104c4919061345a565b60405180910390f35b3480156104d957600080fd5b506104f460048036038101906104ef9190613779565b611429565b60405161050191906136a2565b60405180910390f35b34801561051657600080fd5b50610531600480360381019061052c919061380b565b6114e0565b005b34801561053f57600080fd5b50610548611676565b60405161055591906136a2565b60405180910390f35b34801561056a57600080fd5b5061057361167c565b604051610580919061345a565b60405180910390f35b34801561059557600080fd5b5061059e6116a4565b6040516105ab919061345a565b60405180910390f35b3480156105c057600080fd5b506105c96116c8565b6040516105d69190613394565b60405180910390f35b3480156105eb57600080fd5b5061060660048036038101906106019190613884565b61175a565b005b34801561061457600080fd5b5061062f600480360381019061062a91906138c4565b611770565b60405161063c91906136a2565b60405180910390f35b34801561065157600080fd5b5061065a6119a4565b60405161066892919061392b565b60405180910390f35b34801561067d57600080fd5b5061069860048036038101906106939190613a84565b6119b3565b005b3480156106a657600080fd5b506106c160048036038101906106bc91906138c4565b611a15565b6040516106ce91906132e9565b60405180910390f35b3480156106e357600080fd5b506106fe60048036038101906106f991906133ec565b611a86565b60405161070b9190613394565b60405180910390f35b34801561072057600080fd5b5061073b60048036038101906107369190613b07565b611b2f565b60405161074891906132e9565b60405180910390f35b34801561075d57600080fd5b5061077860048036038101906107739190613be8565b611bc3565b005b34801561078657600080fd5b5061078f611d6a565b60405161079c919061345a565b60405180910390f35b6000632a55205a60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107e057506107df82611d8e565b5b9050919050565b6060600080546107f690613ca7565b80601f016020809104026020016040519081016040528092919081815260200182805461082290613ca7565b801561086f5780601f106108445761010080835404028352916020019161086f565b820191906000526020600020905b81548152906001019060200180831161085257829003601f168201915b5050505050905090565b600061088482611e08565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006108ca826113a3565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361093a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093190613d4a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610959611e53565b73ffffffffffffffffffffffffffffffffffffffff161480610988575061098781610982611e53565b611b2f565b5b6109c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109be90613ddc565b60405180910390fd5b6109d18383611e5b565b505050565b6109de6130ed565b6109e782611f14565b600a6000838152602001908152602001600020604051806080016040529081600082018054610a1590613ca7565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4190613ca7565b8015610a8e5780601f10610a6357610100808354040283529160200191610a8e565b820191906000526020600020905b815481529060010190602001808311610a7157829003601f168201915b505050505081526020016001820154815260200160028201805480602002602001604051908101604052809291908181526020018280548015610b2657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610adc575b505050505081526020016003820160009054906101000a900460ff1615151515815250509050919050565b60095481565b61037881565b6000610b698383611f91565b6103786001600854610b7b9190613e2b565b1115610bb3576040517f916b0b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600860008154809291906001019190505550610bd133600854612336565b6008543373ffffffffffffffffffffffffffffffffffffffff167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe60405160405180910390a3600854905092915050565b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610cb257336040517fe496ccf5000000000000000000000000000000000000000000000000000000008152600401610ca9919061345a565b60405180910390fd5b610cbb81611f14565b6000600a6000838152602001908152602001600020604051806080016040529081600082018054610ceb90613ca7565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1790613ca7565b8015610d645780601f10610d3957610100808354040283529160200191610d64565b820191906000526020600020905b815481529060010190602001808311610d4757829003601f168201915b505050505081526020016001820154815260200160028201805480602002602001604051908101604052809291908181526020018280548015610dfc57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610db2575b505050505081526020016003820160009054906101000a900460ff1615151515815250509050806060015115600a600084815260200190815260200160002060030160006101000a81548160ff021916908315150217905550817f4530f5a14087917530b029bc7ee15c40a10357ffed8af1c5ee8e60f0b0dc03458260000151836060015115604051610e90929190613e5f565b60405180910390a25050565b610ead610ea7611e53565b82612354565b610eec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee390613f01565b60405180910390fd5b610ef78383836123e9565b505050565b6000806000600760008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16036110915760066040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b600061109b6126e2565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff16866110c79190613f21565b6110d19190613f92565b90508160000151819350935050509250929050565b600047905060006125e4612710836110fe9190613f92565b6111089190613f21565b9050600081476111189190613fc3565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168260405161115e90614028565b60006040518083038185875af1925050503d806000811461119b576040519150601f19603f3d011682016040523d82523d6000602084013e6111a0565b606091505b5050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16816040516111e790614028565b60006040518083038185875af1925050503d8060008114611224576040519150601f19603f3d011682016040523d82523d6000602084013e611229565b606091505b505050505050565b61124c838383604051806020016040528060008152506119b3565b505050565b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16146112e157336040517fe496ccf50000000000000000000000000000000000000000000000000000000081526004016112d8919061345a565b60405180910390fd5b6112ea81611f14565b600a60008281526020019081526020016000206000808201600061130e9190613117565b60018201600090556002820160006113269190613157565b6003820160006101000a81549060ff0219169055505060096000815480929190600190039190505550807f9d9a409a3090fd2331ffa45e7eb6e9f2fbc46700cc145781c5e67cfb0c76f8eb60405160405180910390a250565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806113af836126ec565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141790614089565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611499576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114909061411b565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff161461157057336040517fe496ccf5000000000000000000000000000000000000000000000000000000008152600401611567919061345a565b60405180910390fd5b6000828290509050610378816008546115899190613e2b565b11156115c1576040517f916b0b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156116705760086000815480929190600101919050555060008484838181106115f3576115f261413b565b5b90506020020160208101906116089190613779565b905061161681600854612336565b6008548173ffffffffffffffffffffffffffffffffffffffff167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe60405160405180910390a35080806116689061416a565b9150506115c4565b50505050565b60085481565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060600180546116d790613ca7565b80601f016020809104026020016040519081016040528092919081815260200182805461170390613ca7565b80156117505780601f1061172557610100808354040283529160200191611750565b820191906000526020600020905b81548152906001019060200180831161173357829003601f168201915b5050505050905090565b61176c611765611e53565b8383612729565b5050565b600061177b83611f14565b6000600a60008581526020019081526020016000206040518060800160405290816000820180546117ab90613ca7565b80601f01602080910402602001604051908101604052809291908181526020018280546117d790613ca7565b80156118245780601f106117f957610100808354040283529160200191611824565b820191906000526020600020905b81548152906001019060200180831161180757829003601f168201915b5050505050815260200160018201548152602001600282018054806020026020016040519081016040528092919081815260200182805480156118bc57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611872575b505050505081526020016003820160009054906101000a900460ff161515151581525050905060005b816040015151811015611960578373ffffffffffffffffffffffffffffffffffffffff16826040015182815181106119205761191f61413b565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361194d57809250505061199e565b80806119589061416a565b9150506118e5565b50826040517fa28d9c32000000000000000000000000000000000000000000000000000000008152600401611995919061345a565b60405180910390fd5b92915050565b600080306103e8915091509091565b6119c46119be611e53565b83612354565b611a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fa90613f01565b60405180910390fd5b611a0f84848484612895565b50505050565b6000611a2083611f14565b600b600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6060611a91826128f1565b611ad257816040517f7ea7ce42000000000000000000000000000000000000000000000000000000008152600401611ac991906136a2565b60405180910390fd5b6000611adc612932565b90506000815111611afc5760405180602001604052806000815250611b27565b80611b0684612952565b604051602001611b179291906141ee565b6040516020818303038152906040525b915050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614611c5357336040517fe496ccf5000000000000000000000000000000000000000000000000000000008152600401611c4a919061345a565b60405180910390fd5b600084604051602001611c669190614212565b6040516020818303038152906040525103611cad576040517fa22a9d8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60096000815480929190600101919050555083600a600060095481526020019081526020016000206000019081611ce491906143d5565b5082600a60006009548152602001908152602001600020600101819055508181600a600060095481526020019081526020016000206002019190611d29929190613178565b506009547f544300b91121c0d9e3b427d2dcacd25282451d73ffbf7fed4bb1619e07b8541085604051611d5c9190613394565b60405180910390a250505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611e015750611e0082612a20565b5b9050919050565b611e11816128f1565b611e50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e4790614089565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611ece836113a3565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000600a6000838152602001908152602001600020600001604051602001611f3c919061452a565b6040516020818303038152906040525103611f8e57806040517f09b217ce000000000000000000000000000000000000000000000000000000008152600401611f8591906136a2565b60405180910390fd5b50565b6000600a6000848152602001908152602001600020604051806080016040529081600082018054611fc190613ca7565b80601f0160208091040260200160405190810160405280929190818152602001828054611fed90613ca7565b801561203a5780601f1061200f5761010080835404028352916020019161203a565b820191906000526020600020905b81548152906001019060200180831161201d57829003601f168201915b5050505050815260200160018201548152602001600282018054806020026020016040519081016040528092919081815260200182805480156120d257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612088575b505050505081526020016003820160009054906101000a900460ff1615151515815250509050806060015161213e57826040517f182f0d9800000000000000000000000000000000000000000000000000000000815260040161213591906136a2565b60405180910390fd5b8060200151341461218657346040517f9b5e35af00000000000000000000000000000000000000000000000000000000815260040161217d91906136a2565b60405180910390fd5b6000816040015151141580156121e657503373ffffffffffffffffffffffffffffffffffffffff16816040015183815181106121c5576121c461413b565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b1561222857336040517fa28d9c3200000000000000000000000000000000000000000000000000000000815260040161221f919061345a565b60405180910390fd5b600b600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156122c857336040517f91fdb9790000000000000000000000000000000000000000000000000000000081526004016122bf919061345a565b60405180910390fd5b6001600b600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b612350828260405180602001604052806000815250612b02565b5050565b600080612360836113a3565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806123a257506123a18185611b2f565b5b806123e057508373ffffffffffffffffffffffffffffffffffffffff166123c884610879565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612409826113a3565b73ffffffffffffffffffffffffffffffffffffffff161461245f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612456906145b3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036124ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c590614645565b60405180910390fd5b6124db8383836001612b5d565b8273ffffffffffffffffffffffffffffffffffffffff166124fb826113a3565b73ffffffffffffffffffffffffffffffffffffffff1614612551576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612548906145b3565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46126dd8383836001612b63565b505050565b6000612710905090565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161278e906146b1565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161288891906132e9565b60405180910390a3505050565b6128a08484846123e9565b6128ac84848484612b69565b6128eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e290614743565b60405180910390fd5b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff16612913836126ec565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b606060405180608001604052806043815260200161491f60439139905090565b60606000600161296184612cf0565b01905060008167ffffffffffffffff8111156129805761297f613959565b5b6040519080825280601f01601f1916602001820160405280156129b25781602001600182028036833780820191505090505b509050600082602001820190505b600115612a15578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581612a0957612a08613f63565b5b049450600085036129c0575b819350505050919050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612aeb57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612afb5750612afa82612e43565b5b9050919050565b612b0c8383612ead565b612b196000848484612b69565b612b58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b4f90614743565b60405180910390fd5b505050565b50505050565b50505050565b6000612b8a8473ffffffffffffffffffffffffffffffffffffffff166130ca565b15612ce3578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612bb3611e53565b8786866040518563ffffffff1660e01b8152600401612bd594939291906147b8565b6020604051808303816000875af1925050508015612c1157506040513d601f19601f82011682018060405250810190612c0e9190614819565b60015b612c93573d8060008114612c41576040519150601f19603f3d011682016040523d82523d6000602084013e612c46565b606091505b506000815103612c8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8290614743565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612ce8565b600190505b949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612d4e577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381612d4457612d43613f63565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612d8b576d04ee2d6d415b85acef81000000008381612d8157612d80613f63565b5b0492506020810190505b662386f26fc100008310612dba57662386f26fc100008381612db057612daf613f63565b5b0492506010810190505b6305f5e1008310612de3576305f5e1008381612dd957612dd8613f63565b5b0492506008810190505b6127108310612e08576127108381612dfe57612dfd613f63565b5b0492506004810190505b60648310612e2b5760648381612e2157612e20613f63565b5b0492506002810190505b600a8310612e3a576001810190505b80915050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612f1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f1390614892565b60405180910390fd5b612f25816128f1565b15612f65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f5c906148fe565b60405180910390fd5b612f73600083836001612b5d565b612f7c816128f1565b15612fbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fb3906148fe565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46130c6600083836001612b63565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60405180608001604052806060815260200160008152602001606081526020016000151581525090565b50805461312390613ca7565b6000825580601f106131355750613154565b601f0160209004906000526020600020908101906131539190613218565b5b50565b50805460008255906000526020600020908101906131759190613218565b50565b828054828255906000526020600020908101928215613207579160200282015b8281111561320657823573ffffffffffffffffffffffffffffffffffffffff168260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190613198565b5b5090506132149190613218565b5090565b5b80821115613231576000816000905550600101613219565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61327e81613249565b811461328957600080fd5b50565b60008135905061329b81613275565b92915050565b6000602082840312156132b7576132b661323f565b5b60006132c58482850161328c565b91505092915050565b60008115159050919050565b6132e3816132ce565b82525050565b60006020820190506132fe60008301846132da565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561333e578082015181840152602081019050613323565b60008484015250505050565b6000601f19601f8301169050919050565b600061336682613304565b613370818561330f565b9350613380818560208601613320565b6133898161334a565b840191505092915050565b600060208201905081810360008301526133ae818461335b565b905092915050565b6000819050919050565b6133c9816133b6565b81146133d457600080fd5b50565b6000813590506133e6816133c0565b92915050565b6000602082840312156134025761340161323f565b5b6000613410848285016133d7565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061344482613419565b9050919050565b61345481613439565b82525050565b600060208201905061346f600083018461344b565b92915050565b61347e81613439565b811461348957600080fd5b50565b60008135905061349b81613475565b92915050565b600080604083850312156134b8576134b761323f565b5b60006134c68582860161348c565b92505060206134d7858286016133d7565b9150509250929050565b600082825260208201905092915050565b60006134fd82613304565b61350781856134e1565b9350613517818560208601613320565b6135208161334a565b840191505092915050565b613534816133b6565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61356f81613439565b82525050565b60006135818383613566565b60208301905092915050565b6000602082019050919050565b60006135a58261353a565b6135af8185613545565b93506135ba83613556565b8060005b838110156135eb5781516135d28882613575565b97506135dd8361358d565b9250506001810190506135be565b5085935050505092915050565b613601816132ce565b82525050565b6000608083016000830151848203600086015261362482826134f2565b9150506020830151613639602086018261352b565b5060408301518482036040860152613651828261359a565b915050606083015161366660608601826135f8565b508091505092915050565b6000602082019050818103600083015261368b8184613607565b905092915050565b61369c816133b6565b82525050565b60006020820190506136b76000830184613693565b92915050565b600080604083850312156136d4576136d361323f565b5b60006136e2858286016133d7565b92505060206136f3858286016133d7565b9150509250929050565b6000806000606084860312156137165761371561323f565b5b60006137248682870161348c565b93505060206137358682870161348c565b9250506040613746868287016133d7565b9150509250925092565b6000604082019050613765600083018561344b565b6137726020830184613693565b9392505050565b60006020828403121561378f5761378e61323f565b5b600061379d8482850161348c565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126137cb576137ca6137a6565b5b8235905067ffffffffffffffff8111156137e8576137e76137ab565b5b602083019150836020820283011115613804576138036137b0565b5b9250929050565b600080602083850312156138225761382161323f565b5b600083013567ffffffffffffffff8111156138405761383f613244565b5b61384c858286016137b5565b92509250509250929050565b613861816132ce565b811461386c57600080fd5b50565b60008135905061387e81613858565b92915050565b6000806040838503121561389b5761389a61323f565b5b60006138a98582860161348c565b92505060206138ba8582860161386f565b9150509250929050565b600080604083850312156138db576138da61323f565b5b60006138e9858286016133d7565b92505060206138fa8582860161348c565b9150509250929050565b60006bffffffffffffffffffffffff82169050919050565b61392581613904565b82525050565b6000604082019050613940600083018561344b565b61394d602083018461391c565b9392505050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6139918261334a565b810181811067ffffffffffffffff821117156139b0576139af613959565b5b80604052505050565b60006139c3613235565b90506139cf8282613988565b919050565b600067ffffffffffffffff8211156139ef576139ee613959565b5b6139f88261334a565b9050602081019050919050565b82818337600083830152505050565b6000613a27613a22846139d4565b6139b9565b905082815260208101848484011115613a4357613a42613954565b5b613a4e848285613a05565b509392505050565b600082601f830112613a6b57613a6a6137a6565b5b8135613a7b848260208601613a14565b91505092915050565b60008060008060808587031215613a9e57613a9d61323f565b5b6000613aac8782880161348c565b9450506020613abd8782880161348c565b9350506040613ace878288016133d7565b925050606085013567ffffffffffffffff811115613aef57613aee613244565b5b613afb87828801613a56565b91505092959194509250565b60008060408385031215613b1e57613b1d61323f565b5b6000613b2c8582860161348c565b9250506020613b3d8582860161348c565b9150509250929050565b600067ffffffffffffffff821115613b6257613b61613959565b5b613b6b8261334a565b9050602081019050919050565b6000613b8b613b8684613b47565b6139b9565b905082815260208101848484011115613ba757613ba6613954565b5b613bb2848285613a05565b509392505050565b600082601f830112613bcf57613bce6137a6565b5b8135613bdf848260208601613b78565b91505092915050565b60008060008060608587031215613c0257613c0161323f565b5b600085013567ffffffffffffffff811115613c2057613c1f613244565b5b613c2c87828801613bba565b9450506020613c3d878288016133d7565b935050604085013567ffffffffffffffff811115613c5e57613c5d613244565b5b613c6a878288016137b5565b925092505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613cbf57607f821691505b602082108103613cd257613cd1613c78565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000613d3460218361330f565b9150613d3f82613cd8565b604082019050919050565b60006020820190508181036000830152613d6381613d27565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b6000613dc6603d8361330f565b9150613dd182613d6a565b604082019050919050565b60006020820190508181036000830152613df581613db9565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613e36826133b6565b9150613e41836133b6565b9250828201905080821115613e5957613e58613dfc565b5b92915050565b60006040820190508181036000830152613e79818561335b565b9050613e8860208301846132da565b9392505050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b6000613eeb602d8361330f565b9150613ef682613e8f565b604082019050919050565b60006020820190508181036000830152613f1a81613ede565b9050919050565b6000613f2c826133b6565b9150613f37836133b6565b9250828202613f45816133b6565b91508282048414831517613f5c57613f5b613dfc565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613f9d826133b6565b9150613fa8836133b6565b925082613fb857613fb7613f63565b5b828204905092915050565b6000613fce826133b6565b9150613fd9836133b6565b9250828203905081811115613ff157613ff0613dfc565b5b92915050565b600081905092915050565b50565b6000614012600083613ff7565b915061401d82614002565b600082019050919050565b600061403382614005565b9150819050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b600061407360188361330f565b915061407e8261403d565b602082019050919050565b600060208201905081810360008301526140a281614066565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b600061410560298361330f565b9150614110826140a9565b604082019050919050565b60006020820190508181036000830152614134816140f8565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614175826133b6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036141a7576141a6613dfc565b5b600182019050919050565b600081905092915050565b60006141c882613304565b6141d281856141b2565b93506141e2818560208601613320565b80840191505092915050565b60006141fa82856141bd565b915061420682846141bd565b91508190509392505050565b600061421e82846141bd565b915081905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261428b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261424e565b614295868361424e565b95508019841693508086168417925050509392505050565b6000819050919050565b60006142d26142cd6142c8846133b6565b6142ad565b6133b6565b9050919050565b6000819050919050565b6142ec836142b7565b6143006142f8826142d9565b84845461425b565b825550505050565b600090565b614315614308565b6143208184846142e3565b505050565b5b818110156143445761433960008261430d565b600181019050614326565b5050565b601f8211156143895761435a81614229565b6143638461423e565b81016020851015614372578190505b61438661437e8561423e565b830182614325565b50505b505050565b600082821c905092915050565b60006143ac6000198460080261438e565b1980831691505092915050565b60006143c5838361439b565b9150826002028217905092915050565b6143de82613304565b67ffffffffffffffff8111156143f7576143f6613959565b5b6144018254613ca7565b61440c828285614348565b600060209050601f83116001811461443f576000841561442d578287015190505b61443785826143b9565b86555061449f565b601f19841661444d86614229565b60005b8281101561447557848901518255600182019150602085019450602081019050614450565b86831015614492578489015161448e601f89168261439b565b8355505b6001600288020188555050505b505050505050565b600081546144b481613ca7565b6144be81866141b2565b945060018216600081146144d957600181146144ee57614521565b60ff1983168652811515820286019350614521565b6144f785614229565b60005b83811015614519578154818901526001820191506020810190506144fa565b838801955050505b50505092915050565b600061453682846144a7565b915081905092915050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b600061459d60258361330f565b91506145a882614541565b604082019050919050565b600060208201905081810360008301526145cc81614590565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061462f60248361330f565b915061463a826145d3565b604082019050919050565b6000602082019050818103600083015261465e81614622565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b600061469b60198361330f565b91506146a682614665565b602082019050919050565b600060208201905081810360008301526146ca8161468e565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061472d60328361330f565b9150614738826146d1565b604082019050919050565b6000602082019050818103600083015261475c81614720565b9050919050565b600081519050919050565b600082825260208201905092915050565b600061478a82614763565b614794818561476e565b93506147a4818560208601613320565b6147ad8161334a565b840191505092915050565b60006080820190506147cd600083018761344b565b6147da602083018661344b565b6147e76040830185613693565b81810360608301526147f9818461477f565b905095945050505050565b60008151905061481381613275565b92915050565b60006020828403121561482f5761482e61323f565b5b600061483d84828501614804565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b600061487c60208361330f565b915061488782614846565b602082019050919050565b600060208201905081810360008301526148ab8161486f565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006148e8601c8361330f565b91506148f3826148b2565b602082019050919050565b60006020820190508181036000830152614917816148db565b905091905056fe697066733a2f2f62616679626569636662757474706e3674646e6667347266777963676f716635766879336e6935656a72356a6e6636637275637a696a78723369692fa26469706673582212205a338d826ec90107a46bf6d743747188992b893e9c8248742a8e853fda1a704964736f6c6343000813003300000000000000000000000047739957b908cbe52c14eb7cffaa65d105eba76e00000000000000000000000011654dd4343b7d6afacdef98ae7fc4c05e0cc811000000000000000000000000f0d82da1400801e9a7e2651a01645d8fa8be6b70

Deployed Bytecode

0x6080604052600436106101dc5760003560e01c80636352211e11610102578063a62929ba11610095578063c87b56dd11610064578063c87b56dd146106d7578063e985e9c514610714578063e9e2534b14610751578063f851a4401461077a576101e3565b8063a62929ba14610608578063a86a28d114610645578063b88d4fde14610671578063be2078051461069a576101e3565b80638da5cb5b116100d15780638da5cb5b1461055e57806391cca3db1461058957806395d89b41146105b4578063a22cb465146105df576101e3565b80636352211e1461049057806370a08231146104cd578063729ad39e1461050a578063771282f614610533576101e3565b80631b2ef1ca1161017a5780633ccfd60b116101495780633ccfd60b1461040957806342842e0e146104135780635c86a0091461043c57806361d027b314610465576101e3565b80631b2ef1ca146103495780632013a7361461037957806323b872dd146103a25780632a55205a146103cb576101e3565b8063095ea7b3116101b6578063095ea7b31461028d57806316ef376b146102b657806317bd650a146102f357806318160ddd1461031e576101e3565b806301ffc9a7146101e857806306fdde0314610225578063081812fc14610250576101e3565b366101e357005b600080fd5b3480156101f457600080fd5b5061020f600480360381019061020a91906132a1565b6107a5565b60405161021c91906132e9565b60405180910390f35b34801561023157600080fd5b5061023a6107e7565b6040516102479190613394565b60405180910390f35b34801561025c57600080fd5b50610277600480360381019061027291906133ec565b610879565b604051610284919061345a565b60405180910390f35b34801561029957600080fd5b506102b460048036038101906102af91906134a1565b6108bf565b005b3480156102c257600080fd5b506102dd60048036038101906102d891906133ec565b6109d6565b6040516102ea9190613671565b60405180910390f35b3480156102ff57600080fd5b50610308610b51565b60405161031591906136a2565b60405180910390f35b34801561032a57600080fd5b50610333610b57565b60405161034091906136a2565b60405180910390f35b610363600480360381019061035e91906136bd565b610b5d565b60405161037091906136a2565b60405180910390f35b34801561038557600080fd5b506103a0600480360381019061039b91906133ec565b610c22565b005b3480156103ae57600080fd5b506103c960048036038101906103c491906136fd565b610e9c565b005b3480156103d757600080fd5b506103f260048036038101906103ed91906136bd565b610efc565b604051610400929190613750565b60405180910390f35b6104116110e6565b005b34801561041f57600080fd5b5061043a600480360381019061043591906136fd565b611231565b005b34801561044857600080fd5b50610463600480360381019061045e91906133ec565b611251565b005b34801561047157600080fd5b5061047a61137f565b604051610487919061345a565b60405180910390f35b34801561049c57600080fd5b506104b760048036038101906104b291906133ec565b6113a3565b6040516104c4919061345a565b60405180910390f35b3480156104d957600080fd5b506104f460048036038101906104ef9190613779565b611429565b60405161050191906136a2565b60405180910390f35b34801561051657600080fd5b50610531600480360381019061052c919061380b565b6114e0565b005b34801561053f57600080fd5b50610548611676565b60405161055591906136a2565b60405180910390f35b34801561056a57600080fd5b5061057361167c565b604051610580919061345a565b60405180910390f35b34801561059557600080fd5b5061059e6116a4565b6040516105ab919061345a565b60405180910390f35b3480156105c057600080fd5b506105c96116c8565b6040516105d69190613394565b60405180910390f35b3480156105eb57600080fd5b5061060660048036038101906106019190613884565b61175a565b005b34801561061457600080fd5b5061062f600480360381019061062a91906138c4565b611770565b60405161063c91906136a2565b60405180910390f35b34801561065157600080fd5b5061065a6119a4565b60405161066892919061392b565b60405180910390f35b34801561067d57600080fd5b5061069860048036038101906106939190613a84565b6119b3565b005b3480156106a657600080fd5b506106c160048036038101906106bc91906138c4565b611a15565b6040516106ce91906132e9565b60405180910390f35b3480156106e357600080fd5b506106fe60048036038101906106f991906133ec565b611a86565b60405161070b9190613394565b60405180910390f35b34801561072057600080fd5b5061073b60048036038101906107369190613b07565b611b2f565b60405161074891906132e9565b60405180910390f35b34801561075d57600080fd5b5061077860048036038101906107739190613be8565b611bc3565b005b34801561078657600080fd5b5061078f611d6a565b60405161079c919061345a565b60405180910390f35b6000632a55205a60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107e057506107df82611d8e565b5b9050919050565b6060600080546107f690613ca7565b80601f016020809104026020016040519081016040528092919081815260200182805461082290613ca7565b801561086f5780601f106108445761010080835404028352916020019161086f565b820191906000526020600020905b81548152906001019060200180831161085257829003601f168201915b5050505050905090565b600061088482611e08565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006108ca826113a3565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361093a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093190613d4a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610959611e53565b73ffffffffffffffffffffffffffffffffffffffff161480610988575061098781610982611e53565b611b2f565b5b6109c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109be90613ddc565b60405180910390fd5b6109d18383611e5b565b505050565b6109de6130ed565b6109e782611f14565b600a6000838152602001908152602001600020604051806080016040529081600082018054610a1590613ca7565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4190613ca7565b8015610a8e5780601f10610a6357610100808354040283529160200191610a8e565b820191906000526020600020905b815481529060010190602001808311610a7157829003601f168201915b505050505081526020016001820154815260200160028201805480602002602001604051908101604052809291908181526020018280548015610b2657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610adc575b505050505081526020016003820160009054906101000a900460ff1615151515815250509050919050565b60095481565b61037881565b6000610b698383611f91565b6103786001600854610b7b9190613e2b565b1115610bb3576040517f916b0b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600860008154809291906001019190505550610bd133600854612336565b6008543373ffffffffffffffffffffffffffffffffffffffff167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe60405160405180910390a3600854905092915050565b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000f0d82da1400801e9a7e2651a01645d8fa8be6b7073ffffffffffffffffffffffffffffffffffffffff1614610cb257336040517fe496ccf5000000000000000000000000000000000000000000000000000000008152600401610ca9919061345a565b60405180910390fd5b610cbb81611f14565b6000600a6000838152602001908152602001600020604051806080016040529081600082018054610ceb90613ca7565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1790613ca7565b8015610d645780601f10610d3957610100808354040283529160200191610d64565b820191906000526020600020905b815481529060010190602001808311610d4757829003601f168201915b505050505081526020016001820154815260200160028201805480602002602001604051908101604052809291908181526020018280548015610dfc57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610db2575b505050505081526020016003820160009054906101000a900460ff1615151515815250509050806060015115600a600084815260200190815260200160002060030160006101000a81548160ff021916908315150217905550817f4530f5a14087917530b029bc7ee15c40a10357ffed8af1c5ee8e60f0b0dc03458260000151836060015115604051610e90929190613e5f565b60405180910390a25050565b610ead610ea7611e53565b82612354565b610eec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee390613f01565b60405180910390fd5b610ef78383836123e9565b505050565b6000806000600760008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16036110915760066040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b600061109b6126e2565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff16866110c79190613f21565b6110d19190613f92565b90508160000151819350935050509250929050565b600047905060006125e4612710836110fe9190613f92565b6111089190613f21565b9050600081476111189190613fc3565b90507f00000000000000000000000047739957b908cbe52c14eb7cffaa65d105eba76e73ffffffffffffffffffffffffffffffffffffffff168260405161115e90614028565b60006040518083038185875af1925050503d806000811461119b576040519150601f19603f3d011682016040523d82523d6000602084013e6111a0565b606091505b5050507f00000000000000000000000011654dd4343b7d6afacdef98ae7fc4c05e0cc81173ffffffffffffffffffffffffffffffffffffffff16816040516111e790614028565b60006040518083038185875af1925050503d8060008114611224576040519150601f19603f3d011682016040523d82523d6000602084013e611229565b606091505b505050505050565b61124c838383604051806020016040528060008152506119b3565b505050565b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000f0d82da1400801e9a7e2651a01645d8fa8be6b7073ffffffffffffffffffffffffffffffffffffffff16146112e157336040517fe496ccf50000000000000000000000000000000000000000000000000000000081526004016112d8919061345a565b60405180910390fd5b6112ea81611f14565b600a60008281526020019081526020016000206000808201600061130e9190613117565b60018201600090556002820160006113269190613157565b6003820160006101000a81549060ff0219169055505060096000815480929190600190039190505550807f9d9a409a3090fd2331ffa45e7eb6e9f2fbc46700cc145781c5e67cfb0c76f8eb60405160405180910390a250565b7f00000000000000000000000047739957b908cbe52c14eb7cffaa65d105eba76e81565b6000806113af836126ec565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141790614089565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611499576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114909061411b565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000f0d82da1400801e9a7e2651a01645d8fa8be6b7073ffffffffffffffffffffffffffffffffffffffff161461157057336040517fe496ccf5000000000000000000000000000000000000000000000000000000008152600401611567919061345a565b60405180910390fd5b6000828290509050610378816008546115899190613e2b565b11156115c1576040517f916b0b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156116705760086000815480929190600101919050555060008484838181106115f3576115f261413b565b5b90506020020160208101906116089190613779565b905061161681600854612336565b6008548173ffffffffffffffffffffffffffffffffffffffff167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe60405160405180910390a35080806116689061416a565b9150506115c4565b50505050565b60085481565b60007f000000000000000000000000f0d82da1400801e9a7e2651a01645d8fa8be6b70905090565b7f00000000000000000000000011654dd4343b7d6afacdef98ae7fc4c05e0cc81181565b6060600180546116d790613ca7565b80601f016020809104026020016040519081016040528092919081815260200182805461170390613ca7565b80156117505780601f1061172557610100808354040283529160200191611750565b820191906000526020600020905b81548152906001019060200180831161173357829003601f168201915b5050505050905090565b61176c611765611e53565b8383612729565b5050565b600061177b83611f14565b6000600a60008581526020019081526020016000206040518060800160405290816000820180546117ab90613ca7565b80601f01602080910402602001604051908101604052809291908181526020018280546117d790613ca7565b80156118245780601f106117f957610100808354040283529160200191611824565b820191906000526020600020905b81548152906001019060200180831161180757829003601f168201915b5050505050815260200160018201548152602001600282018054806020026020016040519081016040528092919081815260200182805480156118bc57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611872575b505050505081526020016003820160009054906101000a900460ff161515151581525050905060005b816040015151811015611960578373ffffffffffffffffffffffffffffffffffffffff16826040015182815181106119205761191f61413b565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361194d57809250505061199e565b80806119589061416a565b9150506118e5565b50826040517fa28d9c32000000000000000000000000000000000000000000000000000000008152600401611995919061345a565b60405180910390fd5b92915050565b600080306103e8915091509091565b6119c46119be611e53565b83612354565b611a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fa90613f01565b60405180910390fd5b611a0f84848484612895565b50505050565b6000611a2083611f14565b600b600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6060611a91826128f1565b611ad257816040517f7ea7ce42000000000000000000000000000000000000000000000000000000008152600401611ac991906136a2565b60405180910390fd5b6000611adc612932565b90506000815111611afc5760405180602001604052806000815250611b27565b80611b0684612952565b604051602001611b179291906141ee565b6040516020818303038152906040525b915050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000f0d82da1400801e9a7e2651a01645d8fa8be6b7073ffffffffffffffffffffffffffffffffffffffff1614611c5357336040517fe496ccf5000000000000000000000000000000000000000000000000000000008152600401611c4a919061345a565b60405180910390fd5b600084604051602001611c669190614212565b6040516020818303038152906040525103611cad576040517fa22a9d8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60096000815480929190600101919050555083600a600060095481526020019081526020016000206000019081611ce491906143d5565b5082600a60006009548152602001908152602001600020600101819055508181600a600060095481526020019081526020016000206002019190611d29929190613178565b506009547f544300b91121c0d9e3b427d2dcacd25282451d73ffbf7fed4bb1619e07b8541085604051611d5c9190613394565b60405180910390a250505050565b7f000000000000000000000000f0d82da1400801e9a7e2651a01645d8fa8be6b7081565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611e015750611e0082612a20565b5b9050919050565b611e11816128f1565b611e50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e4790614089565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611ece836113a3565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000600a6000838152602001908152602001600020600001604051602001611f3c919061452a565b6040516020818303038152906040525103611f8e57806040517f09b217ce000000000000000000000000000000000000000000000000000000008152600401611f8591906136a2565b60405180910390fd5b50565b6000600a6000848152602001908152602001600020604051806080016040529081600082018054611fc190613ca7565b80601f0160208091040260200160405190810160405280929190818152602001828054611fed90613ca7565b801561203a5780601f1061200f5761010080835404028352916020019161203a565b820191906000526020600020905b81548152906001019060200180831161201d57829003601f168201915b5050505050815260200160018201548152602001600282018054806020026020016040519081016040528092919081815260200182805480156120d257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612088575b505050505081526020016003820160009054906101000a900460ff1615151515815250509050806060015161213e57826040517f182f0d9800000000000000000000000000000000000000000000000000000000815260040161213591906136a2565b60405180910390fd5b8060200151341461218657346040517f9b5e35af00000000000000000000000000000000000000000000000000000000815260040161217d91906136a2565b60405180910390fd5b6000816040015151141580156121e657503373ffffffffffffffffffffffffffffffffffffffff16816040015183815181106121c5576121c461413b565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b1561222857336040517fa28d9c3200000000000000000000000000000000000000000000000000000000815260040161221f919061345a565b60405180910390fd5b600b600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156122c857336040517f91fdb9790000000000000000000000000000000000000000000000000000000081526004016122bf919061345a565b60405180910390fd5b6001600b600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b612350828260405180602001604052806000815250612b02565b5050565b600080612360836113a3565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806123a257506123a18185611b2f565b5b806123e057508373ffffffffffffffffffffffffffffffffffffffff166123c884610879565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612409826113a3565b73ffffffffffffffffffffffffffffffffffffffff161461245f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612456906145b3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036124ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c590614645565b60405180910390fd5b6124db8383836001612b5d565b8273ffffffffffffffffffffffffffffffffffffffff166124fb826113a3565b73ffffffffffffffffffffffffffffffffffffffff1614612551576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612548906145b3565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46126dd8383836001612b63565b505050565b6000612710905090565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161278e906146b1565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161288891906132e9565b60405180910390a3505050565b6128a08484846123e9565b6128ac84848484612b69565b6128eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e290614743565b60405180910390fd5b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff16612913836126ec565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b606060405180608001604052806043815260200161491f60439139905090565b60606000600161296184612cf0565b01905060008167ffffffffffffffff8111156129805761297f613959565b5b6040519080825280601f01601f1916602001820160405280156129b25781602001600182028036833780820191505090505b509050600082602001820190505b600115612a15578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581612a0957612a08613f63565b5b049450600085036129c0575b819350505050919050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612aeb57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612afb5750612afa82612e43565b5b9050919050565b612b0c8383612ead565b612b196000848484612b69565b612b58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b4f90614743565b60405180910390fd5b505050565b50505050565b50505050565b6000612b8a8473ffffffffffffffffffffffffffffffffffffffff166130ca565b15612ce3578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612bb3611e53565b8786866040518563ffffffff1660e01b8152600401612bd594939291906147b8565b6020604051808303816000875af1925050508015612c1157506040513d601f19601f82011682018060405250810190612c0e9190614819565b60015b612c93573d8060008114612c41576040519150601f19603f3d011682016040523d82523d6000602084013e612c46565b606091505b506000815103612c8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8290614743565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612ce8565b600190505b949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612d4e577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381612d4457612d43613f63565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612d8b576d04ee2d6d415b85acef81000000008381612d8157612d80613f63565b5b0492506020810190505b662386f26fc100008310612dba57662386f26fc100008381612db057612daf613f63565b5b0492506010810190505b6305f5e1008310612de3576305f5e1008381612dd957612dd8613f63565b5b0492506008810190505b6127108310612e08576127108381612dfe57612dfd613f63565b5b0492506004810190505b60648310612e2b5760648381612e2157612e20613f63565b5b0492506002810190505b600a8310612e3a576001810190505b80915050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612f1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f1390614892565b60405180910390fd5b612f25816128f1565b15612f65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f5c906148fe565b60405180910390fd5b612f73600083836001612b5d565b612f7c816128f1565b15612fbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fb3906148fe565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46130c6600083836001612b63565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60405180608001604052806060815260200160008152602001606081526020016000151581525090565b50805461312390613ca7565b6000825580601f106131355750613154565b601f0160209004906000526020600020908101906131539190613218565b5b50565b50805460008255906000526020600020908101906131759190613218565b50565b828054828255906000526020600020908101928215613207579160200282015b8281111561320657823573ffffffffffffffffffffffffffffffffffffffff168260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190613198565b5b5090506132149190613218565b5090565b5b80821115613231576000816000905550600101613219565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61327e81613249565b811461328957600080fd5b50565b60008135905061329b81613275565b92915050565b6000602082840312156132b7576132b661323f565b5b60006132c58482850161328c565b91505092915050565b60008115159050919050565b6132e3816132ce565b82525050565b60006020820190506132fe60008301846132da565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561333e578082015181840152602081019050613323565b60008484015250505050565b6000601f19601f8301169050919050565b600061336682613304565b613370818561330f565b9350613380818560208601613320565b6133898161334a565b840191505092915050565b600060208201905081810360008301526133ae818461335b565b905092915050565b6000819050919050565b6133c9816133b6565b81146133d457600080fd5b50565b6000813590506133e6816133c0565b92915050565b6000602082840312156134025761340161323f565b5b6000613410848285016133d7565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061344482613419565b9050919050565b61345481613439565b82525050565b600060208201905061346f600083018461344b565b92915050565b61347e81613439565b811461348957600080fd5b50565b60008135905061349b81613475565b92915050565b600080604083850312156134b8576134b761323f565b5b60006134c68582860161348c565b92505060206134d7858286016133d7565b9150509250929050565b600082825260208201905092915050565b60006134fd82613304565b61350781856134e1565b9350613517818560208601613320565b6135208161334a565b840191505092915050565b613534816133b6565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61356f81613439565b82525050565b60006135818383613566565b60208301905092915050565b6000602082019050919050565b60006135a58261353a565b6135af8185613545565b93506135ba83613556565b8060005b838110156135eb5781516135d28882613575565b97506135dd8361358d565b9250506001810190506135be565b5085935050505092915050565b613601816132ce565b82525050565b6000608083016000830151848203600086015261362482826134f2565b9150506020830151613639602086018261352b565b5060408301518482036040860152613651828261359a565b915050606083015161366660608601826135f8565b508091505092915050565b6000602082019050818103600083015261368b8184613607565b905092915050565b61369c816133b6565b82525050565b60006020820190506136b76000830184613693565b92915050565b600080604083850312156136d4576136d361323f565b5b60006136e2858286016133d7565b92505060206136f3858286016133d7565b9150509250929050565b6000806000606084860312156137165761371561323f565b5b60006137248682870161348c565b93505060206137358682870161348c565b9250506040613746868287016133d7565b9150509250925092565b6000604082019050613765600083018561344b565b6137726020830184613693565b9392505050565b60006020828403121561378f5761378e61323f565b5b600061379d8482850161348c565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126137cb576137ca6137a6565b5b8235905067ffffffffffffffff8111156137e8576137e76137ab565b5b602083019150836020820283011115613804576138036137b0565b5b9250929050565b600080602083850312156138225761382161323f565b5b600083013567ffffffffffffffff8111156138405761383f613244565b5b61384c858286016137b5565b92509250509250929050565b613861816132ce565b811461386c57600080fd5b50565b60008135905061387e81613858565b92915050565b6000806040838503121561389b5761389a61323f565b5b60006138a98582860161348c565b92505060206138ba8582860161386f565b9150509250929050565b600080604083850312156138db576138da61323f565b5b60006138e9858286016133d7565b92505060206138fa8582860161348c565b9150509250929050565b60006bffffffffffffffffffffffff82169050919050565b61392581613904565b82525050565b6000604082019050613940600083018561344b565b61394d602083018461391c565b9392505050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6139918261334a565b810181811067ffffffffffffffff821117156139b0576139af613959565b5b80604052505050565b60006139c3613235565b90506139cf8282613988565b919050565b600067ffffffffffffffff8211156139ef576139ee613959565b5b6139f88261334a565b9050602081019050919050565b82818337600083830152505050565b6000613a27613a22846139d4565b6139b9565b905082815260208101848484011115613a4357613a42613954565b5b613a4e848285613a05565b509392505050565b600082601f830112613a6b57613a6a6137a6565b5b8135613a7b848260208601613a14565b91505092915050565b60008060008060808587031215613a9e57613a9d61323f565b5b6000613aac8782880161348c565b9450506020613abd8782880161348c565b9350506040613ace878288016133d7565b925050606085013567ffffffffffffffff811115613aef57613aee613244565b5b613afb87828801613a56565b91505092959194509250565b60008060408385031215613b1e57613b1d61323f565b5b6000613b2c8582860161348c565b9250506020613b3d8582860161348c565b9150509250929050565b600067ffffffffffffffff821115613b6257613b61613959565b5b613b6b8261334a565b9050602081019050919050565b6000613b8b613b8684613b47565b6139b9565b905082815260208101848484011115613ba757613ba6613954565b5b613bb2848285613a05565b509392505050565b600082601f830112613bcf57613bce6137a6565b5b8135613bdf848260208601613b78565b91505092915050565b60008060008060608587031215613c0257613c0161323f565b5b600085013567ffffffffffffffff811115613c2057613c1f613244565b5b613c2c87828801613bba565b9450506020613c3d878288016133d7565b935050604085013567ffffffffffffffff811115613c5e57613c5d613244565b5b613c6a878288016137b5565b925092505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613cbf57607f821691505b602082108103613cd257613cd1613c78565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000613d3460218361330f565b9150613d3f82613cd8565b604082019050919050565b60006020820190508181036000830152613d6381613d27565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b6000613dc6603d8361330f565b9150613dd182613d6a565b604082019050919050565b60006020820190508181036000830152613df581613db9565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613e36826133b6565b9150613e41836133b6565b9250828201905080821115613e5957613e58613dfc565b5b92915050565b60006040820190508181036000830152613e79818561335b565b9050613e8860208301846132da565b9392505050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b6000613eeb602d8361330f565b9150613ef682613e8f565b604082019050919050565b60006020820190508181036000830152613f1a81613ede565b9050919050565b6000613f2c826133b6565b9150613f37836133b6565b9250828202613f45816133b6565b91508282048414831517613f5c57613f5b613dfc565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613f9d826133b6565b9150613fa8836133b6565b925082613fb857613fb7613f63565b5b828204905092915050565b6000613fce826133b6565b9150613fd9836133b6565b9250828203905081811115613ff157613ff0613dfc565b5b92915050565b600081905092915050565b50565b6000614012600083613ff7565b915061401d82614002565b600082019050919050565b600061403382614005565b9150819050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b600061407360188361330f565b915061407e8261403d565b602082019050919050565b600060208201905081810360008301526140a281614066565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b600061410560298361330f565b9150614110826140a9565b604082019050919050565b60006020820190508181036000830152614134816140f8565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614175826133b6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036141a7576141a6613dfc565b5b600182019050919050565b600081905092915050565b60006141c882613304565b6141d281856141b2565b93506141e2818560208601613320565b80840191505092915050565b60006141fa82856141bd565b915061420682846141bd565b91508190509392505050565b600061421e82846141bd565b915081905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261428b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261424e565b614295868361424e565b95508019841693508086168417925050509392505050565b6000819050919050565b60006142d26142cd6142c8846133b6565b6142ad565b6133b6565b9050919050565b6000819050919050565b6142ec836142b7565b6143006142f8826142d9565b84845461425b565b825550505050565b600090565b614315614308565b6143208184846142e3565b505050565b5b818110156143445761433960008261430d565b600181019050614326565b5050565b601f8211156143895761435a81614229565b6143638461423e565b81016020851015614372578190505b61438661437e8561423e565b830182614325565b50505b505050565b600082821c905092915050565b60006143ac6000198460080261438e565b1980831691505092915050565b60006143c5838361439b565b9150826002028217905092915050565b6143de82613304565b67ffffffffffffffff8111156143f7576143f6613959565b5b6144018254613ca7565b61440c828285614348565b600060209050601f83116001811461443f576000841561442d578287015190505b61443785826143b9565b86555061449f565b601f19841661444d86614229565b60005b8281101561447557848901518255600182019150602085019450602081019050614450565b86831015614492578489015161448e601f89168261439b565b8355505b6001600288020188555050505b505050505050565b600081546144b481613ca7565b6144be81866141b2565b945060018216600081146144d957600181146144ee57614521565b60ff1983168652811515820286019350614521565b6144f785614229565b60005b83811015614519578154818901526001820191506020810190506144fa565b838801955050505b50505092915050565b600061453682846144a7565b915081905092915050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b600061459d60258361330f565b91506145a882614541565b604082019050919050565b600060208201905081810360008301526145cc81614590565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061462f60248361330f565b915061463a826145d3565b604082019050919050565b6000602082019050818103600083015261465e81614622565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b600061469b60198361330f565b91506146a682614665565b602082019050919050565b600060208201905081810360008301526146ca8161468e565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061472d60328361330f565b9150614738826146d1565b604082019050919050565b6000602082019050818103600083015261475c81614720565b9050919050565b600081519050919050565b600082825260208201905092915050565b600061478a82614763565b614794818561476e565b93506147a4818560208601613320565b6147ad8161334a565b840191505092915050565b60006080820190506147cd600083018761344b565b6147da602083018661344b565b6147e76040830185613693565b81810360608301526147f9818461477f565b905095945050505050565b60008151905061481381613275565b92915050565b60006020828403121561482f5761482e61323f565b5b600061483d84828501614804565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b600061487c60208361330f565b915061488782614846565b602082019050919050565b600060208201905081810360008301526148ab8161486f565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006148e8601c8361330f565b91506148f3826148b2565b602082019050919050565b60006020820190508181036000830152614917816148db565b905091905056fe697066733a2f2f62616679626569636662757474706e3674646e6667347266777963676f716635766879336e6935656a72356a6e6636637275637a696a78723369692fa26469706673582212205a338d826ec90107a46bf6d743747188992b893e9c8248742a8e853fda1a704964736f6c63430008130033

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

00000000000000000000000047739957b908cbe52c14eb7cffaa65d105eba76e00000000000000000000000011654dd4343b7d6afacdef98ae7fc4c05e0cc811000000000000000000000000f0d82da1400801e9a7e2651a01645d8fa8be6b70

-----Decoded View---------------
Arg [0] : _treasury (address): 0x47739957B908CBE52C14Eb7cffAa65d105eBA76e
Arg [1] : _dev (address): 0x11654dD4343b7D6AFacDEf98Ae7FC4c05e0cC811
Arg [2] : _admin (address): 0xf0d82DA1400801E9A7E2651A01645D8fa8BE6b70

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000047739957b908cbe52c14eb7cffaa65d105eba76e
Arg [1] : 00000000000000000000000011654dd4343b7d6afacdef98ae7fc4c05e0cc811
Arg [2] : 000000000000000000000000f0d82da1400801e9a7e2651a01645d8fa8be6b70


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.