ETH Price: $2,334.99 (-0.31%)

Contract

0xC8BD034bFaD80e779FCDd87F0cdcCF8913124040
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Redeem With Toke...182943972023-10-06 22:19:47339 days ago1696630787IN
0xC8BD034b...913124040
0 ETH0.002249069.11722696
Redeem With Toke...178006342023-07-29 18:58:35408 days ago1690657115IN
0xC8BD034b...913124040
0 ETH0.0054714723.83099615
Redeem With Toke...161473372022-12-09 13:07:35641 days ago1670591255IN
0xC8BD034b...913124040
0 ETH0.0039924316.18369976
Redeem With Toke...161470132022-12-09 12:02:23641 days ago1670587343IN
0xC8BD034b...913124040
0 ETH0.0042410717.19156426
Redeem With Toke...160800892022-11-30 3:22:11650 days ago1669778531IN
0xC8BD034b...913124040
0 ETH0.0031294312.68606916
Redeem With Toke...156600192022-10-02 10:59:47709 days ago1664708387IN
0xC8BD034b...913124040
0 ETH0.001277775.17958981
Redeem With Toke...156063122022-09-24 22:50:23716 days ago1664059823IN
0xC8BD034b...913124040
0 ETH0.001157684.69279538
Redeem With Toke...154671392022-09-03 19:13:56737 days ago1662232436IN
0xC8BD034b...913124040
0 ETH0.001918317.77642584
Redeem With Toke...152172492022-07-26 9:09:45777 days ago1658826585IN
0xC8BD034b...913124040
0 ETH0.0027301111.06675538
Redeem With Toke...152172282022-07-26 9:05:03777 days ago1658826303IN
0xC8BD034b...913124040
0 ETH0.0025667210.40446533
Redeem With Toke...152104072022-07-25 7:46:30778 days ago1658735190IN
0xC8BD034b...913124040
0 ETH0.001552246.29217473
Redeem With Toke...150067672022-06-22 8:33:05811 days ago1655886785IN
0xC8BD034b...913124040
0 ETH0.004267917.30032683
Redeem With Toke...150043532022-06-21 21:41:51811 days ago1655847711IN
0xC8BD034b...913124040
0 ETH0.0113231627.43067221
Redeem With Toke...149741642022-06-16 15:51:26817 days ago1655394686IN
0xC8BD034b...913124040
0 ETH0.008761435.51514846
Redeem With Toke...149458682022-06-11 18:58:05821 days ago1654973885IN
0xC8BD034b...913124040
0 ETH0.0058182323.58589099
Redeem With Toke...149161792022-06-06 17:34:59826 days ago1654536899IN
0xC8BD034b...913124040
0 ETH0.0153972562.41414242
Redeem With Toke...149150932022-06-06 12:58:52827 days ago1654520332IN
0xC8BD034b...913124040
0 ETH0.0148830660.32983416
Redeem With Toke...149093052022-06-05 13:14:19828 days ago1654434859IN
0xC8BD034b...913124040
0 ETH0.01133745.95553604
Redeem With Toke...149017532022-06-04 6:22:13829 days ago1654323733IN
0xC8BD034b...913124040
0 ETH0.0078505331.8228397
Redeem With Toke...148938132022-06-02 23:29:03830 days ago1654212543IN
0xC8BD034b...913124040
0 ETH0.0126267551.18367897
Redeem With Toke...148837632022-06-01 8:13:27832 days ago1654071207IN
0xC8BD034b...913124040
0 ETH0.0066880927.11080116
Redeem With Toke...148828722022-06-01 4:39:57832 days ago1654058397IN
0xC8BD034b...913124040
0 ETH0.0090326136.61452258
Redeem With Toke...148790302022-05-31 13:46:32833 days ago1654004792IN
0xC8BD034b...913124040
0 ETH0.0088331635.80602725
Redeem With Toke...148780322022-05-31 9:48:11833 days ago1653990491IN
0xC8BD034b...913124040
0 ETH0.0053427721.65741891
Redeem With Toke...148761972022-05-31 2:24:31833 days ago1653963871IN
0xC8BD034b...913124040
0 ETH0.0049496521.55821869
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PleasrPortalMirror721

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : PleasrPortalMirror721.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@manifoldxyz/creator-core-solidity/contracts/extensions/ERC721/ERC721CreatorExtension.sol";
import "@manifoldxyz/creator-core-solidity/contracts/core/IERC721CreatorCore.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract PleasrPortalMirror721 is Ownable, ERC721CreatorExtension {
  using EnumerableSet for EnumerableSet.UintSet;
  using Strings for uint256;
  // Mirror contract 721: 0xef3c951e22c65f6256746f4e227e19a5bcbf393c
  ERC721 private _mirrorContract;
  // pplpleasr 721 creator contract: 0x213a57c79ef27c079f7ac98c4737333c51a95b02
  IERC721CreatorCore private _creator;
  // Mirror contract is a shared contract with arbitrary tokenIds not exclusive to plsr, need to maintain a list of eligible Ids
  EnumerableSet.UintSet private _redeemableTokenIdsSet;
  // toggle for when contract is ready to let users start redeeming after redeemable list is ready
  bool private _isActive;
  // URI for metadata
  string private _baseURI;

  constructor(address creator, address redeemableContract) {
    _creator = IERC721CreatorCore(creator);
    _mirrorContract = ERC721(redeemableContract);
  }

  function setIsActive(bool isActive) external onlyOwner {
    _isActive = isActive;
  }

  function addTokenIdsToRedeemableList(uint256[] calldata tokenIds)
    external
    onlyOwner
  {
    for (uint256 i = 0; i < tokenIds.length; i++) {
      _redeemableTokenIdsSet.add(tokenIds[i]);
    }
  }

  function removeTokenIdsFromRedeemableList(uint256[] calldata tokenIds)
    external
    onlyOwner
  {
    for (uint256 i = 0; i < tokenIds.length; i++) {
      _redeemableTokenIdsSet.remove(tokenIds[i]);
    }
  }

  function setBaseURI(string memory baseURI) external onlyOwner {
    _baseURI = baseURI;
  }

  function redeemWithTokenId(uint256[] calldata tokenIds) public {
    require(_isActive, "Redemption not active");
    // Go through all mirror tokenIds and redeem new token for user
    for (uint256 i = 0; i < tokenIds.length; i++) {
      uint256 id = tokenIds[i];
      require(_redeemableTokenIdsSet.contains(id), "Invalid tokenId");
      require(
        _mirrorContract.ownerOf(id) == msg.sender,
        "Token with TokenId not found in your wallet"
      );
      // burn
      _mirrorContract.transferFrom(msg.sender, address(0xdEaD), id);
      // Mint a new token assigning it the old uri
      string memory uri = string(
        abi.encodePacked(_baseURI, id.toString(), ".json")
      );
      _creator.mintExtension(msg.sender, uri);
    }
  }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 4 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 5 of 16 : IERC721CreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "./ICreatorCore.sol";

/**
 * @dev Core ERC721 creator interface
 */
interface IERC721CreatorCore is ICreatorCore {

    /**
     * @dev mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBase(address to) external returns (uint256);

    /**
     * @dev mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBase(address to, string calldata uri) external returns (uint256);

    /**
     * @dev batch mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBaseBatch(address to, uint16 count) external returns (uint256[] memory);

    /**
     * @dev batch mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBaseBatch(address to, string[] calldata uris) external returns (uint256[] memory);

    /**
     * @dev mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtension(address to) external returns (uint256);

    /**
     * @dev mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtension(address to, string calldata uri) external returns (uint256);

    /**
     * @dev batch mint a token. Can only be called by a registered extension.
     * Returns tokenIds minted
     */
    function mintExtensionBatch(address to, uint16 count) external returns (uint256[] memory);

    /**
     * @dev batch mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtensionBatch(address to, string[] calldata uris) external returns (uint256[] memory);

    /**
     * @dev burn a token. Can only be called by token owner or approved address.
     * On burn, calls back to the registered extension's onBurn method
     */
    function burn(uint256 tokenId) external;

}

File 6 of 16 : ERC721CreatorExtension.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "../CreatorExtension.sol";

/**
 * @dev Base ERC721 creator extension variables
 */
abstract contract ERC721CreatorExtension is CreatorExtension {

    /**
     * @dev Legacy extension interface identifiers (see CreatorExtension for more)
     *
     * {IERC165-supportsInterface} needs to return 'true' for this interface
     * in order backwards compatible with older creator contracts
     */

    // Required to be recognized as a contract to receive onBurn for older creator contracts
    bytes4 constant internal LEGACY_ERC721_EXTENSION_BURNABLE_INTERFACE = 0xf3f4e68b;

}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

/**
 * @dev Base creator extension variables
 */
abstract contract CreatorExtension is ERC165 {

    /**
     * @dev Legacy extension interface identifiers
     *
     * {IERC165-supportsInterface} needs to return 'true' for this interface
     * in order backwards compatible with older creator contracts
     */
    bytes4 constant internal LEGACY_EXTENSION_INTERFACE = 0x7005caad;

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

File 15 of 16 : ICreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @dev Core creator interface
 */
interface ICreatorCore is IERC165 {

    event ExtensionRegistered(address indexed extension, address indexed sender);
    event ExtensionUnregistered(address indexed extension, address indexed sender);
    event ExtensionBlacklisted(address indexed extension, address indexed sender);
    event MintPermissionsUpdated(address indexed extension, address indexed permissions, address indexed sender);
    event RoyaltiesUpdated(uint256 indexed tokenId, address payable[] receivers, uint256[] basisPoints);
    event DefaultRoyaltiesUpdated(address payable[] receivers, uint256[] basisPoints);
    event ExtensionRoyaltiesUpdated(address indexed extension, address payable[] receivers, uint256[] basisPoints);
    event ExtensionApproveTransferUpdated(address indexed extension, bool enabled);

    /**
     * @dev gets address of all extensions
     */
    function getExtensions() external view returns (address[] memory);

    /**
     * @dev add an extension.  Can only be called by contract owner or admin.
     * extension address must point to a contract implementing ICreatorExtension.
     * Returns True if newly added, False if already added.
     */
    function registerExtension(address extension, string calldata baseURI) external;

    /**
     * @dev add an extension.  Can only be called by contract owner or admin.
     * extension address must point to a contract implementing ICreatorExtension.
     * Returns True if newly added, False if already added.
     */
    function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) external;

    /**
     * @dev add an extension.  Can only be called by contract owner or admin.
     * Returns True if removed, False if already removed.
     */
    function unregisterExtension(address extension) external;

    /**
     * @dev blacklist an extension.  Can only be called by contract owner or admin.
     * This function will destroy all ability to reference the metadata of any tokens created
     * by the specified extension. It will also unregister the extension if needed.
     * Returns True if removed, False if already removed.
     */
    function blacklistExtension(address extension) external;

    /**
     * @dev set the baseTokenURI of an extension.  Can only be called by extension.
     */
    function setBaseTokenURIExtension(string calldata uri) external;

    /**
     * @dev set the baseTokenURI of an extension.  Can only be called by extension.
     * For tokens with no uri configured, tokenURI will return "uri+tokenId"
     */
    function setBaseTokenURIExtension(string calldata uri, bool identical) external;

    /**
     * @dev set the common prefix of an extension.  Can only be called by extension.
     * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI"
     * Useful if you want to use ipfs/arweave
     */
    function setTokenURIPrefixExtension(string calldata prefix) external;

    /**
     * @dev set the tokenURI of a token extension.  Can only be called by extension that minted token.
     */
    function setTokenURIExtension(uint256 tokenId, string calldata uri) external;

    /**
     * @dev set the tokenURI of a token extension for multiple tokens.  Can only be called by extension that minted token.
     */
    function setTokenURIExtension(uint256[] memory tokenId, string[] calldata uri) external;

    /**
     * @dev set the baseTokenURI for tokens with no extension.  Can only be called by owner/admin.
     * For tokens with no uri configured, tokenURI will return "uri+tokenId"
     */
    function setBaseTokenURI(string calldata uri) external;

    /**
     * @dev set the common prefix for tokens with no extension.  Can only be called by owner/admin.
     * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI"
     * Useful if you want to use ipfs/arweave
     */
    function setTokenURIPrefix(string calldata prefix) external;

    /**
     * @dev set the tokenURI of a token with no extension.  Can only be called by owner/admin.
     */
    function setTokenURI(uint256 tokenId, string calldata uri) external;

    /**
     * @dev set the tokenURI of multiple tokens with no extension.  Can only be called by owner/admin.
     */
    function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external;

    /**
     * @dev set a permissions contract for an extension.  Used to control minting.
     */
    function setMintPermissions(address extension, address permissions) external;

    /**
     * @dev Configure so transfers of tokens created by the caller (must be extension) gets approval
     * from the extension before transferring
     */
    function setApproveTransferExtension(bool enabled) external;

    /**
     * @dev get the extension of a given token
     */
    function tokenExtension(uint256 tokenId) external view returns (address);

    /**
     * @dev Set default royalties
     */
    function setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Set royalties of a token
     */
    function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Set royalties of an extension
     */
    function setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Get royalites of a token.  Returns list of receivers and basisPoints
     */
    function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
    
    // Royalty support for various other standards
    function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory);
    function getFeeBps(uint256 tokenId) external view returns (uint[] memory);
    function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
    function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256);

}

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"creator","type":"address"},{"internalType":"address","name":"redeemableContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"addTokenIdsToRedeemableList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"redeemWithTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"removeTokenIdsFromRedeemableList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isActive","type":"bool"}],"name":"setIsActive","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001d9238038062001d928339818101604052810190620000379190620001c4565b620000576200004b620000e160201b60201c565b620000e960201b60201c565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506200025e565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620001be8162000244565b92915050565b60008060408385031215620001de57620001dd6200023f565b5b6000620001ee85828601620001ad565b92505060206200020185828601620001ad565b9150509250929050565b600062000218826200021f565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200024f816200020b565b81146200025b57600080fd5b50565b611b24806200026e6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806355f804b31161006657806355f804b31461011c578063715018a6146101385780638da5cb5b14610142578063f239cda914610160578063f2fde38b1461017c57610093565b806301ffc9a7146100985780632750fc78146100c857806336347479146100e457806354f1ee7b14610100575b600080fd5b6100b260048036038101906100ad9190611115565b610198565b6040516100bf9190611451565b60405180910390f35b6100e260048036038101906100dd91906110e8565b6101f9565b005b6100fe60048036038101906100f9919061109b565b610292565b005b61011a6004803603810190610115919061109b565b610362565b005b61013660048036038101906101319190611142565b6106d4565b005b61014061076a565b005b61014a6107f2565b60405161015791906113cf565b60405180910390f35b61017a6004803603810190610175919061109b565b61081b565b005b61019660048036038101906101919190611041565b6108eb565b005b6000637005caad60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101f257506101f1826109e3565b5b9050919050565b610201610a4d565b73ffffffffffffffffffffffffffffffffffffffff1661021f6107f2565b73ffffffffffffffffffffffffffffffffffffffff1614610275576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161026c906114ec565b60405180910390fd5b80600560006101000a81548160ff02191690831515021790555050565b61029a610a4d565b73ffffffffffffffffffffffffffffffffffffffff166102b86107f2565b73ffffffffffffffffffffffffffffffffffffffff161461030e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610305906114ec565b60405180910390fd5b60005b8282905081101561035d57610349838383818110610332576103316118c3565b5b905060200201356003610a5590919063ffffffff16565b5080806103559061178d565b915050610311565b505050565b600560009054906101000a900460ff166103b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a89061146c565b60405180910390fd5b60005b828290508110156106cf5760008383838181106103d4576103d36118c3565b5b9050602002013590506103f1816003610a6f90919063ffffffff16565b610430576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610427906114ac565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016104a2919061150c565b60206040518083038186803b1580156104ba57600080fd5b505afa1580156104ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f2919061106e565b73ffffffffffffffffffffffffffffffffffffffff1614610548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053f906114cc565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3361dead846040518463ffffffff1660e01b81526004016105a9939291906113ea565b600060405180830381600087803b1580156105c357600080fd5b505af11580156105d7573d6000803e3d6000fd5b50505050600060066105e883610a89565b6040516020016105f99291906113a0565b6040516020818303038152906040529050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe2e1f5833836040518363ffffffff1660e01b8152600401610667929190611421565b602060405180830381600087803b15801561068157600080fd5b505af1158015610695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b9919061118b565b50505080806106c79061178d565b9150506103b4565b505050565b6106dc610a4d565b73ffffffffffffffffffffffffffffffffffffffff166106fa6107f2565b73ffffffffffffffffffffffffffffffffffffffff1614610750576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610747906114ec565b60405180910390fd5b8060069080519060200190610766929190610e6f565b5050565b610772610a4d565b73ffffffffffffffffffffffffffffffffffffffff166107906107f2565b73ffffffffffffffffffffffffffffffffffffffff16146107e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107dd906114ec565b60405180910390fd5b6107f06000610bea565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610823610a4d565b73ffffffffffffffffffffffffffffffffffffffff166108416107f2565b73ffffffffffffffffffffffffffffffffffffffff1614610897576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088e906114ec565b60405180910390fd5b60005b828290508110156108e6576108d28383838181106108bb576108ba6118c3565b5b905060200201356003610cae90919063ffffffff16565b5080806108de9061178d565b91505061089a565b505050565b6108f3610a4d565b73ffffffffffffffffffffffffffffffffffffffff166109116107f2565b73ffffffffffffffffffffffffffffffffffffffff1614610967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095e906114ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156109d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ce9061148c565b60405180910390fd5b6109e081610bea565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b6000610a67836000018360001b610cc8565b905092915050565b6000610a81836000018360001b610d38565b905092915050565b60606000821415610ad1576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050610be5565b600082905060005b60008214610b03578080610aec9061178d565b915050600a82610afc919061160f565b9150610ad9565b60008167ffffffffffffffff811115610b1f57610b1e6118f2565b5b6040519080825280601f01601f191660200182016040528015610b515781602001600182028036833780820191505090505b5090505b60008514610bde57600182610b6a9190611640565b9150600a85610b7991906117d6565b6030610b8591906115b9565b60f81b818381518110610b9b57610b9a6118c3565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85610bd7919061160f565b9450610b55565b8093505050505b919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000610cc0836000018360001b610d5b565b905092915050565b6000610cd48383610d38565b610d2d578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050610d32565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b60008083600101600084815260200190815260200160002054905060008114610e63576000600182610d8d9190611640565b9050600060018660000180549050610da59190611640565b9050818114610e14576000866000018281548110610dc657610dc56118c3565b5b9060005260206000200154905080876000018481548110610dea57610de96118c3565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480610e2857610e27611894565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610e69565b60009150505b92915050565b828054610e7b9061172a565b90600052602060002090601f016020900481019282610e9d5760008555610ee4565b82601f10610eb657805160ff1916838001178555610ee4565b82800160010185558215610ee4579182015b82811115610ee3578251825591602001919060010190610ec8565b5b509050610ef19190610ef5565b5090565b5b80821115610f0e576000816000905550600101610ef6565b5090565b6000610f25610f208461154c565b611527565b905082815260208101848484011115610f4157610f40611930565b5b610f4c8482856116e8565b509392505050565b600081359050610f6381611a92565b92915050565b600081519050610f7881611a92565b92915050565b60008083601f840112610f9457610f93611926565b5b8235905067ffffffffffffffff811115610fb157610fb0611921565b5b602083019150836020820283011115610fcd57610fcc61192b565b5b9250929050565b600081359050610fe381611aa9565b92915050565b600081359050610ff881611ac0565b92915050565b600082601f83011261101357611012611926565b5b8135611023848260208601610f12565b91505092915050565b60008151905061103b81611ad7565b92915050565b6000602082840312156110575761105661193a565b5b600061106584828501610f54565b91505092915050565b6000602082840312156110845761108361193a565b5b600061109284828501610f69565b91505092915050565b600080602083850312156110b2576110b161193a565b5b600083013567ffffffffffffffff8111156110d0576110cf611935565b5b6110dc85828601610f7e565b92509250509250929050565b6000602082840312156110fe576110fd61193a565b5b600061110c84828501610fd4565b91505092915050565b60006020828403121561112b5761112a61193a565b5b600061113984828501610fe9565b91505092915050565b6000602082840312156111585761115761193a565b5b600082013567ffffffffffffffff81111561117657611175611935565b5b61118284828501610ffe565b91505092915050565b6000602082840312156111a1576111a061193a565b5b60006111af8482850161102c565b91505092915050565b6111c181611674565b82525050565b6111d081611686565b82525050565b60006111e182611592565b6111eb818561159d565b93506111fb8185602086016116f7565b6112048161193f565b840191505092915050565b600061121a82611592565b61122481856115ae565b93506112348185602086016116f7565b80840191505092915050565b6000815461124d8161172a565b61125781866115ae565b945060018216600081146112725760018114611283576112b6565b60ff198316865281860193506112b6565b61128c8561157d565b60005b838110156112ae5781548189015260018201915060208101905061128f565b838801955050505b50505092915050565b60006112cc60158361159d565b91506112d782611950565b602082019050919050565b60006112ef60268361159d565b91506112fa82611979565b604082019050919050565b6000611312600f8361159d565b915061131d826119c8565b602082019050919050565b6000611335602b8361159d565b9150611340826119f1565b604082019050919050565b60006113586005836115ae565b915061136382611a40565b600582019050919050565b600061137b60208361159d565b915061138682611a69565b602082019050919050565b61139a816116de565b82525050565b60006113ac8285611240565b91506113b8828461120f565b91506113c38261134b565b91508190509392505050565b60006020820190506113e460008301846111b8565b92915050565b60006060820190506113ff60008301866111b8565b61140c60208301856111b8565b6114196040830184611391565b949350505050565b600060408201905061143660008301856111b8565b818103602083015261144881846111d6565b90509392505050565b600060208201905061146660008301846111c7565b92915050565b60006020820190508181036000830152611485816112bf565b9050919050565b600060208201905081810360008301526114a5816112e2565b9050919050565b600060208201905081810360008301526114c581611305565b9050919050565b600060208201905081810360008301526114e581611328565b9050919050565b600060208201905081810360008301526115058161136e565b9050919050565b60006020820190506115216000830184611391565b92915050565b6000611531611542565b905061153d828261175c565b919050565b6000604051905090565b600067ffffffffffffffff821115611567576115666118f2565b5b6115708261193f565b9050602081019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b60006115c4826116de565b91506115cf836116de565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561160457611603611807565b5b828201905092915050565b600061161a826116de565b9150611625836116de565b92508261163557611634611836565b5b828204905092915050565b600061164b826116de565b9150611656836116de565b92508282101561166957611668611807565b5b828203905092915050565b600061167f826116be565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156117155780820151818401526020810190506116fa565b83811115611724576000848401525b50505050565b6000600282049050600182168061174257607f821691505b6020821081141561175657611755611865565b5b50919050565b6117658261193f565b810181811067ffffffffffffffff82111715611784576117836118f2565b5b80604052505050565b6000611798826116de565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156117cb576117ca611807565b5b600182019050919050565b60006117e1826116de565b91506117ec836116de565b9250826117fc576117fb611836565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f526564656d7074696f6e206e6f74206163746976650000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f496e76616c696420746f6b656e49640000000000000000000000000000000000600082015250565b7f546f6b656e207769746820546f6b656e4964206e6f7420666f756e6420696e2060008201527f796f75722077616c6c6574000000000000000000000000000000000000000000602082015250565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b611a9b81611674565b8114611aa657600080fd5b50565b611ab281611686565b8114611abd57600080fd5b50565b611ac981611692565b8114611ad457600080fd5b50565b611ae0816116de565b8114611aeb57600080fd5b5056fea2646970667358221220a2d6bb7bb75857d89bf66aaa9d0dde277720a3224ccbea2c4c5b533f7cb7ca4664736f6c63430008070033000000000000000000000000213a57c79ef27c079f7ac98c4737333c51a95b02000000000000000000000000ef3c951e22c65f6256746f4e227e19a5bcbf393c

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c806355f804b31161006657806355f804b31461011c578063715018a6146101385780638da5cb5b14610142578063f239cda914610160578063f2fde38b1461017c57610093565b806301ffc9a7146100985780632750fc78146100c857806336347479146100e457806354f1ee7b14610100575b600080fd5b6100b260048036038101906100ad9190611115565b610198565b6040516100bf9190611451565b60405180910390f35b6100e260048036038101906100dd91906110e8565b6101f9565b005b6100fe60048036038101906100f9919061109b565b610292565b005b61011a6004803603810190610115919061109b565b610362565b005b61013660048036038101906101319190611142565b6106d4565b005b61014061076a565b005b61014a6107f2565b60405161015791906113cf565b60405180910390f35b61017a6004803603810190610175919061109b565b61081b565b005b61019660048036038101906101919190611041565b6108eb565b005b6000637005caad60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101f257506101f1826109e3565b5b9050919050565b610201610a4d565b73ffffffffffffffffffffffffffffffffffffffff1661021f6107f2565b73ffffffffffffffffffffffffffffffffffffffff1614610275576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161026c906114ec565b60405180910390fd5b80600560006101000a81548160ff02191690831515021790555050565b61029a610a4d565b73ffffffffffffffffffffffffffffffffffffffff166102b86107f2565b73ffffffffffffffffffffffffffffffffffffffff161461030e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610305906114ec565b60405180910390fd5b60005b8282905081101561035d57610349838383818110610332576103316118c3565b5b905060200201356003610a5590919063ffffffff16565b5080806103559061178d565b915050610311565b505050565b600560009054906101000a900460ff166103b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a89061146c565b60405180910390fd5b60005b828290508110156106cf5760008383838181106103d4576103d36118c3565b5b9050602002013590506103f1816003610a6f90919063ffffffff16565b610430576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610427906114ac565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016104a2919061150c565b60206040518083038186803b1580156104ba57600080fd5b505afa1580156104ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f2919061106e565b73ffffffffffffffffffffffffffffffffffffffff1614610548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053f906114cc565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3361dead846040518463ffffffff1660e01b81526004016105a9939291906113ea565b600060405180830381600087803b1580156105c357600080fd5b505af11580156105d7573d6000803e3d6000fd5b50505050600060066105e883610a89565b6040516020016105f99291906113a0565b6040516020818303038152906040529050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe2e1f5833836040518363ffffffff1660e01b8152600401610667929190611421565b602060405180830381600087803b15801561068157600080fd5b505af1158015610695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b9919061118b565b50505080806106c79061178d565b9150506103b4565b505050565b6106dc610a4d565b73ffffffffffffffffffffffffffffffffffffffff166106fa6107f2565b73ffffffffffffffffffffffffffffffffffffffff1614610750576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610747906114ec565b60405180910390fd5b8060069080519060200190610766929190610e6f565b5050565b610772610a4d565b73ffffffffffffffffffffffffffffffffffffffff166107906107f2565b73ffffffffffffffffffffffffffffffffffffffff16146107e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107dd906114ec565b60405180910390fd5b6107f06000610bea565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610823610a4d565b73ffffffffffffffffffffffffffffffffffffffff166108416107f2565b73ffffffffffffffffffffffffffffffffffffffff1614610897576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088e906114ec565b60405180910390fd5b60005b828290508110156108e6576108d28383838181106108bb576108ba6118c3565b5b905060200201356003610cae90919063ffffffff16565b5080806108de9061178d565b91505061089a565b505050565b6108f3610a4d565b73ffffffffffffffffffffffffffffffffffffffff166109116107f2565b73ffffffffffffffffffffffffffffffffffffffff1614610967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095e906114ec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156109d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ce9061148c565b60405180910390fd5b6109e081610bea565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b6000610a67836000018360001b610cc8565b905092915050565b6000610a81836000018360001b610d38565b905092915050565b60606000821415610ad1576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050610be5565b600082905060005b60008214610b03578080610aec9061178d565b915050600a82610afc919061160f565b9150610ad9565b60008167ffffffffffffffff811115610b1f57610b1e6118f2565b5b6040519080825280601f01601f191660200182016040528015610b515781602001600182028036833780820191505090505b5090505b60008514610bde57600182610b6a9190611640565b9150600a85610b7991906117d6565b6030610b8591906115b9565b60f81b818381518110610b9b57610b9a6118c3565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85610bd7919061160f565b9450610b55565b8093505050505b919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000610cc0836000018360001b610d5b565b905092915050565b6000610cd48383610d38565b610d2d578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050610d32565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b60008083600101600084815260200190815260200160002054905060008114610e63576000600182610d8d9190611640565b9050600060018660000180549050610da59190611640565b9050818114610e14576000866000018281548110610dc657610dc56118c3565b5b9060005260206000200154905080876000018481548110610dea57610de96118c3565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480610e2857610e27611894565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610e69565b60009150505b92915050565b828054610e7b9061172a565b90600052602060002090601f016020900481019282610e9d5760008555610ee4565b82601f10610eb657805160ff1916838001178555610ee4565b82800160010185558215610ee4579182015b82811115610ee3578251825591602001919060010190610ec8565b5b509050610ef19190610ef5565b5090565b5b80821115610f0e576000816000905550600101610ef6565b5090565b6000610f25610f208461154c565b611527565b905082815260208101848484011115610f4157610f40611930565b5b610f4c8482856116e8565b509392505050565b600081359050610f6381611a92565b92915050565b600081519050610f7881611a92565b92915050565b60008083601f840112610f9457610f93611926565b5b8235905067ffffffffffffffff811115610fb157610fb0611921565b5b602083019150836020820283011115610fcd57610fcc61192b565b5b9250929050565b600081359050610fe381611aa9565b92915050565b600081359050610ff881611ac0565b92915050565b600082601f83011261101357611012611926565b5b8135611023848260208601610f12565b91505092915050565b60008151905061103b81611ad7565b92915050565b6000602082840312156110575761105661193a565b5b600061106584828501610f54565b91505092915050565b6000602082840312156110845761108361193a565b5b600061109284828501610f69565b91505092915050565b600080602083850312156110b2576110b161193a565b5b600083013567ffffffffffffffff8111156110d0576110cf611935565b5b6110dc85828601610f7e565b92509250509250929050565b6000602082840312156110fe576110fd61193a565b5b600061110c84828501610fd4565b91505092915050565b60006020828403121561112b5761112a61193a565b5b600061113984828501610fe9565b91505092915050565b6000602082840312156111585761115761193a565b5b600082013567ffffffffffffffff81111561117657611175611935565b5b61118284828501610ffe565b91505092915050565b6000602082840312156111a1576111a061193a565b5b60006111af8482850161102c565b91505092915050565b6111c181611674565b82525050565b6111d081611686565b82525050565b60006111e182611592565b6111eb818561159d565b93506111fb8185602086016116f7565b6112048161193f565b840191505092915050565b600061121a82611592565b61122481856115ae565b93506112348185602086016116f7565b80840191505092915050565b6000815461124d8161172a565b61125781866115ae565b945060018216600081146112725760018114611283576112b6565b60ff198316865281860193506112b6565b61128c8561157d565b60005b838110156112ae5781548189015260018201915060208101905061128f565b838801955050505b50505092915050565b60006112cc60158361159d565b91506112d782611950565b602082019050919050565b60006112ef60268361159d565b91506112fa82611979565b604082019050919050565b6000611312600f8361159d565b915061131d826119c8565b602082019050919050565b6000611335602b8361159d565b9150611340826119f1565b604082019050919050565b60006113586005836115ae565b915061136382611a40565b600582019050919050565b600061137b60208361159d565b915061138682611a69565b602082019050919050565b61139a816116de565b82525050565b60006113ac8285611240565b91506113b8828461120f565b91506113c38261134b565b91508190509392505050565b60006020820190506113e460008301846111b8565b92915050565b60006060820190506113ff60008301866111b8565b61140c60208301856111b8565b6114196040830184611391565b949350505050565b600060408201905061143660008301856111b8565b818103602083015261144881846111d6565b90509392505050565b600060208201905061146660008301846111c7565b92915050565b60006020820190508181036000830152611485816112bf565b9050919050565b600060208201905081810360008301526114a5816112e2565b9050919050565b600060208201905081810360008301526114c581611305565b9050919050565b600060208201905081810360008301526114e581611328565b9050919050565b600060208201905081810360008301526115058161136e565b9050919050565b60006020820190506115216000830184611391565b92915050565b6000611531611542565b905061153d828261175c565b919050565b6000604051905090565b600067ffffffffffffffff821115611567576115666118f2565b5b6115708261193f565b9050602081019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b60006115c4826116de565b91506115cf836116de565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561160457611603611807565b5b828201905092915050565b600061161a826116de565b9150611625836116de565b92508261163557611634611836565b5b828204905092915050565b600061164b826116de565b9150611656836116de565b92508282101561166957611668611807565b5b828203905092915050565b600061167f826116be565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156117155780820151818401526020810190506116fa565b83811115611724576000848401525b50505050565b6000600282049050600182168061174257607f821691505b6020821081141561175657611755611865565b5b50919050565b6117658261193f565b810181811067ffffffffffffffff82111715611784576117836118f2565b5b80604052505050565b6000611798826116de565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156117cb576117ca611807565b5b600182019050919050565b60006117e1826116de565b91506117ec836116de565b9250826117fc576117fb611836565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f526564656d7074696f6e206e6f74206163746976650000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f496e76616c696420746f6b656e49640000000000000000000000000000000000600082015250565b7f546f6b656e207769746820546f6b656e4964206e6f7420666f756e6420696e2060008201527f796f75722077616c6c6574000000000000000000000000000000000000000000602082015250565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b611a9b81611674565b8114611aa657600080fd5b50565b611ab281611686565b8114611abd57600080fd5b50565b611ac981611692565b8114611ad457600080fd5b50565b611ae0816116de565b8114611aeb57600080fd5b5056fea2646970667358221220a2d6bb7bb75857d89bf66aaa9d0dde277720a3224ccbea2c4c5b533f7cb7ca4664736f6c63430008070033

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

000000000000000000000000213a57c79ef27c079f7ac98c4737333c51a95b02000000000000000000000000ef3c951e22c65f6256746f4e227e19a5bcbf393c

-----Decoded View---------------
Arg [0] : creator (address): 0x213A57c79eF27C079f7ac98c4737333C51a95B02
Arg [1] : redeemableContract (address): 0xEF3c951e22c65F6256746F4e227e19A5BcbF393C

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000213a57c79ef27c079f7ac98c4737333c51a95b02
Arg [1] : 000000000000000000000000ef3c951e22c65f6256746f4e227e19a5bcbf393c


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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