Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
20335867 | 211 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
OnchainMetadataUtils
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/Base64.sol'; import '../interfaces/IScriptyBuilder.sol'; library OnchainMetadataUtils { // commonly used eth fs assets string public constant POB_STUDIO_SIGNATURE = 'POB_signature_white-min.png'; string public constant PREVIEW_SERVICE_URL = 'https://nft-preview.pob.studio/api?'; bytes public constant URL_SAFE_SCRIPT_TAG = '%253Cscript%253E'; // <script> bytes public constant URL_SAFE_SCRIPT_END_TAG = '%253C%252Fscript%253E'; // </script> uint public constant URL_SAFE_BUFFER_SIZE = 96; uint public constant URL_SAFE_INLINE_SCRIPT_WRAP_BUFFER_SIZE = 16 + 21; uint public constant URL_SAFE_BASE64_SCRIPT_WRAP_BUFFER_SIZE = 73 + 31; uint public constant URL_SAFE_POB_SIGNATURE_BUFFER_SIZE = 5436; function toHexString( bytes memory buffer ) public pure returns (string memory) { // Fixed buffer size for hexadecimal convertion bytes memory converted = new bytes(buffer.length * 2); bytes memory _base = '0123456789abcdef'; for (uint256 i = 0; i < buffer.length; i++) { converted[i * 2] = _base[uint8(buffer[i]) / _base.length]; converted[i * 2 + 1] = _base[uint8(buffer[i]) % _base.length]; } return string(abi.encodePacked('0x', converted)); } function getPreviewImageUrl( address component, uint chainId, bytes memory props, uint width, uint height ) public view returns (string memory url) { return string( abi.encodePacked( PREVIEW_SERVICE_URL, 'component=', Strings.toHexString(component), '&chainId=', Strings.toString(chainId), '&props=', toHexString(props), '&width=', Strings.toString(width), '&height=', Strings.toString(height), '&blockNumber=', Strings.toString(block.number) ) ); } function getPobStudioSignatureRequest( address ethfsStorage ) public pure returns (WrappedScriptRequest memory request) { request.name = POB_STUDIO_SIGNATURE; request.contractAddress = ethfsStorage; request .wrapPrefix = '%253Cscript%253Evar%2520signature%253D%2522data%253Aimage%252Fpng%253Bbase64%252C'; request.wrapSuffix = '%2522%253B%253C%252Fscript%253E'; request.wrapType = 4; } function sizeForBase64Encoding(uint256 value) public pure returns (uint256) { unchecked { return 4 * ((value + 2) / 3); } } enum NftAttributeDisplayType { NONE, NUMBER, BOOST_NUMBER, DATE, BOOST_PERCENTAGE } struct NftAttribute { NftAttributeDisplayType displayType; bytes traitType; bytes value; bool isValueStringWrapped; } function getUrlSafeNftAttributes( NftAttribute[] memory attributes ) public pure returns (bytes memory encodedAttributes) { for (uint i = 0; i < attributes.length; ++i) { NftAttribute memory attr = attributes[i]; bytes memory prefix = '%7B%22trait_type%22%3A%22'; if (attr.displayType == NftAttributeDisplayType.NUMBER) { prefix = '%7B%22display_type%22%3A%20%22number%22%2C%22trait_type%22%3A%22'; } else if (attr.displayType == NftAttributeDisplayType.BOOST_NUMBER) { prefix = '%7B%22display_type%22%3A%20%22boost_number%22%2C%22trait_type%22%3A%22'; } else if (attr.displayType == NftAttributeDisplayType.DATE) { prefix = '%7B%22display_type%22%3A%20%22date%22%2C%22trait_type%22%3A%22'; } else if (attr.displayType == NftAttributeDisplayType.BOOST_PERCENTAGE) { prefix = '%7B%22display_type%22%3A%20%22boost_percentage%22%2C%22trait_type%22%3A%22'; } encodedAttributes = abi.encodePacked( encodedAttributes, prefix, attr.traitType, '%22%2C%22value%22%3A', attr.isValueStringWrapped ? '%22' : '', attr.value, attr.isValueStringWrapped ? '%22' : '', '%7D', i != attributes.length - 1 ? '%2C' : '' ); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.2) (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, 0x20) let dataPtr := data let endPtr := add(data, mload(data)) // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and // set it to zero to make sure no dirty bytes are read in that section. let afterPtr := add(endPtr, 0x20) let afterCache := mload(afterPtr) mstore(afterPtr, 0x00) // Run over the input, 3 bytes at a time for { } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 byte (24 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F to bitmask the least significant 6 bits. // Use this as an index into the lookup table, mload an entire word // so the desired character is in the least significant byte, and // mstore8 this least significant byte into the result and continue. 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 } // Reset the value that was cached mstore(afterPtr, afterCache) // 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; } }
// SPDX-License-Identifier: MIT // 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; } }
// SPDX-License-Identifier: MIT // 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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @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)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /////////////////////////////////////////////////////////// // ░██████╗░█████╗░██████╗░██╗██████╗░████████╗██╗░░░██╗ // // ██╔════╝██╔══██╗██╔══██╗██║██╔══██╗╚══██╔══╝╚██╗░██╔╝ // // ╚█████╗░██║░░╚═╝██████╔╝██║██████╔╝░░░██║░░░░╚████╔╝░ // // ░╚═══██╗██║░░██╗██╔══██╗██║██╔═══╝░░░░██║░░░░░╚██╔╝░░ // // ██████╔╝╚█████╔╝██║░░██║██║██║░░░░░░░░██║░░░░░░██║░░░ // // ╚═════╝░░╚════╝░╚═╝░░╚═╝╚═╝╚═╝░░░░░░░░╚═╝░░░░░░╚═╝░░░ // /////////////////////////////////////////////////////////// // ============================================================= // STRUCTS // ============================================================= struct WrappedScriptRequest { string name; address contractAddress; bytes contractData; uint8 wrapType; bytes wrapPrefix; bytes wrapSuffix; bytes scriptContent; } struct InlineScriptRequest { string name; address contractAddress; bytes contractData; bytes scriptContent; } interface IScriptyBuilder { // ============================================================= // ERRORS // ============================================================= /** * @notice Error for, Invalid length of requests */ error InvalidRequestsLength(); // ============================================================= // RAW HTML GETTERS // ============================================================= /** * @notice Get requested scripts housed in <body> with custom wrappers * @dev Your requested scripts are returned in the following format: * <html> * <head></head> * <body style='margin:0;'> * [wrapPrefix[0]]{request[0]}[wrapSuffix[0]] * [wrapPrefix[1]]{request[1]}[wrapSuffix[1]] * ... * [wrapPrefix[n]]{request[n]}[wrapSuffix[n]] * </body> * </html> * @param requests - Array of WrappedScriptRequests * @param bufferSize - Total buffer size of all requested scripts * @return Full html wrapped scripts */ function getHTMLWrapped( WrappedScriptRequest[] calldata requests, uint256 bufferSize ) external view returns (bytes memory); /** * @notice Get requested scripts housed in URL Safe wrappers * @dev Any wrapper type 0 scripts are converted to base64 and wrapped * with <script src="data:text/javascript;base64,[SCRIPT]"></script> * * [WARNING]: Large non-base64 libraries that need base64 encoding * carry a high risk of causing a gas out. Highly advised to use * base64 encoded scripts where possible * * Your requested scripts are returned in the following format: * <html> * <head></head> * <body style='margin:0;'> * [wrapPrefix[0]]{request[0]}[wrapSuffix[0]] * [wrapPrefix[1]]{request[1]}[wrapSuffix[1]] * ... * [wrapPrefix[n]]{request[n]}[wrapSuffix[n]] * </body> * </html> * @param requests - Array of WrappedScriptRequests * @param bufferSize - Total buffer size of all requested scripts * @return Full URL Safe wrapped scripts */ function getHTMLWrappedURLSafe( WrappedScriptRequest[] calldata requests, uint256 bufferSize ) external view returns (bytes memory); /** * @notice Get requested scripts housed in <body> all wrapped in <script></script> * @dev Your requested scripts are returned in the following format: * <html> * <head></head> * <body style='margin:0;'> * <script> * {request[0]} * {request[1]} * ... * {request[n]} * </script> * </body> * </html> * @param requests - Array of InlineScriptRequest * @param bufferSize - Total buffer size of all requested scripts * @return Full html wrapped scripts */ function getHTMLInline( InlineScriptRequest[] calldata requests, uint256 bufferSize ) external view returns (bytes memory); // ============================================================= // ENCODED HTML GETTERS // ============================================================= /** * @notice Get {getHTMLWrapped} and base64 encode it * @param requests - Array of WrappedScriptRequests * @param bufferSize - Total buffer size of all requested scripts * @return Full html wrapped scripts, base64 encoded */ function getEncodedHTMLWrapped( WrappedScriptRequest[] calldata requests, uint256 bufferSize ) external view returns (bytes memory); /** * @notice Get {getHTMLInline} and base64 encode it * @param requests - Array of InlineScriptRequests * @param bufferSize - Total buffer size of all requested scripts * @return Full html wrapped scripts, base64 encoded */ function getEncodedHTMLInline( InlineScriptRequest[] calldata requests, uint256 bufferSize ) external view returns (bytes memory); // ============================================================= // STRING UTILITIES // ============================================================= /** * @notice Convert {getHTMLWrapped} output to a string * @param requests - Array of WrappedScriptRequests * @param bufferSize - Total buffer size of all requested scripts * @return {getHTMLWrapped} as a string */ function getHTMLWrappedString( WrappedScriptRequest[] calldata requests, uint256 bufferSize ) external view returns (string memory); /** * @notice Convert {getHTMLInline} output to a string * @param requests - Array of InlineScriptRequests * @param bufferSize - Total buffer size of all requested scripts * @return {getHTMLInline} as a string */ function getHTMLInlineString( InlineScriptRequest[] calldata requests, uint256 bufferSize ) external view returns (string memory); /** * @notice Convert {getEncodedHTMLWrapped} output to a string * @param requests - Array of WrappedScriptRequests * @param bufferSize - Total buffer size of all requested scripts * before encoding. * @return {getEncodedHTMLWrapped} as a string */ function getEncodedHTMLWrappedString( WrappedScriptRequest[] calldata requests, uint256 bufferSize ) external view returns (string memory); /** * @notice Convert {getEncodedHTMLInline} output to a string * @param requests - Array of InlineScriptRequests * @param bufferSize - Total buffer size of all requested scripts * before encoding. * @return {getEncodedHTMLInline} as a string */ function getEncodedHTMLInlineString( InlineScriptRequest[] calldata requests, uint256 bufferSize ) external view returns (string memory); // ============================================================= // OFF-CHAIN UTILITIES // ============================================================= /** * @notice Get the buffer size of a single inline requested code * @param request - InlineScriptRequest data for code * @return Buffer size as an unit256 */ function getInlineScriptSize( InlineScriptRequest memory request ) external view returns (uint256); /** * @notice Get the buffer size of a single wrapped requested code * @param request - WrappedScriptRequest data for code * @return Buffer size as an unit256 */ function getWrappedScriptSize( WrappedScriptRequest memory request ) external view returns (uint256); /** * @notice Get the buffer size of a single wrapped requested code * @dev If the script is of wrapper type 0, we get buffer size for * base64 encoded version. * @param request - WrappedScriptRequest data for code * @return Buffer size as an unit256 */ function getURLSafeWrappedScriptSize( WrappedScriptRequest memory request ) external view returns (uint256); /** * @notice Get the buffer size of an array of html wrapped inline scripts * @param requests - InlineScriptRequests data for code * @return Buffer size as an unit256 */ function getBufferSizeForHTMLInline( InlineScriptRequest[] calldata requests ) external view returns (uint256); /** * @notice Get the buffer size of an array of html wrapped, wrapped scripts * @param requests - WrappedScriptRequests data for code * @return Buffer size as an unit256 */ function getBufferSizeForHTMLWrapped( WrappedScriptRequest[] calldata requests ) external view returns (uint256); /** * @notice Get the buffer size of an array of URL safe html wrapped scripts * @param requests - WrappedScriptRequests data for code * @return Buffer size as an unit256 */ function getBufferSizeForURLSafeHTMLWrapped( WrappedScriptRequest[] calldata requests ) external view returns (uint256); /** * @notice Get the buffer size for encoded HTML inline scripts * @param requests - InlineScriptRequests data for code * @return Buffer size as an unit256 */ function getBufferSizeForEncodedHTMLInline( InlineScriptRequest[] calldata requests ) external view returns (uint256); /** * @notice Get the buffer size for encoded HTML inline scripts * @param requests - InlineScriptRequests data for code * @return Buffer size as an unit256 */ function getBufferSizeForEncodedHTMLWrapped( WrappedScriptRequest[] calldata requests ) external view returns (uint256); }
{ "evmVersion": "paris", "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"StringsInsufficientHexLength","type":"error"},{"inputs":[],"name":"POB_STUDIO_SIGNATURE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PREVIEW_SERVICE_URL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URL_SAFE_BASE64_SCRIPT_WRAP_BUFFER_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URL_SAFE_BUFFER_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URL_SAFE_INLINE_SCRIPT_WRAP_BUFFER_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URL_SAFE_POB_SIGNATURE_BUFFER_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URL_SAFE_SCRIPT_END_TAG","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URL_SAFE_SCRIPT_TAG","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ethfsStorage","type":"address"}],"name":"getPobStudioSignatureRequest","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"bytes","name":"contractData","type":"bytes"},{"internalType":"uint8","name":"wrapType","type":"uint8"},{"internalType":"bytes","name":"wrapPrefix","type":"bytes"},{"internalType":"bytes","name":"wrapSuffix","type":"bytes"},{"internalType":"bytes","name":"scriptContent","type":"bytes"}],"internalType":"struct WrappedScriptRequest","name":"request","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"component","type":"address"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bytes","name":"props","type":"bytes"},{"internalType":"uint256","name":"width","type":"uint256"},{"internalType":"uint256","name":"height","type":"uint256"}],"name":"getPreviewImageUrl","outputs":[{"internalType":"string","name":"url","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"enum OnchainMetadataUtils.NftAttributeDisplayType","name":"displayType","type":"OnchainMetadataUtils.NftAttributeDisplayType"},{"internalType":"bytes","name":"traitType","type":"bytes"},{"internalType":"bytes","name":"value","type":"bytes"},{"internalType":"bool","name":"isValueStringWrapped","type":"bool"}],"internalType":"struct OnchainMetadataUtils.NftAttribute[]","name":"attributes","type":"tuple[]"}],"name":"getUrlSafeNftAttributes","outputs":[{"internalType":"bytes","name":"encodedAttributes","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"sizeForBase64Encoding","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"buffer","type":"bytes"}],"name":"toHexString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
612015610053600b82828239805160001a607314610046577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100d95760003560e01c80634cf24d9c11610096578063b3ea54b911610070578063b3ea54b914610234578063c7a20c9914610252578063c937279314610270578063e46a1151146102a0576100d9565b80634cf24d9c146101b657806363e39c7f146101e657806372617f8a14610204576100d9565b8063157299e0146100de5780631d93fbc71461010e57806325c89df81461013e5780632d01993c1461015c5780632f1d54ca1461017a5780633e43f00814610198575b600080fd5b6100f860048036038101906100f39190611292565b6102be565b604051610105919061135a565b60405180910390f35b61012860048036038101906101239190611410565b6105b9565b60405161013591906114fc565b60405180910390f35b61014661063a565b604051610153919061152d565b60405180910390f35b61016461063f565b604051610171919061135a565b60405180910390f35b610182610678565b60405161018f91906114fc565b60405180910390f35b6101a06106b1565b6040516101ad919061135a565b60405180910390f35b6101d060048036038101906101cb9190611548565b6106ea565b6040516101dd91906116ec565b60405180910390f35b6101ee6107df565b6040516101fb919061152d565b60405180910390f35b61021e6004803603810190610219919061170e565b6107e4565b60405161022b919061152d565b60405180910390f35b61023c610805565b60405161024991906114fc565b60405180910390f35b61025a610821565b604051610267919061152d565b60405180910390f35b61028a6004803603810190610285919061173b565b610827565b60405161029791906114fc565b60405180910390f35b6102a8610a4c565b6040516102b5919061152d565b60405180910390f35b606060005b82518110156105b35760008382815181106102e1576102e0611784565b5b6020026020010151905060006040518060400160405280601981526020017f25374225323274726169745f7479706525323225334125323200000000000000815250905060016004811115610339576103386117b3565b5b826000015160048111156103505761034f6117b3565b5b0361037557604051806060016040528060408152602001611fa0604091399050610463565b60026004811115610389576103886117b3565b5b826000015160048111156103a05761039f6117b3565b5b036103c557604051806080016040528060468152602001611e81604691399050610462565b600360048111156103d9576103d86117b3565b5b826000015160048111156103f0576103ef6117b3565b5b03610415576040518060600160405280603e8152602001611f62603e91399050610461565b600480811115610428576104276117b3565b5b8260000151600481111561043f5761043e6117b3565b5b03610460576040518060800160405280604a8152602001611ec7604a913990505b5b5b5b83818360200151846060015161048857604051806020016040528060008152506104bf565b6040518060400160405280600381526020017f25323200000000000000000000000000000000000000000000000000000000008152505b856040015186606001516104e25760405180602001604052806000815250610519565b6040518060400160405280600381526020017f25323200000000000000000000000000000000000000000000000000000000008152505b60018b516105279190611811565b89036105425760405180602001604052806000815250610579565b6040518060400160405280600381526020017f25324300000000000000000000000000000000000000000000000000000000008152505b60405160200161058f9796959493929190611955565b60405160208183030381529060405293505050806105ac906119d0565b90506102c3565b50919050565b6060604051806060016040528060238152602001611e5e602391396105dd87610a51565b6105e687610a7e565b6105ef87610827565b6105f887610a7e565b61060187610a7e565b61060a43610a7e565b6040516020016106209796959493929190611be0565b604051602081830303815290604052905095945050505050565b606881565b6040518060400160405280601081526020017f253235334373637269707425323533450000000000000000000000000000000081525081565b6040518060400160405280601b81526020017f504f425f7369676e61747572655f77686974652d6d696e2e706e67000000000081525081565b6040518060400160405280601581526020017f253235334325323532467363726970742532353345000000000000000000000081525081565b6106f2610ee5565b6040518060400160405280601b81526020017f504f425f7369676e61747572655f77686974652d6d696e2e706e670000000000815250816000018190525081816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050604051806080016040528060518152602001611f116051913981608001819052506040518060400160405280601f81526020017f25323532322532353342253235334325323532467363726970742532353345008152508160a001819052506004816060019060ff16908160ff1681525050919050565b602581565b6000600360028301816107fa576107f9611c87565b5b046004029050919050565b604051806060016040528060238152602001611e5e6023913981565b61153c81565b60606000600283516108399190611cb6565b67ffffffffffffffff81111561085257610851610f65565b5b6040519080825280601f01601f1916602001820160405280156108845781602001600182028036833780820191505090505b50905060006040518060400160405280601081526020017f3031323334353637383961626364656600000000000000000000000000000000815250905060005b8451811015610a22578182518683815181106108e3576108e2611784565b5b602001015160f81c60f81b60f81c60ff166108fe9190611cf8565b8151811061090f5761090e611784565b5b602001015160f81c60f81b836002836109289190611cb6565b8151811061093957610938611784565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535081825186838151811061097e5761097d611784565b5b602001015160f81c60f81b60f81c60ff166109999190611d29565b815181106109aa576109a9611784565b5b602001015160f81c60f81b8360016002846109c59190611cb6565b6109cf9190611d5a565b815181106109e0576109df611784565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610a1a906119d0565b9150506108c4565b5081604051602001610a349190611dda565b60405160208183030381529060405292505050919050565b606081565b6060610a778273ffffffffffffffffffffffffffffffffffffffff16601460ff16610b4c565b9050919050565b606060006001610a8d84610d92565b01905060008167ffffffffffffffff811115610aac57610aab610f65565b5b6040519080825280601f01601f191660200182016040528015610ade5781602001600182028036833780820191505090505b509050600082602001820190505b600115610b41578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610b3557610b34611c87565b5b04945060008503610aec575b819350505050919050565b6060600083905060006002846002610b649190611cb6565b610b6e9190611d5a565b67ffffffffffffffff811115610b8757610b86610f65565b5b6040519080825280601f01601f191660200182016040528015610bb95781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610bf157610bf0611784565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610c5557610c54611784565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001856002610c959190611cb6565b610c9f9190611d5a565b90505b6001811115610d3f577f3031323334353637383961626364656600000000000000000000000000000000600f841660108110610ce157610ce0611784565b5b1a60f81b828281518110610cf857610cf7611784565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600483901c925080610d3890611dfc565b9050610ca2565b5060008214610d875784846040517fe22e27eb000000000000000000000000000000000000000000000000000000008152600401610d7e929190611e34565b60405180910390fd5b809250505092915050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610df0577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381610de657610de5611c87565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610e2d576d04ee2d6d415b85acef81000000008381610e2357610e22611c87565b5b0492506020810190505b662386f26fc100008310610e5c57662386f26fc100008381610e5257610e51611c87565b5b0492506010810190505b6305f5e1008310610e85576305f5e1008381610e7b57610e7a611c87565b5b0492506008810190505b6127108310610eaa576127108381610ea057610e9f611c87565b5b0492506004810190505b60648310610ecd5760648381610ec357610ec2611c87565b5b0492506002810190505b600a8310610edc576001810190505b80915050919050565b6040518060e0016040528060608152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001600060ff1681526020016060815260200160608152602001606081525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f9d82610f54565b810181811067ffffffffffffffff82111715610fbc57610fbb610f65565b5b80604052505050565b6000610fcf610f3b565b9050610fdb8282610f94565b919050565b600067ffffffffffffffff821115610ffb57610ffa610f65565b5b602082029050602081019050919050565b600080fd5b600080fd5b600080fd5b6005811061102857600080fd5b50565b60008135905061103a8161101b565b92915050565b600080fd5b600067ffffffffffffffff8211156110605761105f610f65565b5b61106982610f54565b9050602081019050919050565b82818337600083830152505050565b600061109861109384611045565b610fc5565b9050828152602081018484840111156110b4576110b3611040565b5b6110bf848285611076565b509392505050565b600082601f8301126110dc576110db610f4f565b5b81356110ec848260208601611085565b91505092915050565b60008115159050919050565b61110a816110f5565b811461111557600080fd5b50565b60008135905061112781611101565b92915050565b60006080828403121561114357611142611011565b5b61114d6080610fc5565b9050600061115d8482850161102b565b600083015250602082013567ffffffffffffffff81111561118157611180611016565b5b61118d848285016110c7565b602083015250604082013567ffffffffffffffff8111156111b1576111b0611016565b5b6111bd848285016110c7565b60408301525060606111d184828501611118565b60608301525092915050565b60006111f06111eb84610fe0565b610fc5565b905080838252602082019050602084028301858111156112135761121261100c565b5b835b8181101561125a57803567ffffffffffffffff81111561123857611237610f4f565b5b808601611245898261112d565b85526020850194505050602081019050611215565b5050509392505050565b600082601f83011261127957611278610f4f565b5b81356112898482602086016111dd565b91505092915050565b6000602082840312156112a8576112a7610f45565b5b600082013567ffffffffffffffff8111156112c6576112c5610f4a565b5b6112d284828501611264565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156113155780820151818401526020810190506112fa565b60008484015250505050565b600061132c826112db565b61133681856112e6565b93506113468185602086016112f7565b61134f81610f54565b840191505092915050565b600060208201905081810360008301526113748184611321565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006113a78261137c565b9050919050565b6113b78161139c565b81146113c257600080fd5b50565b6000813590506113d4816113ae565b92915050565b6000819050919050565b6113ed816113da565b81146113f857600080fd5b50565b60008135905061140a816113e4565b92915050565b600080600080600060a0868803121561142c5761142b610f45565b5b600061143a888289016113c5565b955050602061144b888289016113fb565b945050604086013567ffffffffffffffff81111561146c5761146b610f4a565b5b611478888289016110c7565b9350506060611489888289016113fb565b925050608061149a888289016113fb565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60006114ce826114a7565b6114d881856114b2565b93506114e88185602086016112f7565b6114f181610f54565b840191505092915050565b6000602082019050818103600083015261151681846114c3565b905092915050565b611527816113da565b82525050565b6000602082019050611542600083018461151e565b92915050565b60006020828403121561155e5761155d610f45565b5b600061156c848285016113c5565b91505092915050565b600082825260208201905092915050565b6000611591826114a7565b61159b8185611575565b93506115ab8185602086016112f7565b6115b481610f54565b840191505092915050565b6115c88161139c565b82525050565b600082825260208201905092915050565b60006115ea826112db565b6115f481856115ce565b93506116048185602086016112f7565b61160d81610f54565b840191505092915050565b600060ff82169050919050565b61162e81611618565b82525050565b600060e08301600083015184820360008601526116518282611586565b915050602083015161166660208601826115bf565b506040830151848203604086015261167e82826115df565b91505060608301516116936060860182611625565b50608083015184820360808601526116ab82826115df565b91505060a083015184820360a08601526116c582826115df565b91505060c083015184820360c08601526116df82826115df565b9150508091505092915050565b600060208201905081810360008301526117068184611634565b905092915050565b60006020828403121561172457611723610f45565b5b6000611732848285016113fb565b91505092915050565b60006020828403121561175157611750610f45565b5b600082013567ffffffffffffffff81111561176f5761176e610f4a565b5b61177b848285016110c7565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061181c826113da565b9150611827836113da565b925082820390508181111561183f5761183e6117e2565b5b92915050565b600081905092915050565b600061185b826112db565b6118658185611845565b93506118758185602086016112f7565b80840191505092915050565b600081905092915050565b7f25323225324325323276616c7565253232253341000000000000000000000000600082015250565b60006118c2601483611881565b91506118cd8261188c565b601482019050919050565b60006118e3826114a7565b6118ed8185611881565b93506118fd8185602086016112f7565b80840191505092915050565b7f2537440000000000000000000000000000000000000000000000000000000000600082015250565b600061193f600383611881565b915061194a82611909565b600382019050919050565b6000611961828a611850565b915061196d8289611850565b91506119798288611850565b9150611984826118b5565b915061199082876118d8565b915061199c8286611850565b91506119a882856118d8565b91506119b382611932565b91506119bf82846118d8565b915081905098975050505050505050565b60006119db826113da565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611a0d57611a0c6117e2565b5b600182019050919050565b7f636f6d706f6e656e743d00000000000000000000000000000000000000000000600082015250565b6000611a4e600a83611881565b9150611a5982611a18565b600a82019050919050565b7f26636861696e49643d0000000000000000000000000000000000000000000000600082015250565b6000611a9a600983611881565b9150611aa582611a64565b600982019050919050565b7f2670726f70733d00000000000000000000000000000000000000000000000000600082015250565b6000611ae6600783611881565b9150611af182611ab0565b600782019050919050565b7f2677696474683d00000000000000000000000000000000000000000000000000600082015250565b6000611b32600783611881565b9150611b3d82611afc565b600782019050919050565b7f266865696768743d000000000000000000000000000000000000000000000000600082015250565b6000611b7e600883611881565b9150611b8982611b48565b600882019050919050565b7f26626c6f636b4e756d6265723d00000000000000000000000000000000000000600082015250565b6000611bca600d83611881565b9150611bd582611b94565b600d82019050919050565b6000611bec828a6118d8565b9150611bf782611a41565b9150611c0382896118d8565b9150611c0e82611a8d565b9150611c1a82886118d8565b9150611c2582611ad9565b9150611c3182876118d8565b9150611c3c82611b25565b9150611c4882866118d8565b9150611c5382611b71565b9150611c5f82856118d8565b9150611c6a82611bbd565b9150611c7682846118d8565b915081905098975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611cc1826113da565b9150611ccc836113da565b9250828202611cda816113da565b91508282048414831517611cf157611cf06117e2565b5b5092915050565b6000611d03826113da565b9150611d0e836113da565b925082611d1e57611d1d611c87565b5b828204905092915050565b6000611d34826113da565b9150611d3f836113da565b925082611d4f57611d4e611c87565b5b828206905092915050565b6000611d65826113da565b9150611d70836113da565b9250828201905080821115611d8857611d876117e2565b5b92915050565b7f3078000000000000000000000000000000000000000000000000000000000000600082015250565b6000611dc4600283611881565b9150611dcf82611d8e565b600282019050919050565b6000611de582611db7565b9150611df18284611850565b915081905092915050565b6000611e07826113da565b915060008203611e1a57611e196117e2565b5b600182039050919050565b611e2e816113da565b82525050565b6000604082019050611e496000830185611e25565b611e566020830184611e25565b939250505056fe68747470733a2f2f6e66742d707265766965772e706f622e73747564696f2f6170693f253742253232646973706c61795f74797065253232253341253230253232626f6f73745f6e756d62657225323225324325323274726169745f74797065253232253341253232253742253232646973706c61795f74797065253232253341253230253232626f6f73745f70657263656e7461676525323225324325323274726169745f747970652532322533412532322532353343736372697074253235334576617225323532307369676e617475726525323533442532353232646174612532353341696d6167652532353246706e6725323533426261736536342532353243253742253232646973706c61795f747970652532322533412532302532326461746525323225324325323274726169745f74797065253232253341253232253742253232646973706c61795f747970652532322533412532302532326e756d62657225323225324325323274726169745f74797065253232253341253232a2646970667358221220f02cfa47bfd1425b4554038fc5f6dd24fbe9ba913fbb00c1edef6a6fa08795c064736f6c63430008150033
Deployed Bytecode
0x734c6989ae51162449a1abf9c715eecff9e544a20530146080604052600436106100d95760003560e01c80634cf24d9c11610096578063b3ea54b911610070578063b3ea54b914610234578063c7a20c9914610252578063c937279314610270578063e46a1151146102a0576100d9565b80634cf24d9c146101b657806363e39c7f146101e657806372617f8a14610204576100d9565b8063157299e0146100de5780631d93fbc71461010e57806325c89df81461013e5780632d01993c1461015c5780632f1d54ca1461017a5780633e43f00814610198575b600080fd5b6100f860048036038101906100f39190611292565b6102be565b604051610105919061135a565b60405180910390f35b61012860048036038101906101239190611410565b6105b9565b60405161013591906114fc565b60405180910390f35b61014661063a565b604051610153919061152d565b60405180910390f35b61016461063f565b604051610171919061135a565b60405180910390f35b610182610678565b60405161018f91906114fc565b60405180910390f35b6101a06106b1565b6040516101ad919061135a565b60405180910390f35b6101d060048036038101906101cb9190611548565b6106ea565b6040516101dd91906116ec565b60405180910390f35b6101ee6107df565b6040516101fb919061152d565b60405180910390f35b61021e6004803603810190610219919061170e565b6107e4565b60405161022b919061152d565b60405180910390f35b61023c610805565b60405161024991906114fc565b60405180910390f35b61025a610821565b604051610267919061152d565b60405180910390f35b61028a6004803603810190610285919061173b565b610827565b60405161029791906114fc565b60405180910390f35b6102a8610a4c565b6040516102b5919061152d565b60405180910390f35b606060005b82518110156105b35760008382815181106102e1576102e0611784565b5b6020026020010151905060006040518060400160405280601981526020017f25374225323274726169745f7479706525323225334125323200000000000000815250905060016004811115610339576103386117b3565b5b826000015160048111156103505761034f6117b3565b5b0361037557604051806060016040528060408152602001611fa0604091399050610463565b60026004811115610389576103886117b3565b5b826000015160048111156103a05761039f6117b3565b5b036103c557604051806080016040528060468152602001611e81604691399050610462565b600360048111156103d9576103d86117b3565b5b826000015160048111156103f0576103ef6117b3565b5b03610415576040518060600160405280603e8152602001611f62603e91399050610461565b600480811115610428576104276117b3565b5b8260000151600481111561043f5761043e6117b3565b5b03610460576040518060800160405280604a8152602001611ec7604a913990505b5b5b5b83818360200151846060015161048857604051806020016040528060008152506104bf565b6040518060400160405280600381526020017f25323200000000000000000000000000000000000000000000000000000000008152505b856040015186606001516104e25760405180602001604052806000815250610519565b6040518060400160405280600381526020017f25323200000000000000000000000000000000000000000000000000000000008152505b60018b516105279190611811565b89036105425760405180602001604052806000815250610579565b6040518060400160405280600381526020017f25324300000000000000000000000000000000000000000000000000000000008152505b60405160200161058f9796959493929190611955565b60405160208183030381529060405293505050806105ac906119d0565b90506102c3565b50919050565b6060604051806060016040528060238152602001611e5e602391396105dd87610a51565b6105e687610a7e565b6105ef87610827565b6105f887610a7e565b61060187610a7e565b61060a43610a7e565b6040516020016106209796959493929190611be0565b604051602081830303815290604052905095945050505050565b606881565b6040518060400160405280601081526020017f253235334373637269707425323533450000000000000000000000000000000081525081565b6040518060400160405280601b81526020017f504f425f7369676e61747572655f77686974652d6d696e2e706e67000000000081525081565b6040518060400160405280601581526020017f253235334325323532467363726970742532353345000000000000000000000081525081565b6106f2610ee5565b6040518060400160405280601b81526020017f504f425f7369676e61747572655f77686974652d6d696e2e706e670000000000815250816000018190525081816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050604051806080016040528060518152602001611f116051913981608001819052506040518060400160405280601f81526020017f25323532322532353342253235334325323532467363726970742532353345008152508160a001819052506004816060019060ff16908160ff1681525050919050565b602581565b6000600360028301816107fa576107f9611c87565b5b046004029050919050565b604051806060016040528060238152602001611e5e6023913981565b61153c81565b60606000600283516108399190611cb6565b67ffffffffffffffff81111561085257610851610f65565b5b6040519080825280601f01601f1916602001820160405280156108845781602001600182028036833780820191505090505b50905060006040518060400160405280601081526020017f3031323334353637383961626364656600000000000000000000000000000000815250905060005b8451811015610a22578182518683815181106108e3576108e2611784565b5b602001015160f81c60f81b60f81c60ff166108fe9190611cf8565b8151811061090f5761090e611784565b5b602001015160f81c60f81b836002836109289190611cb6565b8151811061093957610938611784565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535081825186838151811061097e5761097d611784565b5b602001015160f81c60f81b60f81c60ff166109999190611d29565b815181106109aa576109a9611784565b5b602001015160f81c60f81b8360016002846109c59190611cb6565b6109cf9190611d5a565b815181106109e0576109df611784565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080610a1a906119d0565b9150506108c4565b5081604051602001610a349190611dda565b60405160208183030381529060405292505050919050565b606081565b6060610a778273ffffffffffffffffffffffffffffffffffffffff16601460ff16610b4c565b9050919050565b606060006001610a8d84610d92565b01905060008167ffffffffffffffff811115610aac57610aab610f65565b5b6040519080825280601f01601f191660200182016040528015610ade5781602001600182028036833780820191505090505b509050600082602001820190505b600115610b41578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610b3557610b34611c87565b5b04945060008503610aec575b819350505050919050565b6060600083905060006002846002610b649190611cb6565b610b6e9190611d5a565b67ffffffffffffffff811115610b8757610b86610f65565b5b6040519080825280601f01601f191660200182016040528015610bb95781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610bf157610bf0611784565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610c5557610c54611784565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001856002610c959190611cb6565b610c9f9190611d5a565b90505b6001811115610d3f577f3031323334353637383961626364656600000000000000000000000000000000600f841660108110610ce157610ce0611784565b5b1a60f81b828281518110610cf857610cf7611784565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600483901c925080610d3890611dfc565b9050610ca2565b5060008214610d875784846040517fe22e27eb000000000000000000000000000000000000000000000000000000008152600401610d7e929190611e34565b60405180910390fd5b809250505092915050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610df0577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381610de657610de5611c87565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610e2d576d04ee2d6d415b85acef81000000008381610e2357610e22611c87565b5b0492506020810190505b662386f26fc100008310610e5c57662386f26fc100008381610e5257610e51611c87565b5b0492506010810190505b6305f5e1008310610e85576305f5e1008381610e7b57610e7a611c87565b5b0492506008810190505b6127108310610eaa576127108381610ea057610e9f611c87565b5b0492506004810190505b60648310610ecd5760648381610ec357610ec2611c87565b5b0492506002810190505b600a8310610edc576001810190505b80915050919050565b6040518060e0016040528060608152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001600060ff1681526020016060815260200160608152602001606081525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f9d82610f54565b810181811067ffffffffffffffff82111715610fbc57610fbb610f65565b5b80604052505050565b6000610fcf610f3b565b9050610fdb8282610f94565b919050565b600067ffffffffffffffff821115610ffb57610ffa610f65565b5b602082029050602081019050919050565b600080fd5b600080fd5b600080fd5b6005811061102857600080fd5b50565b60008135905061103a8161101b565b92915050565b600080fd5b600067ffffffffffffffff8211156110605761105f610f65565b5b61106982610f54565b9050602081019050919050565b82818337600083830152505050565b600061109861109384611045565b610fc5565b9050828152602081018484840111156110b4576110b3611040565b5b6110bf848285611076565b509392505050565b600082601f8301126110dc576110db610f4f565b5b81356110ec848260208601611085565b91505092915050565b60008115159050919050565b61110a816110f5565b811461111557600080fd5b50565b60008135905061112781611101565b92915050565b60006080828403121561114357611142611011565b5b61114d6080610fc5565b9050600061115d8482850161102b565b600083015250602082013567ffffffffffffffff81111561118157611180611016565b5b61118d848285016110c7565b602083015250604082013567ffffffffffffffff8111156111b1576111b0611016565b5b6111bd848285016110c7565b60408301525060606111d184828501611118565b60608301525092915050565b60006111f06111eb84610fe0565b610fc5565b905080838252602082019050602084028301858111156112135761121261100c565b5b835b8181101561125a57803567ffffffffffffffff81111561123857611237610f4f565b5b808601611245898261112d565b85526020850194505050602081019050611215565b5050509392505050565b600082601f83011261127957611278610f4f565b5b81356112898482602086016111dd565b91505092915050565b6000602082840312156112a8576112a7610f45565b5b600082013567ffffffffffffffff8111156112c6576112c5610f4a565b5b6112d284828501611264565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156113155780820151818401526020810190506112fa565b60008484015250505050565b600061132c826112db565b61133681856112e6565b93506113468185602086016112f7565b61134f81610f54565b840191505092915050565b600060208201905081810360008301526113748184611321565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006113a78261137c565b9050919050565b6113b78161139c565b81146113c257600080fd5b50565b6000813590506113d4816113ae565b92915050565b6000819050919050565b6113ed816113da565b81146113f857600080fd5b50565b60008135905061140a816113e4565b92915050565b600080600080600060a0868803121561142c5761142b610f45565b5b600061143a888289016113c5565b955050602061144b888289016113fb565b945050604086013567ffffffffffffffff81111561146c5761146b610f4a565b5b611478888289016110c7565b9350506060611489888289016113fb565b925050608061149a888289016113fb565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60006114ce826114a7565b6114d881856114b2565b93506114e88185602086016112f7565b6114f181610f54565b840191505092915050565b6000602082019050818103600083015261151681846114c3565b905092915050565b611527816113da565b82525050565b6000602082019050611542600083018461151e565b92915050565b60006020828403121561155e5761155d610f45565b5b600061156c848285016113c5565b91505092915050565b600082825260208201905092915050565b6000611591826114a7565b61159b8185611575565b93506115ab8185602086016112f7565b6115b481610f54565b840191505092915050565b6115c88161139c565b82525050565b600082825260208201905092915050565b60006115ea826112db565b6115f481856115ce565b93506116048185602086016112f7565b61160d81610f54565b840191505092915050565b600060ff82169050919050565b61162e81611618565b82525050565b600060e08301600083015184820360008601526116518282611586565b915050602083015161166660208601826115bf565b506040830151848203604086015261167e82826115df565b91505060608301516116936060860182611625565b50608083015184820360808601526116ab82826115df565b91505060a083015184820360a08601526116c582826115df565b91505060c083015184820360c08601526116df82826115df565b9150508091505092915050565b600060208201905081810360008301526117068184611634565b905092915050565b60006020828403121561172457611723610f45565b5b6000611732848285016113fb565b91505092915050565b60006020828403121561175157611750610f45565b5b600082013567ffffffffffffffff81111561176f5761176e610f4a565b5b61177b848285016110c7565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061181c826113da565b9150611827836113da565b925082820390508181111561183f5761183e6117e2565b5b92915050565b600081905092915050565b600061185b826112db565b6118658185611845565b93506118758185602086016112f7565b80840191505092915050565b600081905092915050565b7f25323225324325323276616c7565253232253341000000000000000000000000600082015250565b60006118c2601483611881565b91506118cd8261188c565b601482019050919050565b60006118e3826114a7565b6118ed8185611881565b93506118fd8185602086016112f7565b80840191505092915050565b7f2537440000000000000000000000000000000000000000000000000000000000600082015250565b600061193f600383611881565b915061194a82611909565b600382019050919050565b6000611961828a611850565b915061196d8289611850565b91506119798288611850565b9150611984826118b5565b915061199082876118d8565b915061199c8286611850565b91506119a882856118d8565b91506119b382611932565b91506119bf82846118d8565b915081905098975050505050505050565b60006119db826113da565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611a0d57611a0c6117e2565b5b600182019050919050565b7f636f6d706f6e656e743d00000000000000000000000000000000000000000000600082015250565b6000611a4e600a83611881565b9150611a5982611a18565b600a82019050919050565b7f26636861696e49643d0000000000000000000000000000000000000000000000600082015250565b6000611a9a600983611881565b9150611aa582611a64565b600982019050919050565b7f2670726f70733d00000000000000000000000000000000000000000000000000600082015250565b6000611ae6600783611881565b9150611af182611ab0565b600782019050919050565b7f2677696474683d00000000000000000000000000000000000000000000000000600082015250565b6000611b32600783611881565b9150611b3d82611afc565b600782019050919050565b7f266865696768743d000000000000000000000000000000000000000000000000600082015250565b6000611b7e600883611881565b9150611b8982611b48565b600882019050919050565b7f26626c6f636b4e756d6265723d00000000000000000000000000000000000000600082015250565b6000611bca600d83611881565b9150611bd582611b94565b600d82019050919050565b6000611bec828a6118d8565b9150611bf782611a41565b9150611c0382896118d8565b9150611c0e82611a8d565b9150611c1a82886118d8565b9150611c2582611ad9565b9150611c3182876118d8565b9150611c3c82611b25565b9150611c4882866118d8565b9150611c5382611b71565b9150611c5f82856118d8565b9150611c6a82611bbd565b9150611c7682846118d8565b915081905098975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611cc1826113da565b9150611ccc836113da565b9250828202611cda816113da565b91508282048414831517611cf157611cf06117e2565b5b5092915050565b6000611d03826113da565b9150611d0e836113da565b925082611d1e57611d1d611c87565b5b828204905092915050565b6000611d34826113da565b9150611d3f836113da565b925082611d4f57611d4e611c87565b5b828206905092915050565b6000611d65826113da565b9150611d70836113da565b9250828201905080821115611d8857611d876117e2565b5b92915050565b7f3078000000000000000000000000000000000000000000000000000000000000600082015250565b6000611dc4600283611881565b9150611dcf82611d8e565b600282019050919050565b6000611de582611db7565b9150611df18284611850565b915081905092915050565b6000611e07826113da565b915060008203611e1a57611e196117e2565b5b600182039050919050565b611e2e816113da565b82525050565b6000604082019050611e496000830185611e25565b611e566020830184611e25565b939250505056fe68747470733a2f2f6e66742d707265766965772e706f622e73747564696f2f6170693f253742253232646973706c61795f74797065253232253341253230253232626f6f73745f6e756d62657225323225324325323274726169745f74797065253232253341253232253742253232646973706c61795f74797065253232253341253230253232626f6f73745f70657263656e7461676525323225324325323274726169745f747970652532322533412532322532353343736372697074253235334576617225323532307369676e617475726525323533442532353232646174612532353341696d6167652532353246706e6725323533426261736536342532353243253742253232646973706c61795f747970652532322533412532302532326461746525323225324325323274726169745f74797065253232253341253232253742253232646973706c61795f747970652532322533412532302532326e756d62657225323225324325323274726169745f74797065253232253341253232a2646970667358221220f02cfa47bfd1425b4554038fc5f6dd24fbe9ba913fbb00c1edef6a6fa08795c064736f6c63430008150033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.