ETH Price: $2,030.11 (+1.50%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...191293622024-01-31 22:13:23417 days ago1706739203IN
0xB4a70822...77E556314
0 ETH0.0005776823.867195
Set Approval For...188384022023-12-22 2:25:59458 days ago1703211959IN
0xB4a70822...77E556314
0 ETH0.0011938525.88814127
Safe Transfer Fr...162294462022-12-21 0:19:11824 days ago1671581951IN
0xB4a70822...77E556314
0 ETH0.0007892113.04578684
Set Approval For...162196842022-12-19 15:37:23825 days ago1671464243IN
0xB4a70822...77E556314
0 ETH0.0008595318.60465117
Set Base URI162134812022-12-18 18:50:11826 days ago1671389411IN
0xB4a70822...77E556314
0 ETH0.000796319.57244106
Mint162122372022-12-18 14:41:11826 days ago1671374471IN
0xB4a70822...77E556314
0 ETH0.0022814413.98349893

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FluctuatNecMergitur

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Apache-2.0 license
File 1 of 14 : ShatteredOpportunities.sol
// SPDX-License-Identifier: Apache-2.0

/// @notice Fluctuat Nec Mergitur by Charlesai
/// @author transientlabs.xyz

/**

 ____    ___                    __                      __        __  __                                                       __                    
/\  _`\ /\_ \                  /\ \__                  /\ \__    /\ \/\ \                     /'\_/`\                       __/\ \__                 
\ \ \L\_\//\ \    __  __    ___\ \ ,_\  __  __     __  \ \ ,_\   \ \ `\\ \     __    ___     /\      \     __   _ __    __ /\_\ \ ,_\  __  __  _ __  
 \ \  _\/ \ \ \  /\ \/\ \  /'___\ \ \/ /\ \/\ \  /'__`\ \ \ \/    \ \ , ` \  /'__`\ /'___\   \ \ \__\ \  /'__`\/\`'__\/'_ `\/\ \ \ \/ /\ \/\ \/\`'__\
  \ \ \/   \_\ \_\ \ \_\ \/\ \__/\ \ \_\ \ \_\ \/\ \L\.\_\ \ \_    \ \ \`\ \/\  __//\ \__/    \ \ \_/\ \/\  __/\ \ \//\ \L\ \ \ \ \ \_\ \ \_\ \ \ \/ 
   \ \_\   /\____\\ \____/\ \____\\ \__\\ \____/\ \__/.\_\\ \__\    \ \_\ \_\ \____\ \____\    \ \_\\ \_\ \____\\ \_\\ \____ \ \_\ \__\\ \____/\ \_\ 
    \/_/   \/____/ \/___/  \/____/ \/__/ \/___/  \/__/\/_/ \/__/     \/_/\/_/\/____/\/____/     \/_/ \/_/\/____/ \/_/ \/___L\ \/_/\/__/ \/___/  \/_/ 
                                                                                                                        /\____/                      
                                                                                                                        \_/__/                       

*/

pragma solidity 0.8.14;

import "ShatterV2.sol";

contract FluctuatNecMergitur is ShatterV2 {

    constructor (
        address royaltyRecipient,
        uint256 royaltyPercentage,
        address admin,
        uint256 num,
        uint256 time
    )
    ShatterV2(
        "Fluctuat Nec Mergitur",
        "FNM",
        royaltyRecipient,
        royaltyPercentage,
        admin,
        num,
        time
    )
    {}

}

File 2 of 14 : ShatterV2.sol
// SPDX-License-Identifier: Apache-2.0

/// @title Shatter V2
/// @notice Shatter V2 where the original pieces Shatters into unique 1/1's. No Fuse functionality and owners don't choose number to shatter
/// @author transientlabs.xyz

pragma solidity 0.8.14;

/*
_____/\\\\\\\\\\\____/\\\_________________________________________________________________________________        
 ___/\\\/////////\\\_\/\\\_________________________________________________________________________________       
  __\//\\\______\///__\/\\\____________________________/\\\__________/\\\___________________________________      
   ___\////\\\_________\/\\\__________/\\\\\\\\\_____/\\\\\\\\\\\__/\\\\\\\\\\\_____/\\\\\\\\___/\\/\\\\\\\__     
    ______\////\\\______\/\\\\\\\\\\__\////////\\\___\////\\\////__\////\\\////____/\\\/////\\\_\/\\\/////\\\_    
     _________\////\\\___\/\\\/////\\\___/\\\\\\\\\\_____\/\\\_________\/\\\_______/\\\\\\\\\\\__\/\\\___\///__   
      __/\\\______\//\\\__\/\\\___\/\\\__/\\\/////\\\_____\/\\\_/\\_____\/\\\_/\\__\//\\///////___\/\\\_________  
       _\///\\\\\\\\\\\/___\/\\\___\/\\\_\//\\\\\\\\/\\____\//\\\\\______\//\\\\\____\//\\\\\\\\\\_\/\\\_________ 
        ___\///////////_____\///____\///___\////////\//______\/////________\/////______\//////////__\///__________
   ___       _ __   __  ___  _ ______                 __ 
  / _ )__ __(_) /__/ / / _ \(_) _/ _/__ _______ ___  / /_
 / _  / // / / / _  / / // / / _/ _/ -_) __/ -_) _ \/ __/
/____/\_,_/_/_/\_,_/ /____/_/_//_/ \__/_/  \__/_//_/\__/                                                          
 ______                  _          __    __        __     
/_  __/______ ____  ___ (_)__ ___  / /_  / /  ___ _/ /  ___
 / / / __/ _ `/ _ \(_-</ / -_) _ \/ __/ / /__/ _ `/ _ \(_-<
/_/ /_/  \_,_/_//_/___/_/\__/_//_/\__/ /____/\_,_/_.__/___/                                                           
*/

import "ERC721S.sol";
import "EIP2981AllToken.sol";
import "Ownable.sol";

contract ShatterV2 is ERC721S, EIP2981AllToken, Ownable {

    bool public isShattered;
    uint256 public numShatters;
    uint256 public shatters;
    uint256 public shatterTime;
    address public adminAddress;
    address private _shatterAddress;
    string private _baseUri;

    event Shattered(address indexed user, uint256 indexed numShatters, uint256 indexed shatteredTime);

    modifier adminOrOwner {
        address sender = _msgSender();
        require(sender == adminAddress || sender == owner(), "Address not admin or owner");
        _;
    }

    modifier onlyAdmin {
        require(_msgSender() == adminAddress, "Address not admin");
        _;
    }

    /// @param name is the name of the contract
    /// @param symbol is the contract symbol
    /// @param royaltyRecipient is the royalty recipient
    /// @param royaltyPercentage is the royalty percentage to set
    /// @param admin is the admin address
    /// @param num is the number of shatters that will happen
    /// @param time is time after which shatter can occur
    constructor (
        string memory name,
        string memory symbol,
        address royaltyRecipient,
        uint256 royaltyPercentage,
        address admin,
        uint256 num,
        uint256 time
    )
        ERC721S(name, symbol)
        EIP2981AllToken(royaltyRecipient, royaltyPercentage)
        Ownable()
    {
        require(num >= 1, "Cannot deploy a shatter contract with 0 shatters");
        adminAddress = admin;
        numShatters = num;
        shatterTime = time;
    }

    /// @notice function to change the royalty info
    /// @dev requires owner
    /// @dev this is useful if the amount was set improperly at contract creation.
    /// @param newAddr is the new royalty payout addresss
    /// @param newPerc is the new royalty percentage, in basis points (out of 10,000)
    function setRoyaltyInfo(address newAddr, uint256 newPerc) external onlyOwner {
        _setRoyaltyInfo(newAddr, newPerc);
    }

    /// @notice function to renounce admin rights
    /// @dev requires only admin
    function renounceAdmin() external onlyAdmin {
        adminAddress = address(0);
    }

    /// @notice function to set the admin address on the contract
    /// @dev requires owner
    /// @param newAdmin is the new admin address
    function setAdminAddress(address newAdmin) external onlyOwner {
        require(newAdmin != address(0), "New admin cannot be the zero address");
        adminAddress = newAdmin;
    }

    /// @notice function to set base uri
    /// @dev requires owner
    /// @param newUri is the new base uri
    function setBaseURI(string memory newUri) public onlyOwner {
        _setBaseUri(newUri);
    }

    /// @notice function for minting the 1/1 to the owner's address
    /// @dev requires contract owner or admin
    /// @dev sets the description, image, animation url (if exists), and traits for the piece
    /// @dev requires that shatters is equal to 0 -> meaning no piece has been minted
    /// @dev using _mint function as owner() should always be an EOA or trusted entity
    function mint(string memory newUri) external adminOrOwner {
        require(shatters == 0, "Already minted the first piece");
        _setBaseUri(newUri);
        shatters = 1;
        _mint(owner(), 0);
    }

    /// @notice function for owner of token 0 to unlock the pieces
    /// @dev requires msg.sender to be the owner of token 0
    /// @dev shatters to specified number of shatters
    /// @dev requires isShattered to be false
    /// @dev requires block timestamp to be greater than or equal to shatterTime
    /// @dev purposefully not letting approved addresses shatter as we want owner to be the only one to shatter the token
    function shatter() external {
        address sender = _msgSender();
        require(!isShattered, "Already is shattered");
        require(sender == ownerOf(0), "Caller is not owner of token 0");
        require(block.timestamp >= shatterTime, "Cannot shatter prior to shatterTime");

        _burn(0);
        _batchMint(sender, numShatters);

        // no reentrancy so can set these after burning and minting
        isShattered = true;
        shatters = numShatters;

        emit Shattered(msg.sender, numShatters, block.timestamp);

    }

    /// @notice overrides supportsInterface function
    /// @param interfaceId is supplied from anyone/contract calling this function, as defined in ERC 165
    /// @return boolean saying if this contract supports the interface or not
    function supportsInterface(bytes4 interfaceId) public view override(ERC721S, EIP2981AllToken) returns (bool) {
        return ERC721S.supportsInterface(interfaceId) || EIP2981AllToken.supportsInterface(interfaceId);
    }

    /// @notice function to override ownerOf in ERC721S
    /// @dev if is shattered and not fused, checks to see if that token has been transferred or if it belongs to the shatterAddress.
    ///     Otherwise, returns result from ERC721S.
    function ownerOf(uint256 tokenId) public view virtual override(ERC721S) returns (address) {
        if (isShattered) {
            if (tokenId > 0 && tokenId <= shatters) {
                address owner = _owners[tokenId];
                if (owner == address(0)) {
                    return _shatterAddress;
                } else {
                    return owner;
                }
            } else {
                revert("Invalid token id");
            }
        } else {
            return ERC721S.ownerOf(tokenId);
        }
    }

    /// @notice function to override the _exists function in ERC721S
    /// @dev if is shattered and not fused, checks to see if tokenId is in the range of shatters
    ///     otherwise, returns result from ERC721S
    function _exists(uint256 tokenId) internal view virtual override(ERC721S) returns (bool) {
        if (isShattered) {
            if (tokenId > 0 && tokenId <= shatters) {
                return true;
            } else {
                return false;
            }
        } else {
            return ERC721S._exists(tokenId);
        }
    }

    /// @notice function to batch mint upon shatter
    /// @dev only mints tokenIds 1 -> quantity to shatterExecutor
    function _batchMint(address shatterExecutor, uint256 quantity) internal {
        _shatterAddress = shatterExecutor;
        _balances[shatterExecutor] += quantity;
        for (uint256 id = 1; id < quantity + 1; id++) {
            emit Transfer(address(0), shatterExecutor, id);
        }
        // TODO replace with consecutive transfer
    }

    /// @notice function to set base uri internally
    function _setBaseUri(string memory newUri) internal {
        _baseUri = newUri;
    }

    /// @notice override _baseURI() function from ERC721A
    function _baseURI() internal view override returns (string memory) {
        return _baseUri;
    }
}

File 3 of 14 : ERC721S.sol
// SPDX-License-Identifier: MIT

/// @title ERC721S - an implementation of ERC721 for use in Shatter
/// @author transientlabs.xyz
/// @dev Transient Labs fork of OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)
///     for use in Shatter contracts. Changes are as follows to achieve an efficient batch mint while keeping transfer fees low:
///         1. `_owners` and `_balances` variable scope are `internal`
///         2. all calls to `ERC721.ownerOf` are replaced with just `ownerOf`
/// @dev we decided not to write our own base ERC721 contract as OpenZeppelin's implementation is the standard in the space

pragma solidity ^0.8.0;

import "IERC721.sol";
import "IERC721Receiver.sol";
import "IERC721Metadata.sol";
import "Address.sol";
import "Context.sol";
import "Strings.sol";
import "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 ERC721S 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) internal _owners;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        // Clear approvals
        delete _tokenApprovals[tokenId];

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

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

        _afterTokenTransfer(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(ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "IERC165.sol";

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "IERC721.sol";

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "IERC165.sol";

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

File 12 of 14 : EIP2981AllToken.sol
// SPDX-License-Identifier: MIT
/**
*   @title EIP 2981 All Token
*   @notice implementation of EIP 2981, with all tokens having the same royalty amount
*   @author transientlabs.xyz
*/

/*
   ___       _ __   __  ___  _ ______                 __ 
  / _ )__ __(_) /__/ / / _ \(_) _/ _/__ _______ ___  / /_
 / _  / // / / / _  / / // / / _/ _/ -_) __/ -_) _ \/ __/
/____/\_,_/_/_/\_,_/ /____/_/_//_/ \__/_/  \__/_//_/\__/                                                          
 ______                  _          __    __        __     
/_  __/______ ____  ___ (_)__ ___  / /_  / /  ___ _/ /  ___
 / / / __/ _ `/ _ \(_-</ / -_) _ \/ __/ / /__/ _ `/ _ \(_-<
/_/ /_/  \_,_/_//_/___/_/\__/_//_/\__/ /____/\_,_/_.__/___/ 
*/

pragma solidity >0.8.9 <0.9.0;

import "ERC165.sol";
import "IEIP2981.sol";

abstract contract EIP2981AllToken is IEIP2981, ERC165 {

    address internal _royaltyAddr;
    uint256 internal _royaltyPerc; // percentage in basis (out of 10,000)

    /**
    *   @param recipient is the royalty recipient
    *   @param percentage is the royalty percentage
    */
    constructor(address recipient, uint256 percentage) {
        _setRoyaltyInfo(recipient, percentage);
    }
    
    /**
    *   @notice EIP 2981 royalty support
    *   @dev royalty amount not dependent on _tokenId
    */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view virtual override returns (address receiver, uint256 royaltyAmount) {
        return (_royaltyAddr, _royaltyPerc * _salePrice / 10000);
    }

    /**
    *   @notice override ERC 165 implementation of this function
    *   @dev if using this contract with another contract that suppports ERC 265, will have to override in the inheriting contract
    */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165) returns (bool) {
        return interfaceId == type(IEIP2981).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
    *   @notice function to set royalty information
    *   @dev to be called by inheriting contract
    *   @param addr is the royalty payout address for this token id
    *   @param perc is the royalty percentage (out of 10,000) to set for this token id
    */
    function _setRoyaltyInfo(address addr, uint256 perc) internal virtual {
        require(addr != address(0), "EIP2981AllToken: Cannot set royalty receipient to the zero address");
        require(perc < 10000, "EIP2981AllToken: Cannot set royalty percentage above 10000");
        _royaltyAddr = addr;
        _royaltyPerc = perc;
    }
}

File 13 of 14 : IEIP2981.sol
// SPDX-License-Identifier: MIT

pragma solidity >0.8.9 <0.9.0;

///
/// @dev Interface for the NFT Royalty Standard
///
interface IEIP2981 {
    /// ERC165 bytes to add to interface array - set in parent contract
    /// implementing this standard
    ///
    /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a

    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _salePrice - the sale price of the NFT asset specified by _tokenId
    /// @return receiver - address of who should be sent the royalty payment
    /// @return royaltyAmount - the royalty payment amount for _salePrice
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver,uint256 royaltyAmount);
}

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

pragma solidity ^0.8.0;

import "Context.sol";

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"royaltyRecipient","type":"address"},{"internalType":"uint256","name":"royaltyPercentage","type":"uint256"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint256","name":"num","type":"uint256"},{"internalType":"uint256","name":"time","type":"uint256"}],"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":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"numShatters","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"shatteredTime","type":"uint256"}],"name":"Shattered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"adminAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isShattered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"newUri","type":"string"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numShatters","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"renounceAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setAdminAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newUri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddr","type":"address"},{"internalType":"uint256","name":"newPerc","type":"uint256"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shatter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shatterTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"shatters","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"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"}]

60806040523480156200001157600080fd5b5060405162002283380380620022838339810160408190526200003491620003a2565b6040518060400160405280601581526020017f466c756374756174204e6563204d65726769747572000000000000000000000081525060405180604001604052806003815260200162464e4d60e81b8152508686868686848488888160009080519060200190620000a7929190620002df565b508051620000bd906001906020840190620002df565b505050620000d282826200018760201b60201c565b50620000e09050336200028d565b6001821015620001505760405162461bcd60e51b815260206004820152603060248201527f43616e6e6f74206465706c6f792061207368617474657220636f6e747261637460448201526f2077697468203020736861747465727360801b60648201526084015b60405180910390fd5b600c80546001600160a01b0319166001600160a01b039490941693909317909255600955600b555062000432975050505050505050565b6001600160a01b038216620001ff5760405162461bcd60e51b815260206004820152604260248201526000805160206200226383398151915260448201527f6c74792072656365697069656e7420746f20746865207a65726f206164647265606482015261737360f01b608482015260a40162000147565b6127108110620002675760405162461bcd60e51b815260206004820152603a60248201526000805160206200226383398151915260448201527f6c74792070657263656e746167652061626f7665203130303030000000000000606482015260840162000147565b600680546001600160a01b0319166001600160a01b039390931692909217909155600755565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002ed90620003f6565b90600052602060002090601f0160209004810192826200031157600085556200035c565b82601f106200032c57805160ff19168380011785556200035c565b828001600101855582156200035c579182015b828111156200035c5782518255916020019190600101906200033f565b506200036a9291506200036e565b5090565b5b808211156200036a57600081556001016200036f565b80516001600160a01b03811681146200039d57600080fd5b919050565b600080600080600060a08688031215620003bb57600080fd5b620003c68662000385565b945060208601519350620003dd6040870162000385565b6060870151608090970151959894975095949392505050565b600181811c908216806200040b57607f821691505b6020821081036200042c57634e487b7160e01b600052602260045260246000fd5b50919050565b611e2180620004426000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638bad0c0a116100f9578063c87b56dd11610097578063e985e9c511610071578063e985e9c5146103ae578063f2fde38b146103ea578063f7d5e731146103fd578063fc6f94681461040657600080fd5b8063c87b56dd14610375578063d85d3d2714610388578063e2e784d51461039b57600080fd5b8063a22cb465116100d3578063a22cb4651461033d578063ad8147cb14610350578063b88d4fde14610359578063c11e9ddc1461036c57600080fd5b80638bad0c0a1461031c5780638da5cb5b1461032457806395d89b411461033557600080fd5b80632c1e816d116101665780636352211e116101405780636352211e146102d857806370a08231146102eb578063715018a61461030c57806376122da71461031457600080fd5b80632c1e816d1461029f57806342842e0e146102b257806355f804b3146102c557600080fd5b8063095ea7b3116101a2578063095ea7b314610231578063147bb8981461024657806323b872dd1461025a5780632a55205a1461026d57600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063081812fc14610206575b600080fd5b6101dc6101d736600461187d565b610419565b60405190151581526020015b60405180910390f35b6101f9610439565b6040516101e891906118f2565b610219610214366004611905565b6104cb565b6040516001600160a01b0390911681526020016101e8565b61024461023f366004611935565b6104f2565b005b6008546101dc90600160a01b900460ff1681565b61024461026836600461195f565b61060c565b61028061027b36600461199b565b61063d565b604080516001600160a01b0390931683526020830191909152016101e8565b6102446102ad3660046119bd565b610678565b6102446102c036600461195f565b610704565b6102446102d3366004611a64565b61071f565b6102196102e6366004611905565b610733565b6102fe6102f93660046119bd565b6107d8565b6040519081526020016101e8565b61024461085e565b610244610872565b6102446109ef565b6008546001600160a01b0316610219565b6101f9610a58565b61024461034b366004611aad565b610a67565b6102fe60095481565b610244610367366004611ae9565b610a76565b6102fe600a5481565b6101f9610383366004611905565b610aae565b610244610396366004611a64565b610b15565b6102446103a9366004611935565b610c03565b6101dc6103bc366004611b65565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102446103f83660046119bd565b610c15565b6102fe600b5481565b600c54610219906001600160a01b031681565b600061042482610c8b565b80610433575061043382610cdb565b92915050565b60606000805461044890611b98565b80601f016020809104026020016040519081016040528092919081815260200182805461047490611b98565b80156104c15780601f10610496576101008083540402835291602001916104c1565b820191906000526020600020905b8154815290600101906020018083116104a457829003601f168201915b5050505050905090565b60006104d682610d00565b506000908152600460205260409020546001600160a01b031690565b60006104fd82610733565b9050806001600160a01b0316836001600160a01b03160361056f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061058b575061058b81336103bc565b6105fd5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610566565b6106078383610d50565b505050565b6106163382610dbe565b6106325760405162461bcd60e51b815260040161056690611bd2565b610607838383610e3d565b60065460075460009182916001600160a01b039091169061271090610663908690611c35565b61066d9190611c6a565b915091509250929050565b610680610fd6565b6001600160a01b0381166106e25760405162461bcd60e51b8152602060048201526024808201527f4e65772061646d696e2063616e6e6f7420626520746865207a65726f206164646044820152637265737360e01b6064820152608401610566565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b61060783838360405180602001604052806000815250610a76565b610727610fd6565b61073081611030565b50565b600854600090600160a01b900460ff16156107ca5760008211801561075a5750600a548211155b1561078f576000828152600260205260409020546001600160a01b031680610433575050600d546001600160a01b0316919050565b60405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081d1bdad95b881a5960821b6044820152606401610566565b61043382611043565b919050565b60006001600160a01b0382166108425760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610566565b506001600160a01b031660009081526003602052604090205490565b610866610fd6565b61087060006110a3565b565b6008543390600160a01b900460ff16156108c55760405162461bcd60e51b8152602060048201526014602482015273105b1c9958591e481a5cc81cda185d1d195c995960621b6044820152606401610566565b6108cf6000610733565b6001600160a01b0316816001600160a01b03161461092f5760405162461bcd60e51b815260206004820152601e60248201527f43616c6c6572206973206e6f74206f776e6572206f6620746f6b656e203000006044820152606401610566565b600b5442101561098d5760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f742073686174746572207072696f7220746f207368617474657254604482015262696d6560e81b6064820152608401610566565b61099760006110f5565b6109a38160095461118d565b6008805460ff60a01b1916600160a01b179055600954600a81905560405142919033907fe82f4d4e2fca5079b5f222043ee5fbdfb2aea8ff4586fee052cb94b2c234d2c490600090a450565b600c546001600160a01b0316336001600160a01b031614610a465760405162461bcd60e51b815260206004820152601160248201527020b2323932b9b9903737ba1030b236b4b760791b6044820152606401610566565b600c80546001600160a01b0319169055565b60606001805461044890611b98565b610a7233838361121c565b5050565b610a803383610dbe565b610a9c5760405162461bcd60e51b815260040161056690611bd2565b610aa8848484846112ea565b50505050565b6060610ab982610d00565b6000610ac361131d565b90506000815111610ae35760405180602001604052806000815250610b0e565b80610aed8461132c565b604051602001610afe929190611c7e565b6040516020818303038152906040525b9392505050565b600c5433906001600160a01b0316811480610b3d57506008546001600160a01b038281169116145b610b895760405162461bcd60e51b815260206004820152601a60248201527f41646472657373206e6f742061646d696e206f72206f776e65720000000000006044820152606401610566565b600a5415610bd95760405162461bcd60e51b815260206004820152601e60248201527f416c7265616479206d696e7465642074686520666972737420706965636500006044820152606401610566565b610be282611030565b6001600a55610a72610bfc6008546001600160a01b031690565b600061142d565b610c0b610fd6565b610a72828261154e565b610c1d610fd6565b6001600160a01b038116610c825760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610566565b610730816110a3565b60006001600160e01b031982166380ac58cd60e01b1480610cbc57506001600160e01b03198216635b5e139f60e01b145b8061043357506301ffc9a760e01b6001600160e01b0319831614610433565b60006001600160e01b0319821663152a902d60e11b1480610433575061043382610c8b565b610d0981611672565b6107305760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610566565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610d8582610733565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610dca83610733565b9050806001600160a01b0316846001600160a01b03161480610e1157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80610e355750836001600160a01b0316610e2a846104cb565b6001600160a01b0316145b949350505050565b826001600160a01b0316610e5082610733565b6001600160a01b031614610eb45760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610566565b6001600160a01b038216610f165760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610566565b600081815260046020908152604080832080546001600160a01b03191690556001600160a01b038616835260039091528120805460019290610f59908490611cad565b90915550506001600160a01b0382166000908152600360205260408120805460019290610f87908490611cc4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b038681169182179092559151849391871691600080516020611dcc83398151915291a4505050565b6008546001600160a01b031633146108705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610566565b8051610a7290600e9060208401906117ce565b6000818152600260205260408120546001600160a01b0316806104335760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610566565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061110082610733565b9050600082815260046020908152604080832080546001600160a01b03191690556001600160a01b038416835260039091528120805460019290611145908490611cad565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b03841690600080516020611dcc833981519152908390a45050565b600d80546001600160a01b0319166001600160a01b038416908117909155600090815260036020526040812080548392906111c9908490611cc4565b90915550600190505b6111dd826001611cc4565b8110156106075760405181906001600160a01b03851690600090600080516020611dcc833981519152908290a48061121481611cdc565b9150506111d2565b816001600160a01b0316836001600160a01b03160361127d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610566565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6112f5848484610e3d565b611301848484846116cd565b610aa85760405162461bcd60e51b815260040161056690611cf5565b6060600e805461044890611b98565b6060816000036113535750506040805180820190915260018152600360fc1b602082015290565b8160005b811561137d578061136781611cdc565b91506113769050600a83611c6a565b9150611357565b60008167ffffffffffffffff811115611398576113986119d8565b6040519080825280601f01601f1916602001820160405280156113c2576020820181803683370190505b5090505b8415610e35576113d7600183611cad565b91506113e4600a86611d47565b6113ef906030611cc4565b60f81b81838151811061140457611404611d5b565b60200101906001600160f81b031916908160001a905350611426600a86611c6a565b94506113c6565b6001600160a01b0382166114835760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610566565b61148c81611672565b156114d95760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610566565b6001600160a01b0382166000908152600360205260408120805460019290611502908490611cc4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020611dcc833981519152908290a45050565b6001600160a01b0382166115d55760405162461bcd60e51b815260206004820152604260248201527f45495032393831416c6c546f6b656e3a2043616e6e6f742073657420726f796160448201527f6c74792072656365697069656e7420746f20746865207a65726f206164647265606482015261737360f01b608482015260a401610566565b612710811061164c5760405162461bcd60e51b815260206004820152603a60248201527f45495032393831416c6c546f6b656e3a2043616e6e6f742073657420726f796160448201527f6c74792070657263656e746167652061626f76652031303030300000000000006064820152608401610566565b600680546001600160a01b0319166001600160a01b039390931692909217909155600755565b600854600090600160a01b900460ff16156116ae576000821180156116995750600a548211155b156116a657506001919050565b506000919050565b6000828152600260205260409020546001600160a01b03161515610433565b60006001600160a01b0384163b156117c357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611711903390899088908890600401611d71565b6020604051808303816000875af192505050801561174c575060408051601f3d908101601f1916820190925261174991810190611dae565b60015b6117a9573d80801561177a576040519150601f19603f3d011682016040523d82523d6000602084013e61177f565b606091505b5080516000036117a15760405162461bcd60e51b815260040161056690611cf5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610e35565b506001949350505050565b8280546117da90611b98565b90600052602060002090601f0160209004810192826117fc5760008555611842565b82601f1061181557805160ff1916838001178555611842565b82800160010185558215611842579182015b82811115611842578251825591602001919060010190611827565b5061184e929150611852565b5090565b5b8082111561184e5760008155600101611853565b6001600160e01b03198116811461073057600080fd5b60006020828403121561188f57600080fd5b8135610b0e81611867565b60005b838110156118b557818101518382015260200161189d565b83811115610aa85750506000910152565b600081518084526118de81602086016020860161189a565b601f01601f19169290920160200192915050565b602081526000610b0e60208301846118c6565b60006020828403121561191757600080fd5b5035919050565b80356001600160a01b03811681146107d357600080fd5b6000806040838503121561194857600080fd5b6119518361191e565b946020939093013593505050565b60008060006060848603121561197457600080fd5b61197d8461191e565b925061198b6020850161191e565b9150604084013590509250925092565b600080604083850312156119ae57600080fd5b50508035926020909101359150565b6000602082840312156119cf57600080fd5b610b0e8261191e565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611a0957611a096119d8565b604051601f8501601f19908116603f01168101908282118183101715611a3157611a316119d8565b81604052809350858152868686011115611a4a57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611a7657600080fd5b813567ffffffffffffffff811115611a8d57600080fd5b8201601f81018413611a9e57600080fd5b610e35848235602084016119ee565b60008060408385031215611ac057600080fd5b611ac98361191e565b915060208301358015158114611ade57600080fd5b809150509250929050565b60008060008060808587031215611aff57600080fd5b611b088561191e565b9350611b166020860161191e565b925060408501359150606085013567ffffffffffffffff811115611b3957600080fd5b8501601f81018713611b4a57600080fd5b611b59878235602084016119ee565b91505092959194509250565b60008060408385031215611b7857600080fd5b611b818361191e565b9150611b8f6020840161191e565b90509250929050565b600181811c90821680611bac57607f821691505b602082108103611bcc57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611c4f57611c4f611c1f565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611c7957611c79611c54565b500490565b60008351611c9081846020880161189a565b835190830190611ca481836020880161189a565b01949350505050565b600082821015611cbf57611cbf611c1f565b500390565b60008219821115611cd757611cd7611c1f565b500190565b600060018201611cee57611cee611c1f565b5060010190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082611d5657611d56611c54565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611da4908301846118c6565b9695505050505050565b600060208284031215611dc057600080fd5b8151610b0e8161186756feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d761a847dd148538297bd9b091b74118af4257597b24703c1ef87c8dd7798e0364736f6c634300080e003345495032393831416c6c546f6b656e3a2043616e6e6f742073657420726f7961000000000000000000000000d2839e6d35efae479bcc932fe2779f97a24177af00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000072dbe00de00edf158aebee2c82b7e2f19a8c19a8000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638bad0c0a116100f9578063c87b56dd11610097578063e985e9c511610071578063e985e9c5146103ae578063f2fde38b146103ea578063f7d5e731146103fd578063fc6f94681461040657600080fd5b8063c87b56dd14610375578063d85d3d2714610388578063e2e784d51461039b57600080fd5b8063a22cb465116100d3578063a22cb4651461033d578063ad8147cb14610350578063b88d4fde14610359578063c11e9ddc1461036c57600080fd5b80638bad0c0a1461031c5780638da5cb5b1461032457806395d89b411461033557600080fd5b80632c1e816d116101665780636352211e116101405780636352211e146102d857806370a08231146102eb578063715018a61461030c57806376122da71461031457600080fd5b80632c1e816d1461029f57806342842e0e146102b257806355f804b3146102c557600080fd5b8063095ea7b3116101a2578063095ea7b314610231578063147bb8981461024657806323b872dd1461025a5780632a55205a1461026d57600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063081812fc14610206575b600080fd5b6101dc6101d736600461187d565b610419565b60405190151581526020015b60405180910390f35b6101f9610439565b6040516101e891906118f2565b610219610214366004611905565b6104cb565b6040516001600160a01b0390911681526020016101e8565b61024461023f366004611935565b6104f2565b005b6008546101dc90600160a01b900460ff1681565b61024461026836600461195f565b61060c565b61028061027b36600461199b565b61063d565b604080516001600160a01b0390931683526020830191909152016101e8565b6102446102ad3660046119bd565b610678565b6102446102c036600461195f565b610704565b6102446102d3366004611a64565b61071f565b6102196102e6366004611905565b610733565b6102fe6102f93660046119bd565b6107d8565b6040519081526020016101e8565b61024461085e565b610244610872565b6102446109ef565b6008546001600160a01b0316610219565b6101f9610a58565b61024461034b366004611aad565b610a67565b6102fe60095481565b610244610367366004611ae9565b610a76565b6102fe600a5481565b6101f9610383366004611905565b610aae565b610244610396366004611a64565b610b15565b6102446103a9366004611935565b610c03565b6101dc6103bc366004611b65565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102446103f83660046119bd565b610c15565b6102fe600b5481565b600c54610219906001600160a01b031681565b600061042482610c8b565b80610433575061043382610cdb565b92915050565b60606000805461044890611b98565b80601f016020809104026020016040519081016040528092919081815260200182805461047490611b98565b80156104c15780601f10610496576101008083540402835291602001916104c1565b820191906000526020600020905b8154815290600101906020018083116104a457829003601f168201915b5050505050905090565b60006104d682610d00565b506000908152600460205260409020546001600160a01b031690565b60006104fd82610733565b9050806001600160a01b0316836001600160a01b03160361056f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061058b575061058b81336103bc565b6105fd5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610566565b6106078383610d50565b505050565b6106163382610dbe565b6106325760405162461bcd60e51b815260040161056690611bd2565b610607838383610e3d565b60065460075460009182916001600160a01b039091169061271090610663908690611c35565b61066d9190611c6a565b915091509250929050565b610680610fd6565b6001600160a01b0381166106e25760405162461bcd60e51b8152602060048201526024808201527f4e65772061646d696e2063616e6e6f7420626520746865207a65726f206164646044820152637265737360e01b6064820152608401610566565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b61060783838360405180602001604052806000815250610a76565b610727610fd6565b61073081611030565b50565b600854600090600160a01b900460ff16156107ca5760008211801561075a5750600a548211155b1561078f576000828152600260205260409020546001600160a01b031680610433575050600d546001600160a01b0316919050565b60405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081d1bdad95b881a5960821b6044820152606401610566565b61043382611043565b919050565b60006001600160a01b0382166108425760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610566565b506001600160a01b031660009081526003602052604090205490565b610866610fd6565b61087060006110a3565b565b6008543390600160a01b900460ff16156108c55760405162461bcd60e51b8152602060048201526014602482015273105b1c9958591e481a5cc81cda185d1d195c995960621b6044820152606401610566565b6108cf6000610733565b6001600160a01b0316816001600160a01b03161461092f5760405162461bcd60e51b815260206004820152601e60248201527f43616c6c6572206973206e6f74206f776e6572206f6620746f6b656e203000006044820152606401610566565b600b5442101561098d5760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f742073686174746572207072696f7220746f207368617474657254604482015262696d6560e81b6064820152608401610566565b61099760006110f5565b6109a38160095461118d565b6008805460ff60a01b1916600160a01b179055600954600a81905560405142919033907fe82f4d4e2fca5079b5f222043ee5fbdfb2aea8ff4586fee052cb94b2c234d2c490600090a450565b600c546001600160a01b0316336001600160a01b031614610a465760405162461bcd60e51b815260206004820152601160248201527020b2323932b9b9903737ba1030b236b4b760791b6044820152606401610566565b600c80546001600160a01b0319169055565b60606001805461044890611b98565b610a7233838361121c565b5050565b610a803383610dbe565b610a9c5760405162461bcd60e51b815260040161056690611bd2565b610aa8848484846112ea565b50505050565b6060610ab982610d00565b6000610ac361131d565b90506000815111610ae35760405180602001604052806000815250610b0e565b80610aed8461132c565b604051602001610afe929190611c7e565b6040516020818303038152906040525b9392505050565b600c5433906001600160a01b0316811480610b3d57506008546001600160a01b038281169116145b610b895760405162461bcd60e51b815260206004820152601a60248201527f41646472657373206e6f742061646d696e206f72206f776e65720000000000006044820152606401610566565b600a5415610bd95760405162461bcd60e51b815260206004820152601e60248201527f416c7265616479206d696e7465642074686520666972737420706965636500006044820152606401610566565b610be282611030565b6001600a55610a72610bfc6008546001600160a01b031690565b600061142d565b610c0b610fd6565b610a72828261154e565b610c1d610fd6565b6001600160a01b038116610c825760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610566565b610730816110a3565b60006001600160e01b031982166380ac58cd60e01b1480610cbc57506001600160e01b03198216635b5e139f60e01b145b8061043357506301ffc9a760e01b6001600160e01b0319831614610433565b60006001600160e01b0319821663152a902d60e11b1480610433575061043382610c8b565b610d0981611672565b6107305760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610566565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610d8582610733565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610dca83610733565b9050806001600160a01b0316846001600160a01b03161480610e1157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80610e355750836001600160a01b0316610e2a846104cb565b6001600160a01b0316145b949350505050565b826001600160a01b0316610e5082610733565b6001600160a01b031614610eb45760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610566565b6001600160a01b038216610f165760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610566565b600081815260046020908152604080832080546001600160a01b03191690556001600160a01b038616835260039091528120805460019290610f59908490611cad565b90915550506001600160a01b0382166000908152600360205260408120805460019290610f87908490611cc4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b038681169182179092559151849391871691600080516020611dcc83398151915291a4505050565b6008546001600160a01b031633146108705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610566565b8051610a7290600e9060208401906117ce565b6000818152600260205260408120546001600160a01b0316806104335760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610566565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061110082610733565b9050600082815260046020908152604080832080546001600160a01b03191690556001600160a01b038416835260039091528120805460019290611145908490611cad565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b03841690600080516020611dcc833981519152908390a45050565b600d80546001600160a01b0319166001600160a01b038416908117909155600090815260036020526040812080548392906111c9908490611cc4565b90915550600190505b6111dd826001611cc4565b8110156106075760405181906001600160a01b03851690600090600080516020611dcc833981519152908290a48061121481611cdc565b9150506111d2565b816001600160a01b0316836001600160a01b03160361127d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610566565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6112f5848484610e3d565b611301848484846116cd565b610aa85760405162461bcd60e51b815260040161056690611cf5565b6060600e805461044890611b98565b6060816000036113535750506040805180820190915260018152600360fc1b602082015290565b8160005b811561137d578061136781611cdc565b91506113769050600a83611c6a565b9150611357565b60008167ffffffffffffffff811115611398576113986119d8565b6040519080825280601f01601f1916602001820160405280156113c2576020820181803683370190505b5090505b8415610e35576113d7600183611cad565b91506113e4600a86611d47565b6113ef906030611cc4565b60f81b81838151811061140457611404611d5b565b60200101906001600160f81b031916908160001a905350611426600a86611c6a565b94506113c6565b6001600160a01b0382166114835760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610566565b61148c81611672565b156114d95760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610566565b6001600160a01b0382166000908152600360205260408120805460019290611502908490611cc4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020611dcc833981519152908290a45050565b6001600160a01b0382166115d55760405162461bcd60e51b815260206004820152604260248201527f45495032393831416c6c546f6b656e3a2043616e6e6f742073657420726f796160448201527f6c74792072656365697069656e7420746f20746865207a65726f206164647265606482015261737360f01b608482015260a401610566565b612710811061164c5760405162461bcd60e51b815260206004820152603a60248201527f45495032393831416c6c546f6b656e3a2043616e6e6f742073657420726f796160448201527f6c74792070657263656e746167652061626f76652031303030300000000000006064820152608401610566565b600680546001600160a01b0319166001600160a01b039390931692909217909155600755565b600854600090600160a01b900460ff16156116ae576000821180156116995750600a548211155b156116a657506001919050565b506000919050565b6000828152600260205260409020546001600160a01b03161515610433565b60006001600160a01b0384163b156117c357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611711903390899088908890600401611d71565b6020604051808303816000875af192505050801561174c575060408051601f3d908101601f1916820190925261174991810190611dae565b60015b6117a9573d80801561177a576040519150601f19603f3d011682016040523d82523d6000602084013e61177f565b606091505b5080516000036117a15760405162461bcd60e51b815260040161056690611cf5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610e35565b506001949350505050565b8280546117da90611b98565b90600052602060002090601f0160209004810192826117fc5760008555611842565b82601f1061181557805160ff1916838001178555611842565b82800160010185558215611842579182015b82811115611842578251825591602001919060010190611827565b5061184e929150611852565b5090565b5b8082111561184e5760008155600101611853565b6001600160e01b03198116811461073057600080fd5b60006020828403121561188f57600080fd5b8135610b0e81611867565b60005b838110156118b557818101518382015260200161189d565b83811115610aa85750506000910152565b600081518084526118de81602086016020860161189a565b601f01601f19169290920160200192915050565b602081526000610b0e60208301846118c6565b60006020828403121561191757600080fd5b5035919050565b80356001600160a01b03811681146107d357600080fd5b6000806040838503121561194857600080fd5b6119518361191e565b946020939093013593505050565b60008060006060848603121561197457600080fd5b61197d8461191e565b925061198b6020850161191e565b9150604084013590509250925092565b600080604083850312156119ae57600080fd5b50508035926020909101359150565b6000602082840312156119cf57600080fd5b610b0e8261191e565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611a0957611a096119d8565b604051601f8501601f19908116603f01168101908282118183101715611a3157611a316119d8565b81604052809350858152868686011115611a4a57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611a7657600080fd5b813567ffffffffffffffff811115611a8d57600080fd5b8201601f81018413611a9e57600080fd5b610e35848235602084016119ee565b60008060408385031215611ac057600080fd5b611ac98361191e565b915060208301358015158114611ade57600080fd5b809150509250929050565b60008060008060808587031215611aff57600080fd5b611b088561191e565b9350611b166020860161191e565b925060408501359150606085013567ffffffffffffffff811115611b3957600080fd5b8501601f81018713611b4a57600080fd5b611b59878235602084016119ee565b91505092959194509250565b60008060408385031215611b7857600080fd5b611b818361191e565b9150611b8f6020840161191e565b90509250929050565b600181811c90821680611bac57607f821691505b602082108103611bcc57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611c4f57611c4f611c1f565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611c7957611c79611c54565b500490565b60008351611c9081846020880161189a565b835190830190611ca481836020880161189a565b01949350505050565b600082821015611cbf57611cbf611c1f565b500390565b60008219821115611cd757611cd7611c1f565b500190565b600060018201611cee57611cee611c1f565b5060010190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082611d5657611d56611c54565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611da4908301846118c6565b9695505050505050565b600060208284031215611dc057600080fd5b8151610b0e8161186756feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d761a847dd148538297bd9b091b74118af4257597b24703c1ef87c8dd7798e0364736f6c634300080e0033

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

000000000000000000000000d2839e6d35efae479bcc932fe2779f97a24177af00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000072dbe00de00edf158aebee2c82b7e2f19a8c19a8000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : royaltyRecipient (address): 0xd2839E6d35EfAe479Bcc932fe2779f97a24177AF
Arg [1] : royaltyPercentage (uint256): 1000
Arg [2] : admin (address): 0x72DBe00dE00eDF158AEbEE2c82B7E2f19A8c19a8
Arg [3] : num (uint256): 12
Arg [4] : time (uint256): 0

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000d2839e6d35efae479bcc932fe2779f97a24177af
Arg [1] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [2] : 00000000000000000000000072dbe00de00edf158aebee2c82b7e2f19a8c19a8
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.