OwlBodyTrait

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "contracts/OwlBodyTrait.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract OwlBodyTrait {
    function renderTrait(uint256 seed, string memory color) external pure returns (string memory) {
        if (seed == 10) return renderBodyFeathers(color);
        if (seed == 11) return renderBodySuperowl(color);
        if (seed == 12) return renderBodyMuscular(color);
        if (seed == 13) return renderBodyPriest(color);
        if (seed == 14) return renderBodyShirt(color);
        if (seed == 15) return renderBodySuit(color);
        if (seed == 16) return renderBodyTuxedo(color);

        return "";
    }

    function makePath(string memory pos, string memory pathData, string memory color) private pure returns (string memory) {
        return string(abi.encodePacked(
            '<g transform="translate(', pos, ') scale(0.011, -0.011)"><path d="',
            pathData, '" fill="', color, '"/></g>'
        ));
    }

    function renderBodyFeathers(string memory color) private pure returns (string memory) {
        return string(abi.encodePacked('<g id="body-feathers">',
            makePath('131,174', 'M313 502v227q58 1 94.5 37t36.5 86v158q0 197 124.5 308.5t322.5 111.5h102v-246h-57q-80 0 -127 -52t-47 -147v-106q0 -177 -152 -263q152 -88 152 -260v-112q0 -97 47 -148t127 -51h57v-246h-102q-202 0 -324.5 108.5t-122.5 311.5v164q0 52 -36 84.5t-95 34.5z', color),
            makePath('143,174', 'M268 1563h340l-35 -637h-270z', color),
            makePath('155,174', 'M268 1563h340l-35 -637h-270z', color),
            makePath('167,174', 'M268 1563h340l-35 -637h-270z', color),
            makePath('179,174', 'M338 45h57q80 0 127 51t47 148v112q0 172 152 260q-152 86 -152 263v106q0 95 -47 147t-127 52h-57v246h102q198 0 322.5 -111.5t124.5 -308.5v-158q0 -50 36.5 -86t94.5 -37v-227q-59 -2 -95 -34.5t-36 -84.5v-164q0 -203 -122.5 -311.5t-324.5 -108.5h-102v246z', color),
            '</g>'));
    }

    function renderBodySuperowl(string memory color) private pure returns (string memory) {
        return string(abi.encodePacked('<g id="body-superowl">',
            makePath('117,174', 'M102 -201l795 1635h330l-795 -1635h-330z', color),
            makePath('131,174', 'M313 502v227q58 1 94.5 37t36.5 86v158q0 197 124.5 308.5t322.5 111.5h102v-246h-57q-80 0 -127 -52t-47 -147v-106q0 -177 -152 -263q152 -88 152 -260v-112q0 -97 47 -148t127 -51h57v-246h-102q-202 0 -324.5 108.5t-122.5 311.5v164q0 52 -36 84.5t-95 34.5z', color),
            makePath('143,174', 'M104 1434h330l795 -1635h-330z', color),
            makePath('155,174', 'M113 518h331q0 -266 230 -266q93 0 146.5 40.5t53.5 113.5q0 41 -25.5 70.5t-68 48.5t-98.5 35t-117.5 32.5t-122.5 36.5t-117 53t-98.5 77t-68 112t-25.5 155q0 183 148.5 305.5t382.5 122.5q110 0 208.5 -32t175 -92t122.5 -152t49 -205h-338q-6 98 -69 151.5t-148 53.5q-80 0 -131.5 -37.5t-51.5 -104.5q0 -40 25.5 -68.5t68.5 -46t98.5 -31.5t117 -29.5t123 -35.5t117 -54t98.5 -80t68.5 -119t25.5 -166q0 -188 -155 -309.5t-394 -121.5q-263 0 -412 145.5t-149 397.5z', color),
            makePath('167,174', 'M102 -201l795 1635h330l-795 -1635h-330z', color),
            makePath('179,174', 'M338 45h57q80 0 127 51t47 148v112q0 172 152 260q-152 86 -152 263v106q0 95 -47 147t-127 52h-57v246h102q198 0 322.5 -111.5t124.5 -308.5v-158q0 -50 36.5 -86t94.5 -37v-227q-59 -2 -95 -34.5t-36 -84.5v-164q0 -203 -122.5 -311.5t-324.5 -108.5h-102v246z', color),
            makePath('191,174', 'M104 1434h330l795 -1635h-330z', color),
            '</g>'));
    }

    function renderBodyMuscular(string memory color) private pure returns (string memory) {
        return string(abi.encodePacked('<g id="body-muscular">',
            makePath('131,174', 'M313 502v227q58 1 94.5 37t36.5 86v158q0 197 124.5 308.5t322.5 111.5h102v-246h-57q-80 0 -127 -52t-47 -147v-106q0 -177 -152 -263q152 -88 152 -260v-112q0 -97 47 -148t127 -51h57v-246h-102q-202 0 -324.5 108.5t-122.5 311.5v164q0 52 -36 84.5t-95 34.5z', color),
            makePath('143,174', 'M137 238v276h1055v-276h-1055zM137 731v277h1055v-277h-1055z', color),
            makePath('155,174', 'M496 -389v1907h338v-1907h-338z', color),
            makePath('167,174', 'M137 238v276h1055v-276h-1055zM137 731v277h1055v-277h-1055z', color),
            makePath('179,174', 'M338 45h57q80 0 127 51t47 148v112q0 172 152 260q-152 86 -152 263v106q0 95 -47 147t-127 52h-57v246h102q198 0 322.5 -111.5t124.5 -308.5v-158q0 -50 36.5 -86t94.5 -37v-227q-59 -2 -95 -34.5t-36 -84.5v-164q0 -203 -122.5 -311.5t-324.5 -108.5h-102v246z', color),
            '</g>'));
    }

    function renderBodyPriest(string memory color) private pure returns (string memory) {
        return string(abi.encodePacked('<g id="body-priest">',
            makePath('131,174', 'M414 612q0 218 54 411t185 407h322q-240 -374 -240 -818q0 -439 240 -813h-322q-130 214 -184.5 406.5t-54.5 406.5z', color),
            makePath('143,174', 'M104 1434h330l795 -1635h-330z', color),
            makePath('155,174', 'M137 489v277h389v389h277v-389h389v-277h-389v-391h-277v391h-389z', color),
            makePath('167,174', 'M102 -201l795 1635h330l-795 -1635h-330z', color),
            makePath('179,174', 'M356 -201q240 374 240 813q0 444 -240 818h322q131 -214 185.5 -407.5t54.5 -410.5q0 -214 -54.5 -406.5t-185.5 -406.5h-322z', color),
            '</g>'));
    }

    function renderBodyShirt(string memory color) private pure returns (string memory) {
        return string(abi.encodePacked('<g id="body-shirt">',
            makePath('131,174', 'M313 502v227q58 1 94.5 37t36.5 86v158q0 197 124.5 308.5t322.5 111.5h102v-246h-57q-80 0 -127 -52t-47 -147v-106q0 -177 -152 -263q152 -88 152 -260v-112q0 -97 47 -148t127 -51h57v-246h-102q-202 0 -324.5 108.5t-122.5 311.5v164q0 52 -36 84.5t-95 34.5z', color),
            makePath('143,174', 'M104 1434h330l795 -1635h-330z', color),
            makePath('155,174', 'M479 690v354h369v-354h-369zM481 0v354h369v-354h-369z', color),
            makePath('167,174', 'M102 -201l795 1635h330l-795 -1635h-330z', color),
            makePath('179,174', 'M338 45h57q80 0 127 51t47 148v112q0 172 152 260q-152 86 -152 263v106q0 95 -47 147t-127 52h-57v246h102q198 0 322.5 -111.5t124.5 -308.5v-158q0 -50 36.5 -86t94.5 -37v-227q-59 -2 -95 -34.5t-36 -84.5v-164q0 -203 -122.5 -311.5t-324.5 -108.5h-102v246z', color),
            '</g>'));
    }

    function renderBodySuit(string memory color) private pure returns (string memory) {
        return string(abi.encodePacked('<g id="body-suit">',
            makePath('131,174', 'M313 502v227q58 1 94.5 37t36.5 86v158q0 197 124.5 308.5t322.5 111.5h102v-246h-57q-80 0 -127 -52t-47 -147v-106q0 -177 -152 -263q152 -88 152 -260v-112q0 -97 47 -148t127 -51h57v-246h-102q-202 0 -324.5 108.5t-122.5 311.5v164q0 52 -36 84.5t-95 34.5z', color),
            makePath('143,174', 'M104 1434h330l795 -1635h-330z', color),
            makePath('155,174', 'M479 690v354h369v-354h-369zM481 0v354h369v-354h-369z', color),
            makePath('167,174', 'M102 -201l795 1635h330l-795 -1635h-330z', color),
            makePath('179,174', 'M338 45h57q80 0 127 51t47 148v112q0 172 152 260q-152 86 -152 263v106q0 95 -47 147t-127 52h-57v246h102q198 0 322.5 -111.5t124.5 -308.5v-158q0 -50 36.5 -86t94.5 -37v-227q-59 -2 -95 -34.5t-36 -84.5v-164q0 -203 -122.5 -311.5t-324.5 -108.5h-102v246z', color),
            '</g>'));
    }

    function renderBodyTuxedo(string memory color) private pure returns (string memory) {
        return string(abi.encodePacked('<g id="body-tuxedo">',
            makePath('131,174', 'M313 502v227q58 1 94.5 37t36.5 86v158q0 197 124.5 308.5t322.5 111.5h102v-246h-57q-80 0 -127 -52t-47 -147v-106q0 -177 -152 -263q152 -88 152 -260v-112q0 -97 47 -148t127 -51h57v-246h-102q-202 0 -324.5 108.5t-122.5 311.5v164q0 52 -36 84.5t-95 34.5z', color),
            makePath('143,174', 'M104 1434h330l795 -1635h-330z', color),
            makePath('155,174', 'M84 428q0 97 33.5 177t87.5 129.5t119 76.5t133 27q64 0 128.5 -23.5t107 -51.5t89 -51.5t78.5 -23.5q45 0 77 39t38 102h272q-1 -93 -34 -171.5t-86 -129.5t-118.5 -79.5t-134.5 -28.5q-64 0 -128 23.5t-106 52t-89 52t-80 23.5q-47 0 -80.5 -40t-34.5 -103h-272z', color),
            makePath('167,174', 'M102 -201l795 1635h330l-795 -1635h-330z', color),
            makePath('179,174', 'M338 45h57q80 0 127 51t47 148v112q0 172 152 260q-152 86 -152 263v106q0 95 -47 147t-127 52h-57v246h102q198 0 322.5 -111.5t124.5 -308.5v-158q0 -50 36.5 -86t94.5 -37v-227q-59 -2 -95 -34.5t-36 -84.5v-164q0 -203 -122.5 -311.5t-324.5 -108.5h-102v246z', color),
            '</g>'));
    }
}"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "viaIR": true,
    "evmVersion": "paris",
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    }
  }
}}

Tags:
Factory|addr:0xb97b96136b5fe7a2495e40c4e17b0b0478035b4d|verified:true|block:23440324|tx:0x59634d23b0fbf8ef4be7e690726f81227ff709628e611510fea4c34a226a007c|first_check:1758810195

Submitted on: 2025-09-25 16:23:15

Comments

Log in to comment.

No comments yet.