ETH Price: $3,413.53 (-2.48%)
Gas: 9 Gwei

Trainers (TRNR)
 

Overview

TokenID

2030

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The bond between Pixelmon and trainer is more than an obligation, it's a wellspring of motivation they can both draw from.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
PixelmonTrainer

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 9999 runs

Other Settings:
default evmVersion
File 1 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 3 of 11 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: 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 Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

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

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

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

pragma solidity ^0.8.0;

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

File 5 of 11 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 9 of 11 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // 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);
    }

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

File 10 of 11 : ERC721.sol
// SPDX-License-Identifier: MIT
// Taken from OpenZeppelin Contracts
// batch minting function added
// some unused functions removed

pragma solidity 0.8.15;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner 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: caller is not token 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) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

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

        _owners[tokenId] = to;

        unchecked {
            _balances[to] += 1;
        }

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

    /**
     * @dev Mints `amount` tokens starting from `firstId` id and transfer it to `to`.
     * Not a native OpenZeppelin function. Added to reduce gas costs on batch mints
     *
     * Requirements:
     * - tokens with id's staring from `firstId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mintBatch(
        address to,
        uint256 firstId,
        uint256 amount
    ) internal {
        require(to != address(0), "ERC721: mint to the zero address");

        uint256 lastId = firstId + amount;

        for (uint256 tokenId = firstId; tokenId < lastId; ) {
            require(!_exists(tokenId), "ERC721: token already minted");

            _owners[tokenId] = to;

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

            unchecked {
                ++tokenId;
            }
        }

        unchecked {
            _balances[to] += amount;
        }
    }

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

        _beforeTokenTransfer(from, to, tokenId);

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

        unchecked {
            _balances[from] -= 1;
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * 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 {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 11 of 11 : PixelmonTrainer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721.sol";

/// @notice Thrown when contract functions called by unauthorized address
error NotWhitelisted();

/// @notice Thrown when limit of minted tokens in range reached
error MintAmountExceeded();

/// @notice Thrown in airdrop function when array of receiver is invalid
error InvalidInputArrayLength();

contract PixelmonTrainer is ERC721, Ownable {
    /// @dev Total 10020 tokens supply divided in 3 ranges:
    /// Range 1 - Pixelmon staking rewards, ids [1, 10000]
    /// Range 2 - gold trainers, ids [10001, 10020]
    uint256 public constant FIRST_RANGE_MAX_SUPPLY = 10000;
    uint256 public constant SECOND_RANGE_MAX_SUPPLY = 20;

    /// @notice Supply variables shows how much tokens minted in each range, also used as tokenId counter
    uint256 public firstRangeSupply = 0;
    uint256 public secondRangeSupply = 0;

    /// @notice Token metadata base URI
    string public baseURI;

    /// @notice Whitelisted address can call functions marked with onlyWhitelisted modifier
    mapping(address => bool) private whitelist;

    event SetBaseURI(string _baseURI);
    event WhitelistAddress(address indexed _address, bool _whitelisted);
    event Mint(address indexed _to, uint256 indexed _tokenId);

    modifier onlyWhitelisted() {
        if (!whitelist[msg.sender]) {
            revert NotWhitelisted();
        }
        _;
    }

    constructor(
        string memory _name,
        string memory _symbol,
        string memory _baseTokenURI
    ) ERC721(_name, _symbol) {
        baseURI = _baseTokenURI;
    }

    /// @notice Add/remove address to/from whitelist. Callable only by contract owner
    /// @param _address user or contract address
    /// @param _flag true - add user to whitelist, false - remove from whitelist
    function whitelistAddress(address _address, bool _flag) external onlyOwner {
        whitelist[_address] = _flag;

        emit WhitelistAddress(_address, _flag);
    }

    /// @notice Set base URI for tokens metadata. Callable only by contract owner
    /// @param _baseTokenURI base URI to metadata
    function setBaseURI(string memory _baseTokenURI) external onlyOwner {
        baseURI = _baseTokenURI;

        emit SetBaseURI(_baseTokenURI);
    }

    /// @notice Mint new tokens to address from range #1 [1, 10000]. Callable only by whitelisted addresses
    /// @dev Minting process uses incremental token ids, starting from 1
    /// @param _to receiver address
    /// @param _tokensAmount amount of tokens
    function mintRangeOne(address _to, uint256 _tokensAmount) external onlyWhitelisted {
        if (firstRangeSupply + _tokensAmount > FIRST_RANGE_MAX_SUPPLY) {
            revert MintAmountExceeded();
        }

        uint256 mintStartId = firstRangeSupply + 1;

        _mintTokens(_to, mintStartId, _tokensAmount);

        unchecked {
            firstRangeSupply += _tokensAmount;
        }
    }

    /// @notice Airdrop gold trainer tokens to list of addresses. Callable by contract owner and only once
    /// @dev token ids range #2 - [10001, 10020]
    /// @param _to receivers array
    function airdropGoldTrainers(address[] calldata _to) external onlyOwner {
        if (secondRangeSupply == SECOND_RANGE_MAX_SUPPLY) {
            revert MintAmountExceeded();
        }

        if (_to.length != SECOND_RANGE_MAX_SUPPLY) {
            revert InvalidInputArrayLength();
        }

        uint256 secondRangeTokenId = FIRST_RANGE_MAX_SUPPLY + 1;

        for (uint256 i = 0; i < _to.length; i = _uncheckedInc(i)) {
            _mint(_to[i], secondRangeTokenId);
            emit Mint(_to[i], secondRangeTokenId);

            unchecked {
                ++secondRangeTokenId;
            }
        }

        unchecked {
            secondRangeSupply += SECOND_RANGE_MAX_SUPPLY;
        }
    }

    /// @notice Returns true if wallet in whitelist, otherwise false
    /// @return bool
    function isWhitelisted(address _address) external view returns (bool) {
        return whitelist[_address];
    }

    /// @notice Get total supply of trainers NFT
    /// @return NFT total supply
    function totalSupply() external view returns (uint256) {
        return firstRangeSupply + secondRangeSupply;
    }

    /// @notice Private helper functions to mint tokens
    /// @dev Uses batch minting if _tokensAmount > 1
    /// @param _to receiver address
    /// @param _mintStartId starting tokens id
    /// @param _tokensAmount amount of tokens to mint
    function _mintTokens(
        address _to,
        uint256 _mintStartId,
        uint256 _tokensAmount
    ) private {
        if (_tokensAmount > 1) {
            _mintBatch(_to, _mintStartId, _tokensAmount);
        } else {
            _mint(_to, _mintStartId);

            emit Mint(_to, _mintStartId);
        }
    }

    /// @dev Overrides same function from OpenZeppelin ERC721, used in tokenURI function
    /// @return token base URI
    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;
    }

    /// @dev Unchecked increment function, just to reduce gas usage
    /// @param val value to be incremented, should not overflow 2**256 - 1
    /// @return incremented value
    function _uncheckedInc(uint256 val) internal pure returns (uint256) {
        unchecked {
            return val + 1;
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseTokenURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidInputArrayLength","type":"error"},{"inputs":[],"name":"MintAmountExceeded","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Mint","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":false,"internalType":"string","name":"_baseURI","type":"string"}],"name":"SetBaseURI","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":"_address","type":"address"},{"indexed":false,"internalType":"bool","name":"_whitelisted","type":"bool"}],"name":"WhitelistAddress","type":"event"},{"inputs":[],"name":"FIRST_RANGE_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECOND_RANGE_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"}],"name":"airdropGoldTrainers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"firstRangeSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"address","name":"_address","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokensAmount","type":"uint256"}],"name":"mintRangeOne","outputs":[],"stateMutability":"nonpayable","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":[],"name":"secondRangeSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_flag","type":"bool"}],"name":"whitelistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600060075560006008553480156200001b57600080fd5b506040516200266b3803806200266b8339810160408190526200003e91620001b5565b828260006200004e8382620002d5565b5060016200005d8282620002d5565b5050506200007a620000746200009260201b60201c565b62000096565b6009620000888282620002d5565b50505050620003a1565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200011057600080fd5b81516001600160401b03808211156200012d576200012d620000e8565b604051601f8301601f19908116603f01168101908282118183101715620001585762000158620000e8565b816040528381526020925086838588010111156200017557600080fd5b600091505b838210156200019957858201830151818301840152908201906200017a565b83821115620001ab5760008385830101525b9695505050505050565b600080600060608486031215620001cb57600080fd5b83516001600160401b0380821115620001e357600080fd5b620001f187838801620000fe565b945060208601519150808211156200020857600080fd5b6200021687838801620000fe565b935060408601519150808211156200022d57600080fd5b506200023c86828701620000fe565b9150509250925092565b600181811c908216806200025b57607f821691505b6020821081036200027c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002d057600081815260208120601f850160051c81016020861015620002ab5750805b601f850160051c820191505b81811015620002cc57828155600101620002b7565b5050505b505050565b81516001600160401b03811115620002f157620002f1620000e8565b620003098162000302845462000246565b8462000282565b602080601f831160018114620003415760008415620003285750858301515b600019600386901b1c1916600185901b178555620002cc565b600085815260208120601f198616915b82811015620003725788860151825594840194600190910190840162000351565b5085821015620003915787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6122ba80620003b16000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c8063715018a6116100f9578063acb552ff11610097578063c87b56dd11610071578063c87b56dd146103a6578063e985e9c5146103b9578063f2fde38b14610402578063f6c92a4b1461041557600080fd5b8063acb552ff14610377578063b88d4fde14610380578063b9a45aac1461039357600080fd5b80638da5cb5b116100d35780638da5cb5b1461033557806395d89b41146103535780639a07eb381461035b578063a22cb4651461036457600080fd5b8063715018a6146103115780637195542f1461031957806385b246551461032c57600080fd5b80633af32abf1161016657806355f804b31161014057806355f804b3146102d05780636352211e146102e35780636c0360eb146102f657806370a08231146102fe57600080fd5b80633af32abf146102715780633cc4eacd146102aa57806342842e0e146102bd57600080fd5b8063095ea7b311610197578063095ea7b31461023357806318160ddd1461024857806323b872dd1461025e57600080fd5b806301ffc9a7146101be57806306fdde03146101e6578063081812fc146101fb575b600080fd5b6101d16101cc366004611b43565b61041d565b60405190151581526020015b60405180910390f35b6101ee610502565b6040516101dd9190611bd6565b61020e610209366004611be9565b610594565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101dd565b610246610241366004611c2b565b6105c8565b005b610250610725565b6040519081526020016101dd565b61024661026c366004611c55565b61073c565b6101d161027f366004611c91565b73ffffffffffffffffffffffffffffffffffffffff166000908152600a602052604090205460ff1690565b6102466102b8366004611cac565b6107c3565b6102466102cb366004611c55565b610912565b6102466102de366004611de4565b61092d565b61020e6102f1366004611be9565b61097c565b6101ee6109ee565b61025061030c366004611c91565b610a7c565b610246610b30565b610246610327366004611c2b565b610b44565b61025061271081565b60065473ffffffffffffffffffffffffffffffffffffffff1661020e565b6101ee610c01565b61025060085481565b610246610372366004611e2d565b610c10565b61025060075481565b61024661038e366004611e69565b610c1f565b6102466103a1366004611e2d565b610cad565b6101ee6103b4366004611be9565b610d3f565b6101d16103c7366004611ee5565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b610246610410366004611c91565b610da6565b610250601481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806104b057507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806104fc57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60606000805461051190611f18565b80601f016020809104026020016040519081016040528092919081815260200182805461053d90611f18565b801561058a5780601f1061055f5761010080835404028352916020019161058a565b820191906000526020600020905b81548152906001019060200180831161056d57829003601f168201915b5050505050905090565b600061059f82610e43565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006105d38261097c565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361067b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff821614806106a457506106a481336103c7565b6107165760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610672565b6107208383610eb4565b505050565b60006008546007546107379190611f9a565b905090565b6107463382610f54565b6107b85760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610672565b610720838383611014565b6107cb611210565b601460085403610807576040517fadfbe3d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60148114610841576040517fa7b682d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108506127106001611f9a565b905060005b828110156109035761088d84848381811061087257610872611fb2565b90506020020160208101906108879190611c91565b83611277565b818484838181106108a0576108a0611fb2565b90506020020160208101906108b59190611c91565b73ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688560405160405180910390a360019182019101610855565b50506008805460140190555050565b61072083838360405180602001604052806000815250610c1f565b610935611210565b6009610941828261202f565b507f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa816040516109719190611bd6565b60405180910390a150565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16806104fc5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610672565b600980546109fb90611f18565b80601f0160208091040260200160405190810160405280929190818152602001828054610a2790611f18565b8015610a745780601f10610a4957610100808354040283529160200191610a74565b820191906000526020600020905b815481529060010190602001808311610a5757829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff8216610b075760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610672565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b610b38611210565b610b4260006113dd565b565b336000908152600a602052604090205460ff16610b8d576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61271081600754610b9e9190611f9a565b1115610bd6576040517fadfbe3d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006007546001610be79190611f9a565b9050610bf4838284611454565b5060078054909101905550565b60606001805461051190611f18565b610c1b3383836114ba565b5050565b610c293383610f54565b610c9b5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610672565b610ca7848484846115cd565b50505050565b610cb5611210565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600a602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f33e0bf3ce98fac4118d5a0a8fe49e83b6acdfdef32871c9eca20e1528d7701ba910160405180910390a25050565b6060610d4a82610e43565b6000610d54611656565b90506000815111610d745760405180602001604052806000815250610d9f565b80610d7e84611665565b604051602001610d8f929190612149565b6040516020818303038152906040525b9392505050565b610dae611210565b73ffffffffffffffffffffffffffffffffffffffff8116610e375760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610672565b610e40816113dd565b50565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16610e405760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610672565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190610f0e8261097c565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610f608361097c565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610fce575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b8061100c57508373ffffffffffffffffffffffffffffffffffffffff16610ff484610594565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166110348261097c565b73ffffffffffffffffffffffffffffffffffffffff16146110bd5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610672565b73ffffffffffffffffffffffffffffffffffffffff82166111455760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610672565b611150600082610eb4565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260036020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905593861680835284832080546001019055858352600290915283822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016821790559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610b425760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610672565b73ffffffffffffffffffffffffffffffffffffffff82166112da5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610672565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff161561134c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610672565b600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8716908117909155808452600390925280832080546001019055518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60018111156114685761072083838361179a565b6114728383611277565b604051829073ffffffffffffffffffffffffffffffffffffffff8516907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590600090a3505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036115355760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610672565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6115d8848484611014565b6115e48484848461193c565b610ca75760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610672565b60606009805461051190611f18565b6060816000036116a857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156116d257806116bc81612178565b91506116cb9050600a836121df565b91506116ac565b60008167ffffffffffffffff8111156116ed576116ed611d21565b6040519080825280601f01601f191660200182016040528015611717576020820181803683370190505b5090505b841561100c5761172c6001836121f3565b9150611739600a8661220a565b611744906030611f9a565b60f81b81838151811061175957611759611fb2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611793600a866121df565b945061171b565b73ffffffffffffffffffffffffffffffffffffffff83166117fd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610672565b60006118098284611f9a565b9050825b818110156119095760008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16156118875760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610672565b60008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff891690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a460010161180d565b505073ffffffffffffffffffffffffffffffffffffffff9092166000908152600360205260409020805490920190915550565b600073ffffffffffffffffffffffffffffffffffffffff84163b15611b0a576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a02906119b390339089908890889060040161221e565b6020604051808303816000875af1925050508015611a0c575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611a0991810190612267565b60015b611abf573d808015611a3a576040519150601f19603f3d011682016040523d82523d6000602084013e611a3f565b606091505b508051600003611ab75760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610672565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061100c565b506001949350505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610e4057600080fd5b600060208284031215611b5557600080fd5b8135610d9f81611b15565b60005b83811015611b7b578181015183820152602001611b63565b83811115610ca75750506000910152565b60008151808452611ba4816020860160208601611b60565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610d9f6020830184611b8c565b600060208284031215611bfb57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611c2657600080fd5b919050565b60008060408385031215611c3e57600080fd5b611c4783611c02565b946020939093013593505050565b600080600060608486031215611c6a57600080fd5b611c7384611c02565b9250611c8160208501611c02565b9150604084013590509250925092565b600060208284031215611ca357600080fd5b610d9f82611c02565b60008060208385031215611cbf57600080fd5b823567ffffffffffffffff80821115611cd757600080fd5b818501915085601f830112611ceb57600080fd5b813581811115611cfa57600080fd5b8660208260051b8501011115611d0f57600080fd5b60209290920196919550909350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115611d6b57611d6b611d21565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611db157611db1611d21565b81604052809350858152868686011115611dca57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611df657600080fd5b813567ffffffffffffffff811115611e0d57600080fd5b8201601f81018413611e1e57600080fd5b61100c84823560208401611d50565b60008060408385031215611e4057600080fd5b611e4983611c02565b915060208301358015158114611e5e57600080fd5b809150509250929050565b60008060008060808587031215611e7f57600080fd5b611e8885611c02565b9350611e9660208601611c02565b925060408501359150606085013567ffffffffffffffff811115611eb957600080fd5b8501601f81018713611eca57600080fd5b611ed987823560208401611d50565b91505092959194509250565b60008060408385031215611ef857600080fd5b611f0183611c02565b9150611f0f60208401611c02565b90509250929050565b600181811c90821680611f2c57607f821691505b602082108103611f65577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611fad57611fad611f6b565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b601f82111561072057600081815260208120601f850160051c810160208610156120085750805b601f850160051c820191505b8181101561202757828155600101612014565b505050505050565b815167ffffffffffffffff81111561204957612049611d21565b61205d816120578454611f18565b84611fe1565b602080601f8311600181146120b0576000841561207a5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612027565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156120fd578886015182559484019460019091019084016120de565b508582101561213957878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000835161215b818460208801611b60565b83519083019061216f818360208801611b60565b01949350505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036121a9576121a9611f6b565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826121ee576121ee6121b0565b500490565b60008282101561220557612205611f6b565b500390565b600082612219576122196121b0565b500690565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261225d6080830184611b8c565b9695505050505050565b60006020828403121561227957600080fd5b8151610d9f81611b1556fea2646970667358221220bf24f50d31f3fe2796619497e9e81e803f114137c08b630eb9e87e4e4b163de764736f6c634300080f0033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000008547261696e657273000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000454524e5200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e68747470733a2f2f747261696e65722d6d657461646174612e706978656c6d6f6e2e61692f6d657461646174612f000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101b95760003560e01c8063715018a6116100f9578063acb552ff11610097578063c87b56dd11610071578063c87b56dd146103a6578063e985e9c5146103b9578063f2fde38b14610402578063f6c92a4b1461041557600080fd5b8063acb552ff14610377578063b88d4fde14610380578063b9a45aac1461039357600080fd5b80638da5cb5b116100d35780638da5cb5b1461033557806395d89b41146103535780639a07eb381461035b578063a22cb4651461036457600080fd5b8063715018a6146103115780637195542f1461031957806385b246551461032c57600080fd5b80633af32abf1161016657806355f804b31161014057806355f804b3146102d05780636352211e146102e35780636c0360eb146102f657806370a08231146102fe57600080fd5b80633af32abf146102715780633cc4eacd146102aa57806342842e0e146102bd57600080fd5b8063095ea7b311610197578063095ea7b31461023357806318160ddd1461024857806323b872dd1461025e57600080fd5b806301ffc9a7146101be57806306fdde03146101e6578063081812fc146101fb575b600080fd5b6101d16101cc366004611b43565b61041d565b60405190151581526020015b60405180910390f35b6101ee610502565b6040516101dd9190611bd6565b61020e610209366004611be9565b610594565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101dd565b610246610241366004611c2b565b6105c8565b005b610250610725565b6040519081526020016101dd565b61024661026c366004611c55565b61073c565b6101d161027f366004611c91565b73ffffffffffffffffffffffffffffffffffffffff166000908152600a602052604090205460ff1690565b6102466102b8366004611cac565b6107c3565b6102466102cb366004611c55565b610912565b6102466102de366004611de4565b61092d565b61020e6102f1366004611be9565b61097c565b6101ee6109ee565b61025061030c366004611c91565b610a7c565b610246610b30565b610246610327366004611c2b565b610b44565b61025061271081565b60065473ffffffffffffffffffffffffffffffffffffffff1661020e565b6101ee610c01565b61025060085481565b610246610372366004611e2d565b610c10565b61025060075481565b61024661038e366004611e69565b610c1f565b6102466103a1366004611e2d565b610cad565b6101ee6103b4366004611be9565b610d3f565b6101d16103c7366004611ee5565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b610246610410366004611c91565b610da6565b610250601481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806104b057507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806104fc57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60606000805461051190611f18565b80601f016020809104026020016040519081016040528092919081815260200182805461053d90611f18565b801561058a5780601f1061055f5761010080835404028352916020019161058a565b820191906000526020600020905b81548152906001019060200180831161056d57829003601f168201915b5050505050905090565b600061059f82610e43565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006105d38261097c565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361067b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff821614806106a457506106a481336103c7565b6107165760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610672565b6107208383610eb4565b505050565b60006008546007546107379190611f9a565b905090565b6107463382610f54565b6107b85760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610672565b610720838383611014565b6107cb611210565b601460085403610807576040517fadfbe3d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60148114610841576040517fa7b682d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108506127106001611f9a565b905060005b828110156109035761088d84848381811061087257610872611fb2565b90506020020160208101906108879190611c91565b83611277565b818484838181106108a0576108a0611fb2565b90506020020160208101906108b59190611c91565b73ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688560405160405180910390a360019182019101610855565b50506008805460140190555050565b61072083838360405180602001604052806000815250610c1f565b610935611210565b6009610941828261202f565b507f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa816040516109719190611bd6565b60405180910390a150565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16806104fc5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610672565b600980546109fb90611f18565b80601f0160208091040260200160405190810160405280929190818152602001828054610a2790611f18565b8015610a745780601f10610a4957610100808354040283529160200191610a74565b820191906000526020600020905b815481529060010190602001808311610a5757829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff8216610b075760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610672565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b610b38611210565b610b4260006113dd565b565b336000908152600a602052604090205460ff16610b8d576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61271081600754610b9e9190611f9a565b1115610bd6576040517fadfbe3d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006007546001610be79190611f9a565b9050610bf4838284611454565b5060078054909101905550565b60606001805461051190611f18565b610c1b3383836114ba565b5050565b610c293383610f54565b610c9b5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610672565b610ca7848484846115cd565b50505050565b610cb5611210565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600a602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f33e0bf3ce98fac4118d5a0a8fe49e83b6acdfdef32871c9eca20e1528d7701ba910160405180910390a25050565b6060610d4a82610e43565b6000610d54611656565b90506000815111610d745760405180602001604052806000815250610d9f565b80610d7e84611665565b604051602001610d8f929190612149565b6040516020818303038152906040525b9392505050565b610dae611210565b73ffffffffffffffffffffffffffffffffffffffff8116610e375760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610672565b610e40816113dd565b50565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16610e405760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610672565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190610f0e8261097c565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610f608361097c565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610fce575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b8061100c57508373ffffffffffffffffffffffffffffffffffffffff16610ff484610594565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166110348261097c565b73ffffffffffffffffffffffffffffffffffffffff16146110bd5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610672565b73ffffffffffffffffffffffffffffffffffffffff82166111455760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610672565b611150600082610eb4565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260036020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905593861680835284832080546001019055858352600290915283822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016821790559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610b425760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610672565b73ffffffffffffffffffffffffffffffffffffffff82166112da5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610672565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff161561134c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610672565b600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8716908117909155808452600390925280832080546001019055518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60018111156114685761072083838361179a565b6114728383611277565b604051829073ffffffffffffffffffffffffffffffffffffffff8516907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590600090a3505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036115355760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610672565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6115d8848484611014565b6115e48484848461193c565b610ca75760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610672565b60606009805461051190611f18565b6060816000036116a857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156116d257806116bc81612178565b91506116cb9050600a836121df565b91506116ac565b60008167ffffffffffffffff8111156116ed576116ed611d21565b6040519080825280601f01601f191660200182016040528015611717576020820181803683370190505b5090505b841561100c5761172c6001836121f3565b9150611739600a8661220a565b611744906030611f9a565b60f81b81838151811061175957611759611fb2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611793600a866121df565b945061171b565b73ffffffffffffffffffffffffffffffffffffffff83166117fd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610672565b60006118098284611f9a565b9050825b818110156119095760008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16156118875760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610672565b60008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff891690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a460010161180d565b505073ffffffffffffffffffffffffffffffffffffffff9092166000908152600360205260409020805490920190915550565b600073ffffffffffffffffffffffffffffffffffffffff84163b15611b0a576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a02906119b390339089908890889060040161221e565b6020604051808303816000875af1925050508015611a0c575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611a0991810190612267565b60015b611abf573d808015611a3a576040519150601f19603f3d011682016040523d82523d6000602084013e611a3f565b606091505b508051600003611ab75760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610672565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061100c565b506001949350505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610e4057600080fd5b600060208284031215611b5557600080fd5b8135610d9f81611b15565b60005b83811015611b7b578181015183820152602001611b63565b83811115610ca75750506000910152565b60008151808452611ba4816020860160208601611b60565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610d9f6020830184611b8c565b600060208284031215611bfb57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611c2657600080fd5b919050565b60008060408385031215611c3e57600080fd5b611c4783611c02565b946020939093013593505050565b600080600060608486031215611c6a57600080fd5b611c7384611c02565b9250611c8160208501611c02565b9150604084013590509250925092565b600060208284031215611ca357600080fd5b610d9f82611c02565b60008060208385031215611cbf57600080fd5b823567ffffffffffffffff80821115611cd757600080fd5b818501915085601f830112611ceb57600080fd5b813581811115611cfa57600080fd5b8660208260051b8501011115611d0f57600080fd5b60209290920196919550909350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115611d6b57611d6b611d21565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611db157611db1611d21565b81604052809350858152868686011115611dca57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611df657600080fd5b813567ffffffffffffffff811115611e0d57600080fd5b8201601f81018413611e1e57600080fd5b61100c84823560208401611d50565b60008060408385031215611e4057600080fd5b611e4983611c02565b915060208301358015158114611e5e57600080fd5b809150509250929050565b60008060008060808587031215611e7f57600080fd5b611e8885611c02565b9350611e9660208601611c02565b925060408501359150606085013567ffffffffffffffff811115611eb957600080fd5b8501601f81018713611eca57600080fd5b611ed987823560208401611d50565b91505092959194509250565b60008060408385031215611ef857600080fd5b611f0183611c02565b9150611f0f60208401611c02565b90509250929050565b600181811c90821680611f2c57607f821691505b602082108103611f65577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611fad57611fad611f6b565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b601f82111561072057600081815260208120601f850160051c810160208610156120085750805b601f850160051c820191505b8181101561202757828155600101612014565b505050505050565b815167ffffffffffffffff81111561204957612049611d21565b61205d816120578454611f18565b84611fe1565b602080601f8311600181146120b0576000841561207a5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612027565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156120fd578886015182559484019460019091019084016120de565b508582101561213957878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000835161215b818460208801611b60565b83519083019061216f818360208801611b60565b01949350505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036121a9576121a9611f6b565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826121ee576121ee6121b0565b500490565b60008282101561220557612205611f6b565b500390565b600082612219576122196121b0565b500690565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261225d6080830184611b8c565b9695505050505050565b60006020828403121561227957600080fd5b8151610d9f81611b1556fea2646970667358221220bf24f50d31f3fe2796619497e9e81e803f114137c08b630eb9e87e4e4b163de764736f6c634300080f0033

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000008547261696e657273000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000454524e5200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e68747470733a2f2f747261696e65722d6d657461646174612e706978656c6d6f6e2e61692f6d657461646174612f000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Trainers
Arg [1] : _symbol (string): TRNR
Arg [2] : _baseTokenURI (string): https://trainer-metadata.pixelmon.ai/metadata/

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [4] : 547261696e657273000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [6] : 54524e5200000000000000000000000000000000000000000000000000000000
Arg [7] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [8] : 68747470733a2f2f747261696e65722d6d657461646174612e706978656c6d6f
Arg [9] : 6e2e61692f6d657461646174612f000000000000000000000000000000000000


Loading...
Loading
Loading...
Loading
[ 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.