ETH Price: $2,104.45 (+0.14%)

Token

RichMeka (RM)
 

Overview

Max Total Supply

3 RM

Holders

1

Transfers

-
0

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
RichMeka

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
byzantium EvmVersion
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract RichMeka is ERC721Enumerable, Ownable {
    event Staked(address indexed owner, uint256 indexed tokenId);
    event Unstaked(address indexed owner, uint256 indexed tokenId, uint256 reward);
    event Claimed(address indexed owner, uint256 indexed tokenId, uint256 amount);

    struct Stake {
        bool created;
        uint256 createdAt;
        uint256 rate;
        uint256 claimedAmount;
    }

    using Counters for Counters.Counter;
    
    Counters.Counter private _tokenIdTracker;
    mapping(address => mapping(uint256 => Stake)) private _holderStakes;
    mapping(address => uint256[]) private _holderTokensStaked;
    string public _baseTokenURI = "https://api.richmeka.com/metadata/richmeka/";
    bool public _saleIsActive = false;
    uint256 public _maxSupply = 888;
    uint256 public _maxNumberOfTokens = 10;
    uint256 public _tokenPrice = 0.1 ether;
    uint256 public _commissionValue = 0.005 ether;
    uint256 public _minClaim = 500000000000000000000; // 500 SERUM;
    uint256 public _coloredMekaRate = 5000000000000000000000; // 5 000 SERUM;
    uint256 public _monochromeMekaRate = 8000000000000000000000; // 8 000 SERUM;
    uint256 public _minStakeTime = 86400; // 24 hours;
    address public _serumContract;
    address public _serumAccount;

    constructor() ERC721("RichMeka", "RM") {}

    function _baseURI() internal view override returns (string memory) {
        return _baseTokenURI;
    }

    function setBaseTokenURI(string memory baseTokenURI) external onlyOwner {
        _baseTokenURI = baseTokenURI;
    }

    function flipSaleState() external onlyOwner {
        _saleIsActive = !_saleIsActive;
    }

    function setMaxSupply(uint256 maxSupply) external onlyOwner {
        _maxSupply = maxSupply;
    }

    function setTokenPrice(uint256 tokenPrice) external onlyOwner {
        _tokenPrice = tokenPrice;
    }

    function setCommissionValue(uint256 commissionValue) external onlyOwner {
        _commissionValue = commissionValue;
    }

    function setSerumContract(address serumContract) external onlyOwner {
        _serumContract = serumContract;
    }

    function setSerumAccount(address serumAccount) external onlyOwner {
        _serumAccount = serumAccount;
    }

    function withdrawEther() external onlyOwner {
        payable(owner()).transfer(address(this).balance);
    }

    function _stake(uint256 tokenId) internal {
        require(!_holderStakes[msg.sender][tokenId].created, "RichMeka: staking of token that is already staked");
        require(msg.sender == ownerOf(tokenId), "RichMeka: staking of token that is not own");

        uint256 stakingRate = tokenId <= 888 ? _coloredMekaRate : _monochromeMekaRate;
        _holderStakes[msg.sender][tokenId] = Stake(true, block.timestamp, stakingRate, 0);
        _holderTokensStaked[msg.sender].push(tokenId);
        _burn(tokenId);

        emit Staked(msg.sender, tokenId);
    }

    function _unstake(uint256 tokenId) internal {
        require(_holderStakes[msg.sender][tokenId].created, "RichMeka: unstaking of token that is not staked");
        require((block.timestamp - _holderStakes[msg.sender][tokenId].createdAt) >= _minStakeTime, "RichMeka: unstaking of token that is staked for less then min time");

        uint256 reward = ((_holderStakes[msg.sender][tokenId].rate / 86400) * (block.timestamp - _holderStakes[msg.sender][tokenId].createdAt)) - _holderStakes[msg.sender][tokenId].claimedAmount;
        IERC20 serumInterface = IERC20(_serumContract);
        serumInterface.transferFrom(_serumAccount, msg.sender, reward);

        delete _holderStakes[msg.sender][tokenId];
        for (uint256 i = 0; i < _holderTokensStaked[msg.sender].length; i++) {
            if (_holderTokensStaked[msg.sender][i] == tokenId) {
                 _holderTokensStaked[msg.sender][i] = _holderTokensStaked[msg.sender][_holderTokensStaked[msg.sender].length - 1];
                 _holderTokensStaked[msg.sender].pop();
                 break;
            }
        }
        _safeMint(msg.sender, tokenId);

        emit Unstaked(msg.sender, tokenId, reward);
    }

    function mintMekas(uint256 numberOfTokens, bool stakeTokens) external payable {
        require(_saleIsActive, "RichMeka: sale must be active to mint Meka");
        require(numberOfTokens <= _maxNumberOfTokens, "RichMeka: can`t mint more then _maxNumberOfTokens at a time");
        require(msg.value >= numberOfTokens * _tokenPrice, "RichMeka: ether value sent is not correct");
        require(totalSupply() + numberOfTokens <= _maxSupply, "RichMeka: purchase would exceed max supply of Mekas");

        if (totalSupply() + numberOfTokens == _maxSupply) {
            _saleIsActive = false;
        }

        for (uint256 i = 0; i < numberOfTokens; i++) {
            _tokenIdTracker.increment();
            uint256 tokenId = _tokenIdTracker.current();
            _safeMint(msg.sender, tokenId);

            if (stakeTokens) {
                _stake(tokenId);
            }
        }
    }

    function stakeMekas(uint256[] memory tokenIds) external {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            uint256 tokenId = tokenIds[i];
            _stake(tokenId);
        }
    }

    function unstakeMekas(uint256[] memory tokenIds) external payable {
        require(msg.value >= _commissionValue, "RichMeka: ether value sent is not correct");
        for (uint256 i = 0; i < tokenIds.length; i++) {
            uint256 tokenId = tokenIds[i];
            _unstake(tokenId);
        }
    }

    function claimSerum(uint256 tokenId, uint256 amount) external payable {
        require(msg.value >= _commissionValue, "RichMeka: ether value sent is not correct");
        require(_holderStakes[msg.sender][tokenId].created, "RichMeka: claim of reward for token that is not staked");
        require((block.timestamp - _holderStakes[msg.sender][tokenId].createdAt) >= _minStakeTime, "RichMeka: claim of token that is staked for less then min time");
        require(amount >= _minClaim, "RichMeka: claim amount is less the min amout");

        uint256 reward = ((_holderStakes[msg.sender][tokenId].rate / 86400) * (block.timestamp - _holderStakes[msg.sender][tokenId].createdAt)) - _holderStakes[msg.sender][tokenId].claimedAmount;
        require(amount <= reward, "RichMeka: reward is less then amount");

        _holderStakes[msg.sender][tokenId].claimedAmount += amount;
        IERC20 serumInterface = IERC20(_serumContract);
        serumInterface.transferFrom(_serumAccount, msg.sender, amount);

        emit Claimed(msg.sender, tokenId, amount);
    }

    function claimSerumAll() external payable {
        require(msg.value >= _commissionValue, "RichMeka: ether value sent is not correct");
        IERC20 serumInterface = IERC20(_serumContract);

        for (uint256 i = 0; i < _holderTokensStaked[msg.sender].length; i++) {
            uint256 tokenId = _holderTokensStaked[msg.sender][i];
            uint256 amount = ((_holderStakes[msg.sender][tokenId].rate / 86400) * (block.timestamp - _holderStakes[msg.sender][tokenId].createdAt)) - _holderStakes[msg.sender][tokenId].claimedAmount;

            if (amount >= _minClaim && (block.timestamp - _holderStakes[msg.sender][tokenId].createdAt) >= _minStakeTime) {
                _holderStakes[msg.sender][tokenId].claimedAmount += amount;
                serumInterface.transferFrom(_serumAccount, msg.sender, amount);

                emit Claimed(msg.sender, tokenId, amount);
            }
        }
    }

    function getTokensOfHolder(address holder) public view returns (uint256[] memory) {
        uint256 tokenCount = balanceOf(holder);
        if (tokenCount == 0) {
            return new uint256[](0);
        }
        else {
            uint256[] memory tokens = new uint256[](tokenCount);
            for (uint256 i = 0; i < tokenCount; i++) {
                tokens[i] = tokenOfOwnerByIndex(holder, i);
            }
            return tokens;
        }
    }

    function getStakedTokensOfHolder(address holder) external view returns (uint256[] memory) {
        return _holderTokensStaked[holder];
    }

    function getStakeOfHolderByTokenId(address holder, uint256 tokenId) external view returns (uint256, uint256) {
        require(_holderStakes[holder][tokenId].created, "RichMeka: operator query for nonexistent stake");
        return (_holderStakes[holder][tokenId].createdAt, _holderStakes[holder][tokenId].claimedAmount);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 11 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Staked","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"_baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_coloredMekaRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_commissionValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_maxNumberOfTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_minClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_minStakeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_monochromeMekaRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_serumAccount","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_serumContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimSerum","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimSerumAll","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"flipSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getStakeOfHolderByTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"getStakedTokensOfHolder","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"getTokensOfHolder","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":"numberOfTokens","type":"uint256"},{"internalType":"bool","name":"stakeTokens","type":"bool"}],"name":"mintMekas","outputs":[],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"string","name":"baseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"commissionValue","type":"uint256"}],"name":"setCommissionValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"serumAccount","type":"address"}],"name":"setSerumAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"serumContract","type":"address"}],"name":"setSerumContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenPrice","type":"uint256"}],"name":"setTokenPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stakeMekas","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstakeMekas","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e0604052602b60808181529062003ad260a03980516200002991600e91602090910190620001af565b50600f805460ff19169055610378601055600a60115567016345785d8a00006012556611c37937e08000601355681b1ae4d6e2ef50000060145569010f0cf064dd592000006015556901b1ae4d6e2ef5000000601655620151806017553480156200009357600080fd5b50604080518082018252600881527f526963684d656b6100000000000000000000000000000000000000000000000060208083019182528351808501909452600284527f524d0000000000000000000000000000000000000000000000000000000000009084015281519192916200010e91600091620001af565b50805162000124906001906020840190620001af565b505050620001536200014462000159640100000000026401000000009004565b6401000000006200015d810204565b620002ab565b3390565b600a8054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001bd9062000255565b90600052602060002090601f016020900481019282620001e157600085556200022c565b82601f10620001fc57805160ff19168380011785556200022c565b828001600101855582156200022c579182015b828111156200022c5782518255916020019190600101906200020f565b506200023a9291506200023e565b5090565b5b808211156200023a57600081556001016200023f565b6002810460018216806200026a57607f821691505b60208210811415620002a5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b61381780620002bb6000396000f3fe6080604052600436106102a5576000357c01000000000000000000000000000000000000000000000000000000009004806364e4907c11610177578063aab34446116100de578063d145fb3111610097578063d145fb311461075f578063d494e8361461077f578063e4761be814610792578063e985e9c5146107b2578063f2fde38b146107fb578063f3097bb91461081b57600080fd5b8063aab34446146106b7578063b5e3229d146106bf578063b88d4fde146106f4578063baf7638514610714578063c87b56dd1461072a578063cfc86f7b1461074a57600080fd5b806374ba8f281161013057806374ba8f281461061b5780638da5cb5b1461063157806395d89b411461064f578063a22cb46514610664578063a41fbfd214610684578063a607a8711461069757600080fd5b806364e4907c146105715780636a61e5fc146105915780636f8b44b0146105b157806370a08231146105d1578063715018a6146105f15780637362377b1461060657600080fd5b80632f745c591161021b5780634f6ccce7116101d45780634f6ccce7146104c157806350c24b5f146104e157806358d3d944146105015780635d893ba0146105215780636352211e1461053b57806363e8cb171461055b57600080fd5b80632f745c591461042357806330176e131461044357806334918dfd146104635780633b971f9f14610478578063412824ed1461048e57806342842e0e146104a157600080fd5b806318160ddd1161026d57806318160ddd1461037f5780631b8eee07146103945780631da21c21146103c15780631e0e3aab146103d757806322f4596f146103ed57806323b872dd1461040357600080fd5b806301ffc9a7146102aa57806306fdde03146102df578063081812fc14610301578063095ea7b31461033957806312b265f21461035b575b600080fd5b3480156102b657600080fd5b506102ca6102c5366004613076565b61083b565b60405190151581526020015b60405180910390f35b3480156102eb57600080fd5b506102f461087f565b6040516102d691906130eb565b34801561030d57600080fd5b5061032161031c3660046130fe565b610911565b604051600160a060020a0390911681526020016102d6565b34801561034557600080fd5b50610359610354366004613133565b6109bf565b005b34801561036757600080fd5b5061037160135481565b6040519081526020016102d6565b34801561038b57600080fd5b50600854610371565b3480156103a057600080fd5b506103b46103af36600461315d565b610af7565b6040516102d69190613178565b3480156103cd57600080fd5b5061037160155481565b3480156103e357600080fd5b5061037160175481565b3480156103f957600080fd5b5061037160105481565b34801561040f57600080fd5b5061035961041e3660046131bc565b610b63565b34801561042f57600080fd5b5061037161043e366004613133565b610b97565b34801561044f57600080fd5b5061035961045e36600461329a565b610c42565b34801561046f57600080fd5b50610359610c86565b34801561048457600080fd5b5061037160125481565b61035961049c3660046132e3565b610cc7565b3480156104ad57600080fd5b506103596104bc3660046131bc565b610d32565b3480156104cd57600080fd5b506103716104dc3660046130fe565b610d4d565b3480156104ed57600080fd5b506103596104fc3660046132e3565b610df4565b34801561050d57600080fd5b5060185461032190600160a060020a031681565b34801561052d57600080fd5b50600f546102ca9060ff1681565b34801561054757600080fd5b506103216105563660046130fe565b610e3a565b34801561056757600080fd5b5061037160115481565b34801561057d57600080fd5b506103b461058c36600461315d565b610ec8565b34801561059d57600080fd5b506103596105ac3660046130fe565b610f87565b3480156105bd57600080fd5b506103596105cc3660046130fe565b610fb9565b3480156105dd57600080fd5b506103716105ec36600461315d565b610feb565b3480156105fd57600080fd5b50610359611088565b34801561061257600080fd5b506103596110c1565b34801561062757600080fd5b5061037160165481565b34801561063d57600080fd5b50600a54600160a060020a0316610321565b34801561065b57600080fd5b506102f4611135565b34801561067057600080fd5b5061035961067f366004613396565b611144565b6103596106923660046133cd565b61120c565b3480156106a357600080fd5b506103596106b23660046130fe565b611439565b61035961146b565b3480156106cb57600080fd5b506106df6106da366004613133565b6116ac565b604080519283526020830191909152016102d6565b34801561070057600080fd5b5061035961070f3660046133f2565b61177f565b34801561072057600080fd5b5061037160145481565b34801561073657600080fd5b506102f46107453660046130fe565b6117ba565b34801561075657600080fd5b506102f46118a6565b34801561076b57600080fd5b5061035961077a36600461315d565b611934565b61035961078d36600461346e565b611983565b34801561079e57600080fd5b506103596107ad36600461315d565b611d4b565b3480156107be57600080fd5b506102ca6107cd366004613490565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561080757600080fd5b5061035961081636600461315d565b611d9a565b34801561082757600080fd5b5060195461032190600160a060020a031681565b6000600160e060020a031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610879575061087982611e4f565b92915050565b60606000805461088e906134c3565b80601f01602080910402602001604051908101604052809291908181526020018280546108ba906134c3565b80156109075780601f106108dc57610100808354040283529160200191610907565b820191906000526020600020905b8154815290600101906020018083116108ea57829003601f168201915b5050505050905090565b600081815260026020526040812054600160a060020a03166109a35760405160e560020a62461bcd02815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b50600090815260046020526040902054600160a060020a031690565b60006109ca82610e3a565b905080600160a060020a031683600160a060020a03161415610a575760405160e560020a62461bcd02815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f7200000000000000000000000000000000000000000000000000000000000000606482015260840161099a565b33600160a060020a0382161480610a735750610a7381336107cd565b610ae85760405160e560020a62461bcd02815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161099a565b610af28383611eea565b505050565b600160a060020a0381166000908152600d6020908152604091829020805483518184028101840190945280845260609392830182828015610b5757602002820191906000526020600020905b815481526020019060010190808311610b43575b50505050509050919050565b610b6d3382611f58565b610b8c5760405160e560020a62461bcd02815260040161099a906134fb565b610af2838383612063565b6000610ba283610feb565b8210610c195760405160e560020a62461bcd02815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161099a565b50600160a060020a03919091166000908152600660209081526040808320938352929052205490565b600a54600160a060020a03163314610c6f5760405160e560020a62461bcd02815260040161099a90613558565b8051610c8290600e906020840190612fc7565b5050565b600a54600160a060020a03163314610cb35760405160e560020a62461bcd02815260040161099a90613558565b600f805460ff19811660ff90911615179055565b601354341015610cec5760405160e560020a62461bcd02815260040161099a9061358d565b60005b8151811015610c82576000828281518110610d0c57610d0c6135ea565b60200260200101519050610d1f81612241565b5080610d2a8161361c565b915050610cef565b610af28383836040518060200160405280600081525061177f565b6000610d5860085490565b8210610dcf5760405160e560020a62461bcd02815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e64730000000000000000000000000000000000000000606482015260840161099a565b60088281548110610de257610de26135ea565b90600052602060002001549050919050565b60005b8151811015610c82576000828281518110610e1457610e146135ea565b60200260200101519050610e2781612625565b5080610e328161361c565b915050610df7565b600081815260026020526040812054600160a060020a0316806108795760405160e560020a62461bcd02815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606482015260840161099a565b60606000610ed583610feb565b905080610ef65760408051600080825260208201909252905b509392505050565b60008167ffffffffffffffff811115610f1157610f116131f8565b604051908082528060200260200182016040528015610f3a578160200160208202803683370190505b50905060005b82811015610eee57610f528582610b97565b828281518110610f6457610f646135ea565b602090810291909101015280610f798161361c565b915050610f40565b50919050565b600a54600160a060020a03163314610fb45760405160e560020a62461bcd02815260040161099a90613558565b601255565b600a54600160a060020a03163314610fe65760405160e560020a62461bcd02815260040161099a90613558565b601055565b6000600160a060020a03821661106c5760405160e560020a62461bcd02815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840161099a565b50600160a060020a031660009081526003602052604090205490565b600a54600160a060020a031633146110b55760405160e560020a62461bcd02815260040161099a90613558565b6110bf6000612819565b565b600a54600160a060020a031633146110ee5760405160e560020a62461bcd02815260040161099a90613558565b600a54600160a060020a0316604051600160a060020a039190911690303180156108fc02916000818181858888f19350505050158015611132573d6000803e3d6000fd5b50565b60606001805461088e906134c3565b600160a060020a0382163314156111a05760405160e560020a62461bcd02815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161099a565b336000818152600560209081526040808320600160a060020a03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600f5460ff166112875760405160e560020a62461bcd02815260206004820152602a60248201527f526963684d656b613a2073616c65206d7573742062652061637469766520746f60448201527f206d696e74204d656b6100000000000000000000000000000000000000000000606482015260840161099a565b6011548211156113025760405160e560020a62461bcd02815260206004820152603b60248201527f526963684d656b613a2063616e6074206d696e74206d6f7265207468656e205f60448201527f6d61784e756d6265724f66546f6b656e7320617420612074696d650000000000606482015260840161099a565b60125461130f9083613637565b3410156113315760405160e560020a62461bcd02815260040161099a9061358d565b6010548261133e60085490565b6113489190613656565b11156113bf5760405160e560020a62461bcd02815260206004820152603360248201527f526963684d656b613a20707572636861736520776f756c64206578636565642060448201527f6d617820737570706c79206f66204d656b617300000000000000000000000000606482015260840161099a565b601054826113cc60085490565b6113d69190613656565b14156113e757600f805460ff191690555b60005b82811015610af257611400600b80546001019055565b600061140b600b5490565b9050611417338261286b565b82156114265761142681612625565b50806114318161361c565b9150506113ea565b600a54600160a060020a031633146114665760405160e560020a62461bcd02815260040161099a90613558565b601355565b6013543410156114905760405160e560020a62461bcd02815260040161099a9061358d565b601854600160a060020a031660005b336000908152600d6020526040902054811015610c8257336000908152600d602052604081208054839081106114d7576114d76135ea565b600091825260208083209190910154338352600c82526040808420828552909252908220600381015460019091015491935090611514904261366e565b336000908152600c6020908152604080832087845290915290206002015461154090620151809061369e565b61154a9190613637565b611554919061366e565b905060145481101580156115915750601754336000908152600c6020908152604080832086845290915290206001015461158e904261366e565b10155b1561169757336000908152600c60209081526040808320858452909152812060030180548392906115c3908490613656565b90915550506019546040517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03918216600482015233602482015260448101839052908516906323b872dd906064016020604051808303816000875af115801561163a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165e91906136b2565b50604051818152829033907f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a9060200160405180910390a35b505080806116a49061361c565b91505061149f565b600160a060020a0382166000908152600c60209081526040808320848452909152812054819060ff1661174a5760405160e560020a62461bcd02815260206004820152602e60248201527f526963684d656b613a206f70657261746f7220717565727920666f72206e6f6e60448201527f6578697374656e74207374616b65000000000000000000000000000000000000606482015260840161099a565b5050600160a060020a03919091166000908152600c602090815260408083209383529290522060018101546003909101549091565b6117893383611f58565b6117a85760405160e560020a62461bcd02815260040161099a906134fb565b6117b484848484612885565b50505050565b600081815260026020526040902054606090600160a060020a031661184a5760405160e560020a62461bcd02815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606482015260840161099a565b60006118546128bb565b90506000815111611874576040518060200160405280600081525061189f565b8061187e846128ca565b60405160200161188f9291906136cf565b6040516020818303038152906040525b9392505050565b600e80546118b3906134c3565b80601f01602080910402602001604051908101604052809291908181526020018280546118df906134c3565b801561192c5780601f106119015761010080835404028352916020019161192c565b820191906000526020600020905b81548152906001019060200180831161190f57829003601f168201915b505050505081565b600a54600160a060020a031633146119615760405160e560020a62461bcd02815260040161099a90613558565b60188054600160a060020a031916600160a060020a0392909216919091179055565b6013543410156119a85760405160e560020a62461bcd02815260040161099a9061358d565b336000908152600c6020908152604080832085845290915290205460ff16611a3b5760405160e560020a62461bcd02815260206004820152603660248201527f526963684d656b613a20636c61696d206f662072657761726420666f7220746f60448201527f6b656e2074686174206973206e6f74207374616b656400000000000000000000606482015260840161099a565b601754336000908152600c60209081526040808320868452909152902060010154611a66904261366e565b1015611add5760405160e560020a62461bcd02815260206004820152603e60248201527f526963684d656b613a20636c61696d206f6620746f6b656e207468617420697360448201527f207374616b656420666f72206c657373207468656e206d696e2074696d650000606482015260840161099a565b601454811015611b585760405160e560020a62461bcd02815260206004820152602c60248201527f526963684d656b613a20636c61696d20616d6f756e74206973206c657373207460448201527f6865206d696e20616d6f75740000000000000000000000000000000000000000606482015260840161099a565b336000908152600c6020908152604080832085845290915281206003810154600190910154611b87904261366e565b336000908152600c60209081526040808320888452909152902060020154611bb390620151809061369e565b611bbd9190613637565b611bc7919061366e565b905080821115611c415760405160e560020a62461bcd028152602060048201526024808201527f526963684d656b613a20726577617264206973206c657373207468656e20616d60448201527f6f756e7400000000000000000000000000000000000000000000000000000000606482015260840161099a565b336000908152600c6020908152604080832086845290915281206003018054849290611c6e908490613656565b90915550506018546019546040517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0391821660048201523360248201526044810185905291169081906323b872dd906064016020604051808303816000875af1158015611ce9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0d91906136b2565b50604051838152849033907f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a9060200160405180910390a350505050565b600a54600160a060020a03163314611d785760405160e560020a62461bcd02815260040161099a90613558565b60198054600160a060020a031916600160a060020a0392909216919091179055565b600a54600160a060020a03163314611dc75760405160e560020a62461bcd02815260040161099a90613558565b600160a060020a038116611e465760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161099a565b61113281612819565b6000600160e060020a031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611eb25750600160e060020a031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061087957507f01ffc9a700000000000000000000000000000000000000000000000000000000600160e060020a0319831614610879565b60008181526004602052604090208054600160a060020a031916600160a060020a0384169081179091558190611f1f82610e3a565b600160a060020a03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081815260026020526040812054600160a060020a0316611fe55760405160e560020a62461bcd02815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606482015260840161099a565b6000611ff083610e3a565b905080600160a060020a031684600160a060020a0316148061202b575083600160a060020a031661202084610911565b600160a060020a0316145b8061205b5750600160a060020a0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b82600160a060020a031661207682610e3a565b600160a060020a0316146120f55760405160e560020a62461bcd02815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606482015260840161099a565b600160a060020a0382166121735760405160e560020a62461bcd028152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161099a565b61217e838383612a1b565b612189600082611eea565b600160a060020a03831660009081526003602052604081208054600192906121b290849061366e565b9091555050600160a060020a03821660009081526003602052604081208054600192906121e0908490613656565b90915550506000818152600260205260408082208054600160a060020a031916600160a060020a0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b336000908152600c6020908152604080832084845290915290205460ff166122d45760405160e560020a62461bcd02815260206004820152602f60248201527f526963684d656b613a20756e7374616b696e67206f6620746f6b656e2074686160448201527f74206973206e6f74207374616b65640000000000000000000000000000000000606482015260840161099a565b601754336000908152600c602090815260408083208584529091529020600101546122ff904261366e565b101561239c5760405160e560020a62461bcd02815260206004820152604260248201527f526963684d656b613a20756e7374616b696e67206f6620746f6b656e2074686160448201527f74206973207374616b656420666f72206c657373207468656e206d696e20746960648201527f6d65000000000000000000000000000000000000000000000000000000000000608482015260a40161099a565b336000908152600c60209081526040808320848452909152812060038101546001909101546123cb904261366e565b336000908152600c602090815260408083208784529091529020600201546123f790620151809061369e565b6124019190613637565b61240b919061366e565b6018546019546040517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03918216600482015233602482015260448101849052929350169081906323b872dd906064016020604051808303816000875af1158015612483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a791906136b2565b50336000908152600c602090815260408083208684529091528120805460ff1916815560018101829055600281018290556003018190555b336000908152600d60205260409020548110156125de57336000908152600d6020526040902080548591908390811061251a5761251a6135ea565b906000526020600020015414156125cc57336000908152600d6020526040902080546125489060019061366e565b81548110612558576125586135ea565b6000918252602080832090910154338352600d9091526040909120805483908110612585576125856135ea565b6000918252602080832090910192909255338152600d909152604090208054806125b1576125b16136fe565b600190038181906000526020600020016000905590556125de565b806125d68161361c565b9150506124df565b506125e9338461286b565b604051828152839033907f7fc4727e062e336010f2c282598ef5f14facb3de68cf8195c2f23e1454b2b74e9060200160405180910390a3505050565b336000908152600c6020908152604080832084845290915290205460ff16156126b95760405160e560020a62461bcd02815260206004820152603160248201527f526963684d656b613a207374616b696e67206f6620746f6b656e20746861742060448201527f697320616c7265616479207374616b6564000000000000000000000000000000606482015260840161099a565b6126c281610e3a565b600160a060020a031633600160a060020a03161461274b5760405160e560020a62461bcd02815260206004820152602a60248201527f526963684d656b613a207374616b696e67206f6620746f6b656e20746861742060448201527f6973206e6f74206f776e00000000000000000000000000000000000000000000606482015260840161099a565b600061037882111561275f57601654612763565b6015545b60408051608081018252600180825242602080840191825283850186815260006060860181815233808352600c85528883208c845285528883209751885460ff1916901515178855945187870155915160028701559051600390950194909455908352600d81529282208054918201815582529190200183905590506127e882612ad3565b604051829033907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90600090a35050565b600a8054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610c82828260405180602001604052806000815250612b7a565b612890848484612063565b61289c84848484612bb0565b6117b45760405160e560020a62461bcd02815260040161099a90613717565b6060600e805461088e906134c3565b60608161290a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612934578061291e8161361c565b915061292d9050600a8361369e565b915061290e565b60008167ffffffffffffffff81111561294f5761294f6131f8565b6040519080825280601f01601f191660200182016040528015612979576020820181803683370190505b5090505b841561205b5761298e60018361366e565b915061299b600a86613774565b6129a6906030613656565b7f0100000000000000000000000000000000000000000000000000000000000000028183815181106129da576129da6135ea565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612a14600a8661369e565b945061297d565b600160a060020a038316612a7657612a7181600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612a99565b81600160a060020a031683600160a060020a031614612a9957612a998382612ce3565b600160a060020a038216612ab057610af281612d80565b82600160a060020a031682600160a060020a031614610af257610af28282612e2f565b6000612ade82610e3a565b9050612aec81600084612a1b565b612af7600083611eea565b600160a060020a0381166000908152600360205260408120805460019290612b2090849061366e565b90915550506000828152600260205260408082208054600160a060020a031916905551839190600160a060020a038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b612b848383612e73565b612b916000848484612bb0565b610af25760405160e560020a62461bcd02815260040161099a90613717565b6000600160a060020a0384163b15612cd8576040517f150b7a02000000000000000000000000000000000000000000000000000000008152600160a060020a0385169063150b7a0290612c0d903390899088908890600401613788565b6020604051808303816000875af1925050508015612c48575060408051601f3d908101601f19168201909252612c45918101906137c4565b60015b612ca5573d808015612c76576040519150601f19603f3d011682016040523d82523d6000602084013e612c7b565b606091505b508051612c9d5760405160e560020a62461bcd02815260040161099a90613717565b805181602001fd5b600160e060020a0319167f150b7a020000000000000000000000000000000000000000000000000000000014905061205b565b506001949350505050565b60006001612cf084610feb565b612cfa919061366e565b600083815260076020526040902054909150808214612d4d57600160a060020a03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b506000918252600760209081526040808420849055600160a060020a039094168352600681528383209183525290812055565b600854600090612d929060019061366e565b60008381526009602052604081205460088054939450909284908110612dba57612dba6135ea565b906000526020600020015490508060088381548110612ddb57612ddb6135ea565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612e1357612e136136fe565b6001900381819060005260206000200160009055905550505050565b6000612e3a83610feb565b600160a060020a039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600160a060020a038216612ecc5760405160e560020a62461bcd02815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161099a565b600081815260026020526040902054600160a060020a031615612f345760405160e560020a62461bcd02815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161099a565b612f4060008383612a1b565b600160a060020a0382166000908152600360205260408120805460019290612f69908490613656565b90915550506000818152600260205260408082208054600160a060020a031916600160a060020a03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612fd3906134c3565b90600052602060002090601f016020900481019282612ff5576000855561303b565b82601f1061300e57805160ff191683800117855561303b565b8280016001018555821561303b579182015b8281111561303b578251825591602001919060010190613020565b5061304792915061304b565b5090565b5b80821115613047576000815560010161304c565b600160e060020a03198116811461113257600080fd5b60006020828403121561308857600080fd5b813561189f81613060565b60005b838110156130ae578181015183820152602001613096565b838111156117b45750506000910152565b600081518084526130d7816020860160208601613093565b601f01601f19169290920160200192915050565b60208152600061189f60208301846130bf565b60006020828403121561311057600080fd5b5035919050565b8035600160a060020a038116811461312e57600080fd5b919050565b6000806040838503121561314657600080fd5b61314f83613117565b946020939093013593505050565b60006020828403121561316f57600080fd5b61189f82613117565b6020808252825182820181905260009190848201906040850190845b818110156131b057835183529284019291840191600101613194565b50909695505050505050565b6000806000606084860312156131d157600080fd5b6131da84613117565b92506131e860208501613117565b9150604084013590509250925092565b60e060020a634e487b7102600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561323a5761323a6131f8565b604052919050565b600067ffffffffffffffff83111561325c5761325c6131f8565b61326f601f8401601f1916602001613211565b905082815283838301111561328357600080fd5b828260208301376000602084830101529392505050565b6000602082840312156132ac57600080fd5b813567ffffffffffffffff8111156132c357600080fd5b8201601f810184136132d457600080fd5b61205b84823560208401613242565b600060208083850312156132f657600080fd5b823567ffffffffffffffff8082111561330e57600080fd5b818501915085601f83011261332257600080fd5b813581811115613334576133346131f8565b8381029150613344848301613211565b818152918301840191848101908884111561335e57600080fd5b938501935b8385101561337c57843582529385019390850190613363565b98975050505050505050565b801515811461113257600080fd5b600080604083850312156133a957600080fd5b6133b283613117565b915060208301356133c281613388565b809150509250929050565b600080604083850312156133e057600080fd5b8235915060208301356133c281613388565b6000806000806080858703121561340857600080fd5b61341185613117565b935061341f60208601613117565b925060408501359150606085013567ffffffffffffffff81111561344257600080fd5b8501601f8101871361345357600080fd5b61346287823560208401613242565b91505092959194509250565b6000806040838503121561348157600080fd5b50508035926020909101359150565b600080604083850312156134a357600080fd5b6134ac83613117565b91506134ba60208401613117565b90509250929050565b6002810460018216806134d757607f821691505b60208210811415610f815760e060020a634e487b7102600052602260045260246000fd5b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f526963684d656b613a2065746865722076616c75652073656e74206973206e6f60408201527f7420636f72726563740000000000000000000000000000000000000000000000606082015260800190565b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052601160045260246000fd5b600060001982141561363057613630613603565b5060010190565b600081600019048311821515161561365157613651613603565b500290565b6000821982111561366957613669613603565b500190565b60008282101561368057613680613603565b500390565b60e060020a634e487b7102600052601260045260246000fd5b6000826136ad576136ad613685565b500490565b6000602082840312156136c457600080fd5b815161189f81613388565b600083516136e1818460208801613093565b8351908301906136f5818360208801613093565b01949350505050565b60e060020a634e487b7102600052603160045260246000fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60008261378357613783613685565b500690565b6000600160a060020a038087168352808616602084015250836040830152608060608301526137ba60808301846130bf565b9695505050505050565b6000602082840312156137d657600080fd5b815161189f8161306056fea26469706673582212204be06d56c45d0a8fcfe55452a2a858ad566d2d40df67c2874f12d264a70f2a1b64736f6c634300080b003368747470733a2f2f6170692e726963686d656b612e636f6d2f6d657461646174612f726963686d656b612f

Deployed Bytecode

0x6080604052600436106102a5576000357c01000000000000000000000000000000000000000000000000000000009004806364e4907c11610177578063aab34446116100de578063d145fb3111610097578063d145fb311461075f578063d494e8361461077f578063e4761be814610792578063e985e9c5146107b2578063f2fde38b146107fb578063f3097bb91461081b57600080fd5b8063aab34446146106b7578063b5e3229d146106bf578063b88d4fde146106f4578063baf7638514610714578063c87b56dd1461072a578063cfc86f7b1461074a57600080fd5b806374ba8f281161013057806374ba8f281461061b5780638da5cb5b1461063157806395d89b411461064f578063a22cb46514610664578063a41fbfd214610684578063a607a8711461069757600080fd5b806364e4907c146105715780636a61e5fc146105915780636f8b44b0146105b157806370a08231146105d1578063715018a6146105f15780637362377b1461060657600080fd5b80632f745c591161021b5780634f6ccce7116101d45780634f6ccce7146104c157806350c24b5f146104e157806358d3d944146105015780635d893ba0146105215780636352211e1461053b57806363e8cb171461055b57600080fd5b80632f745c591461042357806330176e131461044357806334918dfd146104635780633b971f9f14610478578063412824ed1461048e57806342842e0e146104a157600080fd5b806318160ddd1161026d57806318160ddd1461037f5780631b8eee07146103945780631da21c21146103c15780631e0e3aab146103d757806322f4596f146103ed57806323b872dd1461040357600080fd5b806301ffc9a7146102aa57806306fdde03146102df578063081812fc14610301578063095ea7b31461033957806312b265f21461035b575b600080fd5b3480156102b657600080fd5b506102ca6102c5366004613076565b61083b565b60405190151581526020015b60405180910390f35b3480156102eb57600080fd5b506102f461087f565b6040516102d691906130eb565b34801561030d57600080fd5b5061032161031c3660046130fe565b610911565b604051600160a060020a0390911681526020016102d6565b34801561034557600080fd5b50610359610354366004613133565b6109bf565b005b34801561036757600080fd5b5061037160135481565b6040519081526020016102d6565b34801561038b57600080fd5b50600854610371565b3480156103a057600080fd5b506103b46103af36600461315d565b610af7565b6040516102d69190613178565b3480156103cd57600080fd5b5061037160155481565b3480156103e357600080fd5b5061037160175481565b3480156103f957600080fd5b5061037160105481565b34801561040f57600080fd5b5061035961041e3660046131bc565b610b63565b34801561042f57600080fd5b5061037161043e366004613133565b610b97565b34801561044f57600080fd5b5061035961045e36600461329a565b610c42565b34801561046f57600080fd5b50610359610c86565b34801561048457600080fd5b5061037160125481565b61035961049c3660046132e3565b610cc7565b3480156104ad57600080fd5b506103596104bc3660046131bc565b610d32565b3480156104cd57600080fd5b506103716104dc3660046130fe565b610d4d565b3480156104ed57600080fd5b506103596104fc3660046132e3565b610df4565b34801561050d57600080fd5b5060185461032190600160a060020a031681565b34801561052d57600080fd5b50600f546102ca9060ff1681565b34801561054757600080fd5b506103216105563660046130fe565b610e3a565b34801561056757600080fd5b5061037160115481565b34801561057d57600080fd5b506103b461058c36600461315d565b610ec8565b34801561059d57600080fd5b506103596105ac3660046130fe565b610f87565b3480156105bd57600080fd5b506103596105cc3660046130fe565b610fb9565b3480156105dd57600080fd5b506103716105ec36600461315d565b610feb565b3480156105fd57600080fd5b50610359611088565b34801561061257600080fd5b506103596110c1565b34801561062757600080fd5b5061037160165481565b34801561063d57600080fd5b50600a54600160a060020a0316610321565b34801561065b57600080fd5b506102f4611135565b34801561067057600080fd5b5061035961067f366004613396565b611144565b6103596106923660046133cd565b61120c565b3480156106a357600080fd5b506103596106b23660046130fe565b611439565b61035961146b565b3480156106cb57600080fd5b506106df6106da366004613133565b6116ac565b604080519283526020830191909152016102d6565b34801561070057600080fd5b5061035961070f3660046133f2565b61177f565b34801561072057600080fd5b5061037160145481565b34801561073657600080fd5b506102f46107453660046130fe565b6117ba565b34801561075657600080fd5b506102f46118a6565b34801561076b57600080fd5b5061035961077a36600461315d565b611934565b61035961078d36600461346e565b611983565b34801561079e57600080fd5b506103596107ad36600461315d565b611d4b565b3480156107be57600080fd5b506102ca6107cd366004613490565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561080757600080fd5b5061035961081636600461315d565b611d9a565b34801561082757600080fd5b5060195461032190600160a060020a031681565b6000600160e060020a031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610879575061087982611e4f565b92915050565b60606000805461088e906134c3565b80601f01602080910402602001604051908101604052809291908181526020018280546108ba906134c3565b80156109075780601f106108dc57610100808354040283529160200191610907565b820191906000526020600020905b8154815290600101906020018083116108ea57829003601f168201915b5050505050905090565b600081815260026020526040812054600160a060020a03166109a35760405160e560020a62461bcd02815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b50600090815260046020526040902054600160a060020a031690565b60006109ca82610e3a565b905080600160a060020a031683600160a060020a03161415610a575760405160e560020a62461bcd02815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f7200000000000000000000000000000000000000000000000000000000000000606482015260840161099a565b33600160a060020a0382161480610a735750610a7381336107cd565b610ae85760405160e560020a62461bcd02815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161099a565b610af28383611eea565b505050565b600160a060020a0381166000908152600d6020908152604091829020805483518184028101840190945280845260609392830182828015610b5757602002820191906000526020600020905b815481526020019060010190808311610b43575b50505050509050919050565b610b6d3382611f58565b610b8c5760405160e560020a62461bcd02815260040161099a906134fb565b610af2838383612063565b6000610ba283610feb565b8210610c195760405160e560020a62461bcd02815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161099a565b50600160a060020a03919091166000908152600660209081526040808320938352929052205490565b600a54600160a060020a03163314610c6f5760405160e560020a62461bcd02815260040161099a90613558565b8051610c8290600e906020840190612fc7565b5050565b600a54600160a060020a03163314610cb35760405160e560020a62461bcd02815260040161099a90613558565b600f805460ff19811660ff90911615179055565b601354341015610cec5760405160e560020a62461bcd02815260040161099a9061358d565b60005b8151811015610c82576000828281518110610d0c57610d0c6135ea565b60200260200101519050610d1f81612241565b5080610d2a8161361c565b915050610cef565b610af28383836040518060200160405280600081525061177f565b6000610d5860085490565b8210610dcf5760405160e560020a62461bcd02815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e64730000000000000000000000000000000000000000606482015260840161099a565b60088281548110610de257610de26135ea565b90600052602060002001549050919050565b60005b8151811015610c82576000828281518110610e1457610e146135ea565b60200260200101519050610e2781612625565b5080610e328161361c565b915050610df7565b600081815260026020526040812054600160a060020a0316806108795760405160e560020a62461bcd02815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606482015260840161099a565b60606000610ed583610feb565b905080610ef65760408051600080825260208201909252905b509392505050565b60008167ffffffffffffffff811115610f1157610f116131f8565b604051908082528060200260200182016040528015610f3a578160200160208202803683370190505b50905060005b82811015610eee57610f528582610b97565b828281518110610f6457610f646135ea565b602090810291909101015280610f798161361c565b915050610f40565b50919050565b600a54600160a060020a03163314610fb45760405160e560020a62461bcd02815260040161099a90613558565b601255565b600a54600160a060020a03163314610fe65760405160e560020a62461bcd02815260040161099a90613558565b601055565b6000600160a060020a03821661106c5760405160e560020a62461bcd02815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840161099a565b50600160a060020a031660009081526003602052604090205490565b600a54600160a060020a031633146110b55760405160e560020a62461bcd02815260040161099a90613558565b6110bf6000612819565b565b600a54600160a060020a031633146110ee5760405160e560020a62461bcd02815260040161099a90613558565b600a54600160a060020a0316604051600160a060020a039190911690303180156108fc02916000818181858888f19350505050158015611132573d6000803e3d6000fd5b50565b60606001805461088e906134c3565b600160a060020a0382163314156111a05760405160e560020a62461bcd02815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161099a565b336000818152600560209081526040808320600160a060020a03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600f5460ff166112875760405160e560020a62461bcd02815260206004820152602a60248201527f526963684d656b613a2073616c65206d7573742062652061637469766520746f60448201527f206d696e74204d656b6100000000000000000000000000000000000000000000606482015260840161099a565b6011548211156113025760405160e560020a62461bcd02815260206004820152603b60248201527f526963684d656b613a2063616e6074206d696e74206d6f7265207468656e205f60448201527f6d61784e756d6265724f66546f6b656e7320617420612074696d650000000000606482015260840161099a565b60125461130f9083613637565b3410156113315760405160e560020a62461bcd02815260040161099a9061358d565b6010548261133e60085490565b6113489190613656565b11156113bf5760405160e560020a62461bcd02815260206004820152603360248201527f526963684d656b613a20707572636861736520776f756c64206578636565642060448201527f6d617820737570706c79206f66204d656b617300000000000000000000000000606482015260840161099a565b601054826113cc60085490565b6113d69190613656565b14156113e757600f805460ff191690555b60005b82811015610af257611400600b80546001019055565b600061140b600b5490565b9050611417338261286b565b82156114265761142681612625565b50806114318161361c565b9150506113ea565b600a54600160a060020a031633146114665760405160e560020a62461bcd02815260040161099a90613558565b601355565b6013543410156114905760405160e560020a62461bcd02815260040161099a9061358d565b601854600160a060020a031660005b336000908152600d6020526040902054811015610c8257336000908152600d602052604081208054839081106114d7576114d76135ea565b600091825260208083209190910154338352600c82526040808420828552909252908220600381015460019091015491935090611514904261366e565b336000908152600c6020908152604080832087845290915290206002015461154090620151809061369e565b61154a9190613637565b611554919061366e565b905060145481101580156115915750601754336000908152600c6020908152604080832086845290915290206001015461158e904261366e565b10155b1561169757336000908152600c60209081526040808320858452909152812060030180548392906115c3908490613656565b90915550506019546040517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03918216600482015233602482015260448101839052908516906323b872dd906064016020604051808303816000875af115801561163a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165e91906136b2565b50604051818152829033907f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a9060200160405180910390a35b505080806116a49061361c565b91505061149f565b600160a060020a0382166000908152600c60209081526040808320848452909152812054819060ff1661174a5760405160e560020a62461bcd02815260206004820152602e60248201527f526963684d656b613a206f70657261746f7220717565727920666f72206e6f6e60448201527f6578697374656e74207374616b65000000000000000000000000000000000000606482015260840161099a565b5050600160a060020a03919091166000908152600c602090815260408083209383529290522060018101546003909101549091565b6117893383611f58565b6117a85760405160e560020a62461bcd02815260040161099a906134fb565b6117b484848484612885565b50505050565b600081815260026020526040902054606090600160a060020a031661184a5760405160e560020a62461bcd02815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606482015260840161099a565b60006118546128bb565b90506000815111611874576040518060200160405280600081525061189f565b8061187e846128ca565b60405160200161188f9291906136cf565b6040516020818303038152906040525b9392505050565b600e80546118b3906134c3565b80601f01602080910402602001604051908101604052809291908181526020018280546118df906134c3565b801561192c5780601f106119015761010080835404028352916020019161192c565b820191906000526020600020905b81548152906001019060200180831161190f57829003601f168201915b505050505081565b600a54600160a060020a031633146119615760405160e560020a62461bcd02815260040161099a90613558565b60188054600160a060020a031916600160a060020a0392909216919091179055565b6013543410156119a85760405160e560020a62461bcd02815260040161099a9061358d565b336000908152600c6020908152604080832085845290915290205460ff16611a3b5760405160e560020a62461bcd02815260206004820152603660248201527f526963684d656b613a20636c61696d206f662072657761726420666f7220746f60448201527f6b656e2074686174206973206e6f74207374616b656400000000000000000000606482015260840161099a565b601754336000908152600c60209081526040808320868452909152902060010154611a66904261366e565b1015611add5760405160e560020a62461bcd02815260206004820152603e60248201527f526963684d656b613a20636c61696d206f6620746f6b656e207468617420697360448201527f207374616b656420666f72206c657373207468656e206d696e2074696d650000606482015260840161099a565b601454811015611b585760405160e560020a62461bcd02815260206004820152602c60248201527f526963684d656b613a20636c61696d20616d6f756e74206973206c657373207460448201527f6865206d696e20616d6f75740000000000000000000000000000000000000000606482015260840161099a565b336000908152600c6020908152604080832085845290915281206003810154600190910154611b87904261366e565b336000908152600c60209081526040808320888452909152902060020154611bb390620151809061369e565b611bbd9190613637565b611bc7919061366e565b905080821115611c415760405160e560020a62461bcd028152602060048201526024808201527f526963684d656b613a20726577617264206973206c657373207468656e20616d60448201527f6f756e7400000000000000000000000000000000000000000000000000000000606482015260840161099a565b336000908152600c6020908152604080832086845290915281206003018054849290611c6e908490613656565b90915550506018546019546040517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0391821660048201523360248201526044810185905291169081906323b872dd906064016020604051808303816000875af1158015611ce9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0d91906136b2565b50604051838152849033907f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a9060200160405180910390a350505050565b600a54600160a060020a03163314611d785760405160e560020a62461bcd02815260040161099a90613558565b60198054600160a060020a031916600160a060020a0392909216919091179055565b600a54600160a060020a03163314611dc75760405160e560020a62461bcd02815260040161099a90613558565b600160a060020a038116611e465760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161099a565b61113281612819565b6000600160e060020a031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611eb25750600160e060020a031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061087957507f01ffc9a700000000000000000000000000000000000000000000000000000000600160e060020a0319831614610879565b60008181526004602052604090208054600160a060020a031916600160a060020a0384169081179091558190611f1f82610e3a565b600160a060020a03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081815260026020526040812054600160a060020a0316611fe55760405160e560020a62461bcd02815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606482015260840161099a565b6000611ff083610e3a565b905080600160a060020a031684600160a060020a0316148061202b575083600160a060020a031661202084610911565b600160a060020a0316145b8061205b5750600160a060020a0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b82600160a060020a031661207682610e3a565b600160a060020a0316146120f55760405160e560020a62461bcd02815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606482015260840161099a565b600160a060020a0382166121735760405160e560020a62461bcd028152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161099a565b61217e838383612a1b565b612189600082611eea565b600160a060020a03831660009081526003602052604081208054600192906121b290849061366e565b9091555050600160a060020a03821660009081526003602052604081208054600192906121e0908490613656565b90915550506000818152600260205260408082208054600160a060020a031916600160a060020a0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b336000908152600c6020908152604080832084845290915290205460ff166122d45760405160e560020a62461bcd02815260206004820152602f60248201527f526963684d656b613a20756e7374616b696e67206f6620746f6b656e2074686160448201527f74206973206e6f74207374616b65640000000000000000000000000000000000606482015260840161099a565b601754336000908152600c602090815260408083208584529091529020600101546122ff904261366e565b101561239c5760405160e560020a62461bcd02815260206004820152604260248201527f526963684d656b613a20756e7374616b696e67206f6620746f6b656e2074686160448201527f74206973207374616b656420666f72206c657373207468656e206d696e20746960648201527f6d65000000000000000000000000000000000000000000000000000000000000608482015260a40161099a565b336000908152600c60209081526040808320848452909152812060038101546001909101546123cb904261366e565b336000908152600c602090815260408083208784529091529020600201546123f790620151809061369e565b6124019190613637565b61240b919061366e565b6018546019546040517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03918216600482015233602482015260448101849052929350169081906323b872dd906064016020604051808303816000875af1158015612483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a791906136b2565b50336000908152600c602090815260408083208684529091528120805460ff1916815560018101829055600281018290556003018190555b336000908152600d60205260409020548110156125de57336000908152600d6020526040902080548591908390811061251a5761251a6135ea565b906000526020600020015414156125cc57336000908152600d6020526040902080546125489060019061366e565b81548110612558576125586135ea565b6000918252602080832090910154338352600d9091526040909120805483908110612585576125856135ea565b6000918252602080832090910192909255338152600d909152604090208054806125b1576125b16136fe565b600190038181906000526020600020016000905590556125de565b806125d68161361c565b9150506124df565b506125e9338461286b565b604051828152839033907f7fc4727e062e336010f2c282598ef5f14facb3de68cf8195c2f23e1454b2b74e9060200160405180910390a3505050565b336000908152600c6020908152604080832084845290915290205460ff16156126b95760405160e560020a62461bcd02815260206004820152603160248201527f526963684d656b613a207374616b696e67206f6620746f6b656e20746861742060448201527f697320616c7265616479207374616b6564000000000000000000000000000000606482015260840161099a565b6126c281610e3a565b600160a060020a031633600160a060020a03161461274b5760405160e560020a62461bcd02815260206004820152602a60248201527f526963684d656b613a207374616b696e67206f6620746f6b656e20746861742060448201527f6973206e6f74206f776e00000000000000000000000000000000000000000000606482015260840161099a565b600061037882111561275f57601654612763565b6015545b60408051608081018252600180825242602080840191825283850186815260006060860181815233808352600c85528883208c845285528883209751885460ff1916901515178855945187870155915160028701559051600390950194909455908352600d81529282208054918201815582529190200183905590506127e882612ad3565b604051829033907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90600090a35050565b600a8054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610c82828260405180602001604052806000815250612b7a565b612890848484612063565b61289c84848484612bb0565b6117b45760405160e560020a62461bcd02815260040161099a90613717565b6060600e805461088e906134c3565b60608161290a57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612934578061291e8161361c565b915061292d9050600a8361369e565b915061290e565b60008167ffffffffffffffff81111561294f5761294f6131f8565b6040519080825280601f01601f191660200182016040528015612979576020820181803683370190505b5090505b841561205b5761298e60018361366e565b915061299b600a86613774565b6129a6906030613656565b7f0100000000000000000000000000000000000000000000000000000000000000028183815181106129da576129da6135ea565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612a14600a8661369e565b945061297d565b600160a060020a038316612a7657612a7181600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612a99565b81600160a060020a031683600160a060020a031614612a9957612a998382612ce3565b600160a060020a038216612ab057610af281612d80565b82600160a060020a031682600160a060020a031614610af257610af28282612e2f565b6000612ade82610e3a565b9050612aec81600084612a1b565b612af7600083611eea565b600160a060020a0381166000908152600360205260408120805460019290612b2090849061366e565b90915550506000828152600260205260408082208054600160a060020a031916905551839190600160a060020a038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b612b848383612e73565b612b916000848484612bb0565b610af25760405160e560020a62461bcd02815260040161099a90613717565b6000600160a060020a0384163b15612cd8576040517f150b7a02000000000000000000000000000000000000000000000000000000008152600160a060020a0385169063150b7a0290612c0d903390899088908890600401613788565b6020604051808303816000875af1925050508015612c48575060408051601f3d908101601f19168201909252612c45918101906137c4565b60015b612ca5573d808015612c76576040519150601f19603f3d011682016040523d82523d6000602084013e612c7b565b606091505b508051612c9d5760405160e560020a62461bcd02815260040161099a90613717565b805181602001fd5b600160e060020a0319167f150b7a020000000000000000000000000000000000000000000000000000000014905061205b565b506001949350505050565b60006001612cf084610feb565b612cfa919061366e565b600083815260076020526040902054909150808214612d4d57600160a060020a03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b506000918252600760209081526040808420849055600160a060020a039094168352600681528383209183525290812055565b600854600090612d929060019061366e565b60008381526009602052604081205460088054939450909284908110612dba57612dba6135ea565b906000526020600020015490508060088381548110612ddb57612ddb6135ea565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612e1357612e136136fe565b6001900381819060005260206000200160009055905550505050565b6000612e3a83610feb565b600160a060020a039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600160a060020a038216612ecc5760405160e560020a62461bcd02815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161099a565b600081815260026020526040902054600160a060020a031615612f345760405160e560020a62461bcd02815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161099a565b612f4060008383612a1b565b600160a060020a0382166000908152600360205260408120805460019290612f69908490613656565b90915550506000818152600260205260408082208054600160a060020a031916600160a060020a03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612fd3906134c3565b90600052602060002090601f016020900481019282612ff5576000855561303b565b82601f1061300e57805160ff191683800117855561303b565b8280016001018555821561303b579182015b8281111561303b578251825591602001919060010190613020565b5061304792915061304b565b5090565b5b80821115613047576000815560010161304c565b600160e060020a03198116811461113257600080fd5b60006020828403121561308857600080fd5b813561189f81613060565b60005b838110156130ae578181015183820152602001613096565b838111156117b45750506000910152565b600081518084526130d7816020860160208601613093565b601f01601f19169290920160200192915050565b60208152600061189f60208301846130bf565b60006020828403121561311057600080fd5b5035919050565b8035600160a060020a038116811461312e57600080fd5b919050565b6000806040838503121561314657600080fd5b61314f83613117565b946020939093013593505050565b60006020828403121561316f57600080fd5b61189f82613117565b6020808252825182820181905260009190848201906040850190845b818110156131b057835183529284019291840191600101613194565b50909695505050505050565b6000806000606084860312156131d157600080fd5b6131da84613117565b92506131e860208501613117565b9150604084013590509250925092565b60e060020a634e487b7102600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561323a5761323a6131f8565b604052919050565b600067ffffffffffffffff83111561325c5761325c6131f8565b61326f601f8401601f1916602001613211565b905082815283838301111561328357600080fd5b828260208301376000602084830101529392505050565b6000602082840312156132ac57600080fd5b813567ffffffffffffffff8111156132c357600080fd5b8201601f810184136132d457600080fd5b61205b84823560208401613242565b600060208083850312156132f657600080fd5b823567ffffffffffffffff8082111561330e57600080fd5b818501915085601f83011261332257600080fd5b813581811115613334576133346131f8565b8381029150613344848301613211565b818152918301840191848101908884111561335e57600080fd5b938501935b8385101561337c57843582529385019390850190613363565b98975050505050505050565b801515811461113257600080fd5b600080604083850312156133a957600080fd5b6133b283613117565b915060208301356133c281613388565b809150509250929050565b600080604083850312156133e057600080fd5b8235915060208301356133c281613388565b6000806000806080858703121561340857600080fd5b61341185613117565b935061341f60208601613117565b925060408501359150606085013567ffffffffffffffff81111561344257600080fd5b8501601f8101871361345357600080fd5b61346287823560208401613242565b91505092959194509250565b6000806040838503121561348157600080fd5b50508035926020909101359150565b600080604083850312156134a357600080fd5b6134ac83613117565b91506134ba60208401613117565b90509250929050565b6002810460018216806134d757607f821691505b60208210811415610f815760e060020a634e487b7102600052602260045260246000fd5b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f526963684d656b613a2065746865722076616c75652073656e74206973206e6f60408201527f7420636f72726563740000000000000000000000000000000000000000000000606082015260800190565b60e060020a634e487b7102600052603260045260246000fd5b60e060020a634e487b7102600052601160045260246000fd5b600060001982141561363057613630613603565b5060010190565b600081600019048311821515161561365157613651613603565b500290565b6000821982111561366957613669613603565b500190565b60008282101561368057613680613603565b500390565b60e060020a634e487b7102600052601260045260246000fd5b6000826136ad576136ad613685565b500490565b6000602082840312156136c457600080fd5b815161189f81613388565b600083516136e1818460208801613093565b8351908301906136f5818360208801613093565b01949350505050565b60e060020a634e487b7102600052603160045260246000fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60008261378357613783613685565b500690565b6000600160a060020a038087168352808616602084015250836040830152608060608301526137ba60808301846130bf565b9695505050505050565b6000602082840312156137d657600080fd5b815161189f8161306056fea26469706673582212204be06d56c45d0a8fcfe55452a2a858ad566d2d40df67c2874f12d264a70f2a1b64736f6c634300080b0033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.