ETH Price: $3,296.97 (-3.76%)
Gas: 7 Gwei

Token

Shark Game (SHRK)
 

Overview

Max Total Supply

611 SHRK

Holders

100

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
kfishnft.eth
Balance
4 SHRK
0xb45b87568b28800eb26d6d4b09549eb0ad31a35b
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:
Sharks

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 50 runs

Other Settings:
default evmVersion, MIT license
File 1 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 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 {
        _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 20 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

File 3 of 20 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

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

File 4 of 20 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

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

File 5 of 20 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 6 of 20 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/ERC721Enumerable.sol)

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 7 of 20 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Enumerable.sol)

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

File 8 of 20 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 9 of 20 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 20 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 11 of 20 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 12 of 20 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

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

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

File 13 of 20 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 14 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 15 of 20 : Sharks.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interfaces/ISharks.sol";
import "./interfaces/ICoral.sol";
import "./interfaces/ITraits.sol";
import "./interfaces/IChum.sol";
import "./interfaces/IRandomizer.sol";

contract Sharks is ISharks, ERC721Enumerable, Ownable, Pausable {
    struct LastWrite {
        uint64 time;
        uint64 blockNum;
    }

    event TokenMinted(uint256 indexed tokenId, ISharks.SGTokenType indexed tokenType);
    event TokenStolen(uint256 indexed tokenId, ISharks.SGTokenType indexed tokenType);

    // max number of tokens that can be minted: 30000 in production
    uint16 public maxTokens;
    // number of tokens that can be claimed for a fee: 5,000
    uint16 public PAID_TOKENS;
    // number of tokens have been minted so far
    uint16 public override minted;

    // mapping from tokenId to a struct containing the token's traits
    mapping(uint256 => SGToken) private tokenTraits;
    // Tracks the last block and timestamp that a caller has written to state.
    // Disallow some access to functions if they occur while a change is being written.
    mapping(address => LastWrite) private lastWriteAddress;
    mapping(uint256 => LastWrite) private lastWriteToken;

    // count of traits for each type
    // 0 - 1 are minnows, 2 - 3 are sharks, 4 - 5 are orcas
    uint8[6] public traitCounts;

    // reference to the Tower contract to allow transfers to it without approval
    ICoral public coral;
    // reference to Traits
    ITraits public traits;
    // reference to Randomizer
    IRandomizer public randomizer;

    // address => allowedToCallFunctions
    mapping(address => bool) private admins;

    constructor(uint16 _maxTokens) ERC721("Shark Game", "SHRK") {
        maxTokens = _maxTokens;
        PAID_TOKENS = _maxTokens / 6;
        _pause();

        // Minnows
        // body
        traitCounts[0] = 3;
        // accessory
        traitCounts[1] = 23;

        // Sharks
        // body
        traitCounts[2] = 3;
        // accessory
        traitCounts[3] = 23;

        // Orcas
        // body
        traitCounts[4] = 3;
        // accessory
        traitCounts[5] = 23;
    }

    /** CRITICAL TO SETUP / MODIFIERS */

    modifier requireContractsSet() {
        require(address(traits) != address(0) && address(coral) != address(0) && address(randomizer) != address(0), "Contracts not set");
        _;
    }

    modifier blockIfChangingAddress() {
        require(admins[_msgSender()] || lastWriteAddress[tx.origin].blockNum < block.number, "hmmmm what doing?");
        _;
    }

    modifier blockIfChangingToken(uint256 tokenId) {
        require(admins[_msgSender()] || lastWriteToken[tokenId].blockNum < block.number, "hmmmm what doing?");
        _;
    }

    function setContracts(address _traits, address _coral, address _rand) external onlyOwner {
        traits = ITraits(_traits);
        coral = ICoral(_coral);
        randomizer = IRandomizer(_rand);
    }

    /** EXTERNAL */

    function getTokenWriteBlock(uint256 tokenId) external view override returns(uint64) {
        require(admins[_msgSender()], "Only admins can call this");
        return lastWriteToken[tokenId].blockNum;
    }

    /**
    * Mint a token - any payment / game logic should be handled in the game contract.
    * This will just generate random traits and mint a token to a designated address.
    */
    function mint(address recipient, uint256 seed) external override whenNotPaused {
        require(admins[_msgSender()], "Only admins can call this");
        require(minted + 1 <= maxTokens, "All tokens minted");
        minted++;
        generate(minted, seed);
        if(tx.origin != recipient && recipient != address(coral)) {
            emit TokenStolen(minted, this.getTokenType(minted));
        }
        _safeMint(recipient, minted);
    }

    /**
    * Burn a token - any game logic should be handled before this function.
    */
    function burn(uint256 tokenId) external override whenNotPaused {
        require(admins[_msgSender()], "Only admins can call this");
        require(ownerOf(tokenId) == tx.origin, "Oops you don't own that");
        _burn(tokenId);
    }

    function updateOriginAccess(uint16[] memory tokenIds) external override {
        require(admins[_msgSender()], "Only admins can call this");
        uint64 blockNum = uint64(block.number);
        uint64 time = uint64(block.timestamp);
        lastWriteAddress[tx.origin] = LastWrite(time, blockNum);
        for (uint256 i = 0; i < tokenIds.length; i++) {
            lastWriteToken[tokenIds[i]] = LastWrite(time, blockNum);
        }
    }

    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) {
        // allow admin contracts to be send without approval
        if(!admins[_msgSender()]) {
            require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        }
        _transfer(from, to, tokenId);
    }

    /** INTERNAL */

    /**
    * generates traits for a specific token, checking to make sure it's unique
    * @param tokenId the id of the token to generate traits for
    * @param seed a pseudorandom 256 bit number to derive traits from
    * @return t - a struct of traits for the given token ID
    */
    function generate(uint256 tokenId, uint256 seed) internal returns (SGToken memory t) {
        t = selectTraits(seed);
        tokenTraits[tokenId] = t;
        emit TokenMinted(tokenId, this.getTokenType(minted));
    }

    /**
    * chooses a random trait
    * @param seed portion of the 256 bit seed to remove trait correlation
    * @param traitType the trait type to select a trait for
    * @return the ID of the randomly selected trait
    */
    function selectTrait(uint16 seed, uint8 traitType) internal view returns (uint8) {
        return uint8(seed) % traitCounts[traitType];
    }

    /**
    * selects the species and all of its traits based on the seed value
    * @param seed a pseudorandom 256 bit number to derive traits from
    * @return t -  a struct of randomly selected traits
    */
    function selectTraits(uint256 seed) internal view returns (SGToken memory t) {
        bool orcasEnabled = minted > 5000;
        uint256 typePercent = (seed & 0xFFFF) % 100;
        t.tokenType = typePercent < 90 ? ISharks.SGTokenType.MINNOW :
            typePercent < 92 && orcasEnabled ? ISharks.SGTokenType.ORCA : ISharks.SGTokenType.SHARK;
        uint8 shift = uint8(t.tokenType) * 2;
        seed >>= 16;
        t.base = selectTrait(uint16(seed & 0xFFFF), 0 + shift);
        seed >>= 16;
        t.accessory = selectTrait(uint16(seed & 0xFFFF), 1 + shift);
        seed >>= 16;
    }

    /** READ */

    /**
    * checks if a token is a Wizards
    * @param tokenId the ID of the token to check
    * @return wizard - whether or not a token is a Wizards
    */
    function getTokenType(uint256 tokenId) external view override blockIfChangingToken(tokenId) returns (ISharks.SGTokenType) {
        // Sneaky dragons will be slain if they try to peep this after mint. Nice try.
        ISharks.SGToken memory s = tokenTraits[tokenId];
        return s.tokenType;
    }

    function getMaxTokens() external view override returns (uint16) {
        return maxTokens;
    }

    function getPaidTokens() external view override returns (uint16) {
        return PAID_TOKENS;
    }

    /** ADMIN */

    /**
    * updates the number of tokens for sale
    */
    function setPaidTokens(uint16 _paidTokens) external onlyOwner {
        PAID_TOKENS = _paidTokens;
    }

    /**
    * enables owner to pause / unpause minting
    */
    function setPaused(bool _paused) external requireContractsSet onlyOwner {
        if (_paused) _pause();
        else _unpause();
    }

    /**
    * enables an address to mint / burn
    * @param addr the address to enable
    */
    function addAdmin(address addr) external onlyOwner {
        admins[addr] = true;
    }

    /**
    * disables an address from minting / burning
    * @param addr the address to disable
    */
    function removeAdmin(address addr) external onlyOwner {
        admins[addr] = false;
    }

    /** Traits */

    function getTokenTraits(uint256 tokenId) external view override blockIfChangingAddress blockIfChangingToken(tokenId) returns (SGToken memory) {
        return tokenTraits[tokenId];
    }

    function tokenURI(uint256 tokenId) public view override(ERC721, ISharks) blockIfChangingAddress blockIfChangingToken(tokenId) returns (string memory) {
        require(_exists(tokenId), "Token ID does not exist");
        return traits.tokenURI(tokenId);
    }

    /** OVERRIDES FOR SAFETY */

    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override(ERC721Enumerable, IERC721Enumerable) blockIfChangingAddress returns (uint256) {
        // Y U checking on this address in the same block it's being modified... hmmmm
        require(admins[_msgSender()] || lastWriteAddress[owner].blockNum < block.number, "hmmmm what doing?");
        uint256 tokenId = super.tokenOfOwnerByIndex(owner, index);
        require(admins[_msgSender()] || lastWriteToken[tokenId].blockNum < block.number, "hmmmm what doing?");
        return tokenId;
    }

    function balanceOf(address owner) public view virtual override(ERC721, IERC721) blockIfChangingAddress returns (uint256) {
        // Y U checking on this address in the same block it's being modified... hmmmm
        require(admins[_msgSender()] || lastWriteAddress[owner].blockNum < block.number, "hmmmm what doing?");
        return super.balanceOf(owner);
    }

    function ownerOf(uint256 tokenId) public view virtual override(ERC721, IERC721) blockIfChangingAddress blockIfChangingToken(tokenId) returns (address) {
        address addr = super.ownerOf(tokenId);
        // Y U checking on this address in the same block it's being modified... hmmmm
        require(admins[_msgSender()] || lastWriteAddress[addr].blockNum < block.number, "hmmmm what doing?");
        return addr;
    }

    function tokenByIndex(uint256 index) public view virtual override(ERC721Enumerable, IERC721Enumerable) returns (uint256) {
        uint256 tokenId = super.tokenByIndex(index);
        // NICE TRY TOAD DRAGON
        require(admins[_msgSender()] || lastWriteToken[tokenId].blockNum < block.number, "hmmmm what doing?");
        return tokenId;
    }

    function approve(address to, uint256 tokenId) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) {
        super.approve(to, tokenId);
    }

    function getApproved(uint256 tokenId) public view virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) returns (address) {
        return super.getApproved(tokenId);
    }

    function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) blockIfChangingAddress {
        super.setApprovalForAll(operator, approved);
    }

    function isApprovedForAll(address owner, address operator) public view virtual override(ERC721, IERC721) blockIfChangingAddress returns (bool) {
        return super.isApprovedForAll(owner, operator);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) {
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) {
        super.safeTransferFrom(from, to, tokenId, _data);
    }
}

File 16 of 20 : IChum.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

interface IChum {
    function mint(address to, uint256 amount) external;
    function burn(address from, uint256 amount) external;
    function updateOriginAccess() external;
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}

File 17 of 20 : ICoral.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

import "./ISharks.sol";

interface ICoral {
  function addManyToCoral(address account, uint16[] calldata tokenIds) external;
  function randomTokenOwner(ISharks.SGTokenType tokenType, uint256 seed) external view returns (address);
}

File 18 of 20 : IRandomizer.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

interface IRandomizer {
    function random() external returns (uint256);
}

File 19 of 20 : ISharks.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";

interface ISharks is IERC721Enumerable {
    // game data storage
    enum SGTokenType {
        MINNOW,
        SHARK,
        ORCA
    }

    struct SGToken {
        SGTokenType tokenType;
        uint8 base;
        uint8 accessory;
    }

    function minted() external returns (uint16);
    function updateOriginAccess(uint16[] memory tokenIds) external;
    function mint(address recipient, uint256 seed) external;
    function burn(uint256 tokenId) external;
    function getMaxTokens() external view returns (uint16);
    function getPaidTokens() external view returns (uint16);
    function tokenURI(uint256 tokenId) external view returns (string memory);
    function getTokenTraits(uint256 tokenId) external view returns (SGToken memory);
    function getTokenWriteBlock(uint256 tokenId) external view returns(uint64);
    function getTokenType(uint256 tokenId) external view returns(SGTokenType);
}

File 20 of 20 : ITraits.sol
// SPDX-License-Identifier: MIT LICENSE 

pragma solidity ^0.8.0;

interface ITraits {
  function tokenURI(uint256 tokenId) external view returns (string memory);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint16","name":"_maxTokens","type":"uint16"}],"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"enum ISharks.SGTokenType","name":"tokenType","type":"uint8"}],"name":"TokenMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"enum ISharks.SGTokenType","name":"tokenType","type":"uint8"}],"name":"TokenStolen","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"PAID_TOKENS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"coral","outputs":[{"internalType":"contract ICoral","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxTokens","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPaidTokens","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenTraits","outputs":[{"components":[{"internalType":"enum ISharks.SGTokenType","name":"tokenType","type":"uint8"},{"internalType":"uint8","name":"base","type":"uint8"},{"internalType":"uint8","name":"accessory","type":"uint8"}],"internalType":"struct ISharks.SGToken","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenType","outputs":[{"internalType":"enum ISharks.SGTokenType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenWriteBlock","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"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":[],"name":"maxTokens","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","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":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomizer","outputs":[{"internalType":"contract IRandomizer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","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":"address","name":"_traits","type":"address"},{"internalType":"address","name":"_coral","type":"address"},{"internalType":"address","name":"_rand","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_paidTokens","type":"uint16"}],"name":"setPaidTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","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":"uint256","name":"","type":"uint256"}],"name":"traitCounts","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traits","outputs":[{"internalType":"contract ITraits","name":"","type":"address"}],"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":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"updateOriginAccess","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620035dd380380620035dd8339810160408190526200003491620002d4565b604080518082018252600a815269536861726b2047616d6560b01b6020808301918252835180850190945260048452635348524b60e01b90840152815191929162000082916000916200022e565b508051620000989060019060208401906200022e565b505050620000b5620000af6200012660201b60201c565b6200012a565b600a805462ffffff60a01b1916600160a81b61ffff841602179055620000dd60068262000301565b600a805461ffff92909216600160b81b0261ffff60b81b19909216919091179055620001086200017c565b50600e805465ffffffffffff1916651703170317031790556200036e565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b62000190600a54600160a01b900460ff1690565b15620001d55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620002113390565b6040516001600160a01b03909116815260200160405180910390a1565b8280546200023c9062000331565b90600052602060002090601f016020900481019282620002605760008555620002ab565b82601f106200027b57805160ff1916838001178555620002ab565b82800160010185558215620002ab579182015b82811115620002ab5782518255916020019190600101906200028e565b50620002b9929150620002bd565b5090565b5b80821115620002b95760008155600101620002be565b600060208284031215620002e757600080fd5b815161ffff81168114620002fa57600080fd5b9392505050565b600061ffff808416806200032557634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b600181811c908216806200034657607f821691505b602082108114156200036857634e487b7160e01b600052602260045260246000fd5b50919050565b61325f806200037e6000396000f3fe608060405234801561001057600080fd5b50600436106102085760003560e01c8063704802751161011b578063c084f540116100a8578063c084f5401461047d578063c87b56dd14610492578063e1fc334f146104a5578063e8315742146104b8578063e985e9c5146104cd578063ebd17368146104e0578063f10fb5841461050b578063f2fde38b1461051e578063fb35994214610531578063fbd626401461054457600080fd5b806370480275146103c657806370a08231146103d9578063715018a6146103ec57806376aed2e1146103f45780638da5cb5b1461041457806394e568471461041c57806395d89b411461043c578063a22cb46514610444578063b3066d4914610457578063b88d4fde1461046a57600080fd5b80634018b1f8116101995780634018b1f8146102f057806340c10f191461031257806342842e0e1461032557806342966c68146103385780634bd702b71461034b5780634f02c420146103705780634f6ccce7146103855780635c975abb146103985780636352211e146103a05780636abcded1146103b357600080fd5b806301ffc9a71461020d57806306fdde0314610235578063081812fc1461024a578063095ea7b31461026a57806316c38b3c1461027f5780631785f53c1461029257806318160ddd146102a557806323b872dd146102b75780632f745c59146102ca57806335ca838b146102dd575b600080fd5b61022061021b366004612c49565b610557565b60405190151581526020015b60405180910390f35b61023d610582565b60405161022c9190612dfb565b61025d610258366004612d35565b610614565b60405161022c9190612d9c565b61027d610278366004612b51565b610689565b005b61027d61028d366004612c2e565b6106f2565b61027d6102a03660046129b0565b6107b4565b6008545b60405190815260200161022c565b61027d6102c5366004612a41565b610804565b6102a96102d8366004612b51565b6108ad565b61027d6102eb366004612b7b565b6109d6565b600a54600160b81b900461ffff165b60405161ffff909116815260200161022c565b61027d610320366004612b51565b610b08565b61027d610333366004612a41565b610d2b565b61027d610346366004612d35565b610d90565b61035e610359366004612d35565b610e47565b60405160ff909116815260200161022c565b600a546102ff90600160c81b900461ffff1681565b6102a9610393366004612d35565b610e71565b610220610ed8565b61025d6103ae366004612d35565b610ee8565b600a54600160a81b900461ffff166102ff565b61027d6103d43660046129b0565b61100b565b6102a96103e73660046129b0565b61105e565b61027d611127565b610407610402366004612d35565b611162565b60405161022c9190612ded565b61025d611227565b61042f61042a366004612d35565b611236565b60405161022c9190612f6e565b61023d61135b565b61027d610452366004612b27565b61136a565b61027d6104653660046129fe565b6113cd565b61027d610478366004612a7d565b61143b565b600a546102ff90600160b81b900461ffff1681565b61023d6104a0366004612d35565b6114a8565b60105461025d906001600160a01b031681565b600a546102ff90600160a81b900461ffff1681565b6102206104db3660046129cb565b61162d565b6104f36104ee366004612d35565b6116b4565b6040516001600160401b03909116815260200161022c565b60115461025d906001600160a01b031681565b61027d61052c3660046129b0565b611706565b61027d61053f366004612d1a565b6117a3565b600f5461025d906001600160a01b031681565b60006001600160e01b0319821663780e9d6360e01b148061057c575061057c826117f4565b92915050565b606060008054610591906130c7565b80601f01602080910402602001604051908101604052809291908181526020018280546105bd906130c7565b801561060a5780601f106105df5761010080835404028352916020019161060a565b820191906000526020600020905b8154815290600101906020018083116105ed57829003601f168201915b5050505050905090565b33600090815260126020526040812054829060ff168061065257506000818152600d602052604090205443600160401b9091046001600160401b0316105b6106775760405162461bcd60e51b815260040161066e90612e93565b60405180910390fd5b61068083611844565b91505b50919050565b33600090815260126020526040902054819060ff16806106c757506000818152600d602052604090205443600160401b9091046001600160401b0316105b6106e35760405162461bcd60e51b815260040161066e90612e93565b6106ed83836118cc565b505050565b6010546001600160a01b0316158015906107165750600f546001600160a01b031615155b801561072c57506011546001600160a01b031615155b61076c5760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b604482015260640161066e565b33610775611227565b6001600160a01b03161461079b5760405162461bcd60e51b815260040161066e90612ee8565b80156107ac576107a96119d8565b50565b6107a9611a4f565b336107bd611227565b6001600160a01b0316146107e35760405162461bcd60e51b815260040161066e90612ee8565b6001600160a01b03166000908152601260205260409020805460ff19169055565b33600090815260126020526040902054819060ff168061084257506000818152600d602052604090205443600160401b9091046001600160401b0316105b61085e5760405162461bcd60e51b815260040161066e90612e93565b3360009081526012602052604090205460ff1661089c57610880335b83611ace565b61089c5760405162461bcd60e51b815260040161066e90612f1d565b6108a7848484611b98565b50505050565b3360009081526012602052604081205460ff16806108ea5750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6109065760405162461bcd60e51b815260040161066e90612e93565b3360009081526012602052604090205460ff168061094c57506001600160a01b0383166000908152600c602052604090205443600160401b9091046001600160401b0316105b6109685760405162461bcd60e51b815260040161066e90612e93565b60006109748484611d31565b3360009081526012602052604090205490915060ff16806109b357506000818152600d602052604090205443600160401b9091046001600160401b0316105b6109cf5760405162461bcd60e51b815260040161066e90612e93565b9392505050565b3360009081526012602052604090205460ff16610a055760405162461bcd60e51b815260040161066e90612e60565b6040805180820182526001600160401b03428181168352438281166020808601918252326000908152600c9091529586209451855491518516600160401b026001600160801b031990921694169390931792909217909255915b83518110156108a7576040518060400160405280836001600160401b03168152602001846001600160401b0316815250600d6000868481518110610aa557610aa56131c7565b60209081029190910181015161ffff168252818101929092526040016000208251815493909201516001600160401b03908116600160401b026001600160801b031990941692169190911791909117905580610b008161311e565b915050610a5f565b610b10610ed8565b15610b2d5760405162461bcd60e51b815260040161066e90612ebe565b3360009081526012602052604090205460ff16610b5c5760405162461bcd60e51b815260040161066e90612e60565b600a5461ffff600160a81b8204811691610b8091600160c81b909104166001612ff8565b61ffff161115610bc65760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b604482015260640161066e565b600a8054600160c81b900461ffff16906019610be1836130fc565b91906101000a81548161ffff021916908361ffff16021790555050610c1a600a60199054906101000a900461ffff1661ffff1682611dc7565b50326001600160a01b03831614801590610c425750600f546001600160a01b03838116911614155b15610d0e57600a546040516376aed2e160e01b8152600160c81b90910461ffff16600482015230906376aed2e19060240160206040518083038186803b158015610c8b57600080fd5b505afa158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc39190612c83565b6002811115610cd457610cd461319b565b600a54604051600160c81b90910461ffff16907f4ee4ccbe14b115f179390f579fdc0745066c101b3815a8b1555dd7b2d3f6818e90600090a35b600a54610d27908390600160c81b900461ffff16611eff565b5050565b33600090815260126020526040902054819060ff1680610d6957506000818152600d602052604090205443600160401b9091046001600160401b0316105b610d855760405162461bcd60e51b815260040161066e90612e93565b6108a7848484611f19565b610d98610ed8565b15610db55760405162461bcd60e51b815260040161066e90612ebe565b3360009081526012602052604090205460ff16610de45760405162461bcd60e51b815260040161066e90612e60565b32610dee82610ee8565b6001600160a01b031614610e3e5760405162461bcd60e51b815260206004820152601760248201527613dbdc1cc81e5bdd48191bdb89dd081bdddb881d1a185d604a1b604482015260640161066e565b6107a981611f34565b600e8160068110610e5757600080fd5b60209182820401919006915054906101000a900460ff1681565b600080610e7d83611fc9565b3360009081526012602052604090205490915060ff1680610ebc57506000818152600d602052604090205443600160401b9091046001600160401b0316105b61057c5760405162461bcd60e51b815260040161066e90612e93565b600a54600160a01b900460ff1690565b3360009081526012602052604081205460ff1680610f255750326000908152600c602052604090205443600160401b9091046001600160401b0316105b610f415760405162461bcd60e51b815260040161066e90612e93565b33600090815260126020526040902054829060ff1680610f7f57506000818152600d602052604090205443600160401b9091046001600160401b0316105b610f9b5760405162461bcd60e51b815260040161066e90612e93565b6000610fa68461205c565b3360009081526012602052604090205490915060ff1680610fef57506001600160a01b0381166000908152600c602052604090205443600160401b9091046001600160401b0316105b6106805760405162461bcd60e51b815260040161066e90612e93565b33611014611227565b6001600160a01b03161461103a5760405162461bcd60e51b815260040161066e90612ee8565b6001600160a01b03166000908152601260205260409020805460ff19166001179055565b3360009081526012602052604081205460ff168061109b5750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6110b75760405162461bcd60e51b815260040161066e90612e93565b3360009081526012602052604090205460ff16806110fd57506001600160a01b0382166000908152600c602052604090205443600160401b9091046001600160401b0316105b6111195760405162461bcd60e51b815260040161066e90612e93565b61057c826120d3565b919050565b33611130611227565b6001600160a01b0316146111565760405162461bcd60e51b815260040161066e90612ee8565b611160600061215a565b565b33600090815260126020526040812054829060ff16806111a057506000818152600d602052604090205443600160401b9091046001600160401b0316105b6111bc5760405162461bcd60e51b815260040161066e90612e93565b6000838152600b60205260408082208151606081019092528054829060ff1660028111156111ec576111ec61319b565b60028111156111fd576111fd61319b565b8152905460ff61010082048116602084015262010000909104166040909101525192505050919050565b600a546001600160a01b031690565b61123e612955565b3360009081526012602052604090205460ff168061127b5750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6112975760405162461bcd60e51b815260040161066e90612e93565b33600090815260126020526040902054829060ff16806112d557506000818152600d602052604090205443600160401b9091046001600160401b0316105b6112f15760405162461bcd60e51b815260040161066e90612e93565b6000838152600b6020526040908190208151606081019092528054829060ff1660028111156113225761132261319b565b60028111156113335761133361319b565b8152905460ff6101008204811660208401526201000090910416604090910152915050919050565b606060018054610591906130c7565b3360009081526012602052604090205460ff16806113a75750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6113c35760405162461bcd60e51b815260040161066e90612e93565b610d2782826121ac565b336113d6611227565b6001600160a01b0316146113fc5760405162461bcd60e51b815260040161066e90612ee8565b601080546001600160a01b039485166001600160a01b031991821617909155600f80549385169382169390931790925560118054919093169116179055565b33600090815260126020526040902054829060ff168061147957506000818152600d602052604090205443600160401b9091046001600160401b0316105b6114955760405162461bcd60e51b815260040161066e90612e93565b6114a1858585856121b7565b5050505050565b3360009081526012602052604090205460609060ff16806114e85750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6115045760405162461bcd60e51b815260040161066e90612e93565b33600090815260126020526040902054829060ff168061154257506000818152600d602052604090205443600160401b9091046001600160401b0316105b61155e5760405162461bcd60e51b815260040161066e90612e93565b611567836121e8565b6115ad5760405162461bcd60e51b8152602060048201526017602482015276151bdad95b88125108191bd95cc81b9bdd08195e1a5cdd604a1b604482015260640161066e565b60105460405163c87b56dd60e01b8152600481018590526001600160a01b039091169063c87b56dd9060240160006040518083038186803b1580156115f157600080fd5b505afa158015611605573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106809190810190612ca4565b3360009081526012602052604081205460ff168061166a5750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6116865760405162461bcd60e51b815260040161066e90612e93565b6001600160a01b0380841660009081526005602090815260408083209386168352929052205460ff166109cf565b3360009081526012602052604081205460ff166116e35760405162461bcd60e51b815260040161066e90612e60565b506000908152600d6020526040902054600160401b90046001600160401b031690565b3361170f611227565b6001600160a01b0316146117355760405162461bcd60e51b815260040161066e90612ee8565b6001600160a01b03811661179a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161066e565b6107a98161215a565b336117ac611227565b6001600160a01b0316146117d25760405162461bcd60e51b815260040161066e90612ee8565b600a805461ffff909216600160b81b0261ffff60b81b19909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061182557506001600160e01b03198216635b5e139f60e01b145b8061057c57506301ffc9a760e01b6001600160e01b031983161461057c565b600061184f826121e8565b6118b05760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161066e565b506000908152600460205260409020546001600160a01b031690565b60006118d78261205c565b9050806001600160a01b0316836001600160a01b031614156119455760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161066e565b336001600160a01b03821614806119615750611961813361162d565b6119ce5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606482015260840161066e565b6106ed8383612205565b6119e0610ed8565b156119fd5760405162461bcd60e51b815260040161066e90612ebe565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611a383390565b604051611a459190612d9c565b60405180910390a1565b611a57610ed8565b611a9a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161066e565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611a38565b6000611ad9826121e8565b611b3a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161066e565b6000611b458361205c565b9050806001600160a01b0316846001600160a01b03161480611b805750836001600160a01b0316611b7584610614565b6001600160a01b0316145b80611b905750611b90818561162d565b949350505050565b826001600160a01b0316611bab8261205c565b6001600160a01b031614611c135760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161066e565b6001600160a01b038216611c755760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161066e565b611c80838383612273565b611c8b600082612205565b6001600160a01b0383166000908152600360205260408120805460019290611cb4908490613084565b90915550506001600160a01b0382166000908152600360205260408120805460019290611ce290849061301e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03868116918217909255915184939187169160008051602061320a83398151915291a4505050565b6000611d3c836120d3565b8210611d9e5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161066e565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b611dcf612955565b611dd88261232b565b6000848152600b60205260409020815181549293508392829060ff19166001836002811115611e0957611e0961319b565b02179055506020820151815460409384015162ffff001990911661010060ff9384160262ff0000191617620100009290911691909102179055600a5490516376aed2e160e01b8152600160c81b90910461ffff16600482015230906376aed2e19060240160206040518083038186803b158015611e8557600080fd5b505afa158015611e99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebd9190612c83565b6002811115611ece57611ece61319b565b60405184907f414bf8128f67ff432c1f7eecb52e0f0835369dff048687fb1c0867a5859cf4e990600090a392915050565b610d27828260405180602001604052806000815250612423565b6106ed8383836040518060200160405280600081525061143b565b6000611f3f8261205c565b9050611f4d81600084612273565b611f58600083612205565b6001600160a01b0381166000908152600360205260408120805460019290611f81908490613084565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b0384169060008051602061320a833981519152908390a45050565b6000611fd460085490565b82106120375760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161066e565b6008828154811061204a5761204a6131c7565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b03168061057c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161066e565b60006001600160a01b03821661213e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161066e565b506001600160a01b031660009081526003602052604090205490565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610d27338383612456565b6121c03361087a565b6121dc5760405162461bcd60e51b815260040161066e90612f1d565b6108a784848484612521565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061223a8261205c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0383166122ce576122c981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6122f1565b816001600160a01b0316836001600160a01b0316146122f1576122f18382612554565b6001600160a01b038216612308576106ed816125f1565b826001600160a01b0316826001600160a01b0316146106ed576106ed82826126a0565b612333612955565b600a5461138861ffff600160c81b90920482161190600090612359906064908616613139565b9050605a811061238257605c811080156123705750815b61237b576001612385565b6002612385565b60005b839060028111156123985761239861319b565b908160028111156123ab576123ab61319b565b905250825160009060028111156123c4576123c461319b565b6123cf90600261305b565b60109590951c9490506123f061ffff86166123eb836000613036565b6126e4565b60ff16602085015260109490941c9361241261ffff86166123eb836001613036565b60ff16604085015250919392505050565b61242d838361271b565b61243a6000848484612848565b6106ed5760405162461bcd60e51b815260040161066e90612e0e565b816001600160a01b0316836001600160a01b031614156124b45760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604482015260640161066e565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61252c848484611b98565b61253884848484612848565b6108a75760405162461bcd60e51b815260040161066e90612e0e565b60006001612561846120d3565b61256b9190613084565b6000838152600760205260409020549091508082146125be576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061260390600190613084565b6000838152600960205260408120546008805493945090928490811061262b5761262b6131c7565b90600052602060002001549050806008838154811061264c5761264c6131c7565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612684576126846131b1565b6001900381819060005260206000200160009055905550505050565b60006126ab836120d3565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000600e8260ff16600681106126fc576126fc6131c7565b6020810491909101546109cf91601f166101000a900460ff168461314d565b6001600160a01b0382166127715760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161066e565b61277a816121e8565b156127c75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161066e565b6127d360008383612273565b6001600160a01b03821660009081526003602052604081208054600192906127fc90849061301e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b038616908117909155905183929060008051602061320a833981519152908290a45050565b60006001600160a01b0384163b1561294a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061288c903390899088908890600401612db0565b602060405180830381600087803b1580156128a657600080fd5b505af19250505080156128d6575060408051601f3d908101601f191682019092526128d391810190612c66565b60015b612930573d808015612904576040519150601f19603f3d011682016040523d82523d6000602084013e612909565b606091505b5080516129285760405162461bcd60e51b815260040161066e90612e0e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b90565b506001949350505050565b6040805160608101909152806000815260006020820181905260409091015290565b80356001600160a01b038116811461112257600080fd5b8035801515811461112257600080fd5b803561ffff8116811461112257600080fd5b6000602082840312156129c257600080fd5b6109cf82612977565b600080604083850312156129de57600080fd5b6129e783612977565b91506129f560208401612977565b90509250929050565b600080600060608486031215612a1357600080fd5b612a1c84612977565b9250612a2a60208501612977565b9150612a3860408501612977565b90509250925092565b600080600060608486031215612a5657600080fd5b612a5f84612977565b9250612a6d60208501612977565b9150604084013590509250925092565b60008060008060808587031215612a9357600080fd5b612a9c85612977565b9350612aaa60208601612977565b92506040850135915060608501356001600160401b03811115612acc57600080fd5b8501601f81018713612add57600080fd5b8035612af0612aeb82612fd1565b612fa1565b818152886020838501011115612b0557600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612b3a57600080fd5b612b4383612977565b91506129f56020840161298e565b60008060408385031215612b6457600080fd5b612b6d83612977565b946020939093013593505050565b60006020808385031215612b8e57600080fd5b82356001600160401b0380821115612ba557600080fd5b818501915085601f830112612bb957600080fd5b813581811115612bcb57612bcb6131dd565b8060051b9150612bdc848301612fa1565b8181528481019084860184860187018a1015612bf757600080fd5b600095505b83861015612c2157612c0d8161299e565b835260019590950194918601918601612bfc565b5098975050505050505050565b600060208284031215612c4057600080fd5b6109cf8261298e565b600060208284031215612c5b57600080fd5b81356109cf816131f3565b600060208284031215612c7857600080fd5b81516109cf816131f3565b600060208284031215612c9557600080fd5b8151600381106109cf57600080fd5b600060208284031215612cb657600080fd5b81516001600160401b03811115612ccc57600080fd5b8201601f81018413612cdd57600080fd5b8051612ceb612aeb82612fd1565b818152856020838501011115612d0057600080fd5b612d1182602083016020860161309b565b95945050505050565b600060208284031215612d2c57600080fd5b6109cf8261299e565b600060208284031215612d4757600080fd5b5035919050565b60008151808452612d6681602086016020860161309b565b601f01601f19169290920160200192915050565b60038110612d9857634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612de390830184612d4e565b9695505050505050565b6020810161057c8284612d7a565b6020815260006109cf6020830184612d4e565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601990820152784f6e6c792061646d696e732063616e2063616c6c207468697360381b604082015260600190565b602080825260119082015270686d6d6d6d207768617420646f696e673f60781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000606082019050612f81828451612d7a565b60ff602084015116602083015260ff604084015116604083015292915050565b604051601f8201601f191681016001600160401b0381118282101715612fc957612fc96131dd565b604052919050565b60006001600160401b03821115612fea57612fea6131dd565b50601f01601f191660200190565b600061ffff8083168185168083038211156130155761301561316f565b01949350505050565b600082198211156130315761303161316f565b500190565b600060ff821660ff84168060ff038211156130535761305361316f565b019392505050565b600060ff821660ff84168160ff048111821515161561307c5761307c61316f565b029392505050565b6000828210156130965761309661316f565b500390565b60005b838110156130b657818101518382015260200161309e565b838111156108a75750506000910152565b600181811c908216806130db57607f821691505b6020821081141561068357634e487b7160e01b600052602260045260246000fd5b600061ffff808316818114156131145761311461316f565b6001019392505050565b60006000198214156131325761313261316f565b5060010190565b60008261314857613148613185565b500690565b600060ff83168061316057613160613185565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146107a957600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220617661ac63976eb8fb64ea28b961f88d6e7ae57442dbe9734daf876ad8fe4ec264736f6c634300080700330000000000000000000000000000000000000000000000000000000000007530

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102085760003560e01c8063704802751161011b578063c084f540116100a8578063c084f5401461047d578063c87b56dd14610492578063e1fc334f146104a5578063e8315742146104b8578063e985e9c5146104cd578063ebd17368146104e0578063f10fb5841461050b578063f2fde38b1461051e578063fb35994214610531578063fbd626401461054457600080fd5b806370480275146103c657806370a08231146103d9578063715018a6146103ec57806376aed2e1146103f45780638da5cb5b1461041457806394e568471461041c57806395d89b411461043c578063a22cb46514610444578063b3066d4914610457578063b88d4fde1461046a57600080fd5b80634018b1f8116101995780634018b1f8146102f057806340c10f191461031257806342842e0e1461032557806342966c68146103385780634bd702b71461034b5780634f02c420146103705780634f6ccce7146103855780635c975abb146103985780636352211e146103a05780636abcded1146103b357600080fd5b806301ffc9a71461020d57806306fdde0314610235578063081812fc1461024a578063095ea7b31461026a57806316c38b3c1461027f5780631785f53c1461029257806318160ddd146102a557806323b872dd146102b75780632f745c59146102ca57806335ca838b146102dd575b600080fd5b61022061021b366004612c49565b610557565b60405190151581526020015b60405180910390f35b61023d610582565b60405161022c9190612dfb565b61025d610258366004612d35565b610614565b60405161022c9190612d9c565b61027d610278366004612b51565b610689565b005b61027d61028d366004612c2e565b6106f2565b61027d6102a03660046129b0565b6107b4565b6008545b60405190815260200161022c565b61027d6102c5366004612a41565b610804565b6102a96102d8366004612b51565b6108ad565b61027d6102eb366004612b7b565b6109d6565b600a54600160b81b900461ffff165b60405161ffff909116815260200161022c565b61027d610320366004612b51565b610b08565b61027d610333366004612a41565b610d2b565b61027d610346366004612d35565b610d90565b61035e610359366004612d35565b610e47565b60405160ff909116815260200161022c565b600a546102ff90600160c81b900461ffff1681565b6102a9610393366004612d35565b610e71565b610220610ed8565b61025d6103ae366004612d35565b610ee8565b600a54600160a81b900461ffff166102ff565b61027d6103d43660046129b0565b61100b565b6102a96103e73660046129b0565b61105e565b61027d611127565b610407610402366004612d35565b611162565b60405161022c9190612ded565b61025d611227565b61042f61042a366004612d35565b611236565b60405161022c9190612f6e565b61023d61135b565b61027d610452366004612b27565b61136a565b61027d6104653660046129fe565b6113cd565b61027d610478366004612a7d565b61143b565b600a546102ff90600160b81b900461ffff1681565b61023d6104a0366004612d35565b6114a8565b60105461025d906001600160a01b031681565b600a546102ff90600160a81b900461ffff1681565b6102206104db3660046129cb565b61162d565b6104f36104ee366004612d35565b6116b4565b6040516001600160401b03909116815260200161022c565b60115461025d906001600160a01b031681565b61027d61052c3660046129b0565b611706565b61027d61053f366004612d1a565b6117a3565b600f5461025d906001600160a01b031681565b60006001600160e01b0319821663780e9d6360e01b148061057c575061057c826117f4565b92915050565b606060008054610591906130c7565b80601f01602080910402602001604051908101604052809291908181526020018280546105bd906130c7565b801561060a5780601f106105df5761010080835404028352916020019161060a565b820191906000526020600020905b8154815290600101906020018083116105ed57829003601f168201915b5050505050905090565b33600090815260126020526040812054829060ff168061065257506000818152600d602052604090205443600160401b9091046001600160401b0316105b6106775760405162461bcd60e51b815260040161066e90612e93565b60405180910390fd5b61068083611844565b91505b50919050565b33600090815260126020526040902054819060ff16806106c757506000818152600d602052604090205443600160401b9091046001600160401b0316105b6106e35760405162461bcd60e51b815260040161066e90612e93565b6106ed83836118cc565b505050565b6010546001600160a01b0316158015906107165750600f546001600160a01b031615155b801561072c57506011546001600160a01b031615155b61076c5760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b604482015260640161066e565b33610775611227565b6001600160a01b03161461079b5760405162461bcd60e51b815260040161066e90612ee8565b80156107ac576107a96119d8565b50565b6107a9611a4f565b336107bd611227565b6001600160a01b0316146107e35760405162461bcd60e51b815260040161066e90612ee8565b6001600160a01b03166000908152601260205260409020805460ff19169055565b33600090815260126020526040902054819060ff168061084257506000818152600d602052604090205443600160401b9091046001600160401b0316105b61085e5760405162461bcd60e51b815260040161066e90612e93565b3360009081526012602052604090205460ff1661089c57610880335b83611ace565b61089c5760405162461bcd60e51b815260040161066e90612f1d565b6108a7848484611b98565b50505050565b3360009081526012602052604081205460ff16806108ea5750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6109065760405162461bcd60e51b815260040161066e90612e93565b3360009081526012602052604090205460ff168061094c57506001600160a01b0383166000908152600c602052604090205443600160401b9091046001600160401b0316105b6109685760405162461bcd60e51b815260040161066e90612e93565b60006109748484611d31565b3360009081526012602052604090205490915060ff16806109b357506000818152600d602052604090205443600160401b9091046001600160401b0316105b6109cf5760405162461bcd60e51b815260040161066e90612e93565b9392505050565b3360009081526012602052604090205460ff16610a055760405162461bcd60e51b815260040161066e90612e60565b6040805180820182526001600160401b03428181168352438281166020808601918252326000908152600c9091529586209451855491518516600160401b026001600160801b031990921694169390931792909217909255915b83518110156108a7576040518060400160405280836001600160401b03168152602001846001600160401b0316815250600d6000868481518110610aa557610aa56131c7565b60209081029190910181015161ffff168252818101929092526040016000208251815493909201516001600160401b03908116600160401b026001600160801b031990941692169190911791909117905580610b008161311e565b915050610a5f565b610b10610ed8565b15610b2d5760405162461bcd60e51b815260040161066e90612ebe565b3360009081526012602052604090205460ff16610b5c5760405162461bcd60e51b815260040161066e90612e60565b600a5461ffff600160a81b8204811691610b8091600160c81b909104166001612ff8565b61ffff161115610bc65760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b604482015260640161066e565b600a8054600160c81b900461ffff16906019610be1836130fc565b91906101000a81548161ffff021916908361ffff16021790555050610c1a600a60199054906101000a900461ffff1661ffff1682611dc7565b50326001600160a01b03831614801590610c425750600f546001600160a01b03838116911614155b15610d0e57600a546040516376aed2e160e01b8152600160c81b90910461ffff16600482015230906376aed2e19060240160206040518083038186803b158015610c8b57600080fd5b505afa158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc39190612c83565b6002811115610cd457610cd461319b565b600a54604051600160c81b90910461ffff16907f4ee4ccbe14b115f179390f579fdc0745066c101b3815a8b1555dd7b2d3f6818e90600090a35b600a54610d27908390600160c81b900461ffff16611eff565b5050565b33600090815260126020526040902054819060ff1680610d6957506000818152600d602052604090205443600160401b9091046001600160401b0316105b610d855760405162461bcd60e51b815260040161066e90612e93565b6108a7848484611f19565b610d98610ed8565b15610db55760405162461bcd60e51b815260040161066e90612ebe565b3360009081526012602052604090205460ff16610de45760405162461bcd60e51b815260040161066e90612e60565b32610dee82610ee8565b6001600160a01b031614610e3e5760405162461bcd60e51b815260206004820152601760248201527613dbdc1cc81e5bdd48191bdb89dd081bdddb881d1a185d604a1b604482015260640161066e565b6107a981611f34565b600e8160068110610e5757600080fd5b60209182820401919006915054906101000a900460ff1681565b600080610e7d83611fc9565b3360009081526012602052604090205490915060ff1680610ebc57506000818152600d602052604090205443600160401b9091046001600160401b0316105b61057c5760405162461bcd60e51b815260040161066e90612e93565b600a54600160a01b900460ff1690565b3360009081526012602052604081205460ff1680610f255750326000908152600c602052604090205443600160401b9091046001600160401b0316105b610f415760405162461bcd60e51b815260040161066e90612e93565b33600090815260126020526040902054829060ff1680610f7f57506000818152600d602052604090205443600160401b9091046001600160401b0316105b610f9b5760405162461bcd60e51b815260040161066e90612e93565b6000610fa68461205c565b3360009081526012602052604090205490915060ff1680610fef57506001600160a01b0381166000908152600c602052604090205443600160401b9091046001600160401b0316105b6106805760405162461bcd60e51b815260040161066e90612e93565b33611014611227565b6001600160a01b03161461103a5760405162461bcd60e51b815260040161066e90612ee8565b6001600160a01b03166000908152601260205260409020805460ff19166001179055565b3360009081526012602052604081205460ff168061109b5750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6110b75760405162461bcd60e51b815260040161066e90612e93565b3360009081526012602052604090205460ff16806110fd57506001600160a01b0382166000908152600c602052604090205443600160401b9091046001600160401b0316105b6111195760405162461bcd60e51b815260040161066e90612e93565b61057c826120d3565b919050565b33611130611227565b6001600160a01b0316146111565760405162461bcd60e51b815260040161066e90612ee8565b611160600061215a565b565b33600090815260126020526040812054829060ff16806111a057506000818152600d602052604090205443600160401b9091046001600160401b0316105b6111bc5760405162461bcd60e51b815260040161066e90612e93565b6000838152600b60205260408082208151606081019092528054829060ff1660028111156111ec576111ec61319b565b60028111156111fd576111fd61319b565b8152905460ff61010082048116602084015262010000909104166040909101525192505050919050565b600a546001600160a01b031690565b61123e612955565b3360009081526012602052604090205460ff168061127b5750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6112975760405162461bcd60e51b815260040161066e90612e93565b33600090815260126020526040902054829060ff16806112d557506000818152600d602052604090205443600160401b9091046001600160401b0316105b6112f15760405162461bcd60e51b815260040161066e90612e93565b6000838152600b6020526040908190208151606081019092528054829060ff1660028111156113225761132261319b565b60028111156113335761133361319b565b8152905460ff6101008204811660208401526201000090910416604090910152915050919050565b606060018054610591906130c7565b3360009081526012602052604090205460ff16806113a75750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6113c35760405162461bcd60e51b815260040161066e90612e93565b610d2782826121ac565b336113d6611227565b6001600160a01b0316146113fc5760405162461bcd60e51b815260040161066e90612ee8565b601080546001600160a01b039485166001600160a01b031991821617909155600f80549385169382169390931790925560118054919093169116179055565b33600090815260126020526040902054829060ff168061147957506000818152600d602052604090205443600160401b9091046001600160401b0316105b6114955760405162461bcd60e51b815260040161066e90612e93565b6114a1858585856121b7565b5050505050565b3360009081526012602052604090205460609060ff16806114e85750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6115045760405162461bcd60e51b815260040161066e90612e93565b33600090815260126020526040902054829060ff168061154257506000818152600d602052604090205443600160401b9091046001600160401b0316105b61155e5760405162461bcd60e51b815260040161066e90612e93565b611567836121e8565b6115ad5760405162461bcd60e51b8152602060048201526017602482015276151bdad95b88125108191bd95cc81b9bdd08195e1a5cdd604a1b604482015260640161066e565b60105460405163c87b56dd60e01b8152600481018590526001600160a01b039091169063c87b56dd9060240160006040518083038186803b1580156115f157600080fd5b505afa158015611605573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106809190810190612ca4565b3360009081526012602052604081205460ff168061166a5750326000908152600c602052604090205443600160401b9091046001600160401b0316105b6116865760405162461bcd60e51b815260040161066e90612e93565b6001600160a01b0380841660009081526005602090815260408083209386168352929052205460ff166109cf565b3360009081526012602052604081205460ff166116e35760405162461bcd60e51b815260040161066e90612e60565b506000908152600d6020526040902054600160401b90046001600160401b031690565b3361170f611227565b6001600160a01b0316146117355760405162461bcd60e51b815260040161066e90612ee8565b6001600160a01b03811661179a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161066e565b6107a98161215a565b336117ac611227565b6001600160a01b0316146117d25760405162461bcd60e51b815260040161066e90612ee8565b600a805461ffff909216600160b81b0261ffff60b81b19909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061182557506001600160e01b03198216635b5e139f60e01b145b8061057c57506301ffc9a760e01b6001600160e01b031983161461057c565b600061184f826121e8565b6118b05760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161066e565b506000908152600460205260409020546001600160a01b031690565b60006118d78261205c565b9050806001600160a01b0316836001600160a01b031614156119455760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161066e565b336001600160a01b03821614806119615750611961813361162d565b6119ce5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606482015260840161066e565b6106ed8383612205565b6119e0610ed8565b156119fd5760405162461bcd60e51b815260040161066e90612ebe565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611a383390565b604051611a459190612d9c565b60405180910390a1565b611a57610ed8565b611a9a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161066e565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611a38565b6000611ad9826121e8565b611b3a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161066e565b6000611b458361205c565b9050806001600160a01b0316846001600160a01b03161480611b805750836001600160a01b0316611b7584610614565b6001600160a01b0316145b80611b905750611b90818561162d565b949350505050565b826001600160a01b0316611bab8261205c565b6001600160a01b031614611c135760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161066e565b6001600160a01b038216611c755760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161066e565b611c80838383612273565b611c8b600082612205565b6001600160a01b0383166000908152600360205260408120805460019290611cb4908490613084565b90915550506001600160a01b0382166000908152600360205260408120805460019290611ce290849061301e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03868116918217909255915184939187169160008051602061320a83398151915291a4505050565b6000611d3c836120d3565b8210611d9e5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161066e565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b611dcf612955565b611dd88261232b565b6000848152600b60205260409020815181549293508392829060ff19166001836002811115611e0957611e0961319b565b02179055506020820151815460409384015162ffff001990911661010060ff9384160262ff0000191617620100009290911691909102179055600a5490516376aed2e160e01b8152600160c81b90910461ffff16600482015230906376aed2e19060240160206040518083038186803b158015611e8557600080fd5b505afa158015611e99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebd9190612c83565b6002811115611ece57611ece61319b565b60405184907f414bf8128f67ff432c1f7eecb52e0f0835369dff048687fb1c0867a5859cf4e990600090a392915050565b610d27828260405180602001604052806000815250612423565b6106ed8383836040518060200160405280600081525061143b565b6000611f3f8261205c565b9050611f4d81600084612273565b611f58600083612205565b6001600160a01b0381166000908152600360205260408120805460019290611f81908490613084565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b0384169060008051602061320a833981519152908390a45050565b6000611fd460085490565b82106120375760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161066e565b6008828154811061204a5761204a6131c7565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b03168061057c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161066e565b60006001600160a01b03821661213e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161066e565b506001600160a01b031660009081526003602052604090205490565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610d27338383612456565b6121c03361087a565b6121dc5760405162461bcd60e51b815260040161066e90612f1d565b6108a784848484612521565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061223a8261205c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0383166122ce576122c981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6122f1565b816001600160a01b0316836001600160a01b0316146122f1576122f18382612554565b6001600160a01b038216612308576106ed816125f1565b826001600160a01b0316826001600160a01b0316146106ed576106ed82826126a0565b612333612955565b600a5461138861ffff600160c81b90920482161190600090612359906064908616613139565b9050605a811061238257605c811080156123705750815b61237b576001612385565b6002612385565b60005b839060028111156123985761239861319b565b908160028111156123ab576123ab61319b565b905250825160009060028111156123c4576123c461319b565b6123cf90600261305b565b60109590951c9490506123f061ffff86166123eb836000613036565b6126e4565b60ff16602085015260109490941c9361241261ffff86166123eb836001613036565b60ff16604085015250919392505050565b61242d838361271b565b61243a6000848484612848565b6106ed5760405162461bcd60e51b815260040161066e90612e0e565b816001600160a01b0316836001600160a01b031614156124b45760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604482015260640161066e565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61252c848484611b98565b61253884848484612848565b6108a75760405162461bcd60e51b815260040161066e90612e0e565b60006001612561846120d3565b61256b9190613084565b6000838152600760205260409020549091508082146125be576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061260390600190613084565b6000838152600960205260408120546008805493945090928490811061262b5761262b6131c7565b90600052602060002001549050806008838154811061264c5761264c6131c7565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612684576126846131b1565b6001900381819060005260206000200160009055905550505050565b60006126ab836120d3565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000600e8260ff16600681106126fc576126fc6131c7565b6020810491909101546109cf91601f166101000a900460ff168461314d565b6001600160a01b0382166127715760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161066e565b61277a816121e8565b156127c75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161066e565b6127d360008383612273565b6001600160a01b03821660009081526003602052604081208054600192906127fc90849061301e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b038616908117909155905183929060008051602061320a833981519152908290a45050565b60006001600160a01b0384163b1561294a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061288c903390899088908890600401612db0565b602060405180830381600087803b1580156128a657600080fd5b505af19250505080156128d6575060408051601f3d908101601f191682019092526128d391810190612c66565b60015b612930573d808015612904576040519150601f19603f3d011682016040523d82523d6000602084013e612909565b606091505b5080516129285760405162461bcd60e51b815260040161066e90612e0e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b90565b506001949350505050565b6040805160608101909152806000815260006020820181905260409091015290565b80356001600160a01b038116811461112257600080fd5b8035801515811461112257600080fd5b803561ffff8116811461112257600080fd5b6000602082840312156129c257600080fd5b6109cf82612977565b600080604083850312156129de57600080fd5b6129e783612977565b91506129f560208401612977565b90509250929050565b600080600060608486031215612a1357600080fd5b612a1c84612977565b9250612a2a60208501612977565b9150612a3860408501612977565b90509250925092565b600080600060608486031215612a5657600080fd5b612a5f84612977565b9250612a6d60208501612977565b9150604084013590509250925092565b60008060008060808587031215612a9357600080fd5b612a9c85612977565b9350612aaa60208601612977565b92506040850135915060608501356001600160401b03811115612acc57600080fd5b8501601f81018713612add57600080fd5b8035612af0612aeb82612fd1565b612fa1565b818152886020838501011115612b0557600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612b3a57600080fd5b612b4383612977565b91506129f56020840161298e565b60008060408385031215612b6457600080fd5b612b6d83612977565b946020939093013593505050565b60006020808385031215612b8e57600080fd5b82356001600160401b0380821115612ba557600080fd5b818501915085601f830112612bb957600080fd5b813581811115612bcb57612bcb6131dd565b8060051b9150612bdc848301612fa1565b8181528481019084860184860187018a1015612bf757600080fd5b600095505b83861015612c2157612c0d8161299e565b835260019590950194918601918601612bfc565b5098975050505050505050565b600060208284031215612c4057600080fd5b6109cf8261298e565b600060208284031215612c5b57600080fd5b81356109cf816131f3565b600060208284031215612c7857600080fd5b81516109cf816131f3565b600060208284031215612c9557600080fd5b8151600381106109cf57600080fd5b600060208284031215612cb657600080fd5b81516001600160401b03811115612ccc57600080fd5b8201601f81018413612cdd57600080fd5b8051612ceb612aeb82612fd1565b818152856020838501011115612d0057600080fd5b612d1182602083016020860161309b565b95945050505050565b600060208284031215612d2c57600080fd5b6109cf8261299e565b600060208284031215612d4757600080fd5b5035919050565b60008151808452612d6681602086016020860161309b565b601f01601f19169290920160200192915050565b60038110612d9857634e487b7160e01b600052602160045260246000fd5b9052565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612de390830184612d4e565b9695505050505050565b6020810161057c8284612d7a565b6020815260006109cf6020830184612d4e565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601990820152784f6e6c792061646d696e732063616e2063616c6c207468697360381b604082015260600190565b602080825260119082015270686d6d6d6d207768617420646f696e673f60781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000606082019050612f81828451612d7a565b60ff602084015116602083015260ff604084015116604083015292915050565b604051601f8201601f191681016001600160401b0381118282101715612fc957612fc96131dd565b604052919050565b60006001600160401b03821115612fea57612fea6131dd565b50601f01601f191660200190565b600061ffff8083168185168083038211156130155761301561316f565b01949350505050565b600082198211156130315761303161316f565b500190565b600060ff821660ff84168060ff038211156130535761305361316f565b019392505050565b600060ff821660ff84168160ff048111821515161561307c5761307c61316f565b029392505050565b6000828210156130965761309661316f565b500390565b60005b838110156130b657818101518382015260200161309e565b838111156108a75750506000910152565b600181811c908216806130db57607f821691505b6020821081141561068357634e487b7160e01b600052602260045260246000fd5b600061ffff808316818114156131145761311461316f565b6001019392505050565b60006000198214156131325761313261316f565b5060010190565b60008261314857613148613185565b500690565b600060ff83168061316057613160613185565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146107a957600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220617661ac63976eb8fb64ea28b961f88d6e7ae57442dbe9734daf876ad8fe4ec264736f6c63430008070033

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

0000000000000000000000000000000000000000000000000000000000007530

-----Decoded View---------------
Arg [0] : _maxTokens (uint16): 30000

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000007530


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.