ETH Price: $3,098.24 (-4.19%)
 

Overview

Max Total Supply

4,081 PunkinSpicies

Holders

10

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
drivemycar.eth
Balance
4 PunkinSpicies
0xc120cd7cf154b135fa8d4391cc3df66865ed22f5
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
ERC721Surrogate

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : ERC721Surrogate.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./IERC721Principal.sol";
import "./IERC721Surrogate.sol";

contract ERC721Surrogate is Ownable, IERC721Surrogate {
  using Strings for uint256;

  error NotSupported();

  struct Token {
    address principal;
    address surrogate;
    bool isSet;
  }

  IERC721Principal public PRINCIPAL;

  string internal _tokenURIPrefix = "";
  string internal _tokenURISuffix = "";
  mapping( address => int256 ) internal _balances;
  mapping( uint256 => Token ) internal _tokens;


  constructor( IERC721Principal _principal )
    Ownable(){
    PRINCIPAL = _principal;
  }


  //IERC721Surrogate :: nonpayable
  function setSurrogate( uint256 tokenId, address surrogateOwner ) public {
    address principalOwner = PRINCIPAL.ownerOf( tokenId );
    require( principalOwner == msg.sender, "ERC721Surrogate: caller is not owner" );

    if( surrogateOwner == principalOwner || surrogateOwner == address(0) ){
      _unsetSurrogate( tokenId, principalOwner );
    }
    else{
      _setSurrogate( tokenId, principalOwner, surrogateOwner );
    }
  }

  function setSurrogates( uint256[] calldata tokenIds, address[] calldata surrogates ) external {
    for( uint256 i; i < tokenIds.length; ++i ){
      setSurrogate( tokenIds[i], surrogates[i] );
    }
  }


  function syncSurrogate( uint256 tokenId ) public {
    address principalOwner = PRINCIPAL.ownerOf( tokenId );
    if( _tokens[ tokenId ].principal != principalOwner ){
      _unsetSurrogate( tokenId, principalOwner );
    }
  }

  function syncSurrogates( uint256[] calldata tokenIds ) external {
    for( uint256 i; i < tokenIds.length; ++i ){
      syncSurrogate( tokenIds[i] );
    }
  }


  function unsetSurrogate( uint256 tokenId ) public {
    address principalOwner = PRINCIPAL.ownerOf( tokenId );
    require( principalOwner == msg.sender, "ERC721Surrogate: caller is not owner" );
    _unsetSurrogate( tokenId, principalOwner );
  }

  function unsetSurrogates( uint256[] calldata tokenIds ) external {
    for( uint256 i; i < tokenIds.length; ++i ){
      unsetSurrogate( tokenIds[i] );
    }
  }


  //ERC721 :: nonpayable
  function approve(address, uint256) external pure override{
    revert NotSupported();
  }

  function safeTransferFrom( address, address to, uint256 tokenId ) external {
    setSurrogate( tokenId, to );
  }

  function safeTransferFrom( address, address to, uint256 tokenId, bytes calldata ) external {
    setSurrogate( tokenId, to );
  }

  function setBaseURI(string calldata _newPrefix, string calldata _newSuffix) external onlyOwner{
    _tokenURIPrefix = _newPrefix;
    _tokenURISuffix = _newSuffix;
  }

  function transferFrom( address, address to, uint256 tokenId ) external {
    setSurrogate( tokenId, to );
  }


  //ERC721 :: nonpayable :: not implemented
  function setApprovalForAll(address, bool) external pure {
    revert NotSupported();
  }


  //ERC721 :: view
  function balanceOf(address account) external view override returns(uint256){
    int256 balance = int256(PRINCIPAL.balanceOf(account)) + _balances[ account ];
    if( balance < 0 )
      return 0;
    else
      return uint256(balance);
  }

  function getApproved(uint256 tokenId) external view override returns(address){
    return PRINCIPAL.ownerOf( tokenId );
  }

  function isApprovedForAll(address, address) external pure override returns(bool){
    return false;
  }

  function name() external view override returns (string memory){
    return PRINCIPAL.name();
  }

  function ownerOf( uint256 tokenId ) external view override returns (address){
    address principalOwner = PRINCIPAL.ownerOf( tokenId );
    Token memory token = _tokens[ tokenId ];
    if( token.principal == principalOwner && token.isSet )
      return token.surrogate;
    else
      return principalOwner;
  }

  function supportsInterface(bytes4 interfaceId) external pure override returns(bool){
    return interfaceId == type(IERC165).interfaceId
      || interfaceId == type(IERC721).interfaceId
      || interfaceId == type(IERC721Metadata).interfaceId;
  }

  function symbol() external view override returns (string memory){
    return PRINCIPAL.symbol();
  }

  function tokenURI( uint256 tokenId ) external view override returns (string memory) {
    //require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
    return string(abi.encodePacked(_tokenURIPrefix, tokenId.toString(), _tokenURISuffix));
  }

  function totalSupply() external view returns (uint256){
    return PRINCIPAL.totalSupply();
  }


  //internal
  function _setSurrogate( uint256 tokenId, address principalOwner, address surrogateOwner ) internal {
    Token memory prev = _tokens[ tokenId ];
    if(prev.principal != principalOwner){
      if(prev.principal != address(0))
        ++_balances[prev.principal];
      
      --_balances[principalOwner];
    }

    if(prev.surrogate != surrogateOwner){
      if(prev.surrogate != address(0))
        --_balances[prev.surrogate];
      
      ++_balances[surrogateOwner];
    }

    _tokens[ tokenId ] = Token(principalOwner, surrogateOwner, true);
    emit Transfer(prev.surrogate, surrogateOwner, tokenId);
  }

  function _unsetSurrogate( uint256 tokenId, address principalOwner ) internal {
    Token memory prev = _tokens[ tokenId ];
    if(prev.isSet){
      --_balances[prev.surrogate];
      ++_balances[prev.principal];
    }

    _tokens[ tokenId ] = Token( principalOwner, principalOwner, false );
    emit Transfer(prev.surrogate, principalOwner, tokenId);
  }
}

File 2 of 10 : IERC721Surrogate.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";

interface IERC721Surrogate is IERC721Metadata {
  //IERC721Metadata
  function balanceOf(address owner) external view returns (uint256 balance);
  function ownerOf(uint256 tokenId) external view returns (address owner);
  function tokenURI(uint256 tokenId) external view returns (string memory);

  //IERC721Surrogate
  function setSurrogate( uint tokenId, address surrogate ) external;
  function setSurrogates( uint[] calldata tokenIds, address[] calldata surrogates ) external;

  function syncSurrogate( uint tokenId ) external;
  function syncSurrogates( uint[] calldata tokenIds ) external;

  function unsetSurrogate( uint tokenId ) external;
  function unsetSurrogates( uint[] calldata tokenIds ) external;
}

File 3 of 10 : IERC721Principal.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";

interface IERC721Principal is IERC721, IERC721Metadata {
  function owner() external view returns (address);
  function totalSupply() external view returns(uint256);
}

File 4 of 10 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 5 of 10 : 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 6 of 10 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 7 of 10 : 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 8 of 10 : 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 9 of 10 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 10 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC721Principal","name":"_principal","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotSupported","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"PRINCIPAL","outputs":[{"internalType":"contract IERC721Principal","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","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":"","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"_newPrefix","type":"string"},{"internalType":"string","name":"_newSuffix","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"surrogateOwner","type":"address"}],"name":"setSurrogate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address[]","name":"surrogates","type":"address[]"}],"name":"setSurrogates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"syncSurrogate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"syncSurrogates","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":"","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unsetSurrogate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unsetSurrogates","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040819052600060808190526200001b91600291620000ee565b506040805160208101918290526000908190526200003c91600391620000ee565b503480156200004a57600080fd5b5060405162001a1438038062001a148339810160408190526200006d9162000194565b62000078336200009e565b600180546001600160a01b0319166001600160a01b039290921691909117905562000202565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620000fc90620001c6565b90600052602060002090601f0160209004810192826200012057600085556200016b565b82601f106200013b57805160ff19168380011785556200016b565b828001600101855582156200016b579182015b828111156200016b5782518255916020019190600101906200014e565b50620001799291506200017d565b5090565b5b808211156200017957600081556001016200017e565b600060208284031215620001a757600080fd5b81516001600160a01b0381168114620001bf57600080fd5b9392505050565b600181811c90821680620001db57607f821691505b602082108103620001fc57634e487b7160e01b600052602260045260246000fd5b50919050565b61180280620002126000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806370a08231116100de578063b2dda18411610097578063c87b56dd11610071578063c87b56dd1461030b578063d274958d1461031e578063e985e9c514610331578063f2fde38b1461034757600080fd5b8063b2dda184146102d2578063b88d4fde146102e5578063bbf4a657146102f857600080fd5b806370a082311461027d578063715018a6146102905780637e0c887f146102985780638da5cb5b146102ab57806395d89b41146102bc578063a22cb465146102c457600080fd5b806342842e0e1161013057806342842e0e1461020b57806343c8ad5d1461021e5780634d77eb681461023157806360dc4851146102445780636352211e146102575780636790a9de1461026a57600080fd5b806301ffc9a71461017857806306fdde03146101a0578063081812fc146101b5578063095ea7b3146101e057806318160ddd146101f557806323b872dd1461020b575b600080fd5b61018b6101863660046110f3565b61035a565b60405190151581526020015b60405180910390f35b6101a86103ac565b6040516101979190611154565b6101c86101c3366004611187565b610423565b6040516001600160a01b039091168152602001610197565b6101f36101ee3660046111b5565b610491565b005b6101fd6104aa565b604051908152602001610197565b6101f36102193660046111e1565b610518565b6101f361022c36600461126e565b610527565b6101f361023f3660046112b0565b610563565b6101f361025236600461126e565b610645565b6101c8610265366004611187565b610681565b6101f3610278366004611322565b61076e565b6101fd61028b36600461138e565b610796565b6101f361083e565b6101f36102a6366004611187565b610852565b6000546001600160a01b03166101c8565b6101a86108f8565b6101f36101ee3660046113ab565b6101f36102e03660046113de565b610942565b6101f36102f336600461143e565b6109a0565b6101f3610306366004611187565b6109aa565b6101a8610319366004611187565b610a46565b6001546101c8906001600160a01b031681565b61018b61033f3660046114b1565b600092915050565b6101f361035536600461138e565b610a7d565b60006001600160e01b031982166301ffc9a760e01b148061038b57506001600160e01b031982166380ac58cd60e01b145b806103a657506001600160e01b03198216635b5e139f60e01b145b92915050565b600154604080516306fdde0360e01b815290516060926001600160a01b0316916306fdde039160048083019260009291908290030181865afa1580156103f6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261041e91908101906114f5565b905090565b6001546040516331a9108f60e11b8152600481018390526000916001600160a01b031690636352211e90602401602060405180830381865afa15801561046d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906115a2565b604051630280e1e560e61b815260040160405180910390fd5b600154604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa1580156104f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041e91906115bf565b6105228183610563565b505050565b60005b8181101561052257610553838383818110610547576105476115d8565b905060200201356109aa565b61055c81611604565b905061052a565b6001546040516331a9108f60e11b8152600481018490526000916001600160a01b031690636352211e90602401602060405180830381865afa1580156105ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d191906115a2565b90506001600160a01b03811633146106045760405162461bcd60e51b81526004016105fb9061161d565b60405180910390fd5b806001600160a01b0316826001600160a01b0316148061062b57506001600160a01b038216155b1561063a576105228382610af6565b610522838284610c50565b60005b8181101561052257610671838383818110610665576106656115d8565b90506020020135610852565b61067a81611604565b9050610648565b6001546040516331a9108f60e11b81526004810183905260009182916001600160a01b0390911690636352211e90602401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f391906115a2565b600084815260056020908152604091829020825160608101845281546001600160a01b0390811680835260019093015480821694830194909452600160a01b90930460ff161515938101939093529293509091908316148015610757575080604001515b1561076757602001519392505050565b5092915050565b610776610e45565b6107826002858561105a565b5061078f6003838361105a565b5050505050565b6001600160a01b0381811660008181526004602081905260408083205460015491516370a0823160e01b815292830194909452919384939216906370a0823190602401602060405180830381865afa1580156107f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081a91906115bf565b6108249190611661565b905060008112156103a65750600092915050565b50919050565b610846610e45565b6108506000610e9f565b565b6001546040516331a9108f60e11b8152600481018390526000916001600160a01b031690636352211e90602401602060405180830381865afa15801561089c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c091906115a2565b90506001600160a01b03811633146108ea5760405162461bcd60e51b81526004016105fb9061161d565b6108f48282610af6565b5050565b600154604080516395d89b4160e01b815290516060926001600160a01b0316916395d89b419160048083019260009291908290030181865afa1580156103f6573d6000803e3d6000fd5b60005b8381101561078f57610990858583818110610962576109626115d8565b9050602002013584848481811061097b5761097b6115d8565b905060200201602081019061023f919061138e565b61099981611604565b9050610945565b61078f8385610563565b6001546040516331a9108f60e11b8152600481018390526000916001600160a01b031690636352211e90602401602060405180830381865afa1580156109f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1891906115a2565b6000838152600560205260409020549091506001600160a01b038083169116146108f4576108f48282610af6565b60606002610a5383610eef565b6003604051602001610a679392919061176f565b6040516020818303038152906040529050919050565b610a85610e45565b6001600160a01b038116610aea5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105fb565b610af381610e9f565b50565b600082815260056020908152604091829020825160608101845281546001600160a01b03908116825260019092015491821692810192909252600160a01b900460ff161580159282019290925290610ba3576020808201516001600160a01b031660009081526004909152604081208054909190610b7390611797565b9091555080516001600160a01b031660009081526004602052604081208054909190610b9e906117b4565b909155505b604080516060810182526001600160a01b03808516808352602080840182815260008587018181528a825260058452878220965187549087166001600160a01b03199091161787559151600196909601805492511515600160a01b026001600160a81b0319909316968616969096179190911790945585015193518794919391909216917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b600083815260056020908152604091829020825160608101845281546001600160a01b0390811680835260019093015480821694830194909452600160a01b90930460ff1615159381019390935290841614610d0d5780516001600160a01b031615610ce25780516001600160a01b031660009081526004602052604081208054909190610cdd906117b4565b909155505b6001600160a01b03831660009081526004602052604081208054909190610d0890611797565b909155505b816001600160a01b031681602001516001600160a01b031614610d985760208101516001600160a01b031615610d6d576020808201516001600160a01b031660009081526004909152604081208054909190610d6890611797565b909155505b6001600160a01b03821660009081526004602052604081208054909190610d93906117b4565b909155505b604080516060810182526001600160a01b0380861682528481166020808401828152600185870181815260008c815260058552888120975188549088166001600160a01b0319909116178855925196909101805491511515600160a01b026001600160a81b0319909216968616969096171790945585015193518894919391909216917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a450505050565b6000546001600160a01b031633146108505760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105fb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60606000610efc83610f82565b600101905060008167ffffffffffffffff811115610f1c57610f1c6114df565b6040519080825280601f01601f191660200182016040528015610f46576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610f5057509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610fc15772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610fed576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061100b57662386f26fc10000830492506010015b6305f5e1008310611023576305f5e100830492506008015b612710831061103757612710830492506004015b60648310611049576064830492506002015b600a83106103a65760010192915050565b828054611066906116a2565b90600052602060002090601f01602090048101928261108857600085556110ce565b82601f106110a15782800160ff198235161785556110ce565b828001600101855582156110ce579182015b828111156110ce5782358255916020019190600101906110b3565b506110da9291506110de565b5090565b5b808211156110da57600081556001016110df565b60006020828403121561110557600080fd5b81356001600160e01b03198116811461111d57600080fd5b9392505050565b60005b8381101561113f578181015183820152602001611127565b8381111561114e576000848401525b50505050565b6020815260008251806020840152611173816040850160208701611124565b601f01601f19169190910160400192915050565b60006020828403121561119957600080fd5b5035919050565b6001600160a01b0381168114610af357600080fd5b600080604083850312156111c857600080fd5b82356111d3816111a0565b946020939093013593505050565b6000806000606084860312156111f657600080fd5b8335611201816111a0565b92506020840135611211816111a0565b929592945050506040919091013590565b60008083601f84011261123457600080fd5b50813567ffffffffffffffff81111561124c57600080fd5b6020830191508360208260051b850101111561126757600080fd5b9250929050565b6000806020838503121561128157600080fd5b823567ffffffffffffffff81111561129857600080fd5b6112a485828601611222565b90969095509350505050565b600080604083850312156112c357600080fd5b8235915060208301356112d5816111a0565b809150509250929050565b60008083601f8401126112f257600080fd5b50813567ffffffffffffffff81111561130a57600080fd5b60208301915083602082850101111561126757600080fd5b6000806000806040858703121561133857600080fd5b843567ffffffffffffffff8082111561135057600080fd5b61135c888389016112e0565b9096509450602087013591508082111561137557600080fd5b50611382878288016112e0565b95989497509550505050565b6000602082840312156113a057600080fd5b813561111d816111a0565b600080604083850312156113be57600080fd5b82356113c9816111a0565b9150602083013580151581146112d557600080fd5b600080600080604085870312156113f457600080fd5b843567ffffffffffffffff8082111561140c57600080fd5b61141888838901611222565b9096509450602087013591508082111561143157600080fd5b5061138287828801611222565b60008060008060006080868803121561145657600080fd5b8535611461816111a0565b94506020860135611471816111a0565b935060408601359250606086013567ffffffffffffffff81111561149457600080fd5b6114a0888289016112e0565b969995985093965092949392505050565b600080604083850312156114c457600080fd5b82356114cf816111a0565b915060208301356112d5816111a0565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561150757600080fd5b815167ffffffffffffffff8082111561151f57600080fd5b818401915084601f83011261153357600080fd5b815181811115611545576115456114df565b604051601f8201601f19908116603f0116810190838211818310171561156d5761156d6114df565b8160405282815287602084870101111561158657600080fd5b611597836020830160208801611124565b979650505050505050565b6000602082840312156115b457600080fd5b815161111d816111a0565b6000602082840312156115d157600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611616576116166115ee565b5060010190565b60208082526024908201527f455243373231537572726f676174653a2063616c6c6572206973206e6f74206f6040820152633bb732b960e11b606082015260800190565b600080821280156001600160ff1b0384900385131615611683576116836115ee565b600160ff1b839003841281161561169c5761169c6115ee565b50500190565b600181811c908216806116b657607f821691505b60208210810361083857634e487b7160e01b600052602260045260246000fd5b8054600090600181811c90808316806116f057607f831692505b6020808410820361171157634e487b7160e01b600052602260045260246000fd5b818015611725576001811461173657611763565b60ff19861689528489019650611763565b60008881526020902060005b8681101561175b5781548b820152908501908301611742565b505084890196505b50505050505092915050565b600061177b82866116d6565b845161178b818360208901611124565b611597818301866116d6565b6000600160ff1b82016117ac576117ac6115ee565b506000190190565b60006001600160ff1b018201611616576116166115ee56fea2646970667358221220635e973398d3bfd51dec7090083522be2001a724374f3f0f7cf4e5e62fc9efc964736f6c634300080d003300000000000000000000000034625ecaa75c0ea33733a05c584f4cf112c10b6b

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101735760003560e01c806370a08231116100de578063b2dda18411610097578063c87b56dd11610071578063c87b56dd1461030b578063d274958d1461031e578063e985e9c514610331578063f2fde38b1461034757600080fd5b8063b2dda184146102d2578063b88d4fde146102e5578063bbf4a657146102f857600080fd5b806370a082311461027d578063715018a6146102905780637e0c887f146102985780638da5cb5b146102ab57806395d89b41146102bc578063a22cb465146102c457600080fd5b806342842e0e1161013057806342842e0e1461020b57806343c8ad5d1461021e5780634d77eb681461023157806360dc4851146102445780636352211e146102575780636790a9de1461026a57600080fd5b806301ffc9a71461017857806306fdde03146101a0578063081812fc146101b5578063095ea7b3146101e057806318160ddd146101f557806323b872dd1461020b575b600080fd5b61018b6101863660046110f3565b61035a565b60405190151581526020015b60405180910390f35b6101a86103ac565b6040516101979190611154565b6101c86101c3366004611187565b610423565b6040516001600160a01b039091168152602001610197565b6101f36101ee3660046111b5565b610491565b005b6101fd6104aa565b604051908152602001610197565b6101f36102193660046111e1565b610518565b6101f361022c36600461126e565b610527565b6101f361023f3660046112b0565b610563565b6101f361025236600461126e565b610645565b6101c8610265366004611187565b610681565b6101f3610278366004611322565b61076e565b6101fd61028b36600461138e565b610796565b6101f361083e565b6101f36102a6366004611187565b610852565b6000546001600160a01b03166101c8565b6101a86108f8565b6101f36101ee3660046113ab565b6101f36102e03660046113de565b610942565b6101f36102f336600461143e565b6109a0565b6101f3610306366004611187565b6109aa565b6101a8610319366004611187565b610a46565b6001546101c8906001600160a01b031681565b61018b61033f3660046114b1565b600092915050565b6101f361035536600461138e565b610a7d565b60006001600160e01b031982166301ffc9a760e01b148061038b57506001600160e01b031982166380ac58cd60e01b145b806103a657506001600160e01b03198216635b5e139f60e01b145b92915050565b600154604080516306fdde0360e01b815290516060926001600160a01b0316916306fdde039160048083019260009291908290030181865afa1580156103f6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261041e91908101906114f5565b905090565b6001546040516331a9108f60e11b8152600481018390526000916001600160a01b031690636352211e90602401602060405180830381865afa15801561046d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906115a2565b604051630280e1e560e61b815260040160405180910390fd5b600154604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa1580156104f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041e91906115bf565b6105228183610563565b505050565b60005b8181101561052257610553838383818110610547576105476115d8565b905060200201356109aa565b61055c81611604565b905061052a565b6001546040516331a9108f60e11b8152600481018490526000916001600160a01b031690636352211e90602401602060405180830381865afa1580156105ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d191906115a2565b90506001600160a01b03811633146106045760405162461bcd60e51b81526004016105fb9061161d565b60405180910390fd5b806001600160a01b0316826001600160a01b0316148061062b57506001600160a01b038216155b1561063a576105228382610af6565b610522838284610c50565b60005b8181101561052257610671838383818110610665576106656115d8565b90506020020135610852565b61067a81611604565b9050610648565b6001546040516331a9108f60e11b81526004810183905260009182916001600160a01b0390911690636352211e90602401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f391906115a2565b600084815260056020908152604091829020825160608101845281546001600160a01b0390811680835260019093015480821694830194909452600160a01b90930460ff161515938101939093529293509091908316148015610757575080604001515b1561076757602001519392505050565b5092915050565b610776610e45565b6107826002858561105a565b5061078f6003838361105a565b5050505050565b6001600160a01b0381811660008181526004602081905260408083205460015491516370a0823160e01b815292830194909452919384939216906370a0823190602401602060405180830381865afa1580156107f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081a91906115bf565b6108249190611661565b905060008112156103a65750600092915050565b50919050565b610846610e45565b6108506000610e9f565b565b6001546040516331a9108f60e11b8152600481018390526000916001600160a01b031690636352211e90602401602060405180830381865afa15801561089c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c091906115a2565b90506001600160a01b03811633146108ea5760405162461bcd60e51b81526004016105fb9061161d565b6108f48282610af6565b5050565b600154604080516395d89b4160e01b815290516060926001600160a01b0316916395d89b419160048083019260009291908290030181865afa1580156103f6573d6000803e3d6000fd5b60005b8381101561078f57610990858583818110610962576109626115d8565b9050602002013584848481811061097b5761097b6115d8565b905060200201602081019061023f919061138e565b61099981611604565b9050610945565b61078f8385610563565b6001546040516331a9108f60e11b8152600481018390526000916001600160a01b031690636352211e90602401602060405180830381865afa1580156109f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1891906115a2565b6000838152600560205260409020549091506001600160a01b038083169116146108f4576108f48282610af6565b60606002610a5383610eef565b6003604051602001610a679392919061176f565b6040516020818303038152906040529050919050565b610a85610e45565b6001600160a01b038116610aea5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105fb565b610af381610e9f565b50565b600082815260056020908152604091829020825160608101845281546001600160a01b03908116825260019092015491821692810192909252600160a01b900460ff161580159282019290925290610ba3576020808201516001600160a01b031660009081526004909152604081208054909190610b7390611797565b9091555080516001600160a01b031660009081526004602052604081208054909190610b9e906117b4565b909155505b604080516060810182526001600160a01b03808516808352602080840182815260008587018181528a825260058452878220965187549087166001600160a01b03199091161787559151600196909601805492511515600160a01b026001600160a81b0319909316968616969096179190911790945585015193518794919391909216917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b600083815260056020908152604091829020825160608101845281546001600160a01b0390811680835260019093015480821694830194909452600160a01b90930460ff1615159381019390935290841614610d0d5780516001600160a01b031615610ce25780516001600160a01b031660009081526004602052604081208054909190610cdd906117b4565b909155505b6001600160a01b03831660009081526004602052604081208054909190610d0890611797565b909155505b816001600160a01b031681602001516001600160a01b031614610d985760208101516001600160a01b031615610d6d576020808201516001600160a01b031660009081526004909152604081208054909190610d6890611797565b909155505b6001600160a01b03821660009081526004602052604081208054909190610d93906117b4565b909155505b604080516060810182526001600160a01b0380861682528481166020808401828152600185870181815260008c815260058552888120975188549088166001600160a01b0319909116178855925196909101805491511515600160a01b026001600160a81b0319909216968616969096171790945585015193518894919391909216917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a450505050565b6000546001600160a01b031633146108505760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105fb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60606000610efc83610f82565b600101905060008167ffffffffffffffff811115610f1c57610f1c6114df565b6040519080825280601f01601f191660200182016040528015610f46576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610f5057509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610fc15772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610fed576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061100b57662386f26fc10000830492506010015b6305f5e1008310611023576305f5e100830492506008015b612710831061103757612710830492506004015b60648310611049576064830492506002015b600a83106103a65760010192915050565b828054611066906116a2565b90600052602060002090601f01602090048101928261108857600085556110ce565b82601f106110a15782800160ff198235161785556110ce565b828001600101855582156110ce579182015b828111156110ce5782358255916020019190600101906110b3565b506110da9291506110de565b5090565b5b808211156110da57600081556001016110df565b60006020828403121561110557600080fd5b81356001600160e01b03198116811461111d57600080fd5b9392505050565b60005b8381101561113f578181015183820152602001611127565b8381111561114e576000848401525b50505050565b6020815260008251806020840152611173816040850160208701611124565b601f01601f19169190910160400192915050565b60006020828403121561119957600080fd5b5035919050565b6001600160a01b0381168114610af357600080fd5b600080604083850312156111c857600080fd5b82356111d3816111a0565b946020939093013593505050565b6000806000606084860312156111f657600080fd5b8335611201816111a0565b92506020840135611211816111a0565b929592945050506040919091013590565b60008083601f84011261123457600080fd5b50813567ffffffffffffffff81111561124c57600080fd5b6020830191508360208260051b850101111561126757600080fd5b9250929050565b6000806020838503121561128157600080fd5b823567ffffffffffffffff81111561129857600080fd5b6112a485828601611222565b90969095509350505050565b600080604083850312156112c357600080fd5b8235915060208301356112d5816111a0565b809150509250929050565b60008083601f8401126112f257600080fd5b50813567ffffffffffffffff81111561130a57600080fd5b60208301915083602082850101111561126757600080fd5b6000806000806040858703121561133857600080fd5b843567ffffffffffffffff8082111561135057600080fd5b61135c888389016112e0565b9096509450602087013591508082111561137557600080fd5b50611382878288016112e0565b95989497509550505050565b6000602082840312156113a057600080fd5b813561111d816111a0565b600080604083850312156113be57600080fd5b82356113c9816111a0565b9150602083013580151581146112d557600080fd5b600080600080604085870312156113f457600080fd5b843567ffffffffffffffff8082111561140c57600080fd5b61141888838901611222565b9096509450602087013591508082111561143157600080fd5b5061138287828801611222565b60008060008060006080868803121561145657600080fd5b8535611461816111a0565b94506020860135611471816111a0565b935060408601359250606086013567ffffffffffffffff81111561149457600080fd5b6114a0888289016112e0565b969995985093965092949392505050565b600080604083850312156114c457600080fd5b82356114cf816111a0565b915060208301356112d5816111a0565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561150757600080fd5b815167ffffffffffffffff8082111561151f57600080fd5b818401915084601f83011261153357600080fd5b815181811115611545576115456114df565b604051601f8201601f19908116603f0116810190838211818310171561156d5761156d6114df565b8160405282815287602084870101111561158657600080fd5b611597836020830160208801611124565b979650505050505050565b6000602082840312156115b457600080fd5b815161111d816111a0565b6000602082840312156115d157600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611616576116166115ee565b5060010190565b60208082526024908201527f455243373231537572726f676174653a2063616c6c6572206973206e6f74206f6040820152633bb732b960e11b606082015260800190565b600080821280156001600160ff1b0384900385131615611683576116836115ee565b600160ff1b839003841281161561169c5761169c6115ee565b50500190565b600181811c908216806116b657607f821691505b60208210810361083857634e487b7160e01b600052602260045260246000fd5b8054600090600181811c90808316806116f057607f831692505b6020808410820361171157634e487b7160e01b600052602260045260246000fd5b818015611725576001811461173657611763565b60ff19861689528489019650611763565b60008881526020902060005b8681101561175b5781548b820152908501908301611742565b505084890196505b50505050505092915050565b600061177b82866116d6565b845161178b818360208901611124565b611597818301866116d6565b6000600160ff1b82016117ac576117ac6115ee565b506000190190565b60006001600160ff1b018201611616576116166115ee56fea2646970667358221220635e973398d3bfd51dec7090083522be2001a724374f3f0f7cf4e5e62fc9efc964736f6c634300080d0033

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

00000000000000000000000034625ecaa75c0ea33733a05c584f4cf112c10b6b

-----Decoded View---------------
Arg [0] : _principal (address): 0x34625Ecaa75C0Ea33733a05c584f4Cf112c10B6B

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000034625ecaa75c0ea33733a05c584f4cf112c10b6b


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

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