ETH Price: $2,594.97 (-2.70%)
Gas: 1 Gwei

Token

GoblinTownTattoo (GOBTAT)
 

Overview

Max Total Supply

71 GOBTAT

Holders

55

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
1 GOBTAT
0x649fafbdb262b29b4dc6836c4d88cf701e676004
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
GoblinTownTattoo

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 7500 runs

Other Settings:
default evmVersion
File 1 of 18 : GoblinTownTattoo.sol
pragma solidity ^0.8.0;

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

import "@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol";
import "@rarible/royalties/contracts/LibRoyaltiesV2.sol";
import "@rarible/royalties/contracts/LibPart.sol";

contract GoblinTownTattoo is ERC721, ERC721Enumerable, Ownable, RoyaltiesV2Impl {
    bool public saleIsActive = false;
    string private _baseURIextended;

    bool public isAllowListActive = false;
    uint256 public constant MAX_SUPPLY = 1000;
    uint256 public constant MAX_PUBLIC_MINT = 1;
    uint256 public constant PRICE_PER_TOKEN = 0.1 ether;

    mapping(address => uint8) private _allowList;

    address public artist;

    constructor(address artist_) ERC721("GoblinTownTattoo", "GOBTAT") {
        artist = artist_;

        _baseURIextended = "https://goblintowntattoo.com/meta/";
    }

    function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
        isAllowListActive = _isAllowListActive;
    }

    function setAllowList(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
            _allowList[addresses[i]] = numAllowedToMint;
        }
    }

    function numAvailableToMint(address addr) external view returns (uint8) {
        return _allowList[addr];
    }

    function mintAllowList(uint8 numberOfTokens, string calldata email) external payable {
        uint256 ts = totalSupply();
        require(isAllowListActive, "Allow list is not active");
        require(numberOfTokens <= _allowList[msg.sender], "Exceeded max available to purchase");
        require(ts + numberOfTokens <= MAX_SUPPLY, "Purchase would exceed max tokens");
        require(balanceOf(msg.sender) < MAX_PUBLIC_MINT, "Balance exceeded max token purchase");
        require(PRICE_PER_TOKEN * numberOfTokens == msg.value, "Ether value sent is not correct");

        _allowList[msg.sender] -= numberOfTokens;
        for (uint256 i = 0; i < numberOfTokens; i++) {
            _safeMint(msg.sender, ts + i);
            _setRoyalties(ts + 1, payable (artist), 1000);
            emit MintedFromAllowedList(msg.sender, ts + 1, email);
        }
    }

    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function setRoyalties(
        uint256 _tokenId,
        address payable _royaltiesReceipientAddress,
        uint96 _percentageBasisPoints
    ) external onlyOwner {
        _setRoyalties(_tokenId, _royaltiesReceipientAddress, _percentageBasisPoints);
    }

    function _setRoyalties(
        uint256 _tokenId,
        address payable _royaltiesReceipientAddress,
        uint96 _percentageBasisPoints
    ) internal {
        LibPart.Part[] memory _royalties = new LibPart.Part[](1);
        _royalties[0].value = _percentageBasisPoints;
        _royalties[0].account = _royaltiesReceipientAddress;
        _saveRoyalties(_tokenId, _royalties);
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
        if (interfaceId == LibRoyaltiesV2._INTERFACE_ID_ROYALTIES) {
            return true;
        }
        return super.supportsInterface(interfaceId);
    }

    function setBaseURI(string memory baseURI_) external onlyOwner() {
        _baseURIextended = baseURI_;
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return _baseURIextended;
    }
    function reserve(uint256 n, address receiver, string calldata email) public onlyOwner {
      uint supply = totalSupply();
      uint i;
      for (i = 0; i < n; i++) {
          _safeMint(receiver, supply + i);
          _setRoyalties(supply + i, payable (artist), 1000);
          emit MintedFromReserve(receiver, supply + i, email);
      }
    }

    function setSaleState(bool newState) public onlyOwner {
        saleIsActive = newState;
    }

    function mint(uint numberOfTokens, string calldata email) public payable {
        uint256 ts = totalSupply();
        require(saleIsActive, "Sale must be active to mint tokens");
        require(numberOfTokens <= MAX_PUBLIC_MINT, "Exceeded max token purchase");
        require(balanceOf(msg.sender) < MAX_PUBLIC_MINT, "Balance exceeded max token purchase");
        require(ts + numberOfTokens <= MAX_SUPPLY, "Purchase would exceed max tokens");
        require(PRICE_PER_TOKEN * numberOfTokens == msg.value, "Ether value sent is not correct");

        for (uint256 i = 0; i < numberOfTokens; i++) {
            _safeMint(msg.sender, ts + i);
            _setRoyalties(ts + 1, payable (artist), 1000);
            emit MintedFromSale(msg.sender, ts + 1, email);
        }
    }

    function withdraw() public onlyOwner {
        uint balance = address(this).balance;
        payable(msg.sender).transfer(balance);
    }

    event MintedFromReserve(address indexed account, uint256 tokenId, string email);
    event MintedFromAllowedList(address indexed account, uint256 tokenId, string email);
    event MintedFromSale(address indexed account, uint256 tokenId, string email);
}

File 2 of 18 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

        _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 a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

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

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

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

    /**
     * @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 3 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 18 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 5 of 18 : RoyaltiesV2Impl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./AbstractRoyalties.sol";
import "../RoyaltiesV2.sol";

contract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 {

    function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) {
        return royalties[id];
    }

    function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) override internal {
        emit RoyaltiesSet(id, _royalties);
    }
}

File 6 of 18 : LibRoyaltiesV2.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library LibRoyaltiesV2 {
    /*
     * bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca
     */
    bytes4 constant _INTERFACE_ID_ROYALTIES = 0xcad96cca;
}

File 7 of 18 : LibPart.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library LibPart {
    bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)");

    struct Part {
        address payable account;
        uint96 value;
    }

    function hash(Part memory part) internal pure returns (bytes32) {
        return keccak256(abi.encode(TYPE_HASH, part.account, part.value));
    }
}

File 8 of 18 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 18 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 10 of 18 : 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 11 of 18 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [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

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

File 12 of 18 : 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 13 of 18 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 14 of 18 : 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 15 of 18 : 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 16 of 18 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 17 of 18 : AbstractRoyalties.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../LibPart.sol";

abstract contract AbstractRoyalties {
    mapping (uint256 => LibPart.Part[]) internal royalties;

    function _saveRoyalties(uint256 id, LibPart.Part[] memory _royalties) internal {
        uint256 totalValue;
        for (uint i = 0; i < _royalties.length; i++) {
            require(_royalties[i].account != address(0x0), "Recipient should be present");
            require(_royalties[i].value != 0, "Royalty value should be positive");
            totalValue += _royalties[i].value;
            royalties[id].push(_royalties[i]);
        }
        require(totalValue < 10000, "Royalty total value should be < 10000");
        _onRoyaltiesSet(id, _royalties);
    }

    function _updateAccount(uint256 _id, address _from, address _to) internal {
        uint length = royalties[_id].length;
        for(uint i = 0; i < length; i++) {
            if (royalties[_id][i].account == _from) {
                royalties[_id][i].account = payable (address(uint160(_to)));
            }
        }
    }

    function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) virtual internal;
}

File 18 of 18 : RoyaltiesV2.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./LibPart.sol";

interface RoyaltiesV2 {
    event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties);

    function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"artist_","type":"address"}],"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":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"email","type":"string"}],"name":"MintedFromAllowedList","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"email","type":"string"}],"name":"MintedFromReserve","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"email","type":"string"}],"name":"MintedFromSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"indexed":false,"internalType":"struct LibPart.Part[]","name":"royalties","type":"tuple[]"}],"name":"RoyaltiesSet","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":"MAX_PUBLIC_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_PER_TOKEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"uint256","name":"id","type":"uint256"}],"name":"getRaribleV2Royalties","outputs":[{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAllowListActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"string","name":"email","type":"string"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"numberOfTokens","type":"uint8"},{"internalType":"string","name":"email","type":"string"}],"name":"mintAllowList","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"numAvailableToMint","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"string","name":"email","type":"string"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint8","name":"numAllowedToMint","type":"uint8"}],"name":"setAllowList","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":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isAllowListActive","type":"bool"}],"name":"setIsAllowListActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address payable","name":"_royaltiesReceipientAddress","type":"address"},{"internalType":"uint96","name":"_percentageBasisPoints","type":"uint96"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"newState","type":"bool"}],"name":"setSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600c805460ff19908116909155600e805490911690553480156200002757600080fd5b5060405162003650380380620036508339810160408190526200004a9162000221565b604080518082018252601081526f476f626c696e546f776e546174746f6f60801b60208083019182528351808501909452600684526511d3d095105560d21b908401528151919291620000a0916000916200017b565b508051620000b69060019060208401906200017b565b505050620000d3620000cd6200012560201b60201c565b62000129565b601080546001600160a01b0319166001600160a01b038316179055604080516060810190915260228082526200362e602083013980516200011d91600d916020909101906200017b565b50506200028e565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001899062000251565b90600052602060002090601f016020900481019282620001ad5760008555620001f8565b82601f10620001c857805160ff1916838001178555620001f8565b82800160010185558215620001f8579182015b82811115620001f8578251825591602001919060010190620001db565b50620002069291506200020a565b5090565b5b808211156200020657600081556001016200020b565b60006020828403121562000233578081fd5b81516001600160a01b03811681146200024a578182fd5b9392505050565b6002810460018216806200026657607f821691505b602082108114156200028857634e487b7160e01b600052602260045260246000fd5b50919050565b613390806200029e6000396000f3fe60806040526004361061024f5760003560e01c806370a0823111610138578063a22cb465116100b0578063c87b56dd1161007f578063e985e9c511610064578063e985e9c51461063a578063eb8d24441461065a578063f2fde38b1461066f5761024f565b8063c87b56dd146105ed578063cad96cca1461060d5761024f565b8063a22cb46514610560578063b88d4fde14610580578063c04a2836146105a0578063c4e37095146105cd5761024f565b80638295784d116101075780638da5cb5b116100ec5780638da5cb5b1461051657806395d89b411461052b578063989057ec146105405761024f565b80638295784d146104e1578063833b9499146105015761024f565b806370a0823114610479578063715018a614610499578063718bc4af146104ae57806377097fc8146104ce5761024f565b806332cb6b0c116101cb5780634f6ccce71161019a5780636352211e1161017f5780636352211e1461043157806365f13097146104515780636ca917eb146104665761024f565b80634f6ccce7146103f157806355f804b3146104115761024f565b806332cb6b0c146103925780633ccfd60b146103a757806342842e0e146103bc57806343bc1612146103dc5761024f565b8063143094db1161022257806323b872dd1161020757806323b872dd1461033d57806329fc6bae1461035d5780632f745c59146103725761024f565b8063143094db146102fb57806318160ddd1461031b5761024f565b806301ffc9a71461025457806306fdde031461028a578063081812fc146102ac578063095ea7b3146102d9575b600080fd5b34801561026057600080fd5b5061027461026f366004612575565b61068f565b6040516102819190612852565b60405180910390f35b34801561029657600080fd5b5061029f6106f4565b604051610281919061285d565b3480156102b857600080fd5b506102cc6102c73660046125f3565b610786565b60405161028191906127ef565b3480156102e557600080fd5b506102f96102f43660046124b2565b6107d2565b005b34801561030757600080fd5b506102f961031636600461260b565b61086a565b34801561032757600080fd5b506103306108b4565b6040516102819190613118565b34801561034957600080fd5b506102f96103583660046123c1565b6108ba565b34801561036957600080fd5b506102746108f2565b34801561037e57600080fd5b5061033061038d3660046124b2565b6108fb565b34801561039e57600080fd5b5061033061094d565b3480156103b357600080fd5b506102f9610953565b3480156103c857600080fd5b506102f96103d73660046123c1565b6109c5565b3480156103e857600080fd5b506102cc6109e0565b3480156103fd57600080fd5b5061033061040c3660046125f3565b6109ef565b34801561041d57600080fd5b506102f961042c3660046125ad565b610a4a565b34801561043d57600080fd5b506102cc61044c3660046125f3565b610a9c565b34801561045d57600080fd5b50610330610ad1565b6102f9610474366004612700565b610ad6565b34801561048557600080fd5b5061033061049436600461236d565b610ca0565b3480156104a557600080fd5b506102f9610ce4565b3480156104ba57600080fd5b506102f96104c936600461255b565b610d2f565b6102f96104dc3660046126b6565b610d81565b3480156104ed57600080fd5b506102f96104fc3660046124dd565b610ed3565b34801561050d57600080fd5b50610330610f9a565b34801561052257600080fd5b506102cc610fa6565b34801561053757600080fd5b5061029f610fb5565b34801561054c57600080fd5b506102f961055b36600461265c565b610fc4565b34801561056c57600080fd5b506102f961057b36600461247e565b61109d565b34801561058c57600080fd5b506102f961059b366004612401565b6110af565b3480156105ac57600080fd5b506105c06105bb36600461236d565b6110e8565b6040516102819190613170565b3480156105d957600080fd5b506102f96105e836600461255b565b611106565b3480156105f957600080fd5b5061029f6106083660046125f3565b611158565b34801561061957600080fd5b5061062d6106283660046125f3565b6111db565b604051610281919061283f565b34801561064657600080fd5b50610274610655366004612389565b611280565b34801561066657600080fd5b506102746112ae565b34801561067b57600080fd5b506102f961068a36600461236d565b6112b7565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fcad96cca0000000000000000000000000000000000000000000000000000000014156106e3575060016106ef565b6106ec82611328565b90505b919050565b6060600080546107039061324d565b80601f016020809104026020016040519081016040528092919081815260200182805461072f9061324d565b801561077c5780601f106107515761010080835404028352916020019161077c565b820191906000526020600020905b81548152906001019060200180831161075f57829003601f168201915b5050505050905090565b60006107918261137e565b6107b65760405162461bcd60e51b81526004016107ad90612d56565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006107dd82610a9c565b9050806001600160a01b0316836001600160a01b031614156108115760405162461bcd60e51b81526004016107ad90612ea2565b806001600160a01b031661082361139b565b6001600160a01b0316148061083f575061083f8161065561139b565b61085b5760405162461bcd60e51b81526004016107ad90612c0a565b610865838361139f565b505050565b61087261139b565b6001600160a01b0316610883610fa6565b6001600160a01b0316146108a95760405162461bcd60e51b81526004016107ad90612db3565b610865838383611425565b60085490565b6108cb6108c561139b565b826114ed565b6108e75760405162461bcd60e51b81526004016107ad90612f93565b610865838383611572565b600e5460ff1681565b600061090683610ca0565b82106109245760405162461bcd60e51b81526004016107ad90612870565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6103e881565b61095b61139b565b6001600160a01b031661096c610fa6565b6001600160a01b0316146109925760405162461bcd60e51b81526004016107ad90612db3565b6040514790339082156108fc029083906000818181858888f193505050501580156109c1573d6000803e3d6000fd5b5050565b610865838383604051806020016040528060008152506110af565b6010546001600160a01b031681565b60006109f96108b4565b8210610a175760405162461bcd60e51b81526004016107ad90612ff0565b60088281548110610a3857634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b610a5261139b565b6001600160a01b0316610a63610fa6565b6001600160a01b031614610a895760405162461bcd60e51b81526004016107ad90612db3565b80516109c190600d9060208401906121e5565b6000818152600260205260408120546001600160a01b0316806106ec5760405162461bcd60e51b81526004016107ad90612cc4565b600181565b6000610ae06108b4565b600e5490915060ff16610b055760405162461bcd60e51b81526004016107ad906130aa565b336000908152600f602052604090205460ff9081169085161115610b3b5760405162461bcd60e51b81526004016107ad90612f36565b6103e8610b4b60ff86168361317e565b1115610b695760405162461bcd60e51b81526004016107ad90612987565b6001610b7433610ca0565b10610b915760405162461bcd60e51b81526004016107ad90612a50565b34610ba760ff861667016345785d8a00006131aa565b14610bc45760405162461bcd60e51b81526004016107ad90612b41565b336000908152600f602052604081208054869290610be690849060ff166131fe565b92506101000a81548160ff021916908360ff16021790555060005b8460ff16811015610c9957610c1f33610c1a838561317e565b6116bd565b610c41610c2d83600161317e565b6010546001600160a01b03166103e8611425565b337f61c9ae49508b49483ab7cda3840854440a3ed430b26956dba385960908c0382a610c6e84600161317e565b8686604051610c7f9392919061313a565b60405180910390a280610c9181613288565b915050610c01565b5050505050565b60006001600160a01b038216610cc85760405162461bcd60e51b81526004016107ad90612c67565b506001600160a01b031660009081526003602052604090205490565b610cec61139b565b6001600160a01b0316610cfd610fa6565b6001600160a01b031614610d235760405162461bcd60e51b81526004016107ad90612db3565b610d2d60006116d7565b565b610d3761139b565b6001600160a01b0316610d48610fa6565b6001600160a01b031614610d6e5760405162461bcd60e51b81526004016107ad90612db3565b600e805460ff1916911515919091179055565b6000610d8b6108b4565b600c5490915060ff16610db05760405162461bcd60e51b81526004016107ad90612e45565b6001841115610dd15760405162461bcd60e51b81526004016107ad90612eff565b6001610ddc33610ca0565b10610df95760405162461bcd60e51b81526004016107ad90612a50565b6103e8610e06858361317e565b1115610e245760405162461bcd60e51b81526004016107ad90612987565b34610e378567016345785d8a00006131aa565b14610e545760405162461bcd60e51b81526004016107ad90612b41565b60005b84811015610c9957610e6d33610c1a838561317e565b610e7b610c2d83600161317e565b337fccfc774ca011b437e2a599c2c5334bc5648fdb5ac02e187ab4e37662b6adfcc5610ea884600161317e565b8686604051610eb99392919061313a565b60405180910390a280610ecb81613288565b915050610e57565b610edb61139b565b6001600160a01b0316610eec610fa6565b6001600160a01b031614610f125760405162461bcd60e51b81526004016107ad90612db3565b60005b82811015610f945781600f6000868685818110610f4257634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610f57919061236d565b6001600160a01b031681526020810191909152604001600020805460ff191660ff9290921691909117905580610f8c81613288565b915050610f15565b50505050565b67016345785d8a000081565b600a546001600160a01b031690565b6060600180546107039061324d565b610fcc61139b565b6001600160a01b0316610fdd610fa6565b6001600160a01b0316146110035760405162461bcd60e51b81526004016107ad90612db3565b600061100d6108b4565b905060005b858110156110955761102885610c1a838561317e565b611035610c2d828461317e565b6001600160a01b0385167fabc313616656bfbf467e895a1434cf662e76ac69259e95aa2d5c15c07eacf44661106a838561317e565b868660405161107b9392919061313a565b60405180910390a28061108d81613288565b915050611012565b505050505050565b6109c16110a861139b565b8383611741565b6110c06110ba61139b565b836114ed565b6110dc5760405162461bcd60e51b81526004016107ad90612f93565b610f94848484846117e4565b6001600160a01b03166000908152600f602052604090205460ff1690565b61110e61139b565b6001600160a01b031661111f610fa6565b6001600160a01b0316146111455760405162461bcd60e51b81526004016107ad90612db3565b600c805460ff1916911515919091179055565b60606111638261137e565b61117f5760405162461bcd60e51b81526004016107ad90612de8565b6000611189611817565b905060008151116111a957604051806020016040528060008152506111d4565b806111b384611826565b6040516020016111c49291906127c0565b6040516020818303038152906040525b9392505050565b6060600b6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561127557600084815260209081902060408051808201909152908401546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681830152825260019092019101611210565b505050509050919050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600c5460ff1681565b6112bf61139b565b6001600160a01b03166112d0610fa6565b6001600160a01b0316146112f65760405162461bcd60e51b81526004016107ad90612db3565b6001600160a01b03811661131c5760405162461bcd60e51b81526004016107ad9061292a565b611325816116d7565b50565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d630000000000000000000000000000000000000000000000000000000014806106ec57506106ec82611975565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906113ec82610a9c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b604080516001808252818301909252600091816020015b611444612269565b81526020019060019003908161143c579050509050818160008151811061147b57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff168152505082816000815181106114cb57634e487b7160e01b600052603260045260246000fd5b60209081029190910101516001600160a01b039091169052610f948482611a17565b60006114f88261137e565b6115145760405162461bcd60e51b81526004016107ad90612b78565b600061151f83610a9c565b9050806001600160a01b0316846001600160a01b0316148061155a5750836001600160a01b031661154f84610786565b6001600160a01b0316145b8061156a575061156a8185611280565b949350505050565b826001600160a01b031661158582610a9c565b6001600160a01b0316146115ab5760405162461bcd60e51b81526004016107ad906129bc565b6001600160a01b0382166115d15760405162461bcd60e51b81526004016107ad90612aad565b6115dc838383611c1d565b6115e760008261139f565b6001600160a01b03831660009081526003602052604081208054600192906116109084906131e7565b90915550506001600160a01b038216600090815260036020526040812080546001929061163e90849061317e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610865838383610865565b6109c1828260405180602001604052806000815250611c28565b600a80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156117735760405162461bcd60e51b81526004016107ad90612b0a565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906117d7908590612852565b60405180910390a3505050565b6117ef848484611572565b6117fb84848484611c5b565b610f945760405162461bcd60e51b81526004016107ad906128cd565b6060600d80546107039061324d565b606081611867575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526106ef565b8160005b8115611891578061187b81613288565b915061188a9050600a83613196565b915061186b565b60008167ffffffffffffffff8111156118ba57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156118e4576020820181803683370190505b5090505b841561156a576118f96001836131e7565b9150611906600a866132c1565b61191190603061317e565b60f81b81838151811061193457634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061196e600a86613196565b94506118e8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480611a0857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806106ec57506106ec82611da7565b6000805b8251811015611bf15760006001600160a01b0316838281518110611a4f57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b03161415611a825760405162461bcd60e51b81526004016107ad906130e1565b828181518110611aa257634e487b7160e01b600052603260045260246000fd5b6020026020010151602001516bffffffffffffffffffffffff1660001415611adc5760405162461bcd60e51b81526004016107ad90612bd5565b828181518110611afc57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001516bffffffffffffffffffffffff1682611b21919061317e565b9150600b6000858152602001908152602001600020838281518110611b5657634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825460018101845560009384529282902081519301805491909201516bffffffffffffffffffffffff1674010000000000000000000000000000000000000000026001600160a01b039384167fffffffffffffffffffffffff00000000000000000000000000000000000000009092169190911790921691909117905580611be981613288565b915050611a1b565b506127108110611c135760405162461bcd60e51b81526004016107ad9061304d565b6108658383611df1565b610865838383611e2e565b611c328383611eb7565b611c3f6000848484611c5b565b6108655760405162461bcd60e51b81526004016107ad906128cd565b6000611c6f846001600160a01b0316611fb6565b15611d9c57836001600160a01b031663150b7a02611c8b61139b565b8786866040518563ffffffff1660e01b8152600401611cad9493929190612803565b602060405180830381600087803b158015611cc757600080fd5b505af1925050508015611cf7575060408051601f3d908101601f19168201909252611cf491810190612591565b60015b611d51573d808015611d25576040519150601f19603f3d011682016040523d82523d6000602084013e611d2a565b606091505b508051611d495760405162461bcd60e51b81526004016107ad906128cd565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061156a565b506001949350505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b7f3fa96d7b6bcbfe71ef171666d84db3cf52fa2d1c8afdb1cc8e486177f208b7df8282604051611e22929190613121565b60405180910390a15050565b611e39838383610865565b6001600160a01b038316611e5557611e5081611fe7565b611e78565b816001600160a01b0316836001600160a01b031614611e7857611e78838261202b565b6001600160a01b038216611e9457611e8f816120c8565b610865565b826001600160a01b0316826001600160a01b0316146108655761086582826121a1565b6001600160a01b038216611edd5760405162461bcd60e51b81526004016107ad90612d21565b611ee68161137e565b15611f035760405162461bcd60e51b81526004016107ad90612a19565b611f0f60008383611c1d565b6001600160a01b0382166000908152600360205260408120805460019290611f3890849061317e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46109c160008383610865565b600080826001600160a01b0316803b806020016040519081016040528181526000908060200190933c511192915050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161203884610ca0565b61204291906131e7565b600083815260076020526040902054909150808214612095576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906120da906001906131e7565b6000838152600960205260408120546008805493945090928490811061211057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061213f57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061218557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006121ac83610ca0565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8280546121f19061324d565b90600052602060002090601f0160209004810192826122135760008555612259565b82601f1061222c57805160ff1916838001178555612259565b82800160010185558215612259579182015b8281111561225957825182559160200191906001019061223e565b50612265929150612280565b5090565b604080518082019091526000808252602082015290565b5b808211156122655760008155600101612281565b600067ffffffffffffffff808411156122b0576122b0613301565b6040516020601f19601f87011682010181811083821117156122d4576122d4613301565b6040528481529150818385018610156122ec57600080fd5b8484602083013760006020868301015250509392505050565b803580151581146106ef57600080fd5b60008083601f840112612326578182fd5b50813567ffffffffffffffff81111561233d578182fd5b60208301915083602082850101111561235557600080fd5b9250929050565b803560ff811681146106ef57600080fd5b60006020828403121561237e578081fd5b81356111d481613317565b6000806040838503121561239b578081fd5b82356123a681613317565b915060208301356123b681613317565b809150509250929050565b6000806000606084860312156123d5578081fd5b83356123e081613317565b925060208401356123f081613317565b929592945050506040919091013590565b60008060008060808587031215612416578081fd5b843561242181613317565b9350602085013561243181613317565b925060408501359150606085013567ffffffffffffffff811115612453578182fd5b8501601f81018713612463578182fd5b61247287823560208401612295565b91505092959194509250565b60008060408385031215612490578182fd5b823561249b81613317565b91506124a960208401612305565b90509250929050565b600080604083850312156124c4578182fd5b82356124cf81613317565b946020939093013593505050565b6000806000604084860312156124f1578283fd5b833567ffffffffffffffff80821115612508578485fd5b818601915086601f83011261251b578485fd5b813581811115612529578586fd5b876020808302850101111561253c578586fd5b602092830195509350612552918601905061235c565b90509250925092565b60006020828403121561256c578081fd5b6111d482612305565b600060208284031215612586578081fd5b81356111d48161332c565b6000602082840312156125a2578081fd5b81516111d48161332c565b6000602082840312156125be578081fd5b813567ffffffffffffffff8111156125d4578182fd5b8201601f810184136125e4578182fd5b61156a84823560208401612295565b600060208284031215612604578081fd5b5035919050565b60008060006060848603121561261f578081fd5b83359250602084013561263181613317565b915060408401356bffffffffffffffffffffffff81168114612651578182fd5b809150509250925092565b60008060008060608587031215612671578182fd5b84359350602085013561268381613317565b9250604085013567ffffffffffffffff81111561269e578283fd5b6126aa87828801612315565b95989497509550505050565b6000806000604084860312156126ca578081fd5b83359250602084013567ffffffffffffffff8111156126e7578182fd5b6126f386828701612315565b9497909650939450505050565b600080600060408486031215612714578081fd5b61271d8461235c565b9250602084013567ffffffffffffffff8111156126e7578182fd5b6000815180845260208085019450808401835b8381101561278957815180516001600160a01b031688528301516bffffffffffffffffffffffff16838801526040909601959082019060010161274b565b509495945050505050565b600081518084526127ac816020860160208601613221565b601f01601f19169290920160200192915050565b600083516127d2818460208801613221565b8351908301906127e6818360208801613221565b01949350505050565b6001600160a01b0391909116815260200190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526128356080830184612794565b9695505050505050565b6000602082526111d46020830184612738565b901515815260200190565b6000602082526111d46020830184612794565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201527f74206f6620626f756e6473000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f507572636861736520776f756c6420657863656564206d617820746f6b656e73604082015260600190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201527f6f776e6572000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526023908201527f42616c616e6365206578636565646564206d617820746f6b656e20707572636860408201527f6173650000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252601f908201527f45746865722076616c75652073656e74206973206e6f7420636f727265637400604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b6020808252818101527f526f79616c74792076616c75652073686f756c6420626520706f736974697665604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560408201527f726f206164647265737300000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606082015260800190565b60208082526022908201527f53616c65206d7573742062652061637469766520746f206d696e7420746f6b6560408201527f6e73000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560408201527f7200000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f4578636565646564206d617820746f6b656e2070757263686173650000000000604082015260600190565b60208082526022908201527f4578636565646564206d617820617661696c61626c6520746f2070757263686160408201527f7365000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201527f7574206f6620626f756e64730000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f526f79616c747920746f74616c2076616c75652073686f756c64206265203c2060408201527f3130303030000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f416c6c6f77206c697374206973206e6f74206163746976650000000000000000604082015260600190565b6020808252601b908201527f526563697069656e742073686f756c642062652070726573656e740000000000604082015260600190565b90815260200190565b60008382526040602083015261156a6040830184612738565b60008482526040602083015282604083015282846060840137818301606090810191909152601f909201601f1916010192915050565b60ff91909116815260200190565b60008219821115613191576131916132d5565b500190565b6000826131a5576131a56132eb565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131e2576131e26132d5565b500290565b6000828210156131f9576131f96132d5565b500390565b600060ff821660ff841680821015613218576132186132d5565b90039392505050565b60005b8381101561323c578181015183820152602001613224565b83811115610f945750506000910152565b60028104600182168061326157607f821691505b6020821081141561328257634e487b7160e01b600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132ba576132ba6132d5565b5060010190565b6000826132d0576132d06132eb565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461132557600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461132557600080fdfea264697066735822122058578a5b45705baaa986be49efb3339c73ef522253a260b9a827e75ac728b7d064736f6c6343000800003368747470733a2f2f676f626c696e746f776e746174746f6f2e636f6d2f6d6574612f00000000000000000000000040d0fe76d7c06a804ef1bf970539eae1202963f1

Deployed Bytecode

0x60806040526004361061024f5760003560e01c806370a0823111610138578063a22cb465116100b0578063c87b56dd1161007f578063e985e9c511610064578063e985e9c51461063a578063eb8d24441461065a578063f2fde38b1461066f5761024f565b8063c87b56dd146105ed578063cad96cca1461060d5761024f565b8063a22cb46514610560578063b88d4fde14610580578063c04a2836146105a0578063c4e37095146105cd5761024f565b80638295784d116101075780638da5cb5b116100ec5780638da5cb5b1461051657806395d89b411461052b578063989057ec146105405761024f565b80638295784d146104e1578063833b9499146105015761024f565b806370a0823114610479578063715018a614610499578063718bc4af146104ae57806377097fc8146104ce5761024f565b806332cb6b0c116101cb5780634f6ccce71161019a5780636352211e1161017f5780636352211e1461043157806365f13097146104515780636ca917eb146104665761024f565b80634f6ccce7146103f157806355f804b3146104115761024f565b806332cb6b0c146103925780633ccfd60b146103a757806342842e0e146103bc57806343bc1612146103dc5761024f565b8063143094db1161022257806323b872dd1161020757806323b872dd1461033d57806329fc6bae1461035d5780632f745c59146103725761024f565b8063143094db146102fb57806318160ddd1461031b5761024f565b806301ffc9a71461025457806306fdde031461028a578063081812fc146102ac578063095ea7b3146102d9575b600080fd5b34801561026057600080fd5b5061027461026f366004612575565b61068f565b6040516102819190612852565b60405180910390f35b34801561029657600080fd5b5061029f6106f4565b604051610281919061285d565b3480156102b857600080fd5b506102cc6102c73660046125f3565b610786565b60405161028191906127ef565b3480156102e557600080fd5b506102f96102f43660046124b2565b6107d2565b005b34801561030757600080fd5b506102f961031636600461260b565b61086a565b34801561032757600080fd5b506103306108b4565b6040516102819190613118565b34801561034957600080fd5b506102f96103583660046123c1565b6108ba565b34801561036957600080fd5b506102746108f2565b34801561037e57600080fd5b5061033061038d3660046124b2565b6108fb565b34801561039e57600080fd5b5061033061094d565b3480156103b357600080fd5b506102f9610953565b3480156103c857600080fd5b506102f96103d73660046123c1565b6109c5565b3480156103e857600080fd5b506102cc6109e0565b3480156103fd57600080fd5b5061033061040c3660046125f3565b6109ef565b34801561041d57600080fd5b506102f961042c3660046125ad565b610a4a565b34801561043d57600080fd5b506102cc61044c3660046125f3565b610a9c565b34801561045d57600080fd5b50610330610ad1565b6102f9610474366004612700565b610ad6565b34801561048557600080fd5b5061033061049436600461236d565b610ca0565b3480156104a557600080fd5b506102f9610ce4565b3480156104ba57600080fd5b506102f96104c936600461255b565b610d2f565b6102f96104dc3660046126b6565b610d81565b3480156104ed57600080fd5b506102f96104fc3660046124dd565b610ed3565b34801561050d57600080fd5b50610330610f9a565b34801561052257600080fd5b506102cc610fa6565b34801561053757600080fd5b5061029f610fb5565b34801561054c57600080fd5b506102f961055b36600461265c565b610fc4565b34801561056c57600080fd5b506102f961057b36600461247e565b61109d565b34801561058c57600080fd5b506102f961059b366004612401565b6110af565b3480156105ac57600080fd5b506105c06105bb36600461236d565b6110e8565b6040516102819190613170565b3480156105d957600080fd5b506102f96105e836600461255b565b611106565b3480156105f957600080fd5b5061029f6106083660046125f3565b611158565b34801561061957600080fd5b5061062d6106283660046125f3565b6111db565b604051610281919061283f565b34801561064657600080fd5b50610274610655366004612389565b611280565b34801561066657600080fd5b506102746112ae565b34801561067b57600080fd5b506102f961068a36600461236d565b6112b7565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fcad96cca0000000000000000000000000000000000000000000000000000000014156106e3575060016106ef565b6106ec82611328565b90505b919050565b6060600080546107039061324d565b80601f016020809104026020016040519081016040528092919081815260200182805461072f9061324d565b801561077c5780601f106107515761010080835404028352916020019161077c565b820191906000526020600020905b81548152906001019060200180831161075f57829003601f168201915b5050505050905090565b60006107918261137e565b6107b65760405162461bcd60e51b81526004016107ad90612d56565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006107dd82610a9c565b9050806001600160a01b0316836001600160a01b031614156108115760405162461bcd60e51b81526004016107ad90612ea2565b806001600160a01b031661082361139b565b6001600160a01b0316148061083f575061083f8161065561139b565b61085b5760405162461bcd60e51b81526004016107ad90612c0a565b610865838361139f565b505050565b61087261139b565b6001600160a01b0316610883610fa6565b6001600160a01b0316146108a95760405162461bcd60e51b81526004016107ad90612db3565b610865838383611425565b60085490565b6108cb6108c561139b565b826114ed565b6108e75760405162461bcd60e51b81526004016107ad90612f93565b610865838383611572565b600e5460ff1681565b600061090683610ca0565b82106109245760405162461bcd60e51b81526004016107ad90612870565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6103e881565b61095b61139b565b6001600160a01b031661096c610fa6565b6001600160a01b0316146109925760405162461bcd60e51b81526004016107ad90612db3565b6040514790339082156108fc029083906000818181858888f193505050501580156109c1573d6000803e3d6000fd5b5050565b610865838383604051806020016040528060008152506110af565b6010546001600160a01b031681565b60006109f96108b4565b8210610a175760405162461bcd60e51b81526004016107ad90612ff0565b60088281548110610a3857634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b610a5261139b565b6001600160a01b0316610a63610fa6565b6001600160a01b031614610a895760405162461bcd60e51b81526004016107ad90612db3565b80516109c190600d9060208401906121e5565b6000818152600260205260408120546001600160a01b0316806106ec5760405162461bcd60e51b81526004016107ad90612cc4565b600181565b6000610ae06108b4565b600e5490915060ff16610b055760405162461bcd60e51b81526004016107ad906130aa565b336000908152600f602052604090205460ff9081169085161115610b3b5760405162461bcd60e51b81526004016107ad90612f36565b6103e8610b4b60ff86168361317e565b1115610b695760405162461bcd60e51b81526004016107ad90612987565b6001610b7433610ca0565b10610b915760405162461bcd60e51b81526004016107ad90612a50565b34610ba760ff861667016345785d8a00006131aa565b14610bc45760405162461bcd60e51b81526004016107ad90612b41565b336000908152600f602052604081208054869290610be690849060ff166131fe565b92506101000a81548160ff021916908360ff16021790555060005b8460ff16811015610c9957610c1f33610c1a838561317e565b6116bd565b610c41610c2d83600161317e565b6010546001600160a01b03166103e8611425565b337f61c9ae49508b49483ab7cda3840854440a3ed430b26956dba385960908c0382a610c6e84600161317e565b8686604051610c7f9392919061313a565b60405180910390a280610c9181613288565b915050610c01565b5050505050565b60006001600160a01b038216610cc85760405162461bcd60e51b81526004016107ad90612c67565b506001600160a01b031660009081526003602052604090205490565b610cec61139b565b6001600160a01b0316610cfd610fa6565b6001600160a01b031614610d235760405162461bcd60e51b81526004016107ad90612db3565b610d2d60006116d7565b565b610d3761139b565b6001600160a01b0316610d48610fa6565b6001600160a01b031614610d6e5760405162461bcd60e51b81526004016107ad90612db3565b600e805460ff1916911515919091179055565b6000610d8b6108b4565b600c5490915060ff16610db05760405162461bcd60e51b81526004016107ad90612e45565b6001841115610dd15760405162461bcd60e51b81526004016107ad90612eff565b6001610ddc33610ca0565b10610df95760405162461bcd60e51b81526004016107ad90612a50565b6103e8610e06858361317e565b1115610e245760405162461bcd60e51b81526004016107ad90612987565b34610e378567016345785d8a00006131aa565b14610e545760405162461bcd60e51b81526004016107ad90612b41565b60005b84811015610c9957610e6d33610c1a838561317e565b610e7b610c2d83600161317e565b337fccfc774ca011b437e2a599c2c5334bc5648fdb5ac02e187ab4e37662b6adfcc5610ea884600161317e565b8686604051610eb99392919061313a565b60405180910390a280610ecb81613288565b915050610e57565b610edb61139b565b6001600160a01b0316610eec610fa6565b6001600160a01b031614610f125760405162461bcd60e51b81526004016107ad90612db3565b60005b82811015610f945781600f6000868685818110610f4257634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610f57919061236d565b6001600160a01b031681526020810191909152604001600020805460ff191660ff9290921691909117905580610f8c81613288565b915050610f15565b50505050565b67016345785d8a000081565b600a546001600160a01b031690565b6060600180546107039061324d565b610fcc61139b565b6001600160a01b0316610fdd610fa6565b6001600160a01b0316146110035760405162461bcd60e51b81526004016107ad90612db3565b600061100d6108b4565b905060005b858110156110955761102885610c1a838561317e565b611035610c2d828461317e565b6001600160a01b0385167fabc313616656bfbf467e895a1434cf662e76ac69259e95aa2d5c15c07eacf44661106a838561317e565b868660405161107b9392919061313a565b60405180910390a28061108d81613288565b915050611012565b505050505050565b6109c16110a861139b565b8383611741565b6110c06110ba61139b565b836114ed565b6110dc5760405162461bcd60e51b81526004016107ad90612f93565b610f94848484846117e4565b6001600160a01b03166000908152600f602052604090205460ff1690565b61110e61139b565b6001600160a01b031661111f610fa6565b6001600160a01b0316146111455760405162461bcd60e51b81526004016107ad90612db3565b600c805460ff1916911515919091179055565b60606111638261137e565b61117f5760405162461bcd60e51b81526004016107ad90612de8565b6000611189611817565b905060008151116111a957604051806020016040528060008152506111d4565b806111b384611826565b6040516020016111c49291906127c0565b6040516020818303038152906040525b9392505050565b6060600b6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561127557600084815260209081902060408051808201909152908401546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681830152825260019092019101611210565b505050509050919050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600c5460ff1681565b6112bf61139b565b6001600160a01b03166112d0610fa6565b6001600160a01b0316146112f65760405162461bcd60e51b81526004016107ad90612db3565b6001600160a01b03811661131c5760405162461bcd60e51b81526004016107ad9061292a565b611325816116d7565b50565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d630000000000000000000000000000000000000000000000000000000014806106ec57506106ec82611975565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906113ec82610a9c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b604080516001808252818301909252600091816020015b611444612269565b81526020019060019003908161143c579050509050818160008151811061147b57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff168152505082816000815181106114cb57634e487b7160e01b600052603260045260246000fd5b60209081029190910101516001600160a01b039091169052610f948482611a17565b60006114f88261137e565b6115145760405162461bcd60e51b81526004016107ad90612b78565b600061151f83610a9c565b9050806001600160a01b0316846001600160a01b0316148061155a5750836001600160a01b031661154f84610786565b6001600160a01b0316145b8061156a575061156a8185611280565b949350505050565b826001600160a01b031661158582610a9c565b6001600160a01b0316146115ab5760405162461bcd60e51b81526004016107ad906129bc565b6001600160a01b0382166115d15760405162461bcd60e51b81526004016107ad90612aad565b6115dc838383611c1d565b6115e760008261139f565b6001600160a01b03831660009081526003602052604081208054600192906116109084906131e7565b90915550506001600160a01b038216600090815260036020526040812080546001929061163e90849061317e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610865838383610865565b6109c1828260405180602001604052806000815250611c28565b600a80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156117735760405162461bcd60e51b81526004016107ad90612b0a565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906117d7908590612852565b60405180910390a3505050565b6117ef848484611572565b6117fb84848484611c5b565b610f945760405162461bcd60e51b81526004016107ad906128cd565b6060600d80546107039061324d565b606081611867575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526106ef565b8160005b8115611891578061187b81613288565b915061188a9050600a83613196565b915061186b565b60008167ffffffffffffffff8111156118ba57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156118e4576020820181803683370190505b5090505b841561156a576118f96001836131e7565b9150611906600a866132c1565b61191190603061317e565b60f81b81838151811061193457634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061196e600a86613196565b94506118e8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480611a0857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806106ec57506106ec82611da7565b6000805b8251811015611bf15760006001600160a01b0316838281518110611a4f57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b03161415611a825760405162461bcd60e51b81526004016107ad906130e1565b828181518110611aa257634e487b7160e01b600052603260045260246000fd5b6020026020010151602001516bffffffffffffffffffffffff1660001415611adc5760405162461bcd60e51b81526004016107ad90612bd5565b828181518110611afc57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001516bffffffffffffffffffffffff1682611b21919061317e565b9150600b6000858152602001908152602001600020838281518110611b5657634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825460018101845560009384529282902081519301805491909201516bffffffffffffffffffffffff1674010000000000000000000000000000000000000000026001600160a01b039384167fffffffffffffffffffffffff00000000000000000000000000000000000000009092169190911790921691909117905580611be981613288565b915050611a1b565b506127108110611c135760405162461bcd60e51b81526004016107ad9061304d565b6108658383611df1565b610865838383611e2e565b611c328383611eb7565b611c3f6000848484611c5b565b6108655760405162461bcd60e51b81526004016107ad906128cd565b6000611c6f846001600160a01b0316611fb6565b15611d9c57836001600160a01b031663150b7a02611c8b61139b565b8786866040518563ffffffff1660e01b8152600401611cad9493929190612803565b602060405180830381600087803b158015611cc757600080fd5b505af1925050508015611cf7575060408051601f3d908101601f19168201909252611cf491810190612591565b60015b611d51573d808015611d25576040519150601f19603f3d011682016040523d82523d6000602084013e611d2a565b606091505b508051611d495760405162461bcd60e51b81526004016107ad906128cd565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061156a565b506001949350505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b7f3fa96d7b6bcbfe71ef171666d84db3cf52fa2d1c8afdb1cc8e486177f208b7df8282604051611e22929190613121565b60405180910390a15050565b611e39838383610865565b6001600160a01b038316611e5557611e5081611fe7565b611e78565b816001600160a01b0316836001600160a01b031614611e7857611e78838261202b565b6001600160a01b038216611e9457611e8f816120c8565b610865565b826001600160a01b0316826001600160a01b0316146108655761086582826121a1565b6001600160a01b038216611edd5760405162461bcd60e51b81526004016107ad90612d21565b611ee68161137e565b15611f035760405162461bcd60e51b81526004016107ad90612a19565b611f0f60008383611c1d565b6001600160a01b0382166000908152600360205260408120805460019290611f3890849061317e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46109c160008383610865565b600080826001600160a01b0316803b806020016040519081016040528181526000908060200190933c511192915050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161203884610ca0565b61204291906131e7565b600083815260076020526040902054909150808214612095576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906120da906001906131e7565b6000838152600960205260408120546008805493945090928490811061211057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061213f57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061218557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006121ac83610ca0565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8280546121f19061324d565b90600052602060002090601f0160209004810192826122135760008555612259565b82601f1061222c57805160ff1916838001178555612259565b82800160010185558215612259579182015b8281111561225957825182559160200191906001019061223e565b50612265929150612280565b5090565b604080518082019091526000808252602082015290565b5b808211156122655760008155600101612281565b600067ffffffffffffffff808411156122b0576122b0613301565b6040516020601f19601f87011682010181811083821117156122d4576122d4613301565b6040528481529150818385018610156122ec57600080fd5b8484602083013760006020868301015250509392505050565b803580151581146106ef57600080fd5b60008083601f840112612326578182fd5b50813567ffffffffffffffff81111561233d578182fd5b60208301915083602082850101111561235557600080fd5b9250929050565b803560ff811681146106ef57600080fd5b60006020828403121561237e578081fd5b81356111d481613317565b6000806040838503121561239b578081fd5b82356123a681613317565b915060208301356123b681613317565b809150509250929050565b6000806000606084860312156123d5578081fd5b83356123e081613317565b925060208401356123f081613317565b929592945050506040919091013590565b60008060008060808587031215612416578081fd5b843561242181613317565b9350602085013561243181613317565b925060408501359150606085013567ffffffffffffffff811115612453578182fd5b8501601f81018713612463578182fd5b61247287823560208401612295565b91505092959194509250565b60008060408385031215612490578182fd5b823561249b81613317565b91506124a960208401612305565b90509250929050565b600080604083850312156124c4578182fd5b82356124cf81613317565b946020939093013593505050565b6000806000604084860312156124f1578283fd5b833567ffffffffffffffff80821115612508578485fd5b818601915086601f83011261251b578485fd5b813581811115612529578586fd5b876020808302850101111561253c578586fd5b602092830195509350612552918601905061235c565b90509250925092565b60006020828403121561256c578081fd5b6111d482612305565b600060208284031215612586578081fd5b81356111d48161332c565b6000602082840312156125a2578081fd5b81516111d48161332c565b6000602082840312156125be578081fd5b813567ffffffffffffffff8111156125d4578182fd5b8201601f810184136125e4578182fd5b61156a84823560208401612295565b600060208284031215612604578081fd5b5035919050565b60008060006060848603121561261f578081fd5b83359250602084013561263181613317565b915060408401356bffffffffffffffffffffffff81168114612651578182fd5b809150509250925092565b60008060008060608587031215612671578182fd5b84359350602085013561268381613317565b9250604085013567ffffffffffffffff81111561269e578283fd5b6126aa87828801612315565b95989497509550505050565b6000806000604084860312156126ca578081fd5b83359250602084013567ffffffffffffffff8111156126e7578182fd5b6126f386828701612315565b9497909650939450505050565b600080600060408486031215612714578081fd5b61271d8461235c565b9250602084013567ffffffffffffffff8111156126e7578182fd5b6000815180845260208085019450808401835b8381101561278957815180516001600160a01b031688528301516bffffffffffffffffffffffff16838801526040909601959082019060010161274b565b509495945050505050565b600081518084526127ac816020860160208601613221565b601f01601f19169290920160200192915050565b600083516127d2818460208801613221565b8351908301906127e6818360208801613221565b01949350505050565b6001600160a01b0391909116815260200190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526128356080830184612794565b9695505050505050565b6000602082526111d46020830184612738565b901515815260200190565b6000602082526111d46020830184612794565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201527f74206f6620626f756e6473000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f507572636861736520776f756c6420657863656564206d617820746f6b656e73604082015260600190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201527f6f776e6572000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526023908201527f42616c616e6365206578636565646564206d617820746f6b656e20707572636860408201527f6173650000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252601f908201527f45746865722076616c75652073656e74206973206e6f7420636f727265637400604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b6020808252818101527f526f79616c74792076616c75652073686f756c6420626520706f736974697665604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560408201527f726f206164647265737300000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606082015260800190565b60208082526022908201527f53616c65206d7573742062652061637469766520746f206d696e7420746f6b6560408201527f6e73000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560408201527f7200000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f4578636565646564206d617820746f6b656e2070757263686173650000000000604082015260600190565b60208082526022908201527f4578636565646564206d617820617661696c61626c6520746f2070757263686160408201527f7365000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201527f7574206f6620626f756e64730000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f526f79616c747920746f74616c2076616c75652073686f756c64206265203c2060408201527f3130303030000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f416c6c6f77206c697374206973206e6f74206163746976650000000000000000604082015260600190565b6020808252601b908201527f526563697069656e742073686f756c642062652070726573656e740000000000604082015260600190565b90815260200190565b60008382526040602083015261156a6040830184612738565b60008482526040602083015282604083015282846060840137818301606090810191909152601f909201601f1916010192915050565b60ff91909116815260200190565b60008219821115613191576131916132d5565b500190565b6000826131a5576131a56132eb565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131e2576131e26132d5565b500290565b6000828210156131f9576131f96132d5565b500390565b600060ff821660ff841680821015613218576132186132d5565b90039392505050565b60005b8381101561323c578181015183820152602001613224565b83811115610f945750506000910152565b60028104600182168061326157607f821691505b6020821081141561328257634e487b7160e01b600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132ba576132ba6132d5565b5060010190565b6000826132d0576132d06132eb565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461132557600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461132557600080fdfea264697066735822122058578a5b45705baaa986be49efb3339c73ef522253a260b9a827e75ac728b7d064736f6c63430008000033

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

00000000000000000000000040d0fe76d7c06a804ef1bf970539eae1202963f1

-----Decoded View---------------
Arg [0] : artist_ (address): 0x40d0FE76D7c06A804eF1bF970539eAe1202963F1

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


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

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