ETH Price: $3,352.73 (-2.41%)
Gas: 6.46 Gwei

Contract

0x41c1CA42ad8Bb5Fb5C9AD15B567104F9133e1c87
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...208906122024-10-04 7:17:5953 days ago1728026279IN
Grattitude NFT: GRAT Token
0 ETH0.000262685.69027509
Set Approval For...205599042024-08-19 3:11:35100 days ago1724037095IN
Grattitude NFT: GRAT Token
0 ETH0.000058661.27300565
Set Approval For...201512552024-06-23 1:55:59157 days ago1719107759IN
Grattitude NFT: GRAT Token
0 ETH0.000096032.08089786
Set Approval For...192828482024-02-22 11:26:47278 days ago1708601207IN
Grattitude NFT: GRAT Token
0 ETH0.0014935832.41293282
Set Approval For...191637972024-02-05 18:19:23295 days ago1707157163IN
Grattitude NFT: GRAT Token
0 ETH0.0009401820.36626554
Set Approval For...191628392024-02-05 15:03:59295 days ago1707145439IN
Grattitude NFT: GRAT Token
0 ETH0.0011727525.45038701
Set Approval For...186360582023-11-23 17:55:59369 days ago1700762159IN
Grattitude NFT: GRAT Token
0 ETH0.0017686838.38287962
Set Approval For...184006552023-10-21 19:05:35402 days ago1697915135IN
Grattitude NFT: GRAT Token
0 ETH0.0006041113.11009953
Set Approval For...182863882023-10-05 19:27:47418 days ago1696534067IN
Grattitude NFT: GRAT Token
0 ETH0.0006896414.96630217
Set Approval For...182219162023-09-26 19:04:47427 days ago1695755087IN
Grattitude NFT: GRAT Token
0 ETH0.001261227.36984294
Mint177061652023-07-16 13:32:47499 days ago1689514367IN
Grattitude NFT: GRAT Token
0 ETH0.0027117623.23549201
Mint176102332023-07-03 1:37:59513 days ago1688348279IN
Grattitude NFT: GRAT Token
0 ETH0.0020474514.07051604
Set Approval For...175661452023-06-26 21:04:47519 days ago1687813487IN
Grattitude NFT: GRAT Token
0 ETH0.0005980912.97951414
Mint175283172023-06-21 13:25:11524 days ago1687353911IN
Grattitude NFT: GRAT Token
0 ETH0.0064743117.22058218
Set Approval For...174860852023-06-15 15:10:47530 days ago1686841847IN
Grattitude NFT: GRAT Token
0 ETH0.0013428729.14222946
Set Approval For...170911662023-04-21 0:18:59586 days ago1682036339IN
Grattitude NFT: GRAT Token
0 ETH0.0021731647.13611527
Set Approval For...168989982023-03-24 17:59:23613 days ago1679680763IN
Grattitude NFT: GRAT Token
0 ETH0.0015984234.68800688
Mint168583472023-03-19 0:56:35619 days ago1679187395IN
Grattitude NFT: GRAT Token
0 ETH0.0016070413.76980492
Set Approval For...168199362023-03-13 15:23:59624 days ago1678721039IN
Grattitude NFT: GRAT Token
0 ETH0.0036875380.02455621
Set Approval For...168124542023-03-12 14:10:59625 days ago1678630259IN
Grattitude NFT: GRAT Token
0 ETH0.0005236321.66648243
Set Approval For...167243952023-02-28 4:49:59637 days ago1677559799IN
Grattitude NFT: GRAT Token
0 ETH0.0006754714.65866189
Set Approval For...167076232023-02-25 20:20:23640 days ago1677356423IN
Grattitude NFT: GRAT Token
0 ETH0.0009146419.83873065
Set Approval For...167073332023-02-25 19:21:23640 days ago1677352883IN
Grattitude NFT: GRAT Token
0 ETH0.0010450822.67982912
Set Approval For...166905192023-02-23 10:31:35642 days ago1677148295IN
Grattitude NFT: GRAT Token
0 ETH0.0012011726.0534909
Set Approval For...166551092023-02-18 11:05:23647 days ago1676718323IN
Grattitude NFT: GRAT Token
0 ETH0.0013111328.43873174
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GrattitudeNFT

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 18 : Grattitude.sol
//
//    ██████╗ ██████╗  █████╗ ████████╗████████╗██╗████████╗██╗   ██╗██████╗ ███████╗
//   ██╔════╝ ██╔══██╗██╔══██╗╚══██╔══╝╚══██╔══╝██║╚══██╔══╝██║   ██║██╔══██╗██╔════╝
//   ██║  ███╗██████╔╝███████║   ██║      ██║   ██║   ██║   ██║   ██║██║  ██║█████╗
//   ██║   ██║██╔══██╗██╔══██║   ██║      ██║   ██║   ██║   ██║   ██║██║  ██║██╔══╝
//   ╚██████╔╝██║  ██║██║  ██║   ██║      ██║   ██║   ██║   ╚██████╔╝██████╔╝███████╗
//    ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝   ╚═╝      ╚═╝   ╚═╝   ╚═╝    ╚═════╝ ╚═════╝ ╚══════╝
//
//   Grattitude is the second NFT drop in the Tunney Munney collection by artist Peter Tunney. Each NFT is a unique AI
//   generated piece of art residing on the Ethereum blockchain. The digital collection is a gift of Grattitude and
//   claimable by Tunney Munney collectors only. It is not for sale or mint to the public.
//
//   Arist          : Peter Tunney
//   Year           : 2022
//   Owner          : Tunney Munney, LLC (https://tunneymunney.io)
//   Author         : Ben Hakim ([email protected])
//

pragma solidity 0.8.14;

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

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

interface ITunneyMunney {
    function balanceOf(address owner) external view returns (uint256);
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
}

contract GrattitudeNFT is Ownable, ERC721, ReentrancyGuard, RoyaltiesV2Impl {
    address payable private constant _ROYALTY_ADDRESS = payable(0x1F1Fd08ED5f3dBC2158D96Cd5eC063A7A5AeBc67);
    address private _tunneyMunneyContractAddress;
    uint16 private _totalMinted = 0;
    uint96 private constant _ROYALTY_PERCENTAGE_BASIS_POINTS = 1000;
    uint256 private constant _MAXIMUM_PURCHASE = 20;
    string private __baseURI = "ipfs://bafybwihxgxez3htnxlj2n3siv64xh2w2xfejil2vxbikeij25ngdmp6wlu/";
    bool private _freezeMetadataCalled = false;
    bool private _mintActive = false;

    // Tunney Munney Id redeemed
    mapping(uint16 => bool) tunneyMunneyIdRedeemed;

    bytes4 private constant _INTERFACE_TO_ERC2981 = 0x2a55205a;

    function getOwnedTunneyMunneyTokenIds() public view returns (uint256[] memory) {
        uint256 balance = ITunneyMunney(_tunneyMunneyContractAddress).balanceOf(msg.sender);
        uint256[] memory ownedTokenIds = new uint256[](balance);
        for (uint256 i = 0; i < balance; i++) {
            ownedTokenIds[i] = ITunneyMunney(_tunneyMunneyContractAddress).tokenOfOwnerByIndex(msg.sender, i);
        }
        return ownedTokenIds;
    }

    function getClaimedTunneyMunneyTokenIds() public view onlyOwner returns (uint256[] memory) {
        uint256[] memory claimedTokenIds = new uint256[](_totalMinted); // Initialize return array of size _totalMinted
        uint256 j = 0; // Initialize return array index counter

        for (uint16 i = 1; i <= 5000; i++) { // Cycle through all possible TM tokens
            if (tunneyMunneyIdRedeemed[i] == true) {
                claimedTokenIds[j] = i;
                j++;
            }
        }

        return claimedTokenIds;
    }

    constructor(address tunneyMunneyContractAddress) ERC721("Grattitude NFT", "GRAT", 20, 5000) {
        _tunneyMunneyContractAddress = tunneyMunneyContractAddress;

        // Royalties Implementation: Rarible
        LibPart.Part[] memory _royalties = new LibPart.Part[](1);
        _royalties[0].value = _ROYALTY_PERCENTAGE_BASIS_POINTS;
        _royalties[0].account = _ROYALTY_ADDRESS;
        _saveRoyalties(1, _royalties);
    }

    function DANGER_freezeMetadata() public onlyOwner {
        _freezeMetadataCalled = true;
    }

    function setBaseURI(string memory newBaseURI) public onlyOwner {
       require(_freezeMetadataCalled == false, "Metadata is frozen.");
       __baseURI = newBaseURI;
    }

    function toggleMintActive() public onlyOwner {
        _mintActive = !_mintActive;
    }

    function getMintActive() public view returns (bool) {
        return _mintActive;
    }

    function totalMinted() public view returns (uint256) {
        return _totalMinted;
    }

    function getMaximumMintCountPermittedAndClaimedCount() public view returns (uint256, uint256, uint256) {
        // Get all Tunney Munney tokens owned by sender
        uint256[] memory ownedTunneyMunneyTokenIds = getOwnedTunneyMunneyTokenIds();

        uint256 maximumMintCountPermitted = 0;
        uint256 grattitudeClaimedCount = 0;

        // Cycle through all ownedTunneyMunneyTokenIds and increment maximumMintCountPermitted if that Id has not yet been minted
        for (uint256 i = 0; i < ownedTunneyMunneyTokenIds.length; i++) {
            if (tunneyMunneyIdRedeemed[uint16(ownedTunneyMunneyTokenIds[i])] == false) {
                maximumMintCountPermitted++;
            } else {
                grattitudeClaimedCount++;
            }
        }

        return (maximumMintCountPermitted, grattitudeClaimedCount, ownedTunneyMunneyTokenIds.length);
    }

    function mint(uint256 numberOfTokensToMint) public nonReentrant {
        require(_mintActive == true, "Minting is not currently active.");
        require(numberOfTokensToMint <= _MAXIMUM_PURCHASE, "You can only mint 20 GrattitudeNFT at a time.");
        require(numberOfTokensToMint > 0, "You should mint at least one token.");

        // Get all Tunney Munney tokens owned by sender
        uint256[] memory ownedTunneyMunneyTokenIds = getOwnedTunneyMunneyTokenIds();

        uint256 numberOfTokensToMintAuthoritative = 0;

        // Cycle through all ownedTunneyMunneyTokenIds and increment numberOfTokensToMintAuthoritative if that Id has not yet been minted
        for (uint256 i = 0; i < ownedTunneyMunneyTokenIds.length; i++) {
            if (tunneyMunneyIdRedeemed[uint16(ownedTunneyMunneyTokenIds[i])] == false && numberOfTokensToMintAuthoritative < numberOfTokensToMint) {
                tunneyMunneyIdRedeemed[uint16(ownedTunneyMunneyTokenIds[i])] = true;
                numberOfTokensToMintAuthoritative++;
            }
        }

        if (numberOfTokensToMintAuthoritative > 0) {
            _totalMinted += uint16(numberOfTokensToMintAuthoritative);

            // Mint
            _safeMint(msg.sender, numberOfTokensToMintAuthoritative);
        }
    }

    // Royalties Implementation: ERC2981
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external pure returns (address receiver, uint256 royaltyAmount) {
        return (_ROYALTY_ADDRESS, _salePrice * _ROYALTY_PERCENTAGE_BASIS_POINTS / 10000);
    }

    // OpenSea Contract-level metadata implementation (https://docs.opensea.io/docs/contract-level-metadata)
    function contractURI() public view returns (string memory) {
        return string(abi.encodePacked(__baseURI, "contract"));
    }

    // Supports Interface Override
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) {
        // Rarible Royalties Interface
        if (interfaceId == LibRoyaltiesV2._INTERFACE_ID_ROYALTIES) {
            return true;
        }

        // ERC2981 Royalty Standard
        if (interfaceId == _INTERFACE_TO_ERC2981) {
            return true;
        }

        return super.supportsInterface(interfaceId);
    }

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

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

pragma solidity ^0.8.0;

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

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
 *
 * Assumes the number of issuable tokens (collection size) is capped and fits in a uint128.
 *
 * Does not support burning tokens to address(0).
 */
contract ERC721 is
Context,
ERC165,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
    using Address for address;
    using Strings for uint256;

    struct TokenOwnership {
        address addr;
        uint64 startTimestamp;
    }

    struct AddressData {
        uint128 balance;
        uint128 numberMinted;
    }

    uint256 private currentIndex = 0;

    uint256 internal immutable collectionSize;
    uint256 internal immutable maxBatchSize;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) private _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // 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
   * `maxBatchSize` refers to how much a minter can mint at a time.
   * `collectionSize_` refers to how many tokens are in the collection.
   */
    constructor(
        string memory name_,
        string memory symbol_,
        uint256 maxBatchSize_,
        uint256 collectionSize_
    ) {
        require(
            collectionSize_ > 0,
            "ERC721: collection must have a nonzero supply"
        );
        require(maxBatchSize_ > 0, "ERC721: max batch size must be nonzero");
        _name = name_;
        _symbol = symbol_;
        maxBatchSize = maxBatchSize_;
        collectionSize = collectionSize_;
    }

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

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
   * This read function is O(collectionSize). If calling from a separate contract, be sure to test gas first.
   * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
   */
    function tokenOfOwnerByIndex(address owner, uint256 index)
    public
    view
    override
    returns (uint256)
    {
        require(index < balanceOf(owner), "ERC721: owner index out of bounds");
        uint256 numMintedSoFar = totalSupply();
        uint256 tokenIdsIdx = 0;
        address currOwnershipAddr = address(0);
        for (uint256 i = 0; i < numMintedSoFar; i++) {
            TokenOwnership memory ownership = _ownerships[i];
            if (ownership.addr != address(0)) {
                currOwnershipAddr = ownership.addr;
            }
            if (currOwnershipAddr == owner) {
                if (tokenIdsIdx == index) {
                    return i;
                }
                tokenIdsIdx++;
            }
        }
        revert("ERC721: unable to get token of owner by index");
    }

    /**
     * @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 ||
        interfaceId == type(IERC721Enumerable).interfaceId ||
        super.supportsInterface(interfaceId);
    }

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

    function _numberMinted(address owner) internal view returns (uint256) {
        require(
            owner != address(0),
            "ERC721: number minted query for the zero address"
        );
        return uint256(_addressData[owner].numberMinted);
    }

    function ownershipOf(uint256 tokenId)
    internal
    view
    returns (TokenOwnership memory)
    {
        require(_exists(tokenId), "ERC721: owner query for nonexistent token");

        uint256 lowestTokenToCheck;
        if (tokenId >= maxBatchSize) {
            lowestTokenToCheck = tokenId - maxBatchSize + 1;
        }

        for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) {
            TokenOwnership memory ownership = _ownerships[curr];
            if (ownership.addr != address(0)) {
                return ownership;
            }
        }

        revert("ERC721: unable to determine the owner of token");
    }

    /**
     * @dev See {IERC721-ownerOf}.
   */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return ownershipOf(tokenId).addr;
    }

    /**
     * @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 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, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
   */
    function getApproved(uint256 tokenId) public view 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 override {
        require(operator != _msgSender(), "ERC721: approve to caller");

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

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

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

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
   */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public override {
        _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`),
   */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return tokenId < currentIndex;
    }

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, "");
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
   *
   * Requirements:
   *
   * - there must be `quantity` tokens remaining unminted in the total collection.
   * - `to` cannot be the zero address.
   * - `quantity` cannot be larger than the max batch size.
   *
   * Emits a {Transfer} event.
   */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = currentIndex;
        require(to != address(0), "ERC721: mint to the zero address");
        // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
        require(!_exists(startTokenId), "ERC721: token already minted");
        require(quantity <= maxBatchSize, "ERC721: quantity to mint too high");

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        AddressData memory addressData = _addressData[to];
        _addressData[to] = AddressData(
            addressData.balance + uint128(quantity),
            addressData.numberMinted + uint128(quantity)
        );
        _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));

        uint256 updatedIndex = startTokenId;

        for (uint256 i = 0; i < quantity; i++) {
            emit Transfer(address(0), to, updatedIndex);
            require(
                _checkOnERC721Received(address(0), to, updatedIndex, _data),
                "ERC721: transfer to non ERC721Receiver implementer"
            );
            updatedIndex++;
        }

        currentIndex = updatedIndex;
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
   *
   * 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
    ) private {
        TokenOwnership memory prevOwnership = ownershipOf(tokenId);

        bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
        getApproved(tokenId) == _msgSender() ||
        isApprovedForAll(prevOwnership.addr, _msgSender()));

        require(
            isApprovedOrOwner,
            "ERC721: transfer caller is not owner nor approved"
        );

        require(
            prevOwnership.addr == from,
            "ERC721: transfer from incorrect owner"
        );
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        _addressData[from].balance -= 1;
        _addressData[to].balance += 1;
        _ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp));

        // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
        // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
        uint256 nextTokenId = tokenId + 1;
        if (_ownerships[nextTokenId].addr == address(0)) {
            if (_exists(nextTokenId)) {
                _ownerships[nextTokenId] = TokenOwnership(
                    prevOwnership.addr,
                    prevOwnership.startTimestamp
                );
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

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

    uint256 public nextOwnerToExplicitlySet = 0;

    /**
     * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
   */
    function _setOwnersExplicit(uint256 quantity) internal {
        uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
        require(quantity > 0, "quantity must be nonzero");
        uint256 endIndex = oldNextOwnerToSet + quantity - 1;
        if (endIndex > collectionSize - 1) {
            endIndex = collectionSize - 1;
        }
        // We know if the last one in the group exists, all in the group exist, due to serial ordering.
        require(_exists(endIndex), "not enough minted yet for this cleanup");
        for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) {
            if (_ownerships[i].addr == address(0)) {
                TokenOwnership memory ownership = ownershipOf(i);
                _ownerships[i] = TokenOwnership(
                    ownership.addr,
                    ownership.startTimestamp
                );
            }
        }
        nextOwnerToExplicitlySet = endIndex + 1;
    }

    /**
     * @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(to).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 a set of serially-ordered token ids are about to be transferred. This includes minting.
   *
   * startTokenId - the first token id to be transferred
   * quantity - the amount to be transferred
   *
   * 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`.
   */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
   * minting.
   *
   * startTokenId - the first token id to be transferred
   * quantity - the amount to be transferred
   *
   * Calling conditions:
   *
   * - when `from` and `to` are both non-zero.
   * - `from` and `to` are never both zero.
   */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) 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 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

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

pragma solidity ^0.8.6;
pragma abicoder v2;

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

contract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 {

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

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

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

pragma solidity ^0.8.6;

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 7 of 18 : LibRoyaltiesV2.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 13 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 14 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 15 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 16 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 17 of 18 : AbstractRoyalties.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

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))); // Wrap address and make it payable
            }
        }
    }

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

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

pragma solidity ^0.8.6;
pragma abicoder v2;

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": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"tunneyMunneyContractAddress","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":"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":"DANGER_freezeMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimedTunneyMunneyTokenIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaximumMintCountPermittedAndClaimedCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwnedTunneyMunneyTokenIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":[{"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":"numberOfTokensToMint","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOwnerToExplicitlySet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleMintActive","outputs":[],"stateMutability":"nonpayable","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":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"}]

60006001819055600855600b805461ffff60a01b19169055610140604052604360c08181529062002f4660e03980516200004291600c91602090910190620005a6565b50600d805461ffff191690553480156200005b57600080fd5b5060405162002f8938038062002f898339810160408190526200007e916200064c565b6040518060400160405280600e81526020016d11dc985d1d1a5d1d59194813919560921b8152506040518060400160405280600481526020016311d4905560e21b8152506014611388620000e1620000db620002db60201b60201c565b620002df565b600081116200014d5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a20636f6c6c656374696f6e206d75737420686176652061206e60448201526c6f6e7a65726f20737570706c7960981b60648201526084015b60405180910390fd5b60008211620001ae5760405162461bcd60e51b815260206004820152602660248201527f4552433732313a206d61782062617463682073697a65206d757374206265206e6044820152656f6e7a65726f60d01b606482015260840162000144565b8351620001c3906002906020870190620005a6565b508251620001d9906003906020860190620005a6565b5060a091909152608052505060016009819055600b80546001600160a01b0319166001600160a01b03841617905560408051828152808201909152600091602082015b60408051808201909152600080825260208201528152602001906001900390816200021c5790505090506103e8816000815181106200025f576200025f6200067e565b6020026020010151602001906001600160601b031690816001600160601b031681525050731f1fd08ed5f3dbc2158d96cd5ec063a7a5aebc6781600081518110620002ae57620002ae6200067e565b60209081029190910101516001600160a01b039091169052620002d36001826200032f565b505062000789565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000805b8251811015620004f45760006001600160a01b03168382815181106200035d576200035d6200067e565b6020026020010151600001516001600160a01b031603620003c15760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e740000000000604482015260640162000144565b828181518110620003d657620003d66200067e565b6020026020010151602001516001600160601b03166000036200043c5760405162461bcd60e51b815260206004820181905260248201527f526f79616c74792076616c75652073686f756c6420626520706f736974697665604482015260640162000144565b8281815181106200045157620004516200067e565b6020026020010151602001516001600160601b031682620004739190620006aa565b9150600a60008581526020019081526020016000208382815181106200049d576200049d6200067e565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b039091161791015580620004eb81620006c5565b91505062000333565b506127108110620005565760405162461bcd60e51b815260206004820152602560248201527f526f79616c747920746f74616c2076616c75652073686f756c64206265203c20604482015264031303030360dc1b606482015260840162000144565b62000562838362000567565b505050565b7f3fa96d7b6bcbfe71ef171666d84db3cf52fa2d1c8afdb1cc8e486177f208b7df82826040516200059a929190620006e1565b60405180910390a15050565b828054620005b4906200074d565b90600052602060002090601f016020900481019282620005d8576000855562000623565b82601f10620005f357805160ff191683800117855562000623565b8280016001018555821562000623579182015b828111156200062357825182559160200191906001019062000606565b506200063192915062000635565b5090565b5b8082111562000631576000815560010162000636565b6000602082840312156200065f57600080fd5b81516001600160a01b03811681146200067757600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115620006c057620006c062000694565b500190565b600060018201620006da57620006da62000694565b5060010190565b6000604080830185845260208281860152818651808452606087019150828801935060005b818110156200073f57845180516001600160a01b031684528401516001600160601b031684840152938301939185019160010162000706565b509098975050505050505050565b600181811c908216806200076257607f821691505b6020821081036200078357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05161278c620007ba600039600081816118f50152818161191f0152611d4b01526000505061278c6000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80638ba1a0d81161010f578063c87b56dd116100a2578063e8a3d48511610071578063e8a3d48514610434578063e985e9c51461043c578063ee99abcf14610478578063f2fde38b1461048857600080fd5b8063c87b56dd146103f0578063cad96cca14610403578063d02c2bf214610423578063d7224ba01461042b57600080fd5b8063a0712d68116100de578063a0712d68146103a4578063a22cb465146103b7578063a2309ff8146103ca578063b88d4fde146103dd57600080fd5b80638ba1a0d8146103605780638da5cb5b1461036857806395d89b41146103795780639910896a1461038157600080fd5b8063353206871161018757806355f804b31161015657806355f804b31461031f5780636352211e1461033257806370a0823114610345578063715018a61461035857600080fd5b806335320687146102dc57806336e47780146102e457806342842e0e146102f95780634f6ccce71461030c57600080fd5b806318160ddd116101c357806318160ddd1461027257806323b872dd146102845780632a55205a146102975780632f745c59146102c957600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b61020861020336600461200e565b61049b565b60405190151581526020015b60405180910390f35b6102256104ec565b6040516102149190612083565b610245610240366004612096565b61057e565b6040516001600160a01b039091168152602001610214565b61027061026b3660046120cb565b61060d565b005b6001545b604051908152602001610214565b6102706102923660046120f5565b610723565b6102aa6102a5366004612131565b61072e565b604080516001600160a01b039093168352602083019190915201610214565b6102766102d73660046120cb565b61076a565b6102706108df565b6102ec610918565b6040516102149190612153565b6102706103073660046120f5565b610a87565b61027661031a366004612096565b610aa2565b61027061032d366004612223565b610b0a565b610245610340366004612096565b610b94565b61027661035336600461226c565b610ba6565b610270610c36565b6102ec610c6c565b6000546001600160a01b0316610245565b610225610d6a565b610389610d79565b60408051938452602084019290925290820152606001610214565b6102706103b2366004612096565b610e1a565b6102706103c5366004612287565b6110ac565b600b54600160a01b900461ffff16610276565b6102706103eb3660046122c3565b611170565b6102256103fe366004612096565b6111a9565b610416610411366004612096565b611276565b604051610214919061233f565b61027061131f565b61027660085481565b610225611366565b61020861044a3660046123a5565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b600d54610100900460ff16610208565b61027061049636600461226c565b61138e565b6000631a93499b60e11b6001600160e01b03198316016104bd57506001919050565b636ad56fd360e11b6001600160e01b03198316016104dd57506001919050565b6104e682611429565b92915050565b6060600280546104fb906123d8565b80601f0160208091040260200160405190810160405280929190818152602001828054610527906123d8565b80156105745780601f1061054957610100808354040283529160200191610574565b820191906000526020600020905b81548152906001019060200180831161055757829003601f168201915b5050505050905090565b600061058b826001541190565b6105f15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061061882610b94565b9050806001600160a01b0316836001600160a01b0316036106855760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105e8565b336001600160a01b03821614806106a157506106a1813361044a565b6107135760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105e8565b61071e838383611494565b505050565b61071e8383836114f0565b600080731f1fd08ed5f3dbc2158d96cd5ec063a7a5aebc676127106107556103e886612428565b61075f919061245d565b915091509250929050565b600061077583610ba6565b82106107cd5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a206f776e657220696e646578206f7574206f6620626f756e646044820152607360f81b60648201526084016105e8565b60006107d860015490565b905060008060005b83811015610880576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff16918301919091521561083357805192505b876001600160a01b0316836001600160a01b03160361086d5786840361085f575093506104e692505050565b8361086981612471565b9450505b508061087881612471565b9150506107e0565b5060405162461bcd60e51b815260206004820152602d60248201527f4552433732313a20756e61626c6520746f2067657420746f6b656e206f66206f60448201526c0eedccae440c4f240d2dcc8caf609b1b60648201526084016105e8565b6000546001600160a01b031633146109095760405162461bcd60e51b81526004016105e89061248a565b600d805460ff19166001179055565b600b546040516370a0823160e01b81523360048201526060916000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610966573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098a91906124bf565b905060008167ffffffffffffffff8111156109a7576109a7612197565b6040519080825280602002602001820160405280156109d0578160200160208202803683370190505b50905060005b82811015610a8057600b54604051632f745c5960e01b8152336004820152602481018390526001600160a01b0390911690632f745c5990604401602060405180830381865afa158015610a2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5191906124bf565b828281518110610a6357610a636124d8565b602090810291909101015280610a7881612471565b9150506109d6565b5092915050565b61071e83838360405180602001604052806000815250611170565b6000610aad60015490565b8210610b065760405162461bcd60e51b815260206004820152602260248201527f4552433732313a20676c6f62616c20696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016105e8565b5090565b6000546001600160a01b03163314610b345760405162461bcd60e51b81526004016105e89061248a565b600d5460ff1615610b7d5760405162461bcd60e51b815260206004820152601360248201527226b2ba30b230ba309034b990333937bd32b71760691b60448201526064016105e8565b8051610b9090600c906020840190611f68565b5050565b6000610b9f82611874565b5192915050565b60006001600160a01b038216610c115760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105e8565b506001600160a01b03166000908152600560205260409020546001600160801b031690565b6000546001600160a01b03163314610c605760405162461bcd60e51b81526004016105e89061248a565b610c6a6000611a1c565b565b6000546060906001600160a01b03163314610c995760405162461bcd60e51b81526004016105e89061248a565b600b54600090600160a01b900461ffff1667ffffffffffffffff811115610cc257610cc2612197565b604051908082528060200260200182016040528015610ceb578160200160208202803683370190505b509050600060015b6113888161ffff1611610d625761ffff81166000908152600e602052604090205460ff161515600103610d50578061ffff16838381518110610d3757610d376124d8565b602090810291909101015281610d4c81612471565b9250505b80610d5a816124ee565b915050610cf3565b509091505090565b6060600380546104fb906123d8565b600080600080610d87610918565b905060008060005b8351811015610e0c57600e6000858381518110610dae57610dae6124d8565b60209081029190910181015161ffff16825281019190915260400160009081205460ff1615159003610dec5782610de481612471565b935050610dfa565b81610df681612471565b9250505b80610e0481612471565b915050610d8f565b509151909591945092509050565b600260095403610e6c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105e8565b6002600955600d5460ff610100909104161515600114610ece5760405162461bcd60e51b815260206004820181905260248201527f4d696e74696e67206973206e6f742063757272656e746c79206163746976652e60448201526064016105e8565b6014811115610f355760405162461bcd60e51b815260206004820152602d60248201527f596f752063616e206f6e6c79206d696e7420323020477261747469747564654e60448201526c232a1030ba1030903a34b6b29760991b60648201526084016105e8565b60008111610f915760405162461bcd60e51b815260206004820152602360248201527f596f752073686f756c64206d696e74206174206c65617374206f6e6520746f6b60448201526232b71760e91b60648201526084016105e8565b6000610f9b610918565b90506000805b825181101561105857600e6000848381518110610fc057610fc06124d8565b60209081029190910181015161ffff1682528101919091526040016000205460ff16158015610fee57508382105b15611046576001600e600085848151811061100b5761100b6124d8565b60209081029190910181015161ffff168252810191909152604001600020805460ff19169115159190911790558161104281612471565b9250505b8061105081612471565b915050610fa1565b5080156110a25780600b60148282829054906101000a900461ffff1661107e919061250f565b92506101000a81548161ffff021916908361ffff1602179055506110a23382611a6c565b5050600160095550565b336001600160a01b038316036111045760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105e8565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61117b8484846114f0565b61118784848484611a86565b6111a35760405162461bcd60e51b81526004016105e890612535565b50505050565b60606111b6826001541190565b61121a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105e8565b6000611224611b88565b90506000815111611244576040518060200160405280600081525061126f565b8061124e84611b97565b60405160200161125f929190612587565b6040516020818303038152906040525b9392505050565b60016000908152600a60209081527fbbc70db1b6c7afd11e79c0fb0051300458f1a3acb8ee9789d9b6b26c61ad9bc780546040805182850281018501909152818152606094909384015b8282101561131457600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff16818301528252600190920191016112c0565b505050509050919050565b6000546001600160a01b031633146113495760405162461bcd60e51b81526004016105e89061248a565b600d805461ff001981166101009182900460ff1615909102179055565b6060600c60405160200161137a91906125ad565b604051602081830303815290604052905090565b6000546001600160a01b031633146113b85760405162461bcd60e51b81526004016105e89061248a565b6001600160a01b03811661141d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e8565b61142681611a1c565b50565b60006001600160e01b031982166380ac58cd60e01b148061145a57506001600160e01b03198216635b5e139f60e01b145b8061147557506001600160e01b0319821663780e9d6360e01b145b806104e657506301ffc9a760e01b6001600160e01b03198316146104e6565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006114fb82611874565b80519091506000906001600160a01b0316336001600160a01b031614806115325750336115278461057e565b6001600160a01b0316145b8061154457508151611544903361044a565b9050806115ad5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016105e8565b846001600160a01b031682600001516001600160a01b0316146116205760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105e8565b6001600160a01b0384166116825760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105e8565b6116926000848460000151611494565b6001600160a01b03851660009081526005602052604081208054600192906116c49084906001600160801b0316612658565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b0386166000908152600560205260408120805460019450909261171091859116612680565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b03808716825267ffffffffffffffff428116602080850191825260008981526004909152948520935184549151909216600160a01b026001600160e01b031990911691909216171790556117988460016126a2565b6000818152600460205260409020549091506001600160a01b031661182a576117c2816001541190565b1561182a5760408051808201825284516001600160a01b03908116825260208087015167ffffffffffffffff9081168285019081526000878152600490935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6040805180820190915260008082526020820152611893826001541190565b6118f15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105e8565b60007f00000000000000000000000000000000000000000000000000000000000000008310611952576119447f0000000000000000000000000000000000000000000000000000000000000000846126ba565b61194f9060016126a2565b90505b825b8181106119bc576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff1691830191909152156119a957949350505050565b50806119b4816126d1565b915050611954565b5060405162461bcd60e51b815260206004820152602e60248201527f4552433732313a20756e61626c6520746f2064657465726d696e65207468652060448201526d37bbb732b91037b3103a37b5b2b760911b60648201526084016105e8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610b90828260405180602001604052806000815250611c98565b60006001600160a01b0384163b15611b7c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611aca9033908990889088906004016126e8565b6020604051808303816000875af1925050508015611b05575060408051601f3d908101601f19168201909252611b0291810190612725565b60015b611b62573d808015611b33576040519150601f19603f3d011682016040523d82523d6000602084013e611b38565b606091505b508051600003611b5a5760405162461bcd60e51b81526004016105e890612535565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b80565b5060015b949350505050565b6060600c80546104fb906123d8565b606081600003611bbe5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611be85780611bd281612471565b9150611be19050600a8361245d565b9150611bc2565b60008167ffffffffffffffff811115611c0357611c03612197565b6040519080825280601f01601f191660200182016040528015611c2d576020820181803683370190505b5090505b8415611b8057611c426001836126ba565b9150611c4f600a86612742565b611c5a9060306126a2565b60f81b818381518110611c6f57611c6f6124d8565b60200101906001600160f81b031916908160001a905350611c91600a8661245d565b9450611c31565b6001546001600160a01b038416611cf15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105e8565b611cfc816001541190565b15611d495760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105e8565b7f0000000000000000000000000000000000000000000000000000000000000000831115611dc35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a207175616e7469747920746f206d696e7420746f6f206869676044820152600d60fb1b60648201526084016105e8565b6001600160a01b0384166000908152600560209081526040918290208251808401845290546001600160801b038082168352600160801b9091041691810191909152815180830190925280519091908190611e1f908790612680565b6001600160801b03168152602001858360200151611e3d9190612680565b6001600160801b039081169091526001600160a01b0380881660008181526005602090815260408083208751978301518716600160801b0297909616969096179094558451808601865291825267ffffffffffffffff4281168386019081528883526004909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b85811015611f5d5760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611f216000888488611a86565b611f3d5760405162461bcd60e51b81526004016105e890612535565b81611f4781612471565b9250508080611f5590612471565b915050611ed4565b50600181905561186c565b828054611f74906123d8565b90600052602060002090601f016020900481019282611f965760008555611fdc565b82601f10611faf57805160ff1916838001178555611fdc565b82800160010185558215611fdc579182015b82811115611fdc578251825591602001919060010190611fc1565b50610b069291505b80821115610b065760008155600101611fe4565b6001600160e01b03198116811461142657600080fd5b60006020828403121561202057600080fd5b813561126f81611ff8565b60005b8381101561204657818101518382015260200161202e565b838111156111a35750506000910152565b6000815180845261206f81602086016020860161202b565b601f01601f19169290920160200192915050565b60208152600061126f6020830184612057565b6000602082840312156120a857600080fd5b5035919050565b80356001600160a01b03811681146120c657600080fd5b919050565b600080604083850312156120de57600080fd5b6120e7836120af565b946020939093013593505050565b60008060006060848603121561210a57600080fd5b612113846120af565b9250612121602085016120af565b9150604084013590509250925092565b6000806040838503121561214457600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561218b5783518352928401929184019160010161216f565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156121c8576121c8612197565b604051601f8501601f19908116603f011681019082821181831017156121f0576121f0612197565b8160405280935085815286868601111561220957600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561223557600080fd5b813567ffffffffffffffff81111561224c57600080fd5b8201601f8101841361225d57600080fd5b611b80848235602084016121ad565b60006020828403121561227e57600080fd5b61126f826120af565b6000806040838503121561229a57600080fd5b6122a3836120af565b9150602083013580151581146122b857600080fd5b809150509250929050565b600080600080608085870312156122d957600080fd5b6122e2856120af565b93506122f0602086016120af565b925060408501359150606085013567ffffffffffffffff81111561231357600080fd5b8501601f8101871361232457600080fd5b612333878235602084016121ad565b91505092959194509250565b602080825282518282018190526000919060409081850190868401855b8281101561239857815180516001600160a01b031685528601516bffffffffffffffffffffffff1686850152928401929085019060010161235c565b5091979650505050505050565b600080604083850312156123b857600080fd5b6123c1836120af565b91506123cf602084016120af565b90509250929050565b600181811c908216806123ec57607f821691505b60208210810361240c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561244257612442612412565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261246c5761246c612447565b500490565b60006001820161248357612483612412565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156124d157600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600061ffff80831681810361250557612505612412565b6001019392505050565b600061ffff80831681851680830382111561252c5761252c612412565b01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000835161259981846020880161202b565b83519083019061252c81836020880161202b565b600080835481600182811c9150808316806125c957607f831692505b602080841082036125e857634e487b7160e01b86526022600452602486fd5b8180156125fc576001811461260d5761263a565b60ff1986168952848901965061263a565b60008a81526020902060005b868110156126325781548b820152908501908301612619565b505084890196505b505050505050611b80816718dbdb9d1c9858dd60c21b815260080190565b60006001600160801b038381169083168181101561267857612678612412565b039392505050565b60006001600160801b0380831681851680830382111561252c5761252c612412565b600082198211156126b5576126b5612412565b500190565b6000828210156126cc576126cc612412565b500390565b6000816126e0576126e0612412565b506000190190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061271b90830184612057565b9695505050505050565b60006020828403121561273757600080fd5b815161126f81611ff8565b60008261275157612751612447565b50069056fea264697066735822122051af75b6cd3a950a20cf0097c48d560474a98f3ec1e578150d7cc513a1d6d7d364736f6c634300080e0033697066733a2f2f6261667962776968786778657a3368746e786c6a326e33736976363478683277327866656a696c32767862696b65696a32356e67646d7036776c752f0000000000000000000000006d4e70f49d030a92005c9a00105c7fa1626f41dc

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80638ba1a0d81161010f578063c87b56dd116100a2578063e8a3d48511610071578063e8a3d48514610434578063e985e9c51461043c578063ee99abcf14610478578063f2fde38b1461048857600080fd5b8063c87b56dd146103f0578063cad96cca14610403578063d02c2bf214610423578063d7224ba01461042b57600080fd5b8063a0712d68116100de578063a0712d68146103a4578063a22cb465146103b7578063a2309ff8146103ca578063b88d4fde146103dd57600080fd5b80638ba1a0d8146103605780638da5cb5b1461036857806395d89b41146103795780639910896a1461038157600080fd5b8063353206871161018757806355f804b31161015657806355f804b31461031f5780636352211e1461033257806370a0823114610345578063715018a61461035857600080fd5b806335320687146102dc57806336e47780146102e457806342842e0e146102f95780634f6ccce71461030c57600080fd5b806318160ddd116101c357806318160ddd1461027257806323b872dd146102845780632a55205a146102975780632f745c59146102c957600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b61020861020336600461200e565b61049b565b60405190151581526020015b60405180910390f35b6102256104ec565b6040516102149190612083565b610245610240366004612096565b61057e565b6040516001600160a01b039091168152602001610214565b61027061026b3660046120cb565b61060d565b005b6001545b604051908152602001610214565b6102706102923660046120f5565b610723565b6102aa6102a5366004612131565b61072e565b604080516001600160a01b039093168352602083019190915201610214565b6102766102d73660046120cb565b61076a565b6102706108df565b6102ec610918565b6040516102149190612153565b6102706103073660046120f5565b610a87565b61027661031a366004612096565b610aa2565b61027061032d366004612223565b610b0a565b610245610340366004612096565b610b94565b61027661035336600461226c565b610ba6565b610270610c36565b6102ec610c6c565b6000546001600160a01b0316610245565b610225610d6a565b610389610d79565b60408051938452602084019290925290820152606001610214565b6102706103b2366004612096565b610e1a565b6102706103c5366004612287565b6110ac565b600b54600160a01b900461ffff16610276565b6102706103eb3660046122c3565b611170565b6102256103fe366004612096565b6111a9565b610416610411366004612096565b611276565b604051610214919061233f565b61027061131f565b61027660085481565b610225611366565b61020861044a3660046123a5565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b600d54610100900460ff16610208565b61027061049636600461226c565b61138e565b6000631a93499b60e11b6001600160e01b03198316016104bd57506001919050565b636ad56fd360e11b6001600160e01b03198316016104dd57506001919050565b6104e682611429565b92915050565b6060600280546104fb906123d8565b80601f0160208091040260200160405190810160405280929190818152602001828054610527906123d8565b80156105745780601f1061054957610100808354040283529160200191610574565b820191906000526020600020905b81548152906001019060200180831161055757829003601f168201915b5050505050905090565b600061058b826001541190565b6105f15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061061882610b94565b9050806001600160a01b0316836001600160a01b0316036106855760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105e8565b336001600160a01b03821614806106a157506106a1813361044a565b6107135760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105e8565b61071e838383611494565b505050565b61071e8383836114f0565b600080731f1fd08ed5f3dbc2158d96cd5ec063a7a5aebc676127106107556103e886612428565b61075f919061245d565b915091509250929050565b600061077583610ba6565b82106107cd5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a206f776e657220696e646578206f7574206f6620626f756e646044820152607360f81b60648201526084016105e8565b60006107d860015490565b905060008060005b83811015610880576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff16918301919091521561083357805192505b876001600160a01b0316836001600160a01b03160361086d5786840361085f575093506104e692505050565b8361086981612471565b9450505b508061087881612471565b9150506107e0565b5060405162461bcd60e51b815260206004820152602d60248201527f4552433732313a20756e61626c6520746f2067657420746f6b656e206f66206f60448201526c0eedccae440c4f240d2dcc8caf609b1b60648201526084016105e8565b6000546001600160a01b031633146109095760405162461bcd60e51b81526004016105e89061248a565b600d805460ff19166001179055565b600b546040516370a0823160e01b81523360048201526060916000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610966573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098a91906124bf565b905060008167ffffffffffffffff8111156109a7576109a7612197565b6040519080825280602002602001820160405280156109d0578160200160208202803683370190505b50905060005b82811015610a8057600b54604051632f745c5960e01b8152336004820152602481018390526001600160a01b0390911690632f745c5990604401602060405180830381865afa158015610a2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5191906124bf565b828281518110610a6357610a636124d8565b602090810291909101015280610a7881612471565b9150506109d6565b5092915050565b61071e83838360405180602001604052806000815250611170565b6000610aad60015490565b8210610b065760405162461bcd60e51b815260206004820152602260248201527f4552433732313a20676c6f62616c20696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016105e8565b5090565b6000546001600160a01b03163314610b345760405162461bcd60e51b81526004016105e89061248a565b600d5460ff1615610b7d5760405162461bcd60e51b815260206004820152601360248201527226b2ba30b230ba309034b990333937bd32b71760691b60448201526064016105e8565b8051610b9090600c906020840190611f68565b5050565b6000610b9f82611874565b5192915050565b60006001600160a01b038216610c115760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105e8565b506001600160a01b03166000908152600560205260409020546001600160801b031690565b6000546001600160a01b03163314610c605760405162461bcd60e51b81526004016105e89061248a565b610c6a6000611a1c565b565b6000546060906001600160a01b03163314610c995760405162461bcd60e51b81526004016105e89061248a565b600b54600090600160a01b900461ffff1667ffffffffffffffff811115610cc257610cc2612197565b604051908082528060200260200182016040528015610ceb578160200160208202803683370190505b509050600060015b6113888161ffff1611610d625761ffff81166000908152600e602052604090205460ff161515600103610d50578061ffff16838381518110610d3757610d376124d8565b602090810291909101015281610d4c81612471565b9250505b80610d5a816124ee565b915050610cf3565b509091505090565b6060600380546104fb906123d8565b600080600080610d87610918565b905060008060005b8351811015610e0c57600e6000858381518110610dae57610dae6124d8565b60209081029190910181015161ffff16825281019190915260400160009081205460ff1615159003610dec5782610de481612471565b935050610dfa565b81610df681612471565b9250505b80610e0481612471565b915050610d8f565b509151909591945092509050565b600260095403610e6c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105e8565b6002600955600d5460ff610100909104161515600114610ece5760405162461bcd60e51b815260206004820181905260248201527f4d696e74696e67206973206e6f742063757272656e746c79206163746976652e60448201526064016105e8565b6014811115610f355760405162461bcd60e51b815260206004820152602d60248201527f596f752063616e206f6e6c79206d696e7420323020477261747469747564654e60448201526c232a1030ba1030903a34b6b29760991b60648201526084016105e8565b60008111610f915760405162461bcd60e51b815260206004820152602360248201527f596f752073686f756c64206d696e74206174206c65617374206f6e6520746f6b60448201526232b71760e91b60648201526084016105e8565b6000610f9b610918565b90506000805b825181101561105857600e6000848381518110610fc057610fc06124d8565b60209081029190910181015161ffff1682528101919091526040016000205460ff16158015610fee57508382105b15611046576001600e600085848151811061100b5761100b6124d8565b60209081029190910181015161ffff168252810191909152604001600020805460ff19169115159190911790558161104281612471565b9250505b8061105081612471565b915050610fa1565b5080156110a25780600b60148282829054906101000a900461ffff1661107e919061250f565b92506101000a81548161ffff021916908361ffff1602179055506110a23382611a6c565b5050600160095550565b336001600160a01b038316036111045760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105e8565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61117b8484846114f0565b61118784848484611a86565b6111a35760405162461bcd60e51b81526004016105e890612535565b50505050565b60606111b6826001541190565b61121a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105e8565b6000611224611b88565b90506000815111611244576040518060200160405280600081525061126f565b8061124e84611b97565b60405160200161125f929190612587565b6040516020818303038152906040525b9392505050565b60016000908152600a60209081527fbbc70db1b6c7afd11e79c0fb0051300458f1a3acb8ee9789d9b6b26c61ad9bc780546040805182850281018501909152818152606094909384015b8282101561131457600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff16818301528252600190920191016112c0565b505050509050919050565b6000546001600160a01b031633146113495760405162461bcd60e51b81526004016105e89061248a565b600d805461ff001981166101009182900460ff1615909102179055565b6060600c60405160200161137a91906125ad565b604051602081830303815290604052905090565b6000546001600160a01b031633146113b85760405162461bcd60e51b81526004016105e89061248a565b6001600160a01b03811661141d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e8565b61142681611a1c565b50565b60006001600160e01b031982166380ac58cd60e01b148061145a57506001600160e01b03198216635b5e139f60e01b145b8061147557506001600160e01b0319821663780e9d6360e01b145b806104e657506301ffc9a760e01b6001600160e01b03198316146104e6565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006114fb82611874565b80519091506000906001600160a01b0316336001600160a01b031614806115325750336115278461057e565b6001600160a01b0316145b8061154457508151611544903361044a565b9050806115ad5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016105e8565b846001600160a01b031682600001516001600160a01b0316146116205760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105e8565b6001600160a01b0384166116825760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105e8565b6116926000848460000151611494565b6001600160a01b03851660009081526005602052604081208054600192906116c49084906001600160801b0316612658565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b0386166000908152600560205260408120805460019450909261171091859116612680565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b03808716825267ffffffffffffffff428116602080850191825260008981526004909152948520935184549151909216600160a01b026001600160e01b031990911691909216171790556117988460016126a2565b6000818152600460205260409020549091506001600160a01b031661182a576117c2816001541190565b1561182a5760408051808201825284516001600160a01b03908116825260208087015167ffffffffffffffff9081168285019081526000878152600490935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6040805180820190915260008082526020820152611893826001541190565b6118f15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105e8565b60007f00000000000000000000000000000000000000000000000000000000000000148310611952576119447f0000000000000000000000000000000000000000000000000000000000000014846126ba565b61194f9060016126a2565b90505b825b8181106119bc576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff1691830191909152156119a957949350505050565b50806119b4816126d1565b915050611954565b5060405162461bcd60e51b815260206004820152602e60248201527f4552433732313a20756e61626c6520746f2064657465726d696e65207468652060448201526d37bbb732b91037b3103a37b5b2b760911b60648201526084016105e8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610b90828260405180602001604052806000815250611c98565b60006001600160a01b0384163b15611b7c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611aca9033908990889088906004016126e8565b6020604051808303816000875af1925050508015611b05575060408051601f3d908101601f19168201909252611b0291810190612725565b60015b611b62573d808015611b33576040519150601f19603f3d011682016040523d82523d6000602084013e611b38565b606091505b508051600003611b5a5760405162461bcd60e51b81526004016105e890612535565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b80565b5060015b949350505050565b6060600c80546104fb906123d8565b606081600003611bbe5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611be85780611bd281612471565b9150611be19050600a8361245d565b9150611bc2565b60008167ffffffffffffffff811115611c0357611c03612197565b6040519080825280601f01601f191660200182016040528015611c2d576020820181803683370190505b5090505b8415611b8057611c426001836126ba565b9150611c4f600a86612742565b611c5a9060306126a2565b60f81b818381518110611c6f57611c6f6124d8565b60200101906001600160f81b031916908160001a905350611c91600a8661245d565b9450611c31565b6001546001600160a01b038416611cf15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105e8565b611cfc816001541190565b15611d495760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105e8565b7f0000000000000000000000000000000000000000000000000000000000000014831115611dc35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a207175616e7469747920746f206d696e7420746f6f206869676044820152600d60fb1b60648201526084016105e8565b6001600160a01b0384166000908152600560209081526040918290208251808401845290546001600160801b038082168352600160801b9091041691810191909152815180830190925280519091908190611e1f908790612680565b6001600160801b03168152602001858360200151611e3d9190612680565b6001600160801b039081169091526001600160a01b0380881660008181526005602090815260408083208751978301518716600160801b0297909616969096179094558451808601865291825267ffffffffffffffff4281168386019081528883526004909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b85811015611f5d5760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611f216000888488611a86565b611f3d5760405162461bcd60e51b81526004016105e890612535565b81611f4781612471565b9250508080611f5590612471565b915050611ed4565b50600181905561186c565b828054611f74906123d8565b90600052602060002090601f016020900481019282611f965760008555611fdc565b82601f10611faf57805160ff1916838001178555611fdc565b82800160010185558215611fdc579182015b82811115611fdc578251825591602001919060010190611fc1565b50610b069291505b80821115610b065760008155600101611fe4565b6001600160e01b03198116811461142657600080fd5b60006020828403121561202057600080fd5b813561126f81611ff8565b60005b8381101561204657818101518382015260200161202e565b838111156111a35750506000910152565b6000815180845261206f81602086016020860161202b565b601f01601f19169290920160200192915050565b60208152600061126f6020830184612057565b6000602082840312156120a857600080fd5b5035919050565b80356001600160a01b03811681146120c657600080fd5b919050565b600080604083850312156120de57600080fd5b6120e7836120af565b946020939093013593505050565b60008060006060848603121561210a57600080fd5b612113846120af565b9250612121602085016120af565b9150604084013590509250925092565b6000806040838503121561214457600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561218b5783518352928401929184019160010161216f565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156121c8576121c8612197565b604051601f8501601f19908116603f011681019082821181831017156121f0576121f0612197565b8160405280935085815286868601111561220957600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561223557600080fd5b813567ffffffffffffffff81111561224c57600080fd5b8201601f8101841361225d57600080fd5b611b80848235602084016121ad565b60006020828403121561227e57600080fd5b61126f826120af565b6000806040838503121561229a57600080fd5b6122a3836120af565b9150602083013580151581146122b857600080fd5b809150509250929050565b600080600080608085870312156122d957600080fd5b6122e2856120af565b93506122f0602086016120af565b925060408501359150606085013567ffffffffffffffff81111561231357600080fd5b8501601f8101871361232457600080fd5b612333878235602084016121ad565b91505092959194509250565b602080825282518282018190526000919060409081850190868401855b8281101561239857815180516001600160a01b031685528601516bffffffffffffffffffffffff1686850152928401929085019060010161235c565b5091979650505050505050565b600080604083850312156123b857600080fd5b6123c1836120af565b91506123cf602084016120af565b90509250929050565b600181811c908216806123ec57607f821691505b60208210810361240c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561244257612442612412565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261246c5761246c612447565b500490565b60006001820161248357612483612412565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156124d157600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600061ffff80831681810361250557612505612412565b6001019392505050565b600061ffff80831681851680830382111561252c5761252c612412565b01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000835161259981846020880161202b565b83519083019061252c81836020880161202b565b600080835481600182811c9150808316806125c957607f831692505b602080841082036125e857634e487b7160e01b86526022600452602486fd5b8180156125fc576001811461260d5761263a565b60ff1986168952848901965061263a565b60008a81526020902060005b868110156126325781548b820152908501908301612619565b505084890196505b505050505050611b80816718dbdb9d1c9858dd60c21b815260080190565b60006001600160801b038381169083168181101561267857612678612412565b039392505050565b60006001600160801b0380831681851680830382111561252c5761252c612412565b600082198211156126b5576126b5612412565b500190565b6000828210156126cc576126cc612412565b500390565b6000816126e0576126e0612412565b506000190190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061271b90830184612057565b9695505050505050565b60006020828403121561273757600080fd5b815161126f81611ff8565b60008261275157612751612447565b50069056fea264697066735822122051af75b6cd3a950a20cf0097c48d560474a98f3ec1e578150d7cc513a1d6d7d364736f6c634300080e0033

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

0000000000000000000000006d4e70f49d030a92005c9a00105c7fa1626f41dc

-----Decoded View---------------
Arg [0] : tunneyMunneyContractAddress (address): 0x6d4E70F49D030a92005C9a00105C7fA1626f41dc

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


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

Grattitude is the second NFT drop in the [Tunney Munney](https://opensea.io/collection/tunney-munney) collection by artist Peter Tunney. Each NFT is a unique AI generated piece of art residing on the Ethereum blockchain. The digital collection is a gift of Grattitude and claim...

Validator Index Block Amount
View All Withdrawals

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

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