// SPDX-License-Identifier: MIT pragma solidity 0.8.26; /// @title Robinhood Ordinal Block — deterministic on-chain SVG artwork /// @notice Art renderer only. No NFT minting, ownership, fees, or external resources. /// @dev Every visible coordinate, palette and fragment lives in this contract. /// designCode encodes palette(2), core(2), crown(2), panels(2), seal(8) bits. /// This renderer has no owner, mutable storage, timestamp, randomness, or upgrade path. contract RobinhoodOrdinalRenderer { function renderSVG(uint16 designCode) external pure returns (string memory) { uint256 code = uint256(designCode); return string.concat( '', _palette(code & 3), _scaffold(), _core((code >> 2) & 3), _foreground(), _crown((code >> 4) & 3), _panels((code >> 6) & 3), _seal(code >> 8), '' ); } function traits(uint16 designCode) external pure returns (uint8 palette, uint8 core, uint8 crown, uint8 panels, uint8 seal) { uint256 c = uint256(designCode); return (uint8(c & 3), uint8((c>>2)&3), uint8((c>>4)&3), uint8((c>>6)&3), uint8(c>>8)); } function _palette(uint256 n) private pure returns (string memory) { if(n==0) return ""; if(n==1) return ""; if(n==2) return ""; return ""; } function _scaffold() private pure returns (string memory) { return ""; } function _core(uint256 n) private pure returns (string memory) { if(n==0) return ""; if(n==1) return ""; if(n==2) return ""; return ""; } function _foreground() private pure returns (string memory) { return ""; } function _crown(uint256 n) private pure returns (string memory) { if(n==0) return ""; if(n==1) return ""; if(n==2) return ""; return ""; } function _panels(uint256 n) private pure returns (string memory) { if(n==0) return ""; if(n==1) return ""; if(n==2) return ""; return ""; } function _seal(uint256 value) private pure returns (string memory out) { // Eight visible inset cells provide an injective eight-bit geometric seal. out = ''; for (uint256 i; i < 8; ++i) { string memory ink = (value & (1 << i)) != 0 ? '#beff48' : '#10372a'; out = string.concat(out, ''); } out=string.concat(out,''); } function _uint(uint256 value) private pure returns (string memory) { if (value == 0) return "0"; uint256 t=value; uint256 length; while(t!=0){ ++length; t/=10; } bytes memory out=new bytes(length); while(value!=0){ out[--length]=bytes1(uint8(48+value%10)); value/=10; } return string(out); } }