MATIC Price: $1.00 (+1.23%)
Gas: 76 Gwei
 

Sponsored

Transaction Hash
Method
Block
From
To
Value
Safe Transfer Fr...530569352024-02-03 1:01:5421 days 4 hrs ago1706922114IN
0x4bF5A9...03D945Da
0 MATIC0.0033828632.49252245
Set Approval For...530280632024-02-02 6:50:3421 days 22 hrs ago1706856634IN
0x4bF5A9...03D945Da
0 MATIC0.0029042762.82904496
Safe Transfer Fr...530140742024-02-01 21:43:3122 days 7 hrs ago1706823811IN
0x4bF5A9...03D945Da
0 MATIC0.0033112631.82443127
Transfer From530020402024-02-01 14:14:5922 days 15 hrs ago1706796899IN
0x4bF5A9...03D945Da
0 MATIC0.018458182.34633106
Burn530017472024-02-01 14:03:3322 days 15 hrs ago1706796213IN
0x4bF5A9...03D945Da
0 MATIC0.01209836173.03405122
Safe Transfer Fr...528980632024-01-29 20:18:4425 days 9 hrs ago1706559524IN
0x4bF5A9...03D945Da
0 MATIC0.0021841233.33263309
Set Approval For...528917042024-01-29 16:20:2525 days 13 hrs ago1706545225IN
0x4bF5A9...03D945Da
0 MATIC0.0104549226.58601034
Safe Transfer Fr...528761722024-01-29 6:51:4425 days 22 hrs ago1706511104IN
0x4bF5A9...03D945Da
0 MATIC0.0034359133.01221495
Safe Transfer Fr...527858042024-01-26 21:27:1328 days 8 hrs ago1706304433IN
0x4bF5A9...03D945Da
0 MATIC0.0020571431.41591824
Change Metadata ...527368472024-01-25 14:45:5629 days 14 hrs ago1706193956IN
0x4bF5A9...03D945Da
0 MATIC0.00461055148.09691815
Change Metadata ...527124182024-01-24 23:00:4430 days 6 hrs ago1706137244IN
0x4bF5A9...03D945Da
0 MATIC0.0009387630.15447162
Safe Transfer Fr...526425682024-01-23 2:51:2032 days 2 hrs ago1705978280IN
0x4bF5A9...03D945Da
0 MATIC0.0036339830.00043759
Change Metadata ...526391872024-01-23 0:44:4632 days 4 hrs ago1705970686IN
0x4bF5A9...03D945Da
0 MATIC0.0009339630.00017852
Safe Transfer Fr...524385502024-01-17 18:00:1237 days 11 hrs ago1705514412IN
0x4bF5A9...03D945Da
0 MATIC0.0063936551.68886763
Edit Data522600722024-01-13 4:07:4742 days 1 hr ago1705118867IN
0x4bF5A9...03D945Da
0 MATIC0.0015030630.00000006
Set Approval For...516841122023-12-29 4:15:4357 days 1 hr ago1703823343IN
0x4bF5A9...03D945Da
0 MATIC0.0044936797.21309859
Edit Data477074032023-09-18 22:27:04158 days 7 hrs ago1695076024IN
0x4bF5A9...03D945Da
0 MATIC0.0234577184.23271374
Edit Data477067082023-09-18 21:59:10158 days 7 hrs ago1695074350IN
0x4bF5A9...03D945Da
0 MATIC0.01679044116.77548166
Change Metadata ...477063452023-09-18 21:44:29158 days 7 hrs ago1695073469IN
0x4bF5A9...03D945Da
0 MATIC0.002596283.39340493
Edit Data470621352023-09-02 16:36:41174 days 12 hrs ago1693672601IN
0x4bF5A9...03D945Da
0 MATIC0.01922788103.13726852
Safe Transfer Fr...440906932023-06-19 12:40:05249 days 16 hrs ago1687178405IN
0x4bF5A9...03D945Da
0 MATIC0.01597873162.656607
Safe Transfer Fr...375930842023-01-02 19:18:02417 days 10 hrs ago1672687082IN
0x4bF5A9...03D945Da
0 MATIC0.0037900836.64255605
Safe Transfer Fr...372204522022-12-24 13:41:28426 days 15 hrs ago1671889288IN
0x4bF5A9...03D945Da
0 MATIC0.00783994120.86188966
Safe Transfer Fr...372204272022-12-24 13:40:38426 days 15 hrs ago1671889238IN
0x4bF5A9...03D945Da
0 MATIC0.00922951142.28374113
Safe Transfer Fr...372204012022-12-24 13:39:42426 days 15 hrs ago1671889182IN
0x4bF5A9...03D945Da
0 MATIC0.01237256119.61793523
View all transactions

Latest 1 internal transaction

Parent Txn Hash Block From To Value
351557442022-11-03 16:26:34477 days 13 hrs ago1667492794  Contract Creation0 MATIC
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xe1E38C...cf014c53
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
FlexiPunkTLD

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 16 : FlexiPunkTLD.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "./interfaces/IFlexiPunkMetadata.sol";
import "../../interfaces/IBasePunkTLD.sol";
import "../../lib/strings.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "base64-sol/base64.sol";

/// @title Punk Domains TLD contract (Flexi)
/// @author Tempe Techie
/// @notice Dynamically generated NFT contract which represents a top-level domain
contract FlexiPunkTLD is IBasePunkTLD, ERC721, Ownable, ReentrancyGuard {
  using strings for string;

  // Domain struct is defined in IBasePunkTLD

  address public immutable factoryAddress; // FlexiPunkTLDFactory address
  address public metadataAddress; // FlexiPunkMetadata address
  address public minter; // address which is allowed to mint domains even if contract is paused
  address public royaltyFeeUpdater; // address which is allowed to change the royalty fee
  address public royaltyFeeReceiver; // address which receives the royalty fee

  bool public buyingEnabled = false; // buying domains enabled
  bool public buyingDisabledForever = false; // buying domains disabled forever
  bool public metadataFrozen = false; // metadata address frozen forever

  uint256 public totalSupply;
  uint256 public idCounter = 1; // up only

  uint256 public override price; // domain price
  uint256 public royalty; // share of each domain purchase (in bips) that goes to Punk Domains
  uint256 public override referral = 1000; // share of each domain purchase (in bips) that goes to the referrer (referral fee)
  uint256 public nameMaxLength = 140; // max length of a domain name
  
  mapping (string => Domain) public override domains; // mapping (domain name => Domain struct); Domain struct is defined in IBasePunkTLD
  mapping (uint256 => string) public domainIdsNames; // mapping (tokenId => domain name)
  mapping (address => string) public override defaultNames; // user's default domain

  event MintingDisabledForever(address user);

  constructor(
    string memory _name,
    string memory _symbol,
    address _tldOwner,
    uint256 _domainPrice,
    bool _buyingEnabled,
    uint256 _royalty,
    address _factoryAddress,
    address _metadataAddress
  ) ERC721(_name, _symbol) {
    price = _domainPrice;
    buyingEnabled = _buyingEnabled;
    royalty = _royalty;
    metadataAddress = _metadataAddress;

    Ownable factory = Ownable(_factoryAddress);

    factoryAddress = _factoryAddress;
    royaltyFeeUpdater = factory.owner();
    royaltyFeeReceiver = factory.owner();

    transferOwnership(_tldOwner);
  }

  // READ

  // Domain getters - you can also get all Domain data by calling the auto-generated domains(domainName) method
  function getDomainHolder(string calldata _domainName) public override view returns(address) {
    return domains[strings.lower(_domainName)].holder;
  }

  function getDomainData(string calldata _domainName) public override view returns(string memory) {
    return domains[strings.lower(_domainName)].data; // should be a JSON object
  }

  function tokenURI(uint256 _tokenId) public view override returns (string memory) {
    return IFlexiPunkMetadata(metadataAddress).getMetadata(
      domains[domainIdsNames[_tokenId]].name, 
      name(), 
      _tokenId
    );
  }

  // WRITE

  /// @notice Flexi-specific function
  function burn(string calldata _domainName) external {
    string memory dName = strings.lower(_domainName);
    require(domains[dName].holder == _msgSender(), "You do not own the selected domain");
    uint256 tokenId = domains[dName].tokenId;
    delete domainIdsNames[tokenId]; // delete tokenId => domainName mapping
    delete domains[dName]; // delete string => Domain struct mapping

    if (keccak256(bytes(defaultNames[_msgSender()])) == keccak256(bytes(dName))) {
      delete defaultNames[_msgSender()];
    }

    _burn(tokenId); // burn the token
    --totalSupply;
    emit DomainBurned(_msgSender(), dName);
  }

  /// @notice Default domain is the domain name that reverse resolver returns for a given address.
  function editDefaultDomain(string calldata _domainName) external {
    string memory dName = strings.lower(_domainName);
    require(domains[dName].holder == _msgSender(), "You do not own the selected domain");
    defaultNames[_msgSender()] = dName;
    emit DefaultDomainChanged(_msgSender(), dName);
  }

  /// @notice Edit domain custom data. Make sure to not accidentally delete previous data. Fetch previous data first.
  /// @param _domainName Only domain name, no TLD/extension.
  /// @param _data Custom data needs to be in a JSON object format.
  function editData(string calldata _domainName, string calldata _data) external {
    string memory dName = strings.lower(_domainName);
    require(domains[dName].holder == _msgSender(), "Only domain holder can edit their data");
    domains[dName].data = _data;
    emit DataChanged(_msgSender());
  }

  /// @notice Mint a new domain name as NFT (no dots and spaces allowed).
  /// @param _domainName Enter domain name without TLD and make sure letters are in lowercase form.
  /// @return token ID
  function mint(
    string memory _domainName,
    address _domainHolder,
    address _referrer
  ) external payable override nonReentrant returns(uint256) {
    require(!buyingDisabledForever, "Domain minting disabled forever");
    require(buyingEnabled || _msgSender() == owner() || _msgSender() == minter, "Buying domains disabled");
    require(msg.value >= price, "Value below price");

    _sendPayment(msg.value, _referrer);

    return _mintDomain(_domainName, _domainHolder, "");
  }

  function _mintDomain(
    string memory _domainNameRaw, 
    address _domainHolder,
    string memory _data
  ) internal returns(uint256) {
    // convert domain name to lowercase (only works for ascii, clients should enforce ascii domains only)
    string memory _domainName = strings.lower(_domainNameRaw);

    require(strings.len(strings.toSlice(_domainName)) > 0, "Domain name empty");
    require(bytes(_domainName).length < nameMaxLength, "Domain name is too long");
    require(strings.count(strings.toSlice(_domainName), strings.toSlice(".")) == 0, "There should be no dots in the name");
    require(strings.count(strings.toSlice(_domainName), strings.toSlice(" ")) == 0, "There should be no spaces in the name");
    require(domains[_domainName].holder == address(0), "Domain with this name already exists");

    _mint(_domainHolder, idCounter);

    Domain memory newDomain; // Domain struct is defined in IBasePunkTLD
    
    // store data in Domain struct
    newDomain.name = _domainName;
    newDomain.tokenId = idCounter;
    newDomain.holder = _domainHolder;
    newDomain.data = _data;

    // add to both mappings
    domains[_domainName] = newDomain;
    domainIdsNames[idCounter] = _domainName;

    if (bytes(defaultNames[_domainHolder]).length == 0) {
      defaultNames[_domainHolder] = _domainName; // if default domain name is not set for that holder, set it now
    }
    
    emit DomainCreated(_msgSender(), _domainHolder, string(abi.encodePacked(_domainName, name())));

    ++idCounter;
    ++totalSupply;

    return idCounter-1;
  }

  function _sendPayment(uint256 _paymentAmount, address _referrer) internal {
    if (royalty > 0 && royalty < 5000) { 
      // send royalty - must be less than 50% (5000 bips)
      (bool sentRoyalty, ) = payable(royaltyFeeReceiver).call{value: ((_paymentAmount * royalty) / 10000)}("");
      require(sentRoyalty, "Failed to send royalty to factory owner");
    }

    if (_referrer != address(0) && referral > 0 && referral < 5000) {
      // send referral fee - must be less than 50% (5000 bips)
      (bool sentReferralFee, ) = payable(_referrer).call{value: ((_paymentAmount * referral) / 10000)}("");
      require(sentReferralFee, "Failed to send referral fee");
    }

    // send the rest to TLD owner
    (bool sent, ) = payable(owner()).call{value: address(this).balance}("");
    require(sent, "Failed to send domain payment to TLD owner");
  }

  ///@dev Hook that is called before any token transfer. This includes minting and burning.
  function _beforeTokenTransfer(address from,address to,uint256 tokenId) internal override virtual {

    if (from != address(0)) { // run on every transfer but not on mint
      domains[domainIdsNames[tokenId]].holder = to; // change holder address in Domain struct
      
      if (bytes(defaultNames[to]).length == 0 && to != address(0)) {
        defaultNames[to] = domains[domainIdsNames[tokenId]].name; // if default domain name is not set for that holder, set it now
      }

      if (strings.equals(strings.toSlice(domains[domainIdsNames[tokenId]].name), strings.toSlice(defaultNames[from]))) {
        delete defaultNames[from]; // if previous owner had this domain name as default, unset it as default
      }
    }
    
  }

  // OWNER

  /// @notice Only TLD contract owner can call this function. Flexi-specific function.
  function changeMetadataAddress(address _metadataAddress) external onlyOwner {
    require(!metadataFrozen, "Cannot change metadata address anymore");
    metadataAddress = _metadataAddress;
  }

  /// @notice Only TLD contract owner can call this function. Flexi-specific function.
  function changeMinter(address _minter) external onlyOwner {
    minter = _minter;
  }

  /// @notice Only TLD contract owner can call this function.
  function changeNameMaxLength(uint256 _maxLength) external override onlyOwner {
    nameMaxLength = _maxLength;
  }

  /// @notice Only TLD contract owner can call this function.
  function changePrice(uint256 _price) external override onlyOwner {
    price = _price;
    emit TldPriceChanged(_msgSender(), _price);
  }

  /// @notice Only TLD contract owner can call this function.
  function changeReferralFee(uint256 _referral) external override onlyOwner {
    require(_referral < 5000, "Referral fee cannot be 50% or higher");
    referral = _referral; // referral must be in bips
    emit ReferralFeeChanged(_msgSender(), _referral);
  }

  /// @notice Only TLD contract owner can call this function. Flexi-specific function.
  function disableBuyingForever() external onlyOwner {
    buyingDisabledForever = true; // this action is irreversible
    emit MintingDisabledForever(_msgSender());
  }

  /// @notice Freeze metadata address. Only TLD contract owner can call this function.
  function freezeMetadata() external onlyOwner {
    metadataFrozen = true; // this action is irreversible
  }

  /// @notice Only TLD contract owner can call this function.
  function toggleBuyingDomains() external onlyOwner {
    buyingEnabled = !buyingEnabled;
    emit DomainBuyingToggle(_msgSender(), buyingEnabled);
  }
  
  // ROYALTY FEE UPDATER

  /// @notice This changes royalty fee in the wrapper contract
  function changeRoyalty(uint256 _royalty) external {
    require(_royalty <= 5000, "Cannot exceed 50%");
    require(_msgSender() == royaltyFeeUpdater, "Sender is not royalty fee updater");
    royalty = _royalty;
    emit TldRoyaltyChanged(_msgSender(), _royalty);
  }

  /// @notice This changes royalty fee receiver address. Flexi-specific function.
  function changeRoyaltyFeeReceiver(address _newReceiver) external {
    require(_msgSender() == royaltyFeeReceiver, "Sender is not royalty fee receiver");
    royaltyFeeReceiver = _newReceiver;
  }

  /// @notice This changes royalty fee updater address. Flexi-specific function.
  function changeRoyaltyFeeUpdater(address _newUpdater) external {
    require(_msgSender() == royaltyFeeUpdater, "Sender is not royalty fee updater");
    royaltyFeeUpdater = _newUpdater;
  }
}

File 2 of 16 : IFlexiPunkMetadata.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

interface IFlexiPunkMetadata {

  function getMetadata(string calldata _domainName, string calldata _tld, uint256 _tokenId) external view returns(string memory);

}

File 3 of 16 : IBasePunkTLD.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IBasePunkTLD is IERC721 {

  struct Domain {
    string name; // domain name that goes before the TLD name; example: "tempetechie" in "tempetechie.web3"
    uint256 tokenId;
    address holder;
    string data; // stringified JSON object, example: {"description": "Some text", "twitter": "@techie1239", "friends": ["0x123..."], "url": "https://punk.domains"}
  }

  event DomainCreated(address indexed user, address indexed owner, string fullDomainName);
  event DomainBurned(address indexed user, string fullDomainName);
  event DefaultDomainChanged(address indexed user, string defaultDomain);
  event DataChanged(address indexed user);
  event TldPriceChanged(address indexed user, uint256 tldPrice);
  event ReferralFeeChanged(address indexed user, uint256 referralFee);
  event TldRoyaltyChanged(address indexed user, uint256 tldRoyalty);
  event DomainBuyingToggle(address indexed user, bool domainBuyingToggle);

  function domains(string calldata _domainName) external view returns(string memory, uint256, address, string memory);

  function defaultNames(address) external view returns(string memory);

  function getDomainData(string calldata _domainName) external view returns(string memory);

  function getDomainHolder(string calldata _domainName) external view returns(address);

  function price() external view returns (uint256);
  function referral() external view returns (uint256);

  function changeNameMaxLength(uint256 _maxLength) external;

  function changePrice(uint256 _price) external;

  function changeReferralFee(uint256 _referral) external;

  function mint(
    string memory _domainName,
    address _domainHolder,
    address _referrer
  ) external payable returns(uint256);

}

File 4 of 16 : strings.sol
// SPDX-License-Identifier: Apache-2.0

/*
 * @title String & slice utility library for Solidity contracts.
 * @author Nick Johnson <[email protected]>
 */

pragma solidity ^0.8.0;

library strings {
    struct slice {
        uint _len;
        uint _ptr;
    }

    function memcpy(uint dest, uint src, uint _len) private pure {
        // Copy word-length chunks while possible
        for(; _len >= 32; _len -= 32) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }

        // Copy remaining bytes
        uint mask = type(uint).max;
        if (_len > 0) {
            mask = 256 ** (32 - _len) - 1;
        }
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
        }
    }

    /*
     * @dev Returns a slice containing the entire string.
     * @param self The string to make a slice from.
     * @return A newly allocated slice containing the entire string.
     */
    function toSlice(string memory self) internal pure returns (slice memory) {
        uint ptr;
        assembly {
            ptr := add(self, 0x20)
        }
        return slice(bytes(self).length, ptr);
    }

    /*
     * @dev Returns the length of a null-terminated bytes32 string.
     * @param self The value to find the length of.
     * @return The length of the string, from 0 to 32.
     */
    function len(bytes32 self) internal pure returns (uint) {
        uint ret;
        if (self == 0)
            return 0;
        if (uint(self) & type(uint128).max == 0) {
            ret += 16;
            self = bytes32(uint(self) / 0x100000000000000000000000000000000);
        }
        if (uint(self) & type(uint64).max == 0) {
            ret += 8;
            self = bytes32(uint(self) / 0x10000000000000000);
        }
        if (uint(self) & type(uint32).max == 0) {
            ret += 4;
            self = bytes32(uint(self) / 0x100000000);
        }
        if (uint(self) & type(uint16).max == 0) {
            ret += 2;
            self = bytes32(uint(self) / 0x10000);
        }
        if (uint(self) & type(uint8).max == 0) {
            ret += 1;
        }
        return 32 - ret;
    }

    /*
     * @dev Returns a slice containing the entire bytes32, interpreted as a
     *      null-terminated utf-8 string.
     * @param self The bytes32 value to convert to a slice.
     * @return A new slice containing the value of the input argument up to the
     *         first null.
     */
    function toSliceB32(bytes32 self) internal pure returns (slice memory ret) {
        // Allocate space for `self` in memory, copy it there, and point ret at it
        assembly {
            let ptr := mload(0x40)
            mstore(0x40, add(ptr, 0x20))
            mstore(ptr, self)
            mstore(add(ret, 0x20), ptr)
        }
        ret._len = len(self);
    }

    /*
     * @dev Returns a new slice containing the same data as the current slice.
     * @param self The slice to copy.
     * @return A new slice containing the same data as `self`.
     */
    function copy(slice memory self) internal pure returns (slice memory) {
        return slice(self._len, self._ptr);
    }

    /*
     * @dev Copies a slice to a new string.
     * @param self The slice to copy.
     * @return A newly allocated string containing the slice's text.
     */
    function toString(slice memory self) internal pure returns (string memory) {
        string memory ret = new string(self._len);
        uint retptr;
        assembly { retptr := add(ret, 32) }

        memcpy(retptr, self._ptr, self._len);
        return ret;
    }

    /*
     * @dev Returns the length in runes of the slice. Note that this operation
     *      takes time proportional to the length of the slice; avoid using it
     *      in loops, and call `slice.empty()` if you only need to know whether
     *      the slice is empty or not.
     * @param self The slice to operate on.
     * @return The length of the slice in runes.
     */
    function len(slice memory self) internal pure returns (uint l) {
        // Starting at ptr-31 means the LSB will be the byte we care about
        uint ptr = self._ptr - 31;
        uint end = ptr + self._len;
        for (l = 0; ptr < end; l++) {
            uint8 b;
            assembly { b := and(mload(ptr), 0xFF) }
            if (b < 0x80) {
                ptr += 1;
            } else if(b < 0xE0) {
                ptr += 2;
            } else if(b < 0xF0) {
                ptr += 3;
            } else if(b < 0xF8) {
                ptr += 4;
            } else if(b < 0xFC) {
                ptr += 5;
            } else {
                ptr += 6;
            }
        }
    }

    /*
     * @dev Returns true if the slice is empty (has a length of 0).
     * @param self The slice to operate on.
     * @return True if the slice is empty, False otherwise.
     */
    function empty(slice memory self) internal pure returns (bool) {
        return self._len == 0;
    }

    /*
     * @dev Returns a positive number if `other` comes lexicographically after
     *      `self`, a negative number if it comes before, or zero if the
     *      contents of the two slices are equal. Comparison is done per-rune,
     *      on unicode codepoints.
     * @param self The first slice to compare.
     * @param other The second slice to compare.
     * @return The result of the comparison.
     */
    function compare(slice memory self, slice memory other) internal pure returns (int) {
        uint shortest = self._len;
        if (other._len < self._len)
            shortest = other._len;

        uint selfptr = self._ptr;
        uint otherptr = other._ptr;
        for (uint idx = 0; idx < shortest; idx += 32) {
            uint a;
            uint b;
            assembly {
                a := mload(selfptr)
                b := mload(otherptr)
            }
            if (a != b) {
                // Mask out irrelevant bytes and check again
                uint mask = type(uint).max; // 0xffff...
                if(shortest < 32) {
                  mask = ~(2 ** (8 * (32 - shortest + idx)) - 1);
                }
                unchecked {
                    uint diff = (a & mask) - (b & mask);
                    if (diff != 0)
                        return int(diff);
                }
            }
            selfptr += 32;
            otherptr += 32;
        }
        return int(self._len) - int(other._len);
    }

    /*
     * @dev Returns true if the two slices contain the same text.
     * @param self The first slice to compare.
     * @param self The second slice to compare.
     * @return True if the slices are equal, false otherwise.
     */
    function equals(slice memory self, slice memory other) internal pure returns (bool) {
        return compare(self, other) == 0;
    }

    /*
     * @dev Extracts the first rune in the slice into `rune`, advancing the
     *      slice to point to the next rune and returning `self`.
     * @param self The slice to operate on.
     * @param rune The slice that will contain the first rune.
     * @return `rune`.
     */
    function nextRune(slice memory self, slice memory rune) internal pure returns (slice memory) {
        rune._ptr = self._ptr;

        if (self._len == 0) {
            rune._len = 0;
            return rune;
        }

        uint l;
        uint b;
        // Load the first byte of the rune into the LSBs of b
        assembly { b := and(mload(sub(mload(add(self, 32)), 31)), 0xFF) }
        if (b < 0x80) {
            l = 1;
        } else if(b < 0xE0) {
            l = 2;
        } else if(b < 0xF0) {
            l = 3;
        } else {
            l = 4;
        }

        // Check for truncated codepoints
        if (l > self._len) {
            rune._len = self._len;
            self._ptr += self._len;
            self._len = 0;
            return rune;
        }

        self._ptr += l;
        self._len -= l;
        rune._len = l;
        return rune;
    }

    /*
     * @dev Returns the first rune in the slice, advancing the slice to point
     *      to the next rune.
     * @param self The slice to operate on.
     * @return A slice containing only the first rune from `self`.
     */
    function nextRune(slice memory self) internal pure returns (slice memory ret) {
        nextRune(self, ret);
    }

    /*
     * @dev Returns the number of the first codepoint in the slice.
     * @param self The slice to operate on.
     * @return The number of the first codepoint in the slice.
     */
    function ord(slice memory self) internal pure returns (uint ret) {
        if (self._len == 0) {
            return 0;
        }

        uint word;
        uint length;
        uint divisor = 2 ** 248;

        // Load the rune into the MSBs of b
        assembly { word:= mload(mload(add(self, 32))) }
        uint b = word / divisor;
        if (b < 0x80) {
            ret = b;
            length = 1;
        } else if(b < 0xE0) {
            ret = b & 0x1F;
            length = 2;
        } else if(b < 0xF0) {
            ret = b & 0x0F;
            length = 3;
        } else {
            ret = b & 0x07;
            length = 4;
        }

        // Check for truncated codepoints
        if (length > self._len) {
            return 0;
        }

        for (uint i = 1; i < length; i++) {
            divisor = divisor / 256;
            b = (word / divisor) & 0xFF;
            if (b & 0xC0 != 0x80) {
                // Invalid UTF-8 sequence
                return 0;
            }
            ret = (ret * 64) | (b & 0x3F);
        }

        return ret;
    }

    /*
     * @dev Returns the keccak-256 hash of the slice.
     * @param self The slice to hash.
     * @return The hash of the slice.
     */
    function keccak(slice memory self) internal pure returns (bytes32 ret) {
        assembly {
            ret := keccak256(mload(add(self, 32)), mload(self))
        }
    }

    /*
     * @dev Returns true if `self` starts with `needle`.
     * @param self The slice to operate on.
     * @param needle The slice to search for.
     * @return True if the slice starts with the provided text, false otherwise.
     */
    function startsWith(slice memory self, slice memory needle) internal pure returns (bool) {
        if (self._len < needle._len) {
            return false;
        }

        if (self._ptr == needle._ptr) {
            return true;
        }

        bool equal;
        assembly {
            let length := mload(needle)
            let selfptr := mload(add(self, 0x20))
            let needleptr := mload(add(needle, 0x20))
            equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
        }
        return equal;
    }

    /*
     * @dev If `self` starts with `needle`, `needle` is removed from the
     *      beginning of `self`. Otherwise, `self` is unmodified.
     * @param self The slice to operate on.
     * @param needle The slice to search for.
     * @return `self`
     */
    function beyond(slice memory self, slice memory needle) internal pure returns (slice memory) {
        if (self._len < needle._len) {
            return self;
        }

        bool equal = true;
        if (self._ptr != needle._ptr) {
            assembly {
                let length := mload(needle)
                let selfptr := mload(add(self, 0x20))
                let needleptr := mload(add(needle, 0x20))
                equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
            }
        }

        if (equal) {
            self._len -= needle._len;
            self._ptr += needle._len;
        }

        return self;
    }

    /*
     * @dev Returns true if the slice ends with `needle`.
     * @param self The slice to operate on.
     * @param needle The slice to search for.
     * @return True if the slice starts with the provided text, false otherwise.
     */
    function endsWith(slice memory self, slice memory needle) internal pure returns (bool) {
        if (self._len < needle._len) {
            return false;
        }

        uint selfptr = self._ptr + self._len - needle._len;

        if (selfptr == needle._ptr) {
            return true;
        }

        bool equal;
        assembly {
            let length := mload(needle)
            let needleptr := mload(add(needle, 0x20))
            equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
        }

        return equal;
    }

    /*
     * @dev If `self` ends with `needle`, `needle` is removed from the
     *      end of `self`. Otherwise, `self` is unmodified.
     * @param self The slice to operate on.
     * @param needle The slice to search for.
     * @return `self`
     */
    function until(slice memory self, slice memory needle) internal pure returns (slice memory) {
        if (self._len < needle._len) {
            return self;
        }

        uint selfptr = self._ptr + self._len - needle._len;
        bool equal = true;
        if (selfptr != needle._ptr) {
            assembly {
                let length := mload(needle)
                let needleptr := mload(add(needle, 0x20))
                equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
            }
        }

        if (equal) {
            self._len -= needle._len;
        }

        return self;
    }

    // Returns the memory address of the first byte of the first occurrence of
    // `needle` in `self`, or the first byte after `self` if not found.
    function findPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) {
        uint ptr = selfptr;
        uint idx;

        if (needlelen <= selflen) {
            if (needlelen <= 32) {
                bytes32 mask;
                if (needlelen > 0) {
                    mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1));
                }

                bytes32 needledata;
                assembly { needledata := and(mload(needleptr), mask) }

                uint end = selfptr + selflen - needlelen;
                bytes32 ptrdata;
                assembly { ptrdata := and(mload(ptr), mask) }

                while (ptrdata != needledata) {
                    if (ptr >= end)
                        return selfptr + selflen;
                    ptr++;
                    assembly { ptrdata := and(mload(ptr), mask) }
                }
                return ptr;
            } else {
                // For long needles, use hashing
                bytes32 hash;
                assembly { hash := keccak256(needleptr, needlelen) }

                for (idx = 0; idx <= selflen - needlelen; idx++) {
                    bytes32 testHash;
                    assembly { testHash := keccak256(ptr, needlelen) }
                    if (hash == testHash)
                        return ptr;
                    ptr += 1;
                }
            }
        }
        return selfptr + selflen;
    }

    // Returns the memory address of the first byte after the last occurrence of
    // `needle` in `self`, or the address of `self` if not found.
    function rfindPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) {
        uint ptr;

        if (needlelen <= selflen) {
            if (needlelen <= 32) {
                bytes32 mask;
                if (needlelen > 0) {
                    mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1));
                }

                bytes32 needledata;
                assembly { needledata := and(mload(needleptr), mask) }

                ptr = selfptr + selflen - needlelen;
                bytes32 ptrdata;
                assembly { ptrdata := and(mload(ptr), mask) }

                while (ptrdata != needledata) {
                    if (ptr <= selfptr)
                        return selfptr;
                    ptr--;
                    assembly { ptrdata := and(mload(ptr), mask) }
                }
                return ptr + needlelen;
            } else {
                // For long needles, use hashing
                bytes32 hash;
                assembly { hash := keccak256(needleptr, needlelen) }
                ptr = selfptr + (selflen - needlelen);
                while (ptr >= selfptr) {
                    bytes32 testHash;
                    assembly { testHash := keccak256(ptr, needlelen) }
                    if (hash == testHash)
                        return ptr + needlelen;
                    ptr -= 1;
                }
            }
        }
        return selfptr;
    }

    /*
     * @dev Modifies `self` to contain everything from the first occurrence of
     *      `needle` to the end of the slice. `self` is set to the empty slice
     *      if `needle` is not found.
     * @param self The slice to search and modify.
     * @param needle The text to search for.
     * @return `self`.
     */
    function find(slice memory self, slice memory needle) internal pure returns (slice memory) {
        uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr);
        self._len -= ptr - self._ptr;
        self._ptr = ptr;
        return self;
    }

    /*
     * @dev Modifies `self` to contain the part of the string from the start of
     *      `self` to the end of the first occurrence of `needle`. If `needle`
     *      is not found, `self` is set to the empty slice.
     * @param self The slice to search and modify.
     * @param needle The text to search for.
     * @return `self`.
     */
    function rfind(slice memory self, slice memory needle) internal pure returns (slice memory) {
        uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr);
        self._len = ptr - self._ptr;
        return self;
    }

    /*
     * @dev Splits the slice, setting `self` to everything after the first
     *      occurrence of `needle`, and `token` to everything before it. If
     *      `needle` does not occur in `self`, `self` is set to the empty slice,
     *      and `token` is set to the entirety of `self`.
     * @param self The slice to split.
     * @param needle The text to search for in `self`.
     * @param token An output parameter to which the first token is written.
     * @return `token`.
     */
    function split(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) {
        uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr);
        token._ptr = self._ptr;
        token._len = ptr - self._ptr;
        if (ptr == self._ptr + self._len) {
            // Not found
            self._len = 0;
        } else {
            self._len -= token._len + needle._len;
            self._ptr = ptr + needle._len;
        }
        return token;
    }

    /*
     * @dev Splits the slice, setting `self` to everything after the first
     *      occurrence of `needle`, and returning everything before it. If
     *      `needle` does not occur in `self`, `self` is set to the empty slice,
     *      and the entirety of `self` is returned.
     * @param self The slice to split.
     * @param needle The text to search for in `self`.
     * @return The part of `self` up to the first occurrence of `delim`.
     */
    function split(slice memory self, slice memory needle) internal pure returns (slice memory token) {
        split(self, needle, token);
    }

    /*
     * @dev Splits the slice, setting `self` to everything before the last
     *      occurrence of `needle`, and `token` to everything after it. If
     *      `needle` does not occur in `self`, `self` is set to the empty slice,
     *      and `token` is set to the entirety of `self`.
     * @param self The slice to split.
     * @param needle The text to search for in `self`.
     * @param token An output parameter to which the first token is written.
     * @return `token`.
     */
    function rsplit(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) {
        uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr);
        token._ptr = ptr;
        token._len = self._len - (ptr - self._ptr);
        if (ptr == self._ptr) {
            // Not found
            self._len = 0;
        } else {
            self._len -= token._len + needle._len;
        }
        return token;
    }

    /*
     * @dev Splits the slice, setting `self` to everything before the last
     *      occurrence of `needle`, and returning everything after it. If
     *      `needle` does not occur in `self`, `self` is set to the empty slice,
     *      and the entirety of `self` is returned.
     * @param self The slice to split.
     * @param needle The text to search for in `self`.
     * @return The part of `self` after the last occurrence of `delim`.
     */
    function rsplit(slice memory self, slice memory needle) internal pure returns (slice memory token) {
        rsplit(self, needle, token);
    }

    /*
     * @dev Counts the number of nonoverlapping occurrences of `needle` in `self`.
     * @param self The slice to search.
     * @param needle The text to search for in `self`.
     * @return The number of occurrences of `needle` found in `self`.
     */
    function count(slice memory self, slice memory needle) internal pure returns (uint cnt) {
        uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr) + needle._len;
        while (ptr <= self._ptr + self._len) {
            cnt++;
            ptr = findPtr(self._len - (ptr - self._ptr), ptr, needle._len, needle._ptr) + needle._len;
        }
    }

    /*
     * @dev Returns True if `self` contains `needle`.
     * @param self The slice to search.
     * @param needle The text to search for in `self`.
     * @return True if `needle` is found in `self`, false otherwise.
     */
    function contains(slice memory self, slice memory needle) internal pure returns (bool) {
        return rfindPtr(self._len, self._ptr, needle._len, needle._ptr) != self._ptr;
    }

    /*
     * @dev Returns a newly allocated string containing the concatenation of
     *      `self` and `other`.
     * @param self The first slice to concatenate.
     * @param other The second slice to concatenate.
     * @return The concatenation of the two strings.
     */
    function concat(slice memory self, slice memory other) internal pure returns (string memory) {
        string memory ret = new string(self._len + other._len);
        uint retptr;
        assembly { retptr := add(ret, 32) }
        memcpy(retptr, self._ptr, self._len);
        memcpy(retptr + self._len, other._ptr, other._len);
        return ret;
    }

    /*
     * @dev Joins an array of slices, using `self` as a delimiter, returning a
     *      newly allocated string.
     * @param self The delimiter to use.
     * @param parts A list of slices to join.
     * @return A newly allocated string containing all the slices in `parts`,
     *         joined with `self`.
     */
    function join(slice memory self, slice[] memory parts) internal pure returns (string memory) {
        if (parts.length == 0)
            return "";

        uint length = self._len * (parts.length - 1);
        for(uint i = 0; i < parts.length; i++)
            length += parts[i]._len;

        string memory ret = new string(length);
        uint retptr;
        assembly { retptr := add(ret, 32) }

        for(uint i = 0; i < parts.length; i++) {
            memcpy(retptr, parts[i]._ptr, parts[i]._len);
            retptr += parts[i]._len;
            if (i < parts.length - 1) {
                memcpy(retptr, self._ptr, self._len);
                retptr += self._len;
            }
        }

        return ret;
    }

    /**
     * Lower
     * 
     * Converts all the values of a string to their corresponding lower case
     * value.
     * 
     * @param _base When being used for a data type this is the extended object
     *              otherwise this is the string base to convert to lower case
     * @return string 
     */
    function lower(string memory _base)
        internal
        pure
        returns (string memory) {
        bytes memory _baseBytes = bytes(_base);
        for (uint i = 0; i < _baseBytes.length; i++) {
            _baseBytes[i] = _lower(_baseBytes[i]);
        }
        return string(_baseBytes);
    }

    /**
     * Lower
     * 
     * Convert an alphabetic character to lower case and return the original
     * value when not alphabetic
     * 
     * @param _b1 The byte to be converted to lower case
     * @return bytes1 The converted value if the passed value was alphabetic
     *                and in a upper case otherwise returns the original value
     */
    function _lower(bytes1 _b1)
        private
        pure
        returns (bytes1) {

        if (_b1 >= 0x41 && _b1 <= 0x5A) {
            return bytes1(uint8(_b1) + 32);
        }

        return _b1;
    }
}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

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

File 6 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 7 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 8 of 16 : base64.sol
// SPDX-License-Identifier: MIT

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides a function for encoding some bytes in base64
library Base64 {
    string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';
        
        // load the table into memory
        string memory table = TABLE;

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

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

        assembly {
            // set the actual output length
            mstore(result, encodedLen)
            
            // prepare the lookup table
            let tablePtr := add(table, 1)
            
            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))
            
            // result ptr, jump over length
            let resultPtr := add(result, 32)
            
            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
               dataPtr := add(dataPtr, 3)
               
               // read 3 bytes
               let input := mload(dataPtr)
               
               // write 4 characters
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(        input,  0x3F)))))
               resultPtr := add(resultPtr, 1)
            }
            
            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }
        
        return result;
    }
}

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 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_tldOwner","type":"address"},{"internalType":"uint256","name":"_domainPrice","type":"uint256"},{"internalType":"bool","name":"_buyingEnabled","type":"bool"},{"internalType":"uint256","name":"_royalty","type":"uint256"},{"internalType":"address","name":"_factoryAddress","type":"address"},{"internalType":"address","name":"_metadataAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"DataChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"string","name":"defaultDomain","type":"string"}],"name":"DefaultDomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"string","name":"fullDomainName","type":"string"}],"name":"DomainBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"domainBuyingToggle","type":"bool"}],"name":"DomainBuyingToggle","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"fullDomainName","type":"string"}],"name":"DomainCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"}],"name":"MintingDisabledForever","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"referralFee","type":"uint256"}],"name":"ReferralFeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tldPrice","type":"uint256"}],"name":"TldPriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tldRoyalty","type":"uint256"}],"name":"TldRoyaltyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_domainName","type":"string"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyingDisabledForever","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_metadataAddress","type":"address"}],"name":"changeMetadataAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"changeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxLength","type":"uint256"}],"name":"changeNameMaxLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"changePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_referral","type":"uint256"}],"name":"changeReferralFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_royalty","type":"uint256"}],"name":"changeRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newReceiver","type":"address"}],"name":"changeRoyaltyFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newUpdater","type":"address"}],"name":"changeRoyaltyFeeUpdater","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"defaultNames","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableBuyingForever","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"domainIdsNames","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"domains","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"holder","type":"address"},{"internalType":"string","name":"data","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_domainName","type":"string"},{"internalType":"string","name":"_data","type":"string"}],"name":"editData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_domainName","type":"string"}],"name":"editDefaultDomain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factoryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freezeMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_domainName","type":"string"}],"name":"getDomainData","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_domainName","type":"string"}],"name":"getDomainHolder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"idCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_domainName","type":"string"},{"internalType":"address","name":"_domainHolder","type":"address"},{"internalType":"address","name":"_referrer","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nameMaxLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyFeeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyFeeUpdater","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleBuyingDomains","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x6080604052600436106102c95760003560e01c80638da5cb5b11610175578063bfcdd7c3116100dc578063dafa1d2d11610095578063e985e9c51161006f578063e985e9c51461087b578063eb08ab28146108c4578063f2fde38b146108da578063fb3cc6c2146108fa57600080fd5b8063dafa1d2d14610826578063db6bf92014610846578063dbd843b51461086657600080fd5b8063bfcdd7c314610770578063c1e2515114610790578063c87b56dd146107b0578063d111515d146107d0578063d2b525d3146107e5578063d85451ff1461080557600080fd5b8063a035b1fe1161012e578063a035b1fe146106c5578063a22cb465146106db578063a2b40d19146106fb578063b88d4fde1461071b578063ba833c4b1461073b578063bf70e90d1461075b57600080fd5b80638da5cb5b146106075780638ed2fe911461062557806395d89b4114610646578063966dae0e1461065b5780639f0346911461068f5780639fbb8e86146106a557600080fd5b80633a516d17116102345780636eb3500d116101ed57806374305d09116101c757806374305d091461059457806378a6743b146105b45780637afdfb4f146105d45780637e6d945e146105f457600080fd5b80636eb3500d1461053f57806370a082311461055f578063715018a61461057f57600080fd5b80633a516d171461047f57806342842e0e1461049f5780634c6dcb7f146104bf5780635dedf3b5146104df57806362ac7a84146104ff5780636352211e1461051f57600080fd5b806318160ddd1161028657806318160ddd146103c35780631fd21214146103d957806323b872dd146103f9578063264492351461041957806329ee566c146104495780632c4d4d181461045f57600080fd5b806301ffc9a7146102ce57806306fdde03146103035780630754617214610325578063081812fc1461035d578063095ea7b31461037d5780631441a5a91461039f575b600080fd5b3480156102da57600080fd5b506102ee6102e936600461365e565b61091b565b60405190151581526020015b60405180910390f35b34801561030f57600080fd5b5061031861096d565b6040516102fa9190613972565b34801561033157600080fd5b50600954610345906001600160a01b031681565b6040516001600160a01b0390911681526020016102fa565b34801561036957600080fd5b50610345610378366004613841565b6109ff565b34801561038957600080fd5b5061039d610398366004613635565b610a99565b005b3480156103ab57600080fd5b506103b560105481565b6040519081526020016102fa565b3480156103cf57600080fd5b506103b5600c5481565b3480156103e557600080fd5b50600a54610345906001600160a01b031681565b34801561040557600080fd5b5061039d610414366004613547565b610baf565b34801561042557600080fd5b5061043961043436600461373f565b610be0565b6040516102fa9493929190613985565b34801561045557600080fd5b506103b5600f5481565b34801561046b57600080fd5b5061039d61047a3660046134fb565b610d31565b34801561048b57600080fd5b5061039d61049a3660046134fb565b610d7d565b3480156104ab57600080fd5b5061039d6104ba366004613547565b610e32565b3480156104cb57600080fd5b5061039d6104da3660046134fb565b610e4d565b3480156104eb57600080fd5b5061039d6104fa366004613841565b610ea2565b34801561050b57600080fd5b5061031861051a3660046134fb565b610ed1565b34801561052b57600080fd5b5061034561053a366004613841565b610f6b565b34801561054b57600080fd5b50600854610345906001600160a01b031681565b34801561056b57600080fd5b506103b561057a3660046134fb565b610fe2565b34801561058b57600080fd5b5061039d611069565b3480156105a057600080fd5b5061039d6105af3660046134fb565b61109f565b3480156105c057600080fd5b5061039d6105cf366004613841565b61112f565b3480156105e057600080fd5b506103186105ef366004613696565b6111f4565b6103b56106023660046137e5565b6112e6565b34801561061357600080fd5b506006546001600160a01b0316610345565b34801561063157600080fd5b50600b546102ee90600160a01b900460ff1681565b34801561065257600080fd5b5061031861149d565b34801561066757600080fd5b506103457f000000000000000000000000df293b5d41034a872abb078182b45e9721e8e38081565b34801561069b57600080fd5b506103b560115481565b3480156106b157600080fd5b50600b54610345906001600160a01b031681565b3480156106d157600080fd5b506103b5600e5481565b3480156106e757600080fd5b5061039d6106f63660046135fb565b6114ac565b34801561070757600080fd5b5061039d610716366004613841565b6114bb565b34801561072757600080fd5b5061039d610736366004613582565b61151c565b34801561074757600080fd5b5061039d6107563660046136d6565b611554565b34801561076757600080fd5b5061039d61168c565b34801561077c57600080fd5b5061034561078b366004613696565b611719565b34801561079c57600080fd5b5061039d6107ab366004613841565b61178d565b3480156107bc57600080fd5b506103186107cb366004613841565b61183d565b3480156107dc57600080fd5b5061039d6118fb565b3480156107f157600080fd5b50610318610800366004613841565b61193a565b34801561081157600080fd5b50600b546102ee90600160a81b900460ff1681565b34801561083257600080fd5b5061039d610841366004613696565b611953565b34801561085257600080fd5b5061039d610861366004613696565b611b46565b34801561087257600080fd5b5061039d611c43565b34801561088757600080fd5b506102ee610896366004613515565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156108d057600080fd5b506103b5600d5481565b3480156108e657600080fd5b5061039d6108f53660046134fb565b611cc5565b34801561090657600080fd5b50600b546102ee90600160b01b900460ff1681565b60006001600160e01b031982166380ac58cd60e01b148061094c57506001600160e01b03198216635b5e139f60e01b145b8061096757506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461097c90613e12565b80601f01602080910402602001604051908101604052809291908181526020018280546109a890613e12565b80156109f55780601f106109ca576101008083540402835291602001916109f5565b820191906000526020600020905b8154815290600101906020018083116109d857829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a7d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610aa482610f6b565b9050806001600160a01b0316836001600160a01b03161415610b125760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a74565b336001600160a01b0382161480610b2e5750610b2e8133610896565b610ba05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a74565b610baa8383611d60565b505050565b610bb93382611dce565b610bd55760405162461bcd60e51b8152600401610a7490613b26565b610baa838383611ec5565b8051602081830181018051601282529282019190930120915280548190610c0690613e12565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3290613e12565b8015610c7f5780601f10610c5457610100808354040283529160200191610c7f565b820191906000526020600020905b815481529060010190602001808311610c6257829003601f168201915b5050505060018301546002840154600385018054949592946001600160a01b03909216935090610cae90613e12565b80601f0160208091040260200160405190810160405280929190818152602001828054610cda90613e12565b8015610d275780601f10610cfc57610100808354040283529160200191610d27565b820191906000526020600020905b815481529060010190602001808311610d0a57829003601f168201915b5050505050905084565b6006546001600160a01b03163314610d5b5760405162461bcd60e51b8152600401610a7490613af1565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b03163314610da75760405162461bcd60e51b8152600401610a7490613af1565b600b54600160b01b900460ff1615610e105760405162461bcd60e51b815260206004820152602660248201527f43616e6e6f74206368616e6765206d65746164617461206164647265737320616044820152656e796d6f726560d01b6064820152608401610a74565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b610baa8383836040518060200160405280600081525061151c565b600a546001600160a01b0316336001600160a01b031614610e805760405162461bcd60e51b8152600401610a7490613a5e565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b03163314610ecc5760405162461bcd60e51b8152600401610a7490613af1565b601155565b60146020526000908152604090208054610eea90613e12565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1690613e12565b8015610f635780601f10610f3857610100808354040283529160200191610f63565b820191906000526020600020905b815481529060010190602001808311610f4657829003601f168201915b505050505081565b6000818152600260205260408120546001600160a01b0316806109675760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a74565b60006001600160a01b03821661104d5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a74565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146110935760405162461bcd60e51b8152600401610a7490613af1565b61109d6000612070565b565b600b546001600160a01b0316336001600160a01b03161461110d5760405162461bcd60e51b815260206004820152602260248201527f53656e646572206973206e6f7420726f79616c7479206665652072656365697660448201526132b960f11b6064820152608401610a74565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031633146111595760405162461bcd60e51b8152600401610a7490613af1565b61138881106111b65760405162461bcd60e51b8152602060048201526024808201527f526566657272616c206665652063616e6e6f7420626520353025206f7220686960448201526333b432b960e11b6064820152608401610a74565b601081905560405181815233907f38d0cf7a8174d3978a2d52052d658cfb52bae5c6ffdad178bf1052ba56ea122e906020015b60405180910390a250565b6060601261123784848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120c292505050565b60405161124491906138f4565b9081526020016040518091039020600301805461126090613e12565b80601f016020809104026020016040519081016040528092919081815260200182805461128c90613e12565b80156112d95780601f106112ae576101008083540402835291602001916112d9565b820191906000526020600020905b8154815290600101906020018083116112bc57829003601f168201915b5050505050905092915050565b60006002600754141561133b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a74565b6002600755600b54600160a81b900460ff161561139a5760405162461bcd60e51b815260206004820152601f60248201527f446f6d61696e206d696e74696e672064697361626c656420666f7265766572006044820152606401610a74565b600b54600160a01b900460ff16806113bc57506006546001600160a01b031633145b806113da57506009546001600160a01b0316336001600160a01b0316145b6114265760405162461bcd60e51b815260206004820152601760248201527f427579696e6720646f6d61696e732064697361626c65640000000000000000006044820152606401610a74565b600e5434101561146c5760405162461bcd60e51b815260206004820152601160248201527056616c75652062656c6f7720707269636560781b6044820152606401610a74565b6114763483612158565b6114908484604051806020016040528060008152506123f1565b6001600755949350505050565b60606001805461097c90613e12565b6114b7338383612859565b5050565b6006546001600160a01b031633146114e55760405162461bcd60e51b8152600401610a7490613af1565b600e81905560405181815233907fee635c8a0d26ec216072a8c63e35b6ae1a6c900a63c37c014e4ebaac51861041906020016111e9565b6115263383611dce565b6115425760405162461bcd60e51b8152600401610a7490613b26565b61154e84848484612928565b50505050565b600061159585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120c292505050565b9050336001600160a01b03166012826040516115b191906138f4565b908152604051908190036020019020600201546001600160a01b0316146116295760405162461bcd60e51b815260206004820152602660248201527f4f6e6c7920646f6d61696e20686f6c6465722063616e2065646974207468656960448201526572206461746160d01b6064820152608401610a74565b828260128360405161163b91906138f4565b90815260200160405180910390206003019190611659929190613276565b5060405133907f5f5a32e7aa0e6d5ba247a155a472ba8f212ee1885baaf457683f3f5dae89480190600090a25050505050565b6006546001600160a01b031633146116b65760405162461bcd60e51b8152600401610a7490613af1565b600b805460ff600160a01b808304821615810260ff60a01b199093169290921792839055604051919092049091161515815233907f8e6cbfe6ffa62410f48c7f382a4560f2b634197f39f7ba9b666914af6674cfdb9060200160405180910390a2565b6000601261175c84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120c292505050565b60405161176991906138f4565b908152604051908190036020019020600201546001600160a01b0316905092915050565b6113888111156117d35760405162461bcd60e51b815260206004820152601160248201527043616e6e6f74206578636565642035302560781b6044820152606401610a74565b600a546001600160a01b0316336001600160a01b0316146118065760405162461bcd60e51b8152600401610a7490613a5e565b600f81905560405181815233907ff76f683b30b41f9eb23902413792df5ff4569a8a274170d9e1b9a16e53558dec906020016111e9565b6008546000828152601360205260409081902090516060926001600160a01b0316916348189f129160129161187191613885565b90815260405190819003602001902061188861096d565b856040518463ffffffff1660e01b81526004016118a7939291906139c0565b60006040518083038186803b1580156118bf57600080fd5b505afa1580156118d3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109679190810190613772565b6006546001600160a01b031633146119255760405162461bcd60e51b8152600401610a7490613af1565b600b805460ff60b01b1916600160b01b179055565b60136020526000908152604090208054610eea90613e12565b600061199483838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120c292505050565b9050336001600160a01b03166012826040516119b091906138f4565b908152604051908190036020019020600201546001600160a01b0316146119e95760405162461bcd60e51b8152600401610a7490613b77565b60006012826040516119fb91906138f4565b9081526020016040518091039020600101549050601360008281526020019081526020016000206000611a2e91906132f6565b601282604051611a3e91906138f4565b9081526040519081900360200190206000611a5982826132f6565b6000600183018190556002830180546001600160a01b0319169055611a829060038401906132f6565b50508151602083012060146000336001600160a01b03166001600160a01b03168152602001908152602001600020604051611abd9190613885565b60405180910390201415611ae357336000908152601460205260408120611ae3916132f6565b611aec8161295b565b600c60008154611afb90613dfb565b90915550336001600160a01b03167fa37475cf96c0b9779814af0b62cf67583091c685221d6a2c12369240539cb9ef83604051611b389190613972565b60405180910390a250505050565b6000611b8783838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120c292505050565b9050336001600160a01b0316601282604051611ba391906138f4565b908152604051908190036020019020600201546001600160a01b031614611bdc5760405162461bcd60e51b8152600401610a7490613b77565b3360009081526014602090815260409091208251611bfc92840190613330565b50336001600160a01b03167f068caa4b2fe151c4db5ef003b9da9f85e1f84c0fa8eaf77f66a095b19998b98882604051611c369190613972565b60405180910390a2505050565b6006546001600160a01b03163314611c6d5760405162461bcd60e51b8152600401610a7490613af1565b600b805460ff60a81b1916600160a81b1790557f6d74cc13fa7ed2a0177961820c3be5913f7b4cf15397d50b80357e80ec4ea78a611ca83390565b6040516001600160a01b03909116815260200160405180910390a1565b6006546001600160a01b03163314611cef5760405162461bcd60e51b8152600401610a7490613af1565b6001600160a01b038116611d545760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a74565b611d5d81612070565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d9582610f6b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611e475760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a74565b6000611e5283610f6b565b9050806001600160a01b0316846001600160a01b03161480611e8d5750836001600160a01b0316611e82846109ff565b6001600160a01b0316145b80611ebd57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611ed882610f6b565b6001600160a01b031614611f405760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a74565b6001600160a01b038216611fa25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a74565b611fad838383612a02565b611fb8600082611d60565b6001600160a01b0383166000908152600360205260408120805460019290611fe1908490613db8565b90915550506001600160a01b038216600090815260036020526040812080546001929061200f908490613c12565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60608160005b8151811015612151576121088282815181106120f457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916612c1c565b82828151811061212857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053508061214981613e4d565b9150506120c8565b5092915050565b6000600f5411801561216d5750611388600f54105b1561224157600b54600f546000916001600160a01b031690612710906121939086613d5a565b61219d9190613c4f565b604051600081818185875af1925050503d80600081146121d9576040519150601f19603f3d011682016040523d82523d6000602084013e6121de565b606091505b505090508061223f5760405162461bcd60e51b815260206004820152602760248201527f4661696c656420746f2073656e6420726f79616c747920746f20666163746f726044820152663c9037bbb732b960c91b6064820152608401610a74565b505b6001600160a01b0381161580159061225b57506000601054115b801561226a5750611388601054105b1561232a576000816001600160a01b03166127106010548561228c9190613d5a565b6122969190613c4f565b604051600081818185875af1925050503d80600081146122d2576040519150601f19603f3d011682016040523d82523d6000602084013e6122d7565b606091505b50509050806123285760405162461bcd60e51b815260206004820152601b60248201527f4661696c656420746f2073656e6420726566657272616c2066656500000000006044820152606401610a74565b505b600061233e6006546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114612388576040519150601f19603f3d011682016040523d82523d6000602084013e61238d565b606091505b5050905080610baa5760405162461bcd60e51b815260206004820152602a60248201527f4661696c656420746f2073656e6420646f6d61696e207061796d656e7420746f604482015269102a26221037bbb732b960b11b6064820152608401610a74565b6000806123fd856120c2565b9050600061241261240d83612c6b565b612c98565b116124535760405162461bcd60e51b8152602060048201526011602482015270446f6d61696e206e616d6520656d70747960781b6044820152606401610a74565b6011548151106124a55760405162461bcd60e51b815260206004820152601760248201527f446f6d61696e206e616d6520697320746f6f206c6f6e670000000000000000006044820152606401610a74565b6124d86124b182612c6b565b6124d3604051806040016040528060018152602001601760f91b815250612c6b565b612d71565b156125315760405162461bcd60e51b815260206004820152602360248201527f54686572652073686f756c64206265206e6f20646f747320696e20746865206e604482015262616d6560e81b6064820152608401610a74565b61255f61253d82612c6b565b6124d3604051806040016040528060018152602001600160fd1b815250612c6b565b156125ba5760405162461bcd60e51b815260206004820152602560248201527f54686572652073686f756c64206265206e6f2073706163657320696e20746865604482015264206e616d6560d81b6064820152608401610a74565b60006001600160a01b03166012826040516125d591906138f4565b908152604051908190036020019020600201546001600160a01b03161461264a5760405162461bcd60e51b8152602060048201526024808201527f446f6d61696e20776974682074686973206e616d6520616c72656164792065786044820152636973747360e01b6064820152608401610a74565b61265684600d54612e0b565b61268a6040518060800160405280606081526020016000815260200160006001600160a01b03168152602001606081525090565b818152600d5460208201526001600160a01b038516604080830191909152606082018590525181906012906126c09085906138f4565b908152602001604051809103902060008201518160000190805190602001906126ea929190613330565b50602082810151600183015560408301516002830180546001600160a01b0319166001600160a01b03909216919091179055606083015180516127339260038501920190613330565b5050600d546000908152601360209081526040909120845161275a93509091850190613330565b506001600160a01b0385166000908152601460205260409020805461277e90613e12565b151590506127b1576001600160a01b038516600090815260146020908152604090912083516127af92850190613330565b505b6001600160a01b038516337f6a48f46f419774a1b2d37bbb2e1214ca73c6d3367d4e9ae39c08a9cf99bdd19b846127e661096d565b6040516020016127f7929190613910565b60408051601f198184030181529082905261281191613972565b60405180910390a3600d6000815461282890613e4d565b90915550600c805460009061283c90613e4d565b90915550600d5461284f90600190613db8565b9695505050505050565b816001600160a01b0316836001600160a01b031614156128bb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a74565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612933848484611ec5565b61293f84848484612f59565b61154e5760405162461bcd60e51b8152600401610a7490613a9f565b600061296682610f6b565b905061297481600084612a02565b61297f600083611d60565b6001600160a01b03811660009081526003602052604081208054600192906129a8908490613db8565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b03831615610baa5781601260136000848152602001908152602001600020604051612a349190613885565b908152604080516020928190038301902060020180546001600160a01b0319166001600160a01b0394851617905591841660009081526014909152208054612a7b90613e12565b1590508015612a9257506001600160a01b03821615155b15612b0457600081815260136020526040908190209051601291612ab591613885565b908152602001604051809103902060000160146000846001600160a01b03166001600160a01b03168152602001908152602001600020908054612af790613e12565b612b029291906133a4565b505b612bf6612bc9601260136000858152602001908152602001600020604051612b2c9190613885565b9081526040519081900360200190208054612b4690613e12565b80601f0160208091040260200160405190810160405280929190818152602001828054612b7290613e12565b8015612bbf5780601f10612b9457610100808354040283529160200191612bbf565b820191906000526020600020905b815481529060010190602001808311612ba257829003601f168201915b5050505050612c6b565b6001600160a01b03851660009081526014602052604090208054612bf19190612b4690613e12565b613066565b15610baa576001600160a01b0383166000908152601460205260408120610baa916132f6565b6000604160f81b6001600160f81b0319831610801590612c4a5750602d60f91b6001600160f81b0319831611155b15612c6757612c5e60f883901c6020613c2a565b60f81b92915050565b5090565b60408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b600080601f8360200151612cac9190613db8565b8351909150600090612cbe9083613c12565b9050600092505b80821015612d6a57815160ff166080811015612ced57612ce6600184613c12565b9250612d57565b60e08160ff161015612d0457612ce6600284613c12565b60f08160ff161015612d1b57612ce6600384613c12565b60f88160ff161015612d3257612ce6600484613c12565b60fc8160ff161015612d4957612ce6600584613c12565b612d54600684613c12565b92505b5082612d6281613e4d565b935050612cc5565b5050919050565b6000808260000151612d95856000015186602001518660000151876020015161307a565b612d9f9190613c12565b90505b83516020850151612db39190613c12565b81116121515781612dc381613e4d565b9250508260000151612dfa856020015183612dde9190613db8565b8651612dea9190613db8565b838660000151876020015161307a565b612e049190613c12565b9050612da2565b6001600160a01b038216612e615760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a74565b6000818152600260205260409020546001600160a01b031615612ec65760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a74565b612ed260008383612a02565b6001600160a01b0382166000908152600360205260408120805460019290612efb908490613c12565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561305b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612f9d90339089908890889060040161393f565b602060405180830381600087803b158015612fb757600080fd5b505af1925050508015612fe7575060408051601f3d908101601f19168201909252612fe49181019061367a565b60015b613041573d808015613015576040519150601f19603f3d011682016040523d82523d6000602084013e61301a565b606091505b5080516130395760405162461bcd60e51b8152600401610a7490613a9f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611ebd565b506001949350505050565b6000613072838361319b565b159392505050565b60008381868511613186576020851161313457600085156130c65760016130a2876020613db8565b6130ad906008613d5a565b6130b8906002613cb2565b6130c29190613db8565b1990505b845181166000876130d78b8b613c12565b6130e19190613db8565b855190915083165b8281146131265781861061310e576131018b8b613c12565b9650505050505050611ebd565b8561311881613e4d565b9650508386511690506130e9565b859650505050505050611ebd565b508383206000905b6131468689613db8565b821161318457858320818114156131635783945050505050611ebd565b61316e600185613c12565b935050818061317c90613e4d565b92505061313c565b505b6131908787613c12565b979650505050505050565b81518151600091908111156131ae575081515b6020808501519084015160005b838110156132675782518251808214613237576000196020871015613216576001846131e8896020613db8565b6131f29190613c12565b6131fd906008613d5a565b613208906002613cb2565b6132129190613db8565b1990505b81811683821681810391146132345797506109679650505050505050565b50505b613242602086613c12565b945061324f602085613c12565b935050506020816132609190613c12565b90506131bb565b508451865161284f9190613d79565b82805461328290613e12565b90600052602060002090601f0160209004810192826132a457600085556132ea565b82601f106132bd5782800160ff198235161785556132ea565b828001600101855582156132ea579182015b828111156132ea5782358255916020019190600101906132cf565b50612c6792915061341f565b50805461330290613e12565b6000825580601f10613312575050565b601f016020900490600052602060002090810190611d5d919061341f565b82805461333c90613e12565b90600052602060002090601f01602090048101928261335e57600085556132ea565b82601f1061337757805160ff19168380011785556132ea565b828001600101855582156132ea579182015b828111156132ea578251825591602001919060010190613389565b8280546133b090613e12565b90600052602060002090601f0160209004810192826133d257600085556132ea565b82601f106133e357805485556132ea565b828001600101855582156132ea57600052602060002091601f016020900482015b828111156132ea578254825591600101919060010190613404565b5b80821115612c675760008155600101613420565b600061344761344284613bea565b613bb9565b905082815283838301111561345b57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461348957600080fd5b919050565b60008083601f84011261349f578182fd5b50813567ffffffffffffffff8111156134b6578182fd5b6020830191508360208285010111156134ce57600080fd5b9250929050565b600082601f8301126134e5578081fd5b6134f483833560208501613434565b9392505050565b60006020828403121561350c578081fd5b6134f482613472565b60008060408385031215613527578081fd5b61353083613472565b915061353e60208401613472565b90509250929050565b60008060006060848603121561355b578081fd5b61356484613472565b925061357260208501613472565b9150604084013590509250925092565b60008060008060808587031215613597578081fd5b6135a085613472565b93506135ae60208601613472565b925060408501359150606085013567ffffffffffffffff8111156135d0578182fd5b8501601f810187136135e0578182fd5b6135ef87823560208401613434565b91505092959194509250565b6000806040838503121561360d578182fd5b61361683613472565b91506020830135801515811461362a578182fd5b809150509250929050565b60008060408385031215613647578182fd5b61365083613472565b946020939093013593505050565b60006020828403121561366f578081fd5b81356134f481613e94565b60006020828403121561368b578081fd5b81516134f481613e94565b600080602083850312156136a8578182fd5b823567ffffffffffffffff8111156136be578283fd5b6136ca8582860161348e565b90969095509350505050565b600080600080604085870312156136eb578384fd5b843567ffffffffffffffff80821115613702578586fd5b61370e8883890161348e565b90965094506020870135915080821115613726578384fd5b506137338782880161348e565b95989497509550505050565b600060208284031215613750578081fd5b813567ffffffffffffffff811115613766578182fd5b611ebd848285016134d5565b600060208284031215613783578081fd5b815167ffffffffffffffff811115613799578182fd5b8201601f810184136137a9578182fd5b80516137b761344282613bea565b8181528560208385010111156137cb578384fd5b6137dc826020830160208601613dcf565b95945050505050565b6000806000606084860312156137f9578081fd5b833567ffffffffffffffff81111561380f578182fd5b61381b868287016134d5565b93505061382a60208501613472565b915061383860408501613472565b90509250925092565b600060208284031215613852578081fd5b5035919050565b60008151808452613871816020860160208601613dcf565b601f01601f19169290920160200192915050565b600080835461389381613e12565b600182811680156138ab57600181146138bc576138e8565b60ff198416875282870194506138e8565b8786526020808720875b858110156138df5781548a8201529084019082016138c6565b50505082870194505b50929695505050505050565b60008251613906818460208701613dcf565b9190910192915050565b60008351613922818460208801613dcf565b835190830190613936818360208801613dcf565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061284f90830184613859565b6020815260006134f46020830184613859565b6080815260006139986080830187613859565b602083018690526001600160a01b038516604084015282810360608401526131908185613859565b6060815260008085546139d281613e12565b80606086015260806001808416600081146139f45760018114613a0857613a36565b60ff1985168884015260a088019550613a36565b8a87526020808820885b86811015613a2d5781548b8201870152908401908201613a12565b8a018501975050505b50505050508281036020840152613a4d8186613859565b915050826040830152949350505050565b60208082526021908201527f53656e646572206973206e6f7420726f79616c747920666565207570646174656040820152603960f91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526022908201527f596f7520646f206e6f74206f776e207468652073656c656374656420646f6d6160408201526134b760f11b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613be257613be2613e7e565b604052919050565b600067ffffffffffffffff821115613c0457613c04613e7e565b50601f01601f191660200190565b60008219821115613c2557613c25613e68565b500190565b600060ff821660ff84168060ff03821115613c4757613c47613e68565b019392505050565b600082613c6a57634e487b7160e01b81526012600452602481fd5b500490565b600181815b80851115613caa578160001904821115613c9057613c90613e68565b80851615613c9d57918102915b93841c9390800290613c74565b509250929050565b60006134f48383600082613cc857506001610967565b81613cd557506000610967565b8160018114613ceb5760028114613cf557613d11565b6001915050610967565b60ff841115613d0657613d06613e68565b50506001821b610967565b5060208310610133831016604e8410600b8410161715613d34575081810a610967565b613d3e8383613c6f565b8060001904821115613d5257613d52613e68565b029392505050565b6000816000190483118215151615613d7457613d74613e68565b500290565b60008083128015600160ff1b850184121615613d9757613d97613e68565b6001600160ff1b0384018313811615613db257613db2613e68565b50500390565b600082821015613dca57613dca613e68565b500390565b60005b83811015613dea578181015183820152602001613dd2565b8381111561154e5750506000910152565b600081613e0a57613e0a613e68565b506000190190565b600181811c90821680613e2657607f821691505b60208210811415613e4757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613e6157613e61613e68565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114611d5d57600080fdfea26469706673582212203310dd47ca7d19bae3bd9b8a4b6f5e8a618c55eab4dedbf648a2bc5e5a3583ff64736f6c63430008040033

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

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.