NFT
Overview
TokenID
794
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
alignDRAW
Compiler Version
v0.8.23+commit.f704f362
Contract Source Code (Solidity Standard Json-Input format)
// File: contracts/utils/Base64.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/Base64.sol) pragma solidity ^0.8.20; /** * @dev Provides a set of functions to operate with Base64 strings. */ library Base64 { /** * @dev Base64 Encoding/Decoding Table */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // Loads the table into memory string memory table = _TABLE; // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter // and split into 4 numbers of 6 bits. // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk string memory result = new string(4 * ((data.length + 2) / 3)); /// @solidity memory-safe-assembly assembly { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 32) // Run over the input, 3 bytes at a time for { let dataPtr := data let endPtr := add(data, mload(data)) } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 bytes (18 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F which is the number of // the previous character in the ASCII table prior to the Base64 Table // The result is then added to the table to get the character to write, // and finally write it in the result pointer but with a left shift // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } return result; } } // File: contracts/interfaces/draft-IERC6093.sol // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); } // File: contracts/utils/math/SignedMath.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } } // File: contracts/utils/math/Math.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @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 towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (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 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 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. uint256 twos = denominator & (0 - denominator); 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 (unsignedRoundsUp(rounding) && 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 * towards zero. * * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * 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 256, 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } } // File: contracts/utils/Strings.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @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), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @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) { uint256 localValue = value; 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_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } 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); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } } // File: contracts/token/ERC721/IERC721Receiver.sol // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; /** * @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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File: contracts/utils/introspection/IERC165.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @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: contracts/utils/introspection/ERC165.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; /** * @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); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: contracts/token/ERC721/IERC721.sol // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; /** * @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 address zero. * * 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: contracts/token/ERC721/extensions/IERC721Metadata.sol // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.20; /** * @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: contracts/utils/Context.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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: contracts/token/ERC721/ERC721.sol // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.20; /** * @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}. */ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; mapping(uint256 tokenId => address) private _owners; mapping(address owner => uint256) private _balances; mapping(uint256 tokenId => address) private _tokenApprovals; mapping(address owner => mapping(address operator => 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 returns (uint256) { if (owner == address(0)) { revert ERC721InvalidOwner(address(0)); } return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual returns (address) { return _requireOwned(tokenId); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual returns (string memory) { _requireOwned(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string.concat(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 overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual { _approve(to, tokenId, _msgSender()); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual returns (address) { _requireOwned(tokenId); return _getApproved(tokenId); } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. address previousOwner = _update(to, tokenId, _msgSender()); if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual { transferFrom(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist * * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`. */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted. */ function _getApproved(uint256 tokenId) internal view virtual returns (address) { return _tokenApprovals[tokenId]; } /** * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in * particular (ignoring whether it is owned by `owner`). * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) { return spender != address(0) && (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender); } /** * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner. * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets * the `spender` for the specific `tokenId`. * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual { if (!_isAuthorized(owner, spender, tokenId)) { if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } else { revert ERC721InsufficientApproval(spender, tokenId); } } } /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that * a uint256 would ever overflow from increments when these increments are bounded to uint128 values. * * WARNING: Increasing an account's balance using this function tends to be paired with an override of the * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership * remain consistent with one another. */ function _increaseBalance(address account, uint128 value) internal virtual { unchecked { _balances[account] += value; } } /** * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update. * * The `auth` argument is optional. If the value passed is non 0, then this function will check that * `auth` is either the owner of the token, or approved to operate on the token (by the owner). * * Emits a {Transfer} event. * * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}. */ function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) { address from = _ownerOf(tokenId); // Perform (optional) operator check if (auth != address(0)) { _checkAuthorized(from, auth, tokenId); } // Execute the update if (from != address(0)) { // Clear approval. No need to re-authorize or emit the Approval event _approve(address(0), tokenId, address(0), false); unchecked { _balances[from] -= 1; } } if (to != address(0)) { unchecked { _balances[to] += 1; } } _owners[tokenId] = to; emit Transfer(from, to, tokenId); return from; } /** * @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 { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner != address(0)) { revert ERC721InvalidSender(address(0)); } } /** * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance. * * 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 { _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); _checkOnERC721Received(address(0), to, tokenId, data); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal { address previousOwner = _update(address(0), tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(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 { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } else if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients * are aware of the ERC721 standard 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 like {safeTransferFrom} in the sense that it invokes * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `tokenId` token must exist and be owned by `from`. * - `to` cannot be the zero address. * - `from` cannot be the zero address. * - 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) internal { _safeTransfer(from, to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { _transfer(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Approve `to` to operate on `tokenId` * * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is * either the owner of the token, or approved to operate on all tokens held by this owner. * * Emits an {Approval} event. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address to, uint256 tokenId, address auth) internal { _approve(to, tokenId, auth, true); } /** * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not * emitted in the context of transfers. */ function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual { // Avoid reading the owner unless necessary if (emitEvent || auth != address(0)) { address owner = _requireOwned(tokenId); // We do not use _isAuthorized because single-token approvals should not be able to call approve if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { revert ERC721InvalidApprover(auth); } if (emitEvent) { emit Approval(owner, to, tokenId); } } _tokenApprovals[tokenId] = to; } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Requirements: * - operator can't be the address zero. * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC721InvalidOperator(operator); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned). * Returns the owner. * * Overrides to ownership logic should be done to {_ownerOf}. */ function _requireOwned(uint256 tokenId) internal view returns (address) { address owner = _ownerOf(tokenId); if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } return owner; } /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the * recipient doesn't accept the token transfer. 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 */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private { if (to.code.length > 0) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { if (retval != IERC721Receiver.onERC721Received.selector) { revert ERC721InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { revert ERC721InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } } // File: contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; /** * @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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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: contracts/ArtAlignDrawMetadata.sol // Copyright (c) 2023 Fellowship pragma solidity ^0.8.23; contract alignDRAWMetadata is Ownable { uint256 private immutable MAX_SUPPLY; address public src = 0x233C1fB6E9a1c9eEA44eBED85faF991485848693; string public metadataHashDefault = ""; /// @dev This event emits when the metadata of a range of tokens is changed. Anyone aware of ERC-4906 can update /// cached attributes for tokens in the designated range. event BatchMetadataUpdate(uint256 fromTokenId, uint256 toTokenId); constructor( uint256 maxSupply ) Ownable(msg.sender) { // CHECKS inputs require(maxSupply > 0, "Max supply must not be zero"); // EFFECTS MAX_SUPPLY = maxSupply; } /// @notice Update the Image Contract for all tokens /// @dev Can only be called by the contract `owner`. Emits an ERC-4906 event. /// @param srcContract_ The new URI base. When specified, token URIs are created by concatenating the baseURI, /// token ID, and ".json". function updateImageContract(address srcContract_) external onlyOwner { // CHECKS inputs require(srcContract_ != address(0), "Image Contract must not be the zero address"); // EFFECTS src = srcContract_; emit BatchMetadataUpdate(1, MAX_SUPPLY); } function updateMetadataHashDefault(string memory metadataHashDefault_) external onlyOwner { // CHECKS inputs require(bytes(metadataHashDefault_).length > 0, "Default IPFS Hash must not be empty"); // EFFECTS metadataHashDefault = metadataHashDefault_; emit BatchMetadataUpdate(1, MAX_SUPPLY); } // VIEW FUNCTIONS /// @notice The URI for the given token /// @dev Throws if `tokenId` is not valid or has not been minted function readImage(uint256 id) private view returns(string memory) { return string.concat( "data:image/png;base64,", Base64.encode(bytes(IImageStore(src).getImage(id))) ); } function tokenURI(uint256 tokenId) external view returns (string memory) { // This is assuming readImage(tokenId) returns a Base64 encoded image data URI string memory imageUri = readImage(tokenId); // Check if the imageUri is empty or error occurred if (bytes(imageUri).length == 0 || keccak256(abi.encodePacked(imageUri)) == keccak256(abi.encodePacked('data:image/png;base64,'))) { return string.concat( "ipfs://", metadataHashDefault, "/", Strings.toString(tokenId), ".json" ); } string memory attributes = string.concat( '[{"trait_type":"Prompt","value":"', _promptName(tokenId),'"},' '{"trait_type":"Prompt Type","value":"', _promptType(tokenId),'"}]' ); string memory svg = string.concat( '<svg width="500" height="500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' '<image width="500" height="500" image-rendering="pixelated" xlink:href="', imageUri, '"/>' '</svg>' ); // Safari compatible blur effect string memory html = string.concat( '<!DOCTYPE html>' '<html>' '<head>' '<style>' 'body, html {' 'margin: 0;' 'padding: 0;' 'overflow: hidden;' '}' 'svg {' 'display: block;' 'width: 100%;' 'height: 100%;' '}' 'img {' 'width: 100%;' 'height: 100%;' 'image-rendering: -webkit-optimize-contrast;' '-ms-interpolation-mode: nearest-neighbor;' 'image-rendering: -moz-crisp-edges;' 'image-rendering: pixelated;' '}' '</style>' '</head>' '<body style="background-color: rgb(0, 0, 0)" width="500" height="500">' '<svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">' '<foreignObject x="0" y="0" width="500" height="500">' '<img src="', imageUri, '"/>' '</foreignObject>' '</svg>' '</body>' '</html>' ); // Base64 encode string memory svgBase64Encoded = Base64.encode(bytes(svg)); string memory htmlBase64Encoded = Base64.encode(bytes(html)); string memory json = Base64.encode( bytes( string.concat( '{"name":"', _promptName(tokenId), ' #', _outputId(tokenId), '",', '"description":"[alignDRAW](https://aligndraw.fellowship.xyz/) - the first text-to-image artwork from 2015.\\n\\nBy early 2015, neural networks had mastered the art of \'image-to-text\' and could create natural language captions for images. Flipping this process, and turning text into image, was a much more complex challenge solved by 19-year old prodigy Elman Mansimov\'s alignDRAW model.\\n\\n\\nFellowship is pleased to present a special release of both print editions and **fully on-chain** NFTs of this historical artwork, containing all the original images created in 2015.\\n\\n*\\"alignDRAW images can be compared to the first fixed photographs taken by Niepce in 1826-1827.\\"* \\nDr Lev Manovich\\n\\n*\\"These images represent the birth of text prompt AI generated imagery.\\"* \\nDarius Himes, Christie\'s",', '"attributes":', attributes, ',', '"animation_url":"data:text/html;base64,', htmlBase64Encoded, '",', '"image":"data:image/svg+xml;base64,', svgBase64Encoded, '"}' ) ) ); return string.concat("data:application/json;base64,", json); } function _promptType(uint256 tokenId) private pure returns (string memory) { if (tokenId <= 168) { return "Paper Prompt"; } else { return "Process Prompt"; } } function _groupId(uint256 tokenId) private pure returns (uint256) { if (tokenId <= 168) { // Tokens 1 to 168, divided into 21 groups of 8 return (tokenId - 1) / 8; } else { // Tokens 169 and beyond, divided into groups of 121 return 21 + ((tokenId - 169) / 121); } } function _outputId(uint256 tokenId) private pure returns (string memory) { if (tokenId <= 168) { // Tokens 1 to 168, modulo 8 uint256 promptId = (tokenId - 1) % 8 + 1; return Strings.toString(promptId); } else { // Tokens beyond 168, modulo 121 uint256 offset = 168; uint256 promptId = (tokenId - offset - 1) % 121 + 1; return Strings.toString(promptId); } } function _promptName(uint256 tokenId) private pure returns (string memory) { string[42] memory promptNames = [ "A stop sign is flying in blue skies", "A herd of elephants flying in the blue skies", "A toilet seat sits open in the grass field", "A person skiing on sand clad vast desert", "A yellow school bus parked in a parking lot", "A red school bus parked in a parking lot", "A green school bus parked in a parking lot", "A blue school bus parked in a parking lot", "The decadent chocolate desert is on the table", "A bowl of bananas is on the table", "A vintage photo of a cat", "A vintage photo of a dog", "A very large commercial plane flying in blue skies", "A very large commercial plane flying in rainy skies", "A herd of elephants walking across a dry grass field", "A herd of elephants walking across a green grass field", "A rider on a blue motorcycle in the desert", "A rider on a blue motorcycle in the forest", "A surfer, a woman, and a child walk on the beach", "A surfer, a woman, and a child walk on the sun", "A group of people walk on a beach with surf boards", "A group of happy elephants in the dry grass field", "A group of happy elephants in the green grass field", "A herd of elephants flying in the blue skies", "A toilet seat sits open in the grass field", "A toilet seat sits open in an empty bathroom", "A brown horse is grazing in a field", "A brown horse is grazing in a beach", "An airplane flying off into the distance on a clear day", "An airplane flying off into the distance at night", "A yellow school bus parked in a parking lot", "A yellow school bus is walking across a green grass field", "A yellow school bus is flying in blue skies", "A green school bus parked in a parking lot", "A blue school bus parked in a parking lot", "A person skiing on snow clad vast mountain", "A person skiing on sand clad vast desert", "An airplane with its landing wheels out landing", "A very large commercial airplane walking in the green grass field", "A very large commercial airplane sitting on surfboard in the water", "A picture of a morning sky", "A picture of a dark sky" ]; uint256 index = _groupId(tokenId); // Ensure this is a uint256 require(index < promptNames.length, "Index out of bounds"); // This should not give a type error return promptNames[index]; } /// @notice Query if a contract implements an interface /// @dev Interface identification is specified in ERC-165. This function uses less than 30,000 gas. /// @param interfaceId The interface identifier, as specified in ERC-165 /// @return `true` if the contract implements `interfaceID` and `interfaceID` is not 0xffffffff, `false` otherwise function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) { return interfaceId == 0x80ac58cd || // ERC-721 Non-Fungible Token Standard interfaceId == 0x5b5e139f || // ERC-721 Non-Fungible Token Standard - metadata extension interfaceId == 0x2a55205a || // ERC-2981 NFT Royalty Standard interfaceId == 0x49064906 || // ERC-4906 Metadata Update Extension interfaceId == 0x7f5828d0 || // ERC-173 Contract Ownership Standard interfaceId == 0x01ffc9a7; // ERC-165 Standard Interface Detection } } interface IImageStore{ function getImage(uint256 id) external view returns (string memory); } // File: contracts/ArtAlignDraw.sol // Copyright (c) 2023 Fellowship pragma solidity ^0.8.23; /// @title Token Base /// @notice Shared logic for token contracts contract alignDRAW is ERC721, Ownable { uint256 private immutable MAX_SUPPLY; address public royaltyReceiver; address public minter; uint256 public royaltyFraction; uint256 public royaltyDenominator = 100; /// @notice Count of valid NFTs tracked by this contract uint256 public totalSupply; alignDRAWMetadata private _metadataContract; error OnlyMinter(); /// @dev This event emits when the metadata of a range of tokens is changed. Anyone aware of ERC-4906 can update /// cached attributes for tokens in the designated range. event BatchMetadataUpdate(uint256 fromTokenId, uint256 toTokenId); constructor( string memory name, string memory symbol, uint256 maxSupply, address royaltyReceiver_, uint256 royaltyPercent ) ERC721(name, symbol) Ownable(msg.sender) { // CHECKS inputs require(maxSupply > 0, "Max supply must not be zero"); require(royaltyReceiver_ != address(0), "Royalty receiver must not be the zero address"); require(royaltyPercent <= 100, "Royalty fraction must not be greater than 100%"); // EFFECTS MAX_SUPPLY = maxSupply; royaltyReceiver = royaltyReceiver_; royaltyFraction = royaltyPercent; } modifier onlyMinter() { if (msg.sender != minter) revert OnlyMinter(); _; } /// @inheritdoc Ownable function owner() public view virtual override(Ownable) returns (address) { return Ownable.owner(); } // MINTER FUNCTIONS /// @notice Mint an unclaimed token to the given address /// @dev Can only be called by the `minter` address /// @param to The new token owner that will receive the minted token /// @param tokenId The token being claimed. Reverts if invalid or already claimed. function mint(address to, uint256 tokenId) external onlyMinter { // CHECKS inputs require(tokenId > 0 && tokenId <= MAX_SUPPLY, "Invalid token ID"); // CHECKS + EFFECTS (not _safeMint, so no interactions) _mint(to, tokenId); // More EFFECTS totalSupply++; } function mintRange(address to, uint256 fromTokenId, uint256 toTokenId) external onlyMinter { // CHECKS require(fromTokenId > 0, "Invalid start token ID"); require(toTokenId >= fromTokenId, "End ID must be greater than or equal to start ID"); require(toTokenId <= MAX_SUPPLY, "End token ID exceeds maximum supply"); require(totalSupply + (toTokenId - fromTokenId + 1) <= MAX_SUPPLY, "Minting would exceed max supply"); // EFFECTS + INTERACTIONS for (uint256 tokenId = fromTokenId; tokenId <= toTokenId; tokenId++) { // Check if the token has already been minted (if necessary) _mint(to, tokenId); totalSupply++; } } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { return _metadataContract.tokenURI(tokenId); } // OWNER FUNCTIONS /// @notice Set the `minter` address /// @dev Can only be called by the contract `owner` function setMinter(address minter_) external onlyOwner { minter = minter_; } function metadataContract() external view returns (address) { return address(_metadataContract); } function setMetadataContract(address _addr) external onlyOwner { _metadataContract = alignDRAWMetadata(_addr); emit BatchMetadataUpdate(1, MAX_SUPPLY); } /// @notice Set the `royaltyReceiver` address /// @dev Can only be called by the contract `owner` function setRoyaltyReceiver(address royaltyReceiver_) external onlyOwner { // CHECKS inputs require(royaltyReceiver_ != address(0), "Royalty receiver must not be the zero address"); // EFFECTS royaltyReceiver = royaltyReceiver_; } /// @notice Update the royalty fraction /// @dev Can only be called by the contract `owner` function setRoyaltyFraction(uint256 royaltyFraction_, uint256 royaltyDenominator_) external onlyOwner { // CHECKS inputss require(royaltyDenominator_ != 0, "Royalty denominator must not be zero"); require(royaltyFraction_ <= royaltyDenominator_, "Royalty fraction must not be greater than 100%"); // EFFECTS royaltyFraction = royaltyFraction_; royaltyDenominator = royaltyDenominator_; } /// @notice Calculate how much royalty is owed and to whom /// @param salePrice - the sale price of the NFT asset /// @return receiver - address of where the royalty payment should be sent /// @return royaltyAmount - the royalty payment amount for salePrice function royaltyInfo(uint256, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { receiver = royaltyReceiver; // Use OpenZeppelin math utils for full precision multiply and divide without overflow royaltyAmount = Math.mulDiv(salePrice, royaltyFraction, royaltyDenominator, Math.Rounding.Ceil); } /// @notice Query if a contract implements an interface /// @dev Interface identification is specified in ERC-165. This function uses less than 30,000 gas. /// @param interfaceId The interface identifier, as specified in ERC-165 /// @return `true` if the contract implements `interfaceID` and `interfaceID` is not 0xffffffff, `false` otherwise function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { return interfaceId == 0x80ac58cd || // ERC-721 Non-Fungible Token Standard interfaceId == 0x5b5e139f || // ERC-721 Non-Fungible Token Standard - metadata extension interfaceId == 0x2a55205a || // ERC-2981 NFT Royalty Standard interfaceId == 0x49064906 || // ERC-4906 Metadata Update Extension interfaceId == 0x7f5828d0 || // ERC-173 Contract Ownership Standard interfaceId == 0x01ffc9a7; // ERC-165 Standard Interface Detection } }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "evmVersion": "shanghai", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"address","name":"royaltyReceiver_","type":"address"},{"internalType":"uint256","name":"royaltyPercent","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[],"name":"MathOverflowedMulDiv","type":"error"},{"inputs":[],"name":"OnlyMinter","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","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":false,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","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":[{"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":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"internalType":"uint256","name":"toTokenId","type":"uint256"}],"name":"mintRange","outputs":[],"stateMutability":"nonpayable","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":"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":[],"name":"royaltyDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyFraction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyReceiver","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":"address","name":"_addr","type":"address"}],"name":"setMetadataContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter_","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"royaltyFraction_","type":"uint256"},{"internalType":"uint256","name":"royaltyDenominator_","type":"uint256"}],"name":"setRoyaltyFraction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"royaltyReceiver_","type":"address"}],"name":"setRoyaltyReceiver","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":"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"}]
Contract Creation Code
604060a0815234620004b05762001b65803803806200001e81620004b4565b92833981019060a081830312620004b05780516001600160401b039190828111620004b0578362000051918301620004da565b6020938483015190848211620004b0576200006e918401620004da565b93858301519160608401519460018060a01b0394858716809703620004b05760800151968251828111620003ce575f54906001948583811c93168015620004a5575b87841014620003af578190601f9384811162000452575b508790848311600114620003ee575f92620003e2575b50505f19600383901b1c191690851b175f555b8151928311620003ce578354918483811c93168015620003c3575b86841014620003af5782828594116200035a575b5085918311600114620002f6575f92620002ea575b50505f19600383901b1c191690821b1790555b3315620002d35760068054336001600160a01b03198083168217909355885192959091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36064600a55821562000293575083156200023a5760648511620001e0575060805260075416176007556009555161161a90816200054b8239608051818181610371015281816106220152610c120152f35b60849086519062461bcd60e51b82526004820152602e60248201527f526f79616c7479206672616374696f6e206d757374206e6f742062652067726560448201526d61746572207468616e203130302560901b6064820152fd5b60849086519062461bcd60e51b82526004820152602d60248201527f526f79616c7479207265636569766572206d757374206e6f742062652074686560448201526c207a65726f206164647265737360981b6064820152fd5b60649162461bcd60e51b82526004820152601b60248201527f4d617820737570706c79206d757374206e6f74206265207a65726f00000000006044820152fd5b8551631e4fbdf760e01b81525f6004820152602490fd5b015190505f8062000134565b90849350601f19831691845f52865f20925f5b888282106200034357505084116200032a575b505050811b01905562000147565b01515f1960f88460031b161c191690555f80806200031c565b838501518655889790950194938401930162000309565b90919250845f52855f208380860160051c820192888710620003a5575b91869588929594930160051c01915b828110620003965750506200011f565b5f815586955087910162000386565b9250819262000377565b634e487b7160e01b5f52602260045260245ffd5b92607f16926200010b565b634e487b7160e01b5f52604160045260245ffd5b015190505f80620000dd565b90879350601f198316915f8052895f20925f5b8b8282106200043b575050841162000422575b505050811b015f55620000f0565b01515f1960f88460031b161c191690555f808062000414565b8385015186558b9790950194938401930162000401565b9091505f8052875f208480850160051c8201928a86106200049b575b918991869594930160051c01915b8281106200048c575050620000c7565b5f81558594508991016200047c565b925081926200046e565b92607f1692620000b0565b5f80fd5b6040519190601f01601f191682016001600160401b03811183821017620003ce57604052565b919080601f84011215620004b05782516001600160401b038111620003ce5760209062000510601f8201601f19168301620004b4565b92818452828287010111620004b0575f5b818110620005365750825f9394955001015290565b85810183015184820184015282016200052156fe6080604090808252600480361015610015575f80fd5b5f3560e01c91826301ffc9a714610f3d5750816306fdde0314610e775781630754617214610e4f578163081812fc14610e17578163095ea7b314610d3c57816318160ddd14610d1e57816323b872dd14610d075781632a55205a14610c6f5781633520982114610c4757816340c10f1914610b8057816342842e0e14610b345781636352211e14610b0557816370a0823114610ab1578163715018a614610a565781638da5cb5b14610a2e5781638dc251e31461098e57816395d89b411461087f5781639fbc871314610857578163a22cb465146107bc578163b88d4fde14610736578163c87b56dd14610649578163e5187f43146105bb578163e7dee99f1461059d578163e985e9c51461054f578163ea8876fa14610327578163ecededad1461024d578163f2fde38b146101c357508063fca3b5aa146101805763fd8d7ed31461015f575f80fd5b3461017c575f36600319011261017c57602090600a549051908152f35b5f80fd5b3461017c57602036600319011261017c57610199611035565b6101a1611511565b600880546001600160a01b0319166001600160a01b0392909216919091179055005b90503461017c57602036600319011261017c576101de611035565b906101e7611511565b6001600160a01b03918216928315610237575050600654826001600160601b0360a01b821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b905f6024925191631e4fbdf760e01b8352820152fd5b823461017c5761025c36611096565b929091610267611511565b83156102d85783831161027e575050600955600a55005b906020608492519162461bcd60e51b8352820152602e60248201527f526f79616c7479206672616374696f6e206d757374206e6f742062652067726560448201526d61746572207468616e203130302560901b6064820152fd5b906020608492519162461bcd60e51b83528201526024808201527f526f79616c74792064656e6f6d696e61746f72206d757374206e6f74206265206044820152637a65726f60e01b6064820152fd5b90503461017c57606036600319011261017c57610342611035565b60085490926044359290916024803592916001600160a01b03163303610540578215610505578285106104aa577f00000000000000000000000000000000000000000000000000000000000000009384861161045c57600b94600b5485880388811161044a5760018101811161044a5760019082010180911161043857116103f6575050505b828111156103d257005b806103e06103f1928661143f565b6103ea8354611297565b8355611297565b6103c8565b606492916020601f92519362461bcd60e51b85528401528201527f4d696e74696e6720776f756c6420657863656564206d617820737570706c79006044820152fd5b83601186634e487b7160e01b5f52525ffd5b84601187634e487b7160e01b5f52525ffd5b608492916020602392519362461bcd60e51b85528401528201527f456e6420746f6b656e2049442065786365656473206d6178696d756d20737570604482015262706c7960e81b6064820152fd5b906030608492602086519362461bcd60e51b85528401528201527f456e64204944206d7573742062652067726561746572207468616e206f72206560448201526f1c5d585b081d1bc81cdd185c9d08125160821b6064820152fd5b906016606492602086519362461bcd60e51b855284015282015275125b9d985b1a59081cdd185c9d081d1bdad95b88125160521b6044820152fd5b508251639cdc2ed560e01b8152fd5b823461017c578060031936011261017c5760209061056b611035565b61057361104b565b9060018060a01b038091165f5260058452825f2091165f52825260ff815f20541690519015158152f35b823461017c575f36600319011261017c576020906009549051908152f35b823461017c57602036600319011261017c577f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c906105f7611035565b6105ff611511565b60018060a01b03166001600160601b0360a01b600c541617600c558051600181527f00000000000000000000000000000000000000000000000000000000000000006020820152a1005b823461017c576020908160031936011261017c57600c54815163c87b56dd60e01b81528435948101949094525f90849060249082906001600160a01b03165afa92831561072c575f936106af575b506106ab9051928284938452830190611010565b0390f35b9092503d805f833e6106c181836110ac565b810190828183031261017c5780519067ffffffffffffffff821161017c57019080601f8301121561017c578151916106f8836110e2565b91610705865193846110ac565b83835284848301011161017c576106ab9261072591858085019101610fef565b9290610697565b50513d5f823e3d90fd5b823461017c57608036600319011261017c57610750611035565b61075861104b565b6064359367ffffffffffffffff851161017c573660238601121561017c5784013561078e610785826110e2565b945194856110ac565b808452366024828701011161017c576020815f9260246107ba98018388013785010152604435916112b9565b005b823461017c578060031936011261017c576107d5611035565b906024359182151580930361017c576001600160a01b03169283156108425750335f526005602052805f20835f52602052805f2060ff1981541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b836024925191630b61174360e31b8352820152fd5b823461017c575f36600319011261017c5760075490516001600160a01b039091168152602090f35b823461017c575f36600319011261017c578051905f90600191600154928360011c9060018516948515610984575b60209586841081146109715783885287949392918790821561094f5750506001146108f4575b50506106ab92916108e59103856110ac565b51928284938452830190611010565b9085925060015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6915f925b82841061093757505050820101816108e56108d3565b8054848a018601528895508794909301928101610921565b60ff19168682015292151560051b850190920192508391506108e590506108d3565b602289634e487b7160e01b5f525260245ffd5b91607f16916108ad565b90503461017c57602036600319011261017c576109a9611035565b6109b1611511565b6001600160a01b03169182156109d557600780546001600160a01b03191684179055005b906020608492519162461bcd60e51b8352820152602d60248201527f526f79616c7479207265636569766572206d757374206e6f742062652074686560448201526c207a65726f206164647265737360981b6064820152fd5b823461017c575f36600319011261017c5760065490516001600160a01b039091168152602090f35b3461017c575f36600319011261017c57610a6e611511565b600680546001600160a01b031981169091555f906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b823461017c57602036600319011261017c576001600160a01b03610ad3611035565b168015610aef57602092505f5260038252805f20549051908152f35b81516322718ad960e21b81525f81850152602490fd5b823461017c57602036600319011261017c57610b2360209235611405565b90516001600160a01b039091168152f35b823461017c57610b4336611061565b91835193602085019085821067ffffffffffffffff831117610b6d576107ba9650525f84526112b9565b604187634e487b7160e01b5f525260245ffd5b90503461017c578160031936011261017c57610b9a611035565b60085460243592906001600160a01b03163303610c395782151580610c0f575b15610bd957610bc9838361143f565b610bd4600b54611297565b600b55005b606490602085519162461bcd60e51b8352820152601060248201526f125b9d985b1a59081d1bdad95b88125160821b6044820152fd5b507f0000000000000000000000000000000000000000000000000000000000000000831115610bba565b8351639cdc2ed560e01b8152fd5b823461017c575f36600319011261017c57600c5490516001600160a01b039091168152602090f35b90503461017c57610c7f36611096565b92905060018060a01b036007541691600954600a5490610ca082828861153d565b958215610cf45709610cca575b50516001600160a01b039190911681526020810191909152604090f35b600184929401809211610ce15750916106ab610cad565b601190634e487b7160e01b5f525260245ffd5b601284634e487b7160e01b5f525260245ffd5b3461017c576107ba610d1836611061565b916110fe565b823461017c575f36600319011261017c57602090600b549051908152f35b823461017c578060031936011261017c57610d55611035565b91602435610d6281611405565b33151580610e04575b80610ddd575b610dc7576001600160a01b039485169482918691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f526020525f20906001600160601b0360a01b8254161790555f80f35b835163a9fbf51f60e01b81523381850152602490fd5b5060018060a01b0381165f526005602052835f20335f5260205260ff845f20541615610d71565b506001600160a01b038116331415610d6b565b823461017c57602036600319011261017c578160209235610e3781611405565b505f52825260018060a01b03815f2054169051908152f35b823461017c575f36600319011261017c5760085490516001600160a01b039091168152602090f35b823461017c575f36600319011261017c578051905f905f549160018360011c9060018516948515610f33575b60209586841081146109715783885287949392918790821561094f575050600114610eda5750506106ab92916108e59103856110ac565b5f80805286935091907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410610f1b57505050820101816108e56108d3565b8054848a018601528895508794909301928101610f05565b91607f1691610ea3565b903461017c57602036600319011261017c57359063ffffffff60e01b821680920361017c576020916380ac58cd60e01b8114908115610fde575b8115610fcd575b8115610fbc575b8115610fab575b8115610f9a575b5015158152f35b6301ffc9a760e01b14905083610f93565b6307f5828d60e41b81149150610f8c565b632483248360e11b81149150610f85565b63152a902d60e11b81149150610f7e565b635b5e139f60e01b81149150610f77565b5f5b8381106110005750505f910152565b8181015183820152602001610ff1565b9060209161102981518092818552858086019101610fef565b601f01601f1916010190565b600435906001600160a01b038216820361017c57565b602435906001600160a01b038216820361017c57565b606090600319011261017c576001600160a01b0390600435828116810361017c5791602435908116810361017c579060443590565b604090600319011261017c576004359060243590565b90601f8019910116810190811067ffffffffffffffff8211176110ce57604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff81116110ce57601f01601f191660200190565b6001600160a01b03918216929091831561127f57815f52602092600284528260409583875f20541695331515806111ea575b50600290876111b9575b825f5260038152885f2060018154019055835f5252865f20816001600160601b0360a01b825416179055857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a416928383036111985750505050565b6064945051926364283d7b60e01b8452600484015260248301526044820152fd5b5f84815260046020526040812080546001600160a01b03191690558881526003825289902080545f1901905561113a565b919250908061123e575b15611202579084915f611130565b86858761121f576024915190637e27328960e01b82526004820152fd5b905163177e802f60e01b81523360048201526024810191909152604490fd5b503386148015611263575b806111f45750845f52600481523384885f205416146111f4565b50855f5260058152865f20335f52815260ff875f205416611249565b604051633250574960e11b81525f6004820152602490fd5b5f1981146112a55760010190565b634e487b7160e01b5f52601160045260245ffd5b91926112c68483856110fe565b813b6112d3575b50505050565b604051630a85bd0160e11b8082523360048301526001600160a01b03948516602483015260448201959095526080606482015260209593909216939190859082908190611324906084830190611010565b03815f885af15f91816113c5575b5061138f575050503d5f14611388573d61134b816110e2565b9061135960405192836110ac565b81523d5f8483013e5b8051928361138357604051633250574960e11b815260048101849052602490fd5b019050fd5b6060611362565b9193506001600160e01b0319909116036113ad57505f8080806112cd565b60249060405190633250574960e11b82526004820152fd5b9091508581813d83116113fe575b6113dd81836110ac565b8101031261017c57516001600160e01b03198116810361017c57905f611332565b503d6113d3565b5f818152600260205260409020546001600160a01b0316908115611427575090565b60249060405190637e27328960e01b82526004820152fd5b6001600160a01b039081169190821561127f57815f52600260205260405f2054169182151592836114de575b815f52600360205260405f2060018154019055825f52600260205260405f20826001600160601b0360a01b8254161790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a46114c657565b6040516339e3563760e11b81525f6004820152602490fd5b5f83815260046020526040902080546001600160a01b0319169055805f52600360205260405f205f19815401905561146b565b6006546001600160a01b0316330361152557565b60405163118cdaa760e01b8152336004820152602490fd5b9091828202915f19848209938380861095039480860395146115c257848311156115b057829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60405163227bc15360e01b8152600490fd5b5050809250156115d0570490565b634e487b7160e01b5f52601260045260245ffdfea2646970667358221220c41bdcf0905e376a2d6514f04680bee97c980a15428684132177d2705cb5e62f64736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000a95000000000000000000000000c5325831462d809fbf532d71029fa3efe35cbcce00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000009616c69676e44524157000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026144000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604090808252600480361015610015575f80fd5b5f3560e01c91826301ffc9a714610f3d5750816306fdde0314610e775781630754617214610e4f578163081812fc14610e17578163095ea7b314610d3c57816318160ddd14610d1e57816323b872dd14610d075781632a55205a14610c6f5781633520982114610c4757816340c10f1914610b8057816342842e0e14610b345781636352211e14610b0557816370a0823114610ab1578163715018a614610a565781638da5cb5b14610a2e5781638dc251e31461098e57816395d89b411461087f5781639fbc871314610857578163a22cb465146107bc578163b88d4fde14610736578163c87b56dd14610649578163e5187f43146105bb578163e7dee99f1461059d578163e985e9c51461054f578163ea8876fa14610327578163ecededad1461024d578163f2fde38b146101c357508063fca3b5aa146101805763fd8d7ed31461015f575f80fd5b3461017c575f36600319011261017c57602090600a549051908152f35b5f80fd5b3461017c57602036600319011261017c57610199611035565b6101a1611511565b600880546001600160a01b0319166001600160a01b0392909216919091179055005b90503461017c57602036600319011261017c576101de611035565b906101e7611511565b6001600160a01b03918216928315610237575050600654826001600160601b0360a01b821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b905f6024925191631e4fbdf760e01b8352820152fd5b823461017c5761025c36611096565b929091610267611511565b83156102d85783831161027e575050600955600a55005b906020608492519162461bcd60e51b8352820152602e60248201527f526f79616c7479206672616374696f6e206d757374206e6f742062652067726560448201526d61746572207468616e203130302560901b6064820152fd5b906020608492519162461bcd60e51b83528201526024808201527f526f79616c74792064656e6f6d696e61746f72206d757374206e6f74206265206044820152637a65726f60e01b6064820152fd5b90503461017c57606036600319011261017c57610342611035565b60085490926044359290916024803592916001600160a01b03163303610540578215610505578285106104aa577f0000000000000000000000000000000000000000000000000000000000000a959384861161045c57600b94600b5485880388811161044a5760018101811161044a5760019082010180911161043857116103f6575050505b828111156103d257005b806103e06103f1928661143f565b6103ea8354611297565b8355611297565b6103c8565b606492916020601f92519362461bcd60e51b85528401528201527f4d696e74696e6720776f756c6420657863656564206d617820737570706c79006044820152fd5b83601186634e487b7160e01b5f52525ffd5b84601187634e487b7160e01b5f52525ffd5b608492916020602392519362461bcd60e51b85528401528201527f456e6420746f6b656e2049442065786365656473206d6178696d756d20737570604482015262706c7960e81b6064820152fd5b906030608492602086519362461bcd60e51b85528401528201527f456e64204944206d7573742062652067726561746572207468616e206f72206560448201526f1c5d585b081d1bc81cdd185c9d08125160821b6064820152fd5b906016606492602086519362461bcd60e51b855284015282015275125b9d985b1a59081cdd185c9d081d1bdad95b88125160521b6044820152fd5b508251639cdc2ed560e01b8152fd5b823461017c578060031936011261017c5760209061056b611035565b61057361104b565b9060018060a01b038091165f5260058452825f2091165f52825260ff815f20541690519015158152f35b823461017c575f36600319011261017c576020906009549051908152f35b823461017c57602036600319011261017c577f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c906105f7611035565b6105ff611511565b60018060a01b03166001600160601b0360a01b600c541617600c558051600181527f0000000000000000000000000000000000000000000000000000000000000a956020820152a1005b823461017c576020908160031936011261017c57600c54815163c87b56dd60e01b81528435948101949094525f90849060249082906001600160a01b03165afa92831561072c575f936106af575b506106ab9051928284938452830190611010565b0390f35b9092503d805f833e6106c181836110ac565b810190828183031261017c5780519067ffffffffffffffff821161017c57019080601f8301121561017c578151916106f8836110e2565b91610705865193846110ac565b83835284848301011161017c576106ab9261072591858085019101610fef565b9290610697565b50513d5f823e3d90fd5b823461017c57608036600319011261017c57610750611035565b61075861104b565b6064359367ffffffffffffffff851161017c573660238601121561017c5784013561078e610785826110e2565b945194856110ac565b808452366024828701011161017c576020815f9260246107ba98018388013785010152604435916112b9565b005b823461017c578060031936011261017c576107d5611035565b906024359182151580930361017c576001600160a01b03169283156108425750335f526005602052805f20835f52602052805f2060ff1981541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b836024925191630b61174360e31b8352820152fd5b823461017c575f36600319011261017c5760075490516001600160a01b039091168152602090f35b823461017c575f36600319011261017c578051905f90600191600154928360011c9060018516948515610984575b60209586841081146109715783885287949392918790821561094f5750506001146108f4575b50506106ab92916108e59103856110ac565b51928284938452830190611010565b9085925060015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6915f925b82841061093757505050820101816108e56108d3565b8054848a018601528895508794909301928101610921565b60ff19168682015292151560051b850190920192508391506108e590506108d3565b602289634e487b7160e01b5f525260245ffd5b91607f16916108ad565b90503461017c57602036600319011261017c576109a9611035565b6109b1611511565b6001600160a01b03169182156109d557600780546001600160a01b03191684179055005b906020608492519162461bcd60e51b8352820152602d60248201527f526f79616c7479207265636569766572206d757374206e6f742062652074686560448201526c207a65726f206164647265737360981b6064820152fd5b823461017c575f36600319011261017c5760065490516001600160a01b039091168152602090f35b3461017c575f36600319011261017c57610a6e611511565b600680546001600160a01b031981169091555f906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b823461017c57602036600319011261017c576001600160a01b03610ad3611035565b168015610aef57602092505f5260038252805f20549051908152f35b81516322718ad960e21b81525f81850152602490fd5b823461017c57602036600319011261017c57610b2360209235611405565b90516001600160a01b039091168152f35b823461017c57610b4336611061565b91835193602085019085821067ffffffffffffffff831117610b6d576107ba9650525f84526112b9565b604187634e487b7160e01b5f525260245ffd5b90503461017c578160031936011261017c57610b9a611035565b60085460243592906001600160a01b03163303610c395782151580610c0f575b15610bd957610bc9838361143f565b610bd4600b54611297565b600b55005b606490602085519162461bcd60e51b8352820152601060248201526f125b9d985b1a59081d1bdad95b88125160821b6044820152fd5b507f0000000000000000000000000000000000000000000000000000000000000a95831115610bba565b8351639cdc2ed560e01b8152fd5b823461017c575f36600319011261017c57600c5490516001600160a01b039091168152602090f35b90503461017c57610c7f36611096565b92905060018060a01b036007541691600954600a5490610ca082828861153d565b958215610cf45709610cca575b50516001600160a01b039190911681526020810191909152604090f35b600184929401809211610ce15750916106ab610cad565b601190634e487b7160e01b5f525260245ffd5b601284634e487b7160e01b5f525260245ffd5b3461017c576107ba610d1836611061565b916110fe565b823461017c575f36600319011261017c57602090600b549051908152f35b823461017c578060031936011261017c57610d55611035565b91602435610d6281611405565b33151580610e04575b80610ddd575b610dc7576001600160a01b039485169482918691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f526020525f20906001600160601b0360a01b8254161790555f80f35b835163a9fbf51f60e01b81523381850152602490fd5b5060018060a01b0381165f526005602052835f20335f5260205260ff845f20541615610d71565b506001600160a01b038116331415610d6b565b823461017c57602036600319011261017c578160209235610e3781611405565b505f52825260018060a01b03815f2054169051908152f35b823461017c575f36600319011261017c5760085490516001600160a01b039091168152602090f35b823461017c575f36600319011261017c578051905f905f549160018360011c9060018516948515610f33575b60209586841081146109715783885287949392918790821561094f575050600114610eda5750506106ab92916108e59103856110ac565b5f80805286935091907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410610f1b57505050820101816108e56108d3565b8054848a018601528895508794909301928101610f05565b91607f1691610ea3565b903461017c57602036600319011261017c57359063ffffffff60e01b821680920361017c576020916380ac58cd60e01b8114908115610fde575b8115610fcd575b8115610fbc575b8115610fab575b8115610f9a575b5015158152f35b6301ffc9a760e01b14905083610f93565b6307f5828d60e41b81149150610f8c565b632483248360e11b81149150610f85565b63152a902d60e11b81149150610f7e565b635b5e139f60e01b81149150610f77565b5f5b8381106110005750505f910152565b8181015183820152602001610ff1565b9060209161102981518092818552858086019101610fef565b601f01601f1916010190565b600435906001600160a01b038216820361017c57565b602435906001600160a01b038216820361017c57565b606090600319011261017c576001600160a01b0390600435828116810361017c5791602435908116810361017c579060443590565b604090600319011261017c576004359060243590565b90601f8019910116810190811067ffffffffffffffff8211176110ce57604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff81116110ce57601f01601f191660200190565b6001600160a01b03918216929091831561127f57815f52602092600284528260409583875f20541695331515806111ea575b50600290876111b9575b825f5260038152885f2060018154019055835f5252865f20816001600160601b0360a01b825416179055857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a416928383036111985750505050565b6064945051926364283d7b60e01b8452600484015260248301526044820152fd5b5f84815260046020526040812080546001600160a01b03191690558881526003825289902080545f1901905561113a565b919250908061123e575b15611202579084915f611130565b86858761121f576024915190637e27328960e01b82526004820152fd5b905163177e802f60e01b81523360048201526024810191909152604490fd5b503386148015611263575b806111f45750845f52600481523384885f205416146111f4565b50855f5260058152865f20335f52815260ff875f205416611249565b604051633250574960e11b81525f6004820152602490fd5b5f1981146112a55760010190565b634e487b7160e01b5f52601160045260245ffd5b91926112c68483856110fe565b813b6112d3575b50505050565b604051630a85bd0160e11b8082523360048301526001600160a01b03948516602483015260448201959095526080606482015260209593909216939190859082908190611324906084830190611010565b03815f885af15f91816113c5575b5061138f575050503d5f14611388573d61134b816110e2565b9061135960405192836110ac565b81523d5f8483013e5b8051928361138357604051633250574960e11b815260048101849052602490fd5b019050fd5b6060611362565b9193506001600160e01b0319909116036113ad57505f8080806112cd565b60249060405190633250574960e11b82526004820152fd5b9091508581813d83116113fe575b6113dd81836110ac565b8101031261017c57516001600160e01b03198116810361017c57905f611332565b503d6113d3565b5f818152600260205260409020546001600160a01b0316908115611427575090565b60249060405190637e27328960e01b82526004820152fd5b6001600160a01b039081169190821561127f57815f52600260205260405f2054169182151592836114de575b815f52600360205260405f2060018154019055825f52600260205260405f20826001600160601b0360a01b8254161790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a46114c657565b6040516339e3563760e11b81525f6004820152602490fd5b5f83815260046020526040902080546001600160a01b0319169055805f52600360205260405f205f19815401905561146b565b6006546001600160a01b0316330361152557565b60405163118cdaa760e01b8152336004820152602490fd5b9091828202915f19848209938380861095039480860395146115c257848311156115b057829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60405163227bc15360e01b8152600490fd5b5050809250156115d0570490565b634e487b7160e01b5f52601260045260245ffdfea2646970667358221220c41bdcf0905e376a2d6514f04680bee97c980a15428684132177d2705cb5e62f64736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000a95000000000000000000000000c5325831462d809fbf532d71029fa3efe35cbcce00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000009616c69676e44524157000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026144000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): alignDRAW
Arg [1] : symbol (string): aD
Arg [2] : maxSupply (uint256): 2709
Arg [3] : royaltyReceiver_ (address): 0xC5325831462D809fbf532D71029FA3EFe35CbcCE
Arg [4] : royaltyPercent (uint256): 5
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000a95
Arg [3] : 000000000000000000000000c5325831462d809fbf532d71029fa3efe35cbcce
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [6] : 616c69676e445241570000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [8] : 6144000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
70517:6074:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;70702:39;70517:6074;;;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;:::i;:::-;57617:62;;:::i;:::-;73740:16;70517:6074;;-1:-1:-1;;;;;;70517:6074:0;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;:::i;:::-;57617:62;;;:::i;:::-;-1:-1:-1;;;;;70517:6074:0;;;;58744:22;;58740:91;;70517:6074;;59121:6;70517:6074;;-1:-1:-1;;;;;70517:6074:0;;;;;59121:6;70517:6074;;59169:40;70517:6074;59169:40;;70517:6074;58740:91;70517:6074;;;;;58789:31;;;;;;;;70517:6074;58789:31;70517:6074;;;;;;;;:::i;:::-;57617:62;;;;;:::i;:::-;74688:24;;70517:6074;;74771:39;;;70517:6074;;-1:-1:-1;;74890:34:0;70517:6074;74934:40;70517:6074;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;70517:6074:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;70517:6074:0;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;:::i;:::-;71859:6;70517:6074;;;;;;;;;;;;;-1:-1:-1;;;;;70517:6074:0;71845:10;:20;71841:45;;72804:15;;70517:6074;;72864:24;;;70517:6074;;72972:10;72959:23;;;;70517:6074;;73040:11;70517:6074;73040:11;70517:6074;;;;;;;;;;;;;;;;;;;;;;;;;;73040:57;70517:6074;;73183:29;;;73214:20;;;;;;;70517:6074;73236:9;73344:7;;73236:9;73344:7;;;:::i;:::-;73366:13;70517:6074;;73366:13;:::i;:::-;70517:6074;;73236:9;:::i;:::-;73183:29;;70517:6074;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;70517:6074:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;70517:6074:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;70517:6074:0;;;;;71841:45;-1:-1:-1;70517:6074:0;;-1:-1:-1;;;71874:12:0;;;70517:6074;;;;;;;;;;;;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;;;;;;42490:18;70517:6074;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;70666:30;70517:6074;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;74017:34;70517:6074;;;:::i;:::-;57617:62;;:::i;:::-;70517:6074;;;;;;-1:-1:-1;;;;;70517:6074:0;;73958:44;70517:6074;;;73958:44;70517:6074;;;74037:1;70517:6074;;74040:10;70517:6074;;;;74017:34;70517:6074;;;;;;;;;;;;;;;;73507:17;70517:6074;;;-1:-1:-1;;;73507:35:0;;70517:6074;;73507:35;;;70517:6074;;;;;;;;;;;;-1:-1:-1;;;;;70517:6074:0;73507:35;;;;;;;70517:6074;73507:35;;;70517:6074;;;;;;;;;;;;;;;:::i;:::-;;;;73507:35;;;;;;70517:6074;73507:35;;;;;;:::i;:::-;;;70517:6074;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;73507:35;;;;;70517:6074;;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;70517:6074:0;;54149:22;;54145:91;;38701:10;;70517:6074;;54245:18;70517:6074;;;;;;;;;;;;;;;;;;;;;;;;;;;;54306:41;70517:6074;38701:10;54306:41;;70517:6074;54145:91;70517:6074;;;;54194:31;;;;;;;;70517:6074;54194:31;70517:6074;;;;;;;-1:-1:-1;;70517:6074:0;;;;70603:30;70517:6074;;;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;;;41048:7;;70517:6074;41048:7;70517:6074;;;41048:7;70517:6074;;41048:7;70517:6074;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;41048:7;70517:6074;;;;;;;;;;;;-1:-1:-1;;;70517:6074:0;;;;;;;;;;;;;;;;;;-1:-1:-1;70517:6074:0;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;;;;;;;;;;;-1:-1:-1;70517:6074:0;;-1:-1:-1;70517:6074:0;;-1:-1:-1;70517:6074:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;:::i;:::-;57617:62;;:::i;:::-;-1:-1:-1;;;;;70517:6074:0;;74286:30;;70517:6074;;74395:34;70517:6074;;-1:-1:-1;;;;;;70517:6074:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;70517:6074:0;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;57827:6;70517:6074;;;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;57617:62;;:::i;:::-;59121:6;70517:6074;;-1:-1:-1;;;;;;70517:6074:0;;;;;;;-1:-1:-1;;;;;70517:6074:0;59169:40;70517:6074;;59169:40;70517:6074;;;;;;;;-1:-1:-1;;70517:6074:0;;;;-1:-1:-1;;;;;70517:6074:0;;:::i;:::-;;40457:19;;40453:87;;70517:6074;;;;;40556:9;70517:6074;;;;;;;;;;;;40453:87;70517:6074;;-1:-1:-1;;;40499:30:0;;70517:6074;40499:30;;;70517:6074;;;40499:30;70517:6074;;;;;;;-1:-1:-1;;70517:6074:0;;;;40725:22;70517:6074;;;40725:22;:::i;:::-;70517:6074;;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;43324:39;70517:6074;;;;;;43324:39;:::i;70517:6074::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;71859:6;70517:6074;;;;;-1:-1:-1;;;;;70517:6074:0;71845:10;:20;71841:45;;72464:11;;;:36;;;70517:6074;;;;72605:7;;;;:::i;:::-;72647:13;;70517:6074;72647:13;:::i;:::-;;70517:6074;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;70517:6074:0;;;;;72464:36;72490:10;;72479:21;;;72464:36;;71841:45;70517:6074;;-1:-1:-1;;;71874:12:0;;;70517:6074;;;;;;;-1:-1:-1;;70517:6074:0;;;;73854:17;70517:6074;;;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;75395:15;70517:6074;;;75554:15;70517:6074;75571:18;70517:6074;19542:25;;;;;;:::i;:::-;19611;;;;;;19577:101;;70517:6074;-1:-1:-1;70517:6074:0;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;;;;;;;;19577:101;75591:18;70517:6074;;;;;;;;;-1:-1:-1;19656:11:0;70517:6074;19577:101;;70517:6074;;;;;;;;;;;;19611:25;70517:6074;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;70808:26;70517:6074;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;53394:22;;;:::i;:::-;38701:10;53544:18;;:35;;;70517:6074;53544:69;;;70517:6074;53540:142;;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;53734:28;70517:6074;;53734:28;70517:6074;;;;;;;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;;;53540:142;70517:6074;;-1:-1:-1;;;53640:27:0;;38701:10;53640:27;;;70517:6074;;;53640:27;53544:69;70517:6074;;;;;;;;;;42490:18;70517:6074;;;;;38701:10;70517:6074;;;;;;;;;;53583:30;53544:69;;:35;-1:-1:-1;;;;;;70517:6074:0;;38701:10;53566:13;;53544:35;;70517:6074;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;;;42034:22;;;:::i;:::-;;70517:6074;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;70639:21;70517:6074;;;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;70517:6074:0;;;;;;;;;-1:-1:-1;;;70517:6074:0;;;;;;;;;;;;;;;;;;-1:-1:-1;70517:6074:0;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;;;;;;;;;;;;;;;-1:-1:-1;;;76103:25:0;;;:105;;;;70517:6074;76103:206;;;;70517:6074;76103:280;;;;70517:6074;76103:359;;;;70517:6074;76103:439;;;;70517:6074;;;;;;;76103:439;-1:-1:-1;;;76517:25:0;;-1:-1:-1;76103:439:0;;;:359;-1:-1:-1;;;76437:25:0;;;-1:-1:-1;76103:359:0;;:280;-1:-1:-1;;;76358:25:0;;;-1:-1:-1;76103:280:0;;:206;-1:-1:-1;;;76284:25:0;;;-1:-1:-1;76103:206:0;;:105;-1:-1:-1;;;76183:25:0;;;-1:-1:-1;76103:105:0;;70517:6074;;;;;;;;-1:-1:-1;;70517:6074:0;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;-1:-1:-1;;70517:6074:0;;;;:::o;:::-;;;;-1:-1:-1;;;;;70517:6074:0;;;;;;:::o;:::-;;;;-1:-1:-1;;;;;70517:6074:0;;;;;;:::o;:::-;;;;;;;;;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;70517:6074:0;;;;:::o;42594:578::-;-1:-1:-1;;;;;70517:6074:0;;;;42594:578;;42688:16;;42684:87;;70517:6074;-1:-1:-1;70517:6074:0;;;44250:7;70517:6074;;;;;;;-1:-1:-1;70517:6074:0;;;38701:10;;47486:18;;47482:86;;;42594:578;47612:18;44250:7;47612:18;;47608:256;;42594:578;70517:6074;-1:-1:-1;70517:6074:0;47938:9;70517:6074;;;-1:-1:-1;70517:6074:0;47878:16;70517:6074;;;;;;-1:-1:-1;70517:6074:0;;;-1:-1:-1;70517:6074:0;;-1:-1:-1;;;;;70517:6074:0;;;;;;;;48028:27;;-1:-1:-1;48028:27:0;;70517:6074;43061:21;;;;43057:109;;42594:578;;;;:::o;43057:109::-;70517:6074;;;;43105:50;;;;;;;;;70517:6074;;;;;;;;;43105:50;47608:256;70517:6074;;;;53797:15;70517:6074;;;;;;;-1:-1:-1;;;;;;70517:6074:0;;;;;;47819:9;70517:6074;;;;;;;-1:-1:-1;;70517:6074:0;;;47608:256;;47482:86;44965:127;;-1:-1:-1;44965:127:0;;;;47482:86;45644:39;45640:255;;47482:86;;;;;;45640:255;45703:19;;;70517:6074;;;;;45749:31;;;;;;;;;70517:6074;45749:31;45699:186;70517:6074;;-1:-1:-1;;;45826:44:0;;38701:10;45826:44;;;70517:6074;;;;;;;;;;45826:44;44965:127;38701:10;;45003:16;;:52;;;;44965:127;45003:88;44965:127;45003:88;70517:6074;;-1:-1:-1;70517:6074:0;44485:15;70517:6074;;38701:10;70517:6074;;-1:-1:-1;70517:6074:0;;;45059:32;44965:127;;45003:52;70517:6074;;-1:-1:-1;70517:6074:0;42490:18;70517:6074;;;-1:-1:-1;70517:6074:0;38701:10;-1:-1:-1;70517:6074:0;;;;;-1:-1:-1;70517:6074:0;;;45003:52;;42684:87;70517:6074;;-1:-1:-1;;;42727:33:0;;42702:1;42727:33;;;70517:6074;;;42727:33;70517:6074;-1:-1:-1;;70517:6074:0;;;;;;;:::o;:::-;;;;;;;;;;;;43436:208;;;43572:7;;;;;:::i;:::-;55485:14;;55481:664;;43436:208;;;;;:::o;55481:664::-;70517:6074;;-1:-1:-1;;;55523:71:0;;;38701:10;55523:71;;;70517:6074;-1:-1:-1;;;;;70517:6074:0;;;;;;;;;;;;;;;;;;;55523:71;;70517:6074;;;;;;;55523:71;;70517:6074;;;;;;;;;;;:::i;:::-;55523:71;;55502:1;55523:71;;;55502:1;;55523:71;;;55481:664;-1:-1:-1;55519:616:0;;55782:353;;;70517:6074;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;55502:1;70517:6074;;;;;;;;55832:18;;;70517:6074;;-1:-1:-1;;;55881:25:0;;55523:71;55881:25;;70517:6074;;;;;55881:25;55828:293;56008:95;;-1:-1:-1;56008:95:0;70517:6074;;;;55519:616;70517:6074;;-1:-1:-1;;;;;;;70517:6074:0;;;55641:51;55637:130;;55519:616;55481:664;;;;;;55637:130;70517:6074;;;;42727:33;;;;55723:25;;55523:71;55723:25;;70517:6074;55723:25;55523:71;;;;;;;;;;;;;;;;;:::i;:::-;;;70517:6074;;;;;-1:-1:-1;;;;;;70517:6074:0;;;;;;55523:71;;;;;;;;;54589:241;-1:-1:-1;70517:6074:0;;;44250:7;70517:6074;;;;;;-1:-1:-1;;;;;70517:6074:0;;54718:19;;54714:88;;54811:12;54589:241;:::o;54714:88::-;70517:6074;;;;45749:31;;;;54760;;;;;70517:6074;54760:31;48406:327;-1:-1:-1;;;;;70517:6074:0;;;;48406:327;48473:16;;48469:87;;70517:6074;-1:-1:-1;70517:6074:0;44250:7;70517:6074;;;-1:-1:-1;70517:6074:0;;;47612:18;;;;47608:256;;;;48406:327;70517:6074;-1:-1:-1;70517:6074:0;47938:9;70517:6074;;;-1:-1:-1;70517:6074:0;47878:16;70517:6074;;;;;;-1:-1:-1;70517:6074:0;44250:7;70517:6074;;;-1:-1:-1;70517:6074:0;;-1:-1:-1;;;;;70517:6074:0;;;;;;;;48028:27;-1:-1:-1;48028:27:0;;48631:96;;48406:327::o;48631:96::-;70517:6074;;-1:-1:-1;;;48685:31:0;;-1:-1:-1;48685:31:0;;;70517:6074;;;48685:31;47608:256;70517:6074;;;;53797:15;70517:6074;;;;;;;-1:-1:-1;;;;;;70517:6074:0;;;;-1:-1:-1;70517:6074:0;47819:9;70517:6074;;;-1:-1:-1;70517:6074:0;;;;;;;;47608:256;;57913:162;57827:6;70517:6074;-1:-1:-1;;;;;70517:6074:0;38701:10;57972:23;57968:101;;57913:162::o;57968:101::-;70517:6074;;-1:-1:-1;;;58018:40:0;;38701:10;58018:40;;;70517:6074;;;58018:40;15157:4116;;;70517:6074;;;;-1:-1:-1;;15157:4116:0;;15737:131;;;;;;;;;;;;15949:10;;15945:368;;16419:20;;;;16415:88;;16789:300;;;70517:6074;-1:-1:-1;70517:6074:0;17308:31;;17353:371;;;18167:1;70517:6074;;18148:1;70517:6074;18147:21;70517:6074;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17353:371;;;;-1:-1:-1;17353:371:0;;;16789:300;;;;;;70517:6074;16789:300;;17353:371;17790:21;70517:6074;15157:4116;:::o;16415:88::-;70517:6074;;-1:-1:-1;;;16466:22:0;;;;;15945:368;70517:6074;;;;;;;;;16272:26;:::o;70517:6074::-;;;;-1:-1:-1;70517:6074:0;;;;;-1:-1:-1;70517:6074:0
Swarm Source
ipfs://c41bdcf0905e376a2d6514f04680bee97c980a15428684132177d2705cb5e62f
Loading...
Loading
Loading...
Loading
[ 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.