Token wagmi.cards

 

Overview ERC-721

Total Supply:
59 wagmi.cards

Holders:
40 addresses
 
Balance
1 wagmi.cards
0x13532b842adb6144ac5a4fbce11c0934dbd2f16f
Loading
[ Download CSV Export  ] 
Loading
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
WagmiCards

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 16 : WagmiCards.sol
pragma solidity ^0.8.0;

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

import "./libraries/Base64.sol";


contract WagmiCards is Ownable, ERC721, ERC721Enumerable, ERC721URIStorage {
    string public contract_metadata;
    using Counters for Counters.Counter;
    Counters.Counter public _tokenIDs;

    struct Gift {
        uint256 tokenID;
        uint256 amount;
        bool redeemed;
        address from;
        uint256 redeem_at;
    }
    
    event GiftMintedToOwner(address indexed previousOwner,address indexed newOwner);
    event GiftRedeemed(address indexed owner,uint256 indexed tokenID);

    mapping(uint256 => Gift) private gifts;
    mapping(address => uint256[]) private ownerGifts;

    uint public _giftCharge = 0.01 ether;
    bool public _scheduledRedeemSwitch = true;

    constructor(
        string memory _name,
        string memory _symbol,
        string memory _metadata
    ) ERC721(_name, _symbol) {
        contract_metadata = _metadata;
    }

    function contractURI() public view returns (string memory) {
        return contract_metadata;
    }

    function mint(address ownerAddress, uint256 redeem_at, string memory message) public payable returns (uint256) {
        require(msg.value > _giftCharge, "Gift cannot be lesser than gift charge");

        // check if message length is greater than 140 chars
        require(bytes(message).length <= 140, "Message cannot be greater than 140 characters");

        _tokenIDs.increment();
        uint256 newID = _tokenIDs.current();

        uint256 amount = msg.value - _giftCharge;

        Gift memory newGift = Gift({
            tokenID: newID,
            amount: amount,
            redeemed: false,
            redeem_at: redeem_at,
            from: msg.sender
        });

        gifts[newID] = newGift;
        ownerGifts[ownerAddress].push(newID);

        string memory json = Base64.encode(
            bytes(
                string(
                    abi.encodePacked(
                        '{"name": "Wagmi Card #',
                        toString(newID),
                        '", "description": "',
                        message, '. Redeem at https://wagmi.cards/redeem-gift',
                        '", "image": "https://www.wagmi.cards/opensea-thumbnail.png"}'
                    )
                )
            )
        );

        string memory finalTokenUri = string(
            abi.encodePacked("data:application/json;base64,", json)
        );

        _safeMint(msg.sender, newID);
        _setTokenURI(newID, finalTokenUri);

        transferToken(msg.sender, ownerAddress, newID);

        emit GiftMintedToOwner(msg.sender, ownerAddress);

        return newID;
    }

    function getAllGifts(address owner) public view returns (Gift[] memory) {

        Gift[] memory result = new Gift[](ownerGifts[owner].length);

        for (uint256 i = 0; i < ownerGifts[owner].length; i++) {
            result[i] = gifts[ownerGifts[owner][i]];
        }

        return result;
    }

    function redeem(uint256 tokenID) public returns (uint256) {
        Gift memory gift = gifts[tokenID];
        require(gift.redeemed == false, "Gift has already been redeemed");

        address tokenOwner = ownerOf(tokenID);
        require(tokenOwner == msg.sender, "You do not own this gift");

        if(gift.redeem_at > 0 && _scheduledRedeemSwitch){
            require(gift.redeem_at < block.timestamp, "Gift can't be redeemed yet");
        }

        payable(msg.sender).transfer(gift.amount);
        gifts[tokenID].redeemed = true;

        emit GiftRedeemed(msg.sender, tokenID);

        return gift.amount;
    }

    function redeemAll() public {
        for (uint256 i = 0; i < ownerGifts[msg.sender].length; i++) {
            if(!gifts[ownerGifts[msg.sender][i]].redeemed) {
                if(gifts[ownerGifts[msg.sender][i]].redeem_at > 0){
                    require(gifts[ownerGifts[msg.sender][i]].redeem_at < block.timestamp, "Gift can't be redeemed yet");
                }

                payable(msg.sender).transfer(gifts[ownerGifts[msg.sender][i]].amount);
                gifts[ownerGifts[msg.sender][i]].redeemed = true;

                emit GiftRedeemed(msg.sender, gifts[ownerGifts[msg.sender][i]].tokenID);
            }
        }
    }

    function transferToken(
        address from,
        address to,
        uint256 tokenID
    ) public returns (bool) {
        super.safeTransferFrom(from, to, tokenID);
        return true;
    }

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

    function _burn(uint256 tokenId)
        internal
        override(ERC721, ERC721URIStorage)
    {
        super._burn(tokenId);
    }

    function tokenURI(uint256 tokenId)
        public
        view
        override(ERC721, ERC721URIStorage)
        returns (string memory)
    {
        return super.tokenURI(tokenId);
    }

    function ownerOf(uint256 tokenId) public view override returns (address) {
        return super.ownerOf(tokenId);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, ERC721Enumerable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    function withdraw() public onlyOwner {

        uint redeemableBalanceForOwners = address(this).balance;

        for (uint256 i = 0; i < _tokenIDs.current(); i++) {
            if(!gifts[i].redeemed) {
                redeemableBalanceForOwners -= gifts[i].amount;
            }
        }

        require(redeemableBalanceForOwners > 0, "0 balance");
        payable(msg.sender).transfer(redeemableBalanceForOwners);
    }

    function overrideRedeemTime(uint256 tokenID, uint256 timestamp) public onlyOwner returns(Gift memory)  {
        gifts[tokenID].redeem_at = timestamp;
        return gifts[tokenID];
    }

    function overrideGiftCharge(uint256 updatedCharge) public onlyOwner {
        _giftCharge = updatedCharge;
    }

    function updateScheduleRedeemSwitch(bool switchStatus) public onlyOwner {
        _scheduledRedeemSwitch = switchStatus;
    }

    function updateContractMetadata(string memory metadata) public onlyOwner {
        contract_metadata = metadata;
    }
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT license
        // 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);
    }
}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

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

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

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

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

File 5 of 16 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 6 of 16 : 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 7 of 16 : Base64.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE =
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    bytes internal constant TABLE_DECODE =
        hex"0000000000000000000000000000000000000000000000000000000000000000"
        hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
        hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
        hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return "";

        // load the table into memory
        string memory table = TABLE_ENCODE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {

            } lt(dataPtr, endPtr) {

            } {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(
                    resultPtr,
                    mload(add(tablePtr, and(shr(18, input), 0x3F)))
                )
                resultPtr := add(resultPtr, 1)
                mstore8(
                    resultPtr,
                    mload(add(tablePtr, and(shr(12, input), 0x3F)))
                )
                resultPtr := add(resultPtr, 1)
                mstore8(
                    resultPtr,
                    mload(add(tablePtr, and(shr(6, input), 0x3F)))
                )
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 {
                mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
            }
            case 2 {
                mstore(sub(resultPtr, 1), shl(248, 0x3d))
            }
        }

        return result;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

        // add some extra buffer at the end required for the writing
        bytes memory result = new bytes(decodedLen + 32);

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 4 characters at a time
            for {

            } lt(dataPtr, endPtr) {

            } {
                // read 4 characters
                dataPtr := add(dataPtr, 4)
                let input := mload(dataPtr)

                // write 3 bytes
                let output := add(
                    add(
                        shl(
                            18,
                            and(
                                mload(add(tablePtr, and(shr(24, input), 0xFF))),
                                0xFF
                            )
                        ),
                        shl(
                            12,
                            and(
                                mload(add(tablePtr, and(shr(16, input), 0xFF))),
                                0xFF
                            )
                        )
                    ),
                    add(
                        shl(
                            6,
                            and(
                                mload(add(tablePtr, and(shr(8, input), 0xFF))),
                                0xFF
                            )
                        ),
                        and(mload(add(tablePtr, and(input, 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 13 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_metadata","type":"string"}],"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":"GiftMintedToOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"GiftRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"_giftCharge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_scheduledRedeemSwitch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenIDs","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"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":[],"name":"contract_metadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getAllGifts","outputs":[{"components":[{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"redeemed","type":"bool"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"redeem_at","type":"uint256"}],"internalType":"struct WagmiCards.Gift[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ownerAddress","type":"address"},{"internalType":"uint256","name":"redeem_at","type":"uint256"},{"internalType":"string","name":"message","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"updatedCharge","type":"uint256"}],"name":"overrideGiftCharge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"overrideRedeemTime","outputs":[{"components":[{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"redeemed","type":"bool"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"redeem_at","type":"uint256"}],"internalType":"struct WagmiCards.Gift","name":"","type":"tuple"}],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"transferToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"metadata","type":"string"}],"name":"updateContractMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"switchStatus","type":"bool"}],"name":"updateScheduleRedeemSwitch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052662386f26fc100006010556011805460ff191660011790553480156200002957600080fd5b50604051620038dc380380620038dc8339810160408190526200004c9162000254565b8282620000626200005c620000af565b620000b3565b81516200007790600190602085019062000103565b5080516200008d90600290602084019062000103565b50508151620000a59150600c90602084019062000103565b5050505062000334565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200011190620002e1565b90600052602060002090601f01602090048101928262000135576000855562000180565b82601f106200015057805160ff191683800117855562000180565b8280016001018555821562000180579182015b828111156200018057825182559160200191906001019062000163565b506200018e92915062000192565b5090565b5b808211156200018e576000815560010162000193565b600082601f830112620001ba578081fd5b81516001600160401b0380821115620001d757620001d76200031e565b6040516020601f8401601f1916820181018381118382101715620001ff57620001ff6200031e565b604052838252858401810187101562000216578485fd5b8492505b838310156200023957858301810151828401820152918201916200021a565b838311156200024a57848185840101525b5095945050505050565b60008060006060848603121562000269578283fd5b83516001600160401b038082111562000280578485fd5b6200028e87838801620001a9565b94506020860151915080821115620002a4578384fd5b620002b287838801620001a9565b93506040860151915080821115620002c8578283fd5b50620002d786828701620001a9565b9150509250925092565b600281046001821680620002f657607f821691505b602082108114156200031857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61359880620003446000396000f3fe6080604052600436106102195760003560e01c806370a082311161011d578063b88d4fde116100b0578063db006a751161007f578063e985e9c511610064578063e985e9c5146105c6578063f2fde38b146105e6578063f5537ede1461060657610219565b8063db006a7514610591578063e8a3d485146105b157610219565b8063b88d4fde1461051e578063bf1ec5441461053e578063c87b56dd1461055e578063d3fc98641461057e57610219565b80638e45779e116100ec5780638e45779e146104b457806395d89b41146104d4578063a22cb465146104e9578063af9ca2311461050957610219565b806370a082311461043d578063715018a61461045d5780637e948af1146104725780638da5cb5b1461049f57610219565b80632f4350c2116101b05780633f9bbc4f1161017f5780634f6ccce7116101645780634f6ccce7146103dd5780636352211e146103fd578063662faff01461041d57610219565b80633f9bbc4f146103a857806342842e0e146103bd57610219565b80632f4350c2146103495780632f745c591461035e57806338d31db11461037e5780633ccfd60b1461039357610219565b8063095ea7b3116101ec578063095ea7b3146102c557806318160ddd146102e757806322576c7a146102fc57806323b872dd1461032957610219565b806301ffc9a71461021e57806303cccb4d1461025457806306fdde0314610276578063081812fc14610298575b600080fd5b34801561022a57600080fd5b5061023e610239366004612847565b610626565b60405161024b9190612b81565b60405180910390f35b34801561026057600080fd5b50610269610639565b60405161024b91906133c9565b34801561028257600080fd5b5061028b61063f565b60405161024b9190612b8c565b3480156102a457600080fd5b506102b86102b33660046128b2565b6106d1565b60405161024b9190612ae3565b3480156102d157600080fd5b506102e56102e03660046127af565b61071d565b005b3480156102f357600080fd5b506102696107b5565b34801561030857600080fd5b5061031c610317366004612686565b6107bb565b60405161024b9190612b33565b34801561033557600080fd5b506102e56103443660046126d2565b610947565b34801561035557600080fd5b506102e561097f565b34801561036a57600080fd5b506102696103793660046127af565b610c3c565b34801561038a57600080fd5b5061023e610c91565b34801561039f57600080fd5b506102e5610c9a565b3480156103b457600080fd5b50610269610d8a565b3480156103c957600080fd5b506102e56103d83660046126d2565b610d90565b3480156103e957600080fd5b506102696103f83660046128b2565b610dab565b34801561040957600080fd5b506102b86104183660046128b2565b610e06565b34801561042957600080fd5b506102e561043836600461287f565b610e11565b34801561044957600080fd5b50610269610458366004612686565b610e63565b34801561046957600080fd5b506102e5610ea7565b34801561047e57600080fd5b5061049261048d3660046128ca565b610ef2565b60405161024b91906133bb565b3480156104ab57600080fd5b506102b8610f98565b3480156104c057600080fd5b506102e56104cf3660046128b2565b610fa7565b3480156104e057600080fd5b5061028b610feb565b3480156104f557600080fd5b506102e5610504366004612786565b610ffa565b34801561051557600080fd5b5061028b61100c565b34801561052a57600080fd5b506102e561053936600461270d565b61109a565b34801561054a57600080fd5b506102e561055936600461282d565b6110d9565b34801561056a57600080fd5b5061028b6105793660046128b2565b61112b565b61026961058c3660046127d8565b611136565b34801561059d57600080fd5b506102696105ac3660046128b2565b611317565b3480156105bd57600080fd5b5061028b611480565b3480156105d257600080fd5b5061023e6105e13660046126a0565b61148f565b3480156105f257600080fd5b506102e5610601366004612686565b6114bd565b34801561061257600080fd5b5061023e6106213660046126d2565b61152b565b600061063182611542565b90505b919050565b60105481565b60606001805461064e90613460565b80601f016020809104026020016040519081016040528092919081815260200182805461067a90613460565b80156106c75780601f1061069c576101008083540402835291602001916106c7565b820191906000526020600020905b8154815290600101906020018083116106aa57829003601f168201915b5050505050905090565b60006106dc82611580565b6107015760405162461bcd60e51b81526004016106f8906130fb565b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b60006107288261159d565b9050806001600160a01b0316836001600160a01b0316141561075c5760405162461bcd60e51b81526004016106f890613236565b806001600160a01b031661076e6115d2565b6001600160a01b0316148061078a575061078a816105e16115d2565b6107a65760405162461bcd60e51b81526004016106f890612e98565b6107b083836115d6565b505050565b60095490565b6001600160a01b0381166000908152600f60205260408120546060919067ffffffffffffffff8111156107fe57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561083757816020015b6108246124fd565b81526020019060019003908161081c5790505b50905060005b6001600160a01b0384166000908152600f6020526040902054811015610940576001600160a01b0384166000908152600f602052604081208054600e9291908490811061089a57634e487b7160e01b600052603260045260246000fd5b60009182526020808320919091015483528281019390935260409182019020815160a08101835281548152600182015493810193909352600281015460ff81161515928401929092526101009091046001600160a01b03166060830152600301546080820152825183908390811061092257634e487b7160e01b600052603260045260246000fd5b602002602001018190525080806109389061349b565b91505061083d565b5092915050565b6109586109526115d2565b82611651565b6109745760405162461bcd60e51b81526004016106f8906132ca565b6107b08383836116d6565b60005b336000908152600f6020526040902054811015610c3957336000908152600f602052604081208054600e929190849081106109cd57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910154835282019290925260400190206002015460ff16610c2757336000908152600f602052604081208054600e91839185908110610a2757634e487b7160e01b600052603260045260246000fd5b90600052602060002001548152602001908152602001600020600301541115610aba57336000908152600f6020526040812080544292600e92909185908110610a8057634e487b7160e01b600052603260045260246000fd5b906000526020600020015481526020019081526020016000206003015410610aba5760405162461bcd60e51b81526004016106f890613293565b336000818152600f6020526040812080546108fc92600e92909186908110610af257634e487b7160e01b600052603260045260246000fd5b90600052602060002001548152602001908152602001600020600101549081150290604051600060405180830381858888f19350505050158015610b3a573d6000803e3d6000fd5b50336000908152600f602052604081208054600192600e92909185908110610b7257634e487b7160e01b600052603260045260246000fd5b60009182526020808320919091015483528281019390935260409182018120600201805460ff191694151594909417909355338352600f90915281208054600e92919084908110610bd357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154815260200190815260200160002060000154336001600160a01b03167f08d1206aaf42428eda0c18887a8498d2638c134ac63a3d48170d7ba5565e2dbd60405160405180910390a35b80610c318161349b565b915050610982565b50565b6000610c4783610e63565b8210610c655760405162461bcd60e51b81526004016106f890612c0d565b506001600160a01b03821660009081526007602090815260408083208484529091529020545b92915050565b60115460ff1681565b610ca26115d2565b6001600160a01b0316610cb3610f98565b6001600160a01b031614610cd95760405162461bcd60e51b81526004016106f890613147565b4760005b610ce7600d611810565b811015610d38576000818152600e602052604090206002015460ff16610d26576000818152600e6020526040902060010154610d23908361341d565b91505b80610d308161349b565b915050610cdd565b5060008111610d595760405162461bcd60e51b81526004016106f890613327565b604051339082156108fc029083906000818181858888f19350505050158015610d86573d6000803e3d6000fd5b5050565b600d5481565b6107b08383836040518060200160405280600081525061109a565b6000610db56107b5565b8210610dd35760405162461bcd60e51b81526004016106f89061335e565b60098281548110610df457634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b60006106318261159d565b610e196115d2565b6001600160a01b0316610e2a610f98565b6001600160a01b031614610e505760405162461bcd60e51b81526004016106f890613147565b8051610d8690600c906020840190612537565b60006001600160a01b038216610e8b5760405162461bcd60e51b81526004016106f890612ef5565b506001600160a01b031660009081526004602052604090205490565b610eaf6115d2565b6001600160a01b0316610ec0610f98565b6001600160a01b031614610ee65760405162461bcd60e51b81526004016106f890613147565b610ef06000611814565b565b610efa6124fd565b610f026115d2565b6001600160a01b0316610f13610f98565b6001600160a01b031614610f395760405162461bcd60e51b81526004016106f890613147565b506000918252600e602090815260409283902060038101839055835160a081018552815481526001820154928101929092526002015460ff81161515938201939093526101009092046001600160a01b03166060830152608082015290565b6000546001600160a01b031690565b610faf6115d2565b6001600160a01b0316610fc0610f98565b6001600160a01b031614610fe65760405162461bcd60e51b81526004016106f890613147565b601055565b60606002805461064e90613460565b610d866110056115d2565b8383611871565b600c805461101990613460565b80601f016020809104026020016040519081016040528092919081815260200182805461104590613460565b80156110925780601f1061106757610100808354040283529160200191611092565b820191906000526020600020905b81548152906001019060200180831161107557829003601f168201915b505050505081565b6110ab6110a56115d2565b83611651565b6110c75760405162461bcd60e51b81526004016106f8906132ca565b6110d384848484611914565b50505050565b6110e16115d2565b6001600160a01b03166110f2610f98565b6001600160a01b0316146111185760405162461bcd60e51b81526004016106f890613147565b6011805460ff1916911515919091179055565b606061063182611947565b600060105434116111595760405162461bcd60e51b81526004016106f890612def565b608c8251111561117b5760405162461bcd60e51b81526004016106f890612f52565b611185600d611a60565b6000611191600d611810565b90506000601054346111a3919061341d565b6040805160a081018252848152602080820184815260008385018181523360608601908152608086018d81528a8452600e86528784208751815594516001808701919091559251600286018054935160ff19909416911515919091177fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b039485160217905551600390940193909355918c168152600f83529384208054918201815584529083200185905591925061128e61126885611a69565b8760405160200161127a929190612981565b604051602081830303815290604052611b9c565b90506000816040516020016112a39190612a9e565b60405160208183030381529060405290506112be3386611d48565b6112c88582611d62565b6112d3338a8761152b565b506040516001600160a01b038a169033907fbf248924cfab67b82cc9956b1aaae8af9fd81413a089af27e9cbd0128da8f2be90600090a35092979650505050505050565b6000818152600e60209081526040808320815160a08101835281548152600182015493810193909352600281015460ff81161580159385019390935261010090046001600160a01b0316606084015260030154608083015261138b5760405162461bcd60e51b81526004016106f890612bd6565b600061139684610e06565b90506001600160a01b03811633146113c05760405162461bcd60e51b81526004016106f890612b9f565b600082608001511180156113d6575060115460ff165b156113fe57428260800151106113fe5760405162461bcd60e51b81526004016106f890613293565b6020820151604051339180156108fc02916000818181858888f1935050505015801561142e573d6000803e3d6000fd5b506000848152600e6020526040808220600201805460ff1916600117905551859133917f08d1206aaf42428eda0c18887a8498d2638c134ac63a3d48170d7ba5565e2dbd9190a3506020015192915050565b6060600c805461064e90613460565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6114c56115d2565b6001600160a01b03166114d6610f98565b6001600160a01b0316146114fc5760405162461bcd60e51b81526004016106f890613147565b6001600160a01b0381166115225760405162461bcd60e51b81526004016106f890612cc7565b610c3981611814565b6000611538848484610d90565b5060019392505050565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610631575061063182611da6565b6000908152600360205260409020546001600160a01b0316151590565b6000818152600360205260408120546001600160a01b0316806106315760405162461bcd60e51b81526004016106f890612faf565b3390565b6000818152600560205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906116188261159d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061165c82611580565b6116785760405162461bcd60e51b81526004016106f890612e4c565b60006116838361159d565b9050806001600160a01b0316846001600160a01b031614806116be5750836001600160a01b03166116b3846106d1565b6001600160a01b0316145b806116ce57506116ce818561148f565b949350505050565b826001600160a01b03166116e98261159d565b6001600160a01b03161461170f5760405162461bcd60e51b81526004016106f89061317c565b6001600160a01b0382166117355760405162461bcd60e51b81526004016106f890612d5b565b611740838383611e18565b61174b6000826115d6565b6001600160a01b038316600090815260046020526040812080546001929061177490849061341d565b90915550506001600160a01b03821660009081526004602052604081208054600192906117a29084906133d2565b9091555050600081815260036020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b5490565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b031614156118a35760405162461bcd60e51b81526004016106f890612db8565b6001600160a01b0383811660008181526006602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611907908590612b81565b60405180910390a3505050565b61191f8484846116d6565b61192b84848484611e23565b6110d35760405162461bcd60e51b81526004016106f890612c6a565b606061195282611580565b61196e5760405162461bcd60e51b81526004016106f89061309e565b6000828152600b60205260408120805461198790613460565b80601f01602080910402602001604051908101604052809291908181526020018280546119b390613460565b8015611a005780601f106119d557610100808354040283529160200191611a00565b820191906000526020600020905b8154815290600101906020018083116119e357829003601f168201915b505050505090506000611a11611f57565b9050805160001415611a2557509050610634565b815115611a57578082604051602001611a3f929190612952565b60405160208183030381529060405292505050610634565b6116ce84611f69565b80546001019055565b606081611a8e57506040805180820190915260018152600360fc1b6020820152610634565b8160005b8115611ab85780611aa28161349b565b9150611ab19050600a836133ea565b9150611a92565b60008167ffffffffffffffff811115611ae157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611b0b576020820181803683370190505b5090505b84156116ce57611b2060018361341d565b9150611b2d600a866134b6565b611b389060306133d2565b60f81b818381518110611b5b57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611b95600a866133ea565b9450611b0f565b6060815160001415611bbd5750604080516020810190915260008152610634565b60006040518060600160405280604081526020016135236040913990506000600384516002611bec91906133d2565b611bf691906133ea565b611c019060046133fe565b90506000611c108260206133d2565b67ffffffffffffffff811115611c3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c60576020820181803683370190505b509050818152600183018586518101602084015b81831015611ccc576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101611c74565b600389510660018114611ce65760028114611d1257611d3a565b7f3d3d000000000000000000000000000000000000000000000000000000000000600119830152611d3a565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b610d86828260405180602001604052806000815250611fec565b611d6b82611580565b611d875760405162461bcd60e51b81526004016106f89061300c565b6000828152600b6020908152604090912082516107b092840190612537565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611e0957506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061063157506106318261201f565b6107b0838383612051565b6000611e37846001600160a01b03166120da565b15611f4c57836001600160a01b031663150b7a02611e536115d2565b8786866040518563ffffffff1660e01b8152600401611e759493929190612af7565b602060405180830381600087803b158015611e8f57600080fd5b505af1925050508015611ebf575060408051601f3d908101601f19168201909252611ebc91810190612863565b60015b611f19573d808015611eed576040519150601f19603f3d011682016040523d82523d6000602084013e611ef2565b606091505b508051611f115760405162461bcd60e51b81526004016106f890612c6a565b805181602001fd5b6001600160e01b0319167f150b7a02000000000000000000000000000000000000000000000000000000001490506116ce565b506001949350505050565b60408051602081019091526000815290565b6060611f7482611580565b611f905760405162461bcd60e51b81526004016106f8906131d9565b6000611f9a611f57565b90506000815111611fba5760405180602001604052806000815250611fe5565b80611fc4846120e0565b604051602001611fd5929190612952565b6040516020818303038152906040525b9392505050565b611ff68383612213565b6120036000848484611e23565b6107b05760405162461bcd60e51b81526004016106f890612c6a565b6001600160e01b031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b61205c8383836107b0565b6001600160a01b03831661207857612073816122ff565b61209b565b816001600160a01b0316836001600160a01b03161461209b5761209b8382612343565b6001600160a01b0382166120b7576120b2816123e0565b6107b0565b826001600160a01b0316826001600160a01b0316146107b0576107b082826124b9565b3b151590565b60608161210557506040805180820190915260018152600360fc1b6020820152610634565b8160005b811561212f57806121198161349b565b91506121289050600a836133ea565b9150612109565b60008167ffffffffffffffff81111561215857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612182576020820181803683370190505b5090505b84156116ce5761219760018361341d565b91506121a4600a866134b6565b6121af9060306133d2565b60f81b8183815181106121d257634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061220c600a866133ea565b9450612186565b6001600160a01b0382166122395760405162461bcd60e51b81526004016106f890613069565b61224281611580565b1561225f5760405162461bcd60e51b81526004016106f890612d24565b61226b60008383611e18565b6001600160a01b03821660009081526004602052604081208054600192906122949084906133d2565b9091555050600081815260036020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b6000600161235084610e63565b61235a919061341d565b6000838152600860205260409020549091508082146123ad576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906123f29060019061341d565b6000838152600a60205260408120546009805493945090928490811061242857634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806009838154811061245757634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061249d57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006124c483610e63565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6040518060a00160405280600081526020016000815260200160001515815260200160006001600160a01b03168152602001600081525090565b82805461254390613460565b90600052602060002090601f01602090048101928261256557600085556125ab565b82601f1061257e57805160ff19168380011785556125ab565b828001600101855582156125ab579182015b828111156125ab578251825591602001919060010190612590565b506125b79291506125bb565b5090565b5b808211156125b757600081556001016125bc565b600067ffffffffffffffff808411156125eb576125eb6134f6565b604051601f8501601f19168101602001828111828210171561260f5761260f6134f6565b60405284815291508183850186101561262757600080fd5b8484602083013760006020868301015250509392505050565b80356001600160a01b038116811461063457600080fd5b8035801515811461063457600080fd5b600082601f830112612677578081fd5b611fe5838335602085016125d0565b600060208284031215612697578081fd5b611fe582612640565b600080604083850312156126b2578081fd5b6126bb83612640565b91506126c960208401612640565b90509250929050565b6000806000606084860312156126e6578081fd5b6126ef84612640565b92506126fd60208501612640565b9150604084013590509250925092565b60008060008060808587031215612722578081fd5b61272b85612640565b935061273960208601612640565b925060408501359150606085013567ffffffffffffffff81111561275b578182fd5b8501601f8101871361276b578182fd5b61277a878235602084016125d0565b91505092959194509250565b60008060408385031215612798578182fd5b6127a183612640565b91506126c960208401612657565b600080604083850312156127c1578182fd5b6127ca83612640565b946020939093013593505050565b6000806000606084860312156127ec578283fd5b6127f584612640565b925060208401359150604084013567ffffffffffffffff811115612817578182fd5b61282386828701612667565b9150509250925092565b60006020828403121561283e578081fd5b611fe582612657565b600060208284031215612858578081fd5b8135611fe58161350c565b600060208284031215612874578081fd5b8151611fe58161350c565b600060208284031215612890578081fd5b813567ffffffffffffffff8111156128a6578182fd5b6116ce84828501612667565b6000602082840312156128c3578081fd5b5035919050565b600080604083850312156128dc578182fd5b50508035926020909101359150565b60008151808452612903816020860160208601613434565b601f01601f19169290920160200192915050565b80518252602081015160208301526040810151151560408301526001600160a01b036060820151166060830152608081015160808301525050565b60008351612964818460208801613434565b835190830190612978818360208801613434565b01949350505050565b60007f7b226e616d65223a20225761676d692043617264202300000000000000000000825283516129b9816016850160208801613434565b7f222c20226465736372697074696f6e223a20220000000000000000000000000060169184019182015283516129f6816029840160208801613434565b7f2e2052656465656d2061742068747470733a2f2f7761676d692e63617264732f602992909101918201527f72656465656d2d6769667400000000000000000000000000000000000000000060498201527f222c2022696d616765223a202268747470733a2f2f7777772e7761676d692e6360548201527f617264732f6f70656e7365612d7468756d626e61696c2e706e67227d000000006074820152609001949350505050565b60007f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000082528251612ad681601d850160208701613434565b91909101601d0192915050565b6001600160a01b0391909116815260200190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612b2960808301846128eb565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612b7557612b62838551612917565b9284019260a09290920191600101612b4f565b50909695505050505050565b901515815260200190565b600060208252611fe560208301846128eb565b60208082526018908201527f596f7520646f206e6f74206f776e207468697320676966740000000000000000604082015260600190565b6020808252601e908201527f476966742068617320616c7265616479206265656e2072656465656d65640000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201527f74206f6620626f756e6473000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526026908201527f476966742063616e6e6f74206265206c6573736572207468616e20676966742060408201527f6368617267650000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560408201527f726f206164647265737300000000000000000000000000000000000000000000606082015260800190565b6020808252602d908201527f4d6573736167652063616e6e6f742062652067726561746572207468616e203160408201527f3430206368617261637465727300000000000000000000000000000000000000606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60408201527f6578697374656e7420746f6b656e000000000000000000000000000000000000606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b60208082526031908201527f45524337323155524953746f726167653a2055524920717565727920666f722060408201527f6e6f6e6578697374656e7420746f6b656e000000000000000000000000000000606082015260800190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560408201527f7200000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f476966742063616e27742062652072656465656d656420796574000000000000604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b60208082526009908201527f302062616c616e63650000000000000000000000000000000000000000000000604082015260600190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201527f7574206f6620626f756e64730000000000000000000000000000000000000000606082015260800190565b60a08101610c8b8284612917565b90815260200190565b600082198211156133e5576133e56134ca565b500190565b6000826133f9576133f96134e0565b500490565b6000816000190483118215151615613418576134186134ca565b500290565b60008282101561342f5761342f6134ca565b500390565b60005b8381101561344f578181015183820152602001613437565b838111156110d35750506000910152565b60028104600182168061347457607f821691505b6020821081141561349557634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156134af576134af6134ca565b5060010190565b6000826134c5576134c56134e0565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610c3957600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220008889ac51708af645210120fe3547c78b3edd7431171a1d7a907b083ff0bf0564736f6c63430008000033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000b7761676d692e6361726473000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b7761676d692e6361726473000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e68747470733a2f2f7777772e7761676d692e63617264732f636f6e74726163742d6d657461646174612e6a736f6e000000000000000000000000000000000000

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000b7761676d692e6361726473000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b7761676d692e6361726473000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e68747470733a2f2f7777772e7761676d692e63617264732f636f6e74726163742d6d657461646174612e6a736f6e000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): wagmi.cards
Arg [1] : _symbol (string): wagmi.cards
Arg [2] : _metadata (string): https://www.wagmi.cards/contract-metadata.json

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [4] : 7761676d692e6361726473000000000000000000000000000000000000000000
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [6] : 7761676d692e6361726473000000000000000000000000000000000000000000
Arg [7] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [8] : 68747470733a2f2f7777772e7761676d692e63617264732f636f6e7472616374
Arg [9] : 2d6d657461646174612e6a736f6e000000000000000000000000000000000000


Loading