ETH Price: $3,275.17 (+0.87%)

Contract

0x11fb55d9580CdBfB83DE3510fF5Ba74309800Ad1
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...147521352022-05-11 2:10:45976 days ago1652235045IN
0x11fb55d9...309800Ad1
0 ETH0.0011814841.41073928
Add Many Accesso...141532682022-02-06 15:16:581070 days ago1644160618IN
0x11fb55d9...309800Ad1
0 ETH0.0310139667
Add Many Accesso...141532562022-02-06 15:13:371070 days ago1644160417IN
0x11fb55d9...309800Ad1
0 ETH0.0202812857
Add Many Accesso...141532452022-02-06 15:11:211070 days ago1644160281IN
0x11fb55d9...309800Ad1
0 ETH0.0177275157
Add Many Accesso...141532312022-02-06 15:08:491070 days ago1644160129IN
0x11fb55d9...309800Ad1
0 ETH0.0298124567
Add Many Accesso...141532272022-02-06 15:07:491070 days ago1644160069IN
0x11fb55d9...309800Ad1
0 ETH0.0253558867
Add Many Accesso...141532192022-02-06 15:06:311070 days ago1644159991IN
0x11fb55d9...309800Ad1
0 ETH0.0238474467
Add Many Accesso...141531922022-02-06 15:00:261070 days ago1644159626IN
0x11fb55d9...309800Ad1
0 ETH0.0278947157
Add Many Accesso...141530502022-02-06 14:28:191070 days ago1644157699IN
0x11fb55d9...309800Ad1
0 ETH0.0242707757
Add Many Accesso...141530422022-02-06 14:26:461070 days ago1644157606IN
0x11fb55d9...309800Ad1
0 ETH0.0192727257
Add Many Accesso...141530012022-02-06 14:16:451070 days ago1644157005IN
0x11fb55d9...309800Ad1
0 ETH0.0253765157
Add Many Accesso...141529952022-02-06 14:14:531070 days ago1644156893IN
0x11fb55d9...309800Ad1
0 ETH0.0373020557
Add Many Accesso...141529882022-02-06 14:13:461070 days ago1644156826IN
0x11fb55d9...309800Ad1
0 ETH0.0394108857
Add Many Accesso...141529582022-02-06 14:06:351070 days ago1644156395IN
0x11fb55d9...309800Ad1
0 ETH0.0368564257
Add Many Accesso...141529452022-02-06 14:02:381070 days ago1644156158IN
0x11fb55d9...309800Ad1
0 ETH0.0263416357
Add Many Colors ...141528642022-02-06 13:44:291070 days ago1644155069IN
0x11fb55d9...309800Ad1
0 ETH0.320309157
Add Many Glasses141472952022-02-05 17:19:021070 days ago1644081542IN
0x11fb55d9...309800Ad1
0 ETH0.1874511267
Add Many Heads141471902022-02-05 16:57:141070 days ago1644080234IN
0x11fb55d9...309800Ad1
0 ETH0.0491199167
Add Many Heads141471522022-02-05 16:48:331070 days ago1644079713IN
0x11fb55d9...309800Ad1
0 ETH0.1236950667
Add Many Heads141471302022-02-05 16:42:391071 days ago1644079359IN
0x11fb55d9...309800Ad1
0 ETH0.1246022857
Add Many Heads141470982022-02-05 16:33:341071 days ago1644078814IN
0x11fb55d9...309800Ad1
0 ETH0.1042170357
Add Many Heads141470352022-02-05 16:18:351071 days ago1644077915IN
0x11fb55d9...309800Ad1
0 ETH0.094967357
Add Many Heads141470032022-02-05 16:11:311071 days ago1644077491IN
0x11fb55d9...309800Ad1
0 ETH0.1190105567
Add Many Heads141469492022-02-05 16:00:261071 days ago1644076826IN
0x11fb55d9...309800Ad1
0 ETH0.0923139557
Add Many Heads141469172022-02-05 15:54:321071 days ago1644076472IN
0x11fb55d9...309800Ad1
0 ETH0.0911372457
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x17C1465A...aAD2Bac6F
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
LilNounsDescriptor

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 9 : LilNounsDescriptor.sol
// SPDX-License-Identifier: GPL-3.0

/// @title The Nouns NFT descriptor

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {ILilNounsDescriptor} from "./interfaces/ILilNounsDescriptor.sol";
import {INounsSeeder} from "./interfaces/INounsSeeder.sol";
import {NFTDescriptor} from "./libs/NFTDescriptor.sol";
import {MultiPartRLEToSVG} from "./libs/MultiPartRLEToSVG.sol";

contract LilNounsDescriptor is ILilNounsDescriptor, Ownable {
    using Strings for uint256;

    // prettier-ignore
    // https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt
    // bytes32 constant COPYRIGHT_CC0_1_0_UNIVERSAL_LICENSE = 0xa2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499;

    // Whether or not new Noun parts can be added
    bool public override arePartsLocked;

    // Whether or not `tokenURI` should be returned as a data URI (Default: true)
    bool public override isDataURIEnabled = true;

    // Base URI
    string public override baseURI;

    // Noun Color Palettes (Index => Hex Colors)
    mapping(uint8 => string[]) public override palettes;

    // Noun Backgrounds (Hex Colors)
    string[] public override backgrounds;

    // Noun Bodies (Custom RLE)
    bytes[] public override bodies;

    // Noun Accessories (Custom RLE)
    bytes[] public override accessories;

    // Noun Heads (Custom RLE)
    bytes[] public override heads;

    // Noun Glasses (Custom RLE)
    bytes[] public override glasses;

    /**
     * @notice Require that the parts have not been locked.
     */
    modifier whenPartsNotLocked() {
        require(!arePartsLocked, "Parts are locked");
        _;
    }

    /**
     * @notice Get the number of available Noun `backgrounds`.
     */
    function backgroundCount() external view override returns (uint256) {
        return backgrounds.length;
    }

    /**
     * @notice Get the number of available Noun `bodies`.
     */
    function bodyCount() external view override returns (uint256) {
        return bodies.length;
    }

    /**
     * @notice Get the number of available Noun `accessories`.
     */
    function accessoryCount() external view override returns (uint256) {
        return accessories.length;
    }

    /**
     * @notice Get the number of available Noun `heads`.
     */
    function headCount() external view override returns (uint256) {
        return heads.length;
    }

    /**
     * @notice Get the number of available Noun `glasses`.
     */
    function glassesCount() external view override returns (uint256) {
        return glasses.length;
    }

    /**
     * @notice Add colors to a color palette.
     * @dev This function can only be called by the owner.
     */
    function addManyColorsToPalette(
        uint8 paletteIndex,
        string[] calldata newColors
    ) external override onlyOwner {
        require(
            palettes[paletteIndex].length + newColors.length <= 288,
            "Palettes can only hold 288 colors"
        );
        for (uint256 i = 0; i < newColors.length; i++) {
            _addColorToPalette(paletteIndex, newColors[i]);
        }
    }

    /**
     * @notice Batch add Noun backgrounds.
     * @dev This function can only be called by the owner when not locked.
     */
    function addManyBackgrounds(string[] calldata _backgrounds)
        external
        override
        onlyOwner
        whenPartsNotLocked
    {
        for (uint256 i = 0; i < _backgrounds.length; i++) {
            _addBackground(_backgrounds[i]);
        }
    }

    /**
     * @notice Batch add Noun bodies.
     * @dev This function can only be called by the owner when not locked.
     */
    function addManyBodies(bytes[] calldata _bodies)
        external
        override
        onlyOwner
        whenPartsNotLocked
    {
        for (uint256 i = 0; i < _bodies.length; i++) {
            _addBody(_bodies[i]);
        }
    }

    /**
     * @notice Batch add Noun accessories.
     * @dev This function can only be called by the owner when not locked.
     */
    function addManyAccessories(bytes[] calldata _accessories)
        external
        override
        onlyOwner
        whenPartsNotLocked
    {
        for (uint256 i = 0; i < _accessories.length; i++) {
            _addAccessory(_accessories[i]);
        }
    }

    /**
     * @notice Batch add Noun heads.
     * @dev This function can only be called by the owner when not locked.
     */
    function addManyHeads(bytes[] calldata _heads)
        external
        override
        onlyOwner
        whenPartsNotLocked
    {
        for (uint256 i = 0; i < _heads.length; i++) {
            _addHead(_heads[i]);
        }
    }

    /**
     * @notice Batch add Noun glasses.
     * @dev This function can only be called by the owner when not locked.
     */
    function addManyGlasses(bytes[] calldata _glasses)
        external
        override
        onlyOwner
        whenPartsNotLocked
    {
        for (uint256 i = 0; i < _glasses.length; i++) {
            _addGlasses(_glasses[i]);
        }
    }

    /**
     * @notice Add a single color to a color palette.
     * @dev This function can only be called by the owner.
     */
    function addColorToPalette(uint8 _paletteIndex, string calldata _color)
        external
        override
        onlyOwner
    {
        require(
            palettes[_paletteIndex].length <= 287,
            "Palettes can only hold 288 colors"
        );
        _addColorToPalette(_paletteIndex, _color);
    }

    /**
     * @notice Add a Noun background.
     * @dev This function can only be called by the owner when not locked.
     */
    function addBackground(string calldata _background)
        external
        override
        onlyOwner
        whenPartsNotLocked
    {
        _addBackground(_background);
    }

    /**
     * @notice Add a Noun body.
     * @dev This function can only be called by the owner when not locked.
     */
    function addBody(bytes calldata _body)
        external
        override
        onlyOwner
        whenPartsNotLocked
    {
        _addBody(_body);
    }

    /**
     * @notice Add a Noun accessory.
     * @dev This function can only be called by the owner when not locked.
     */
    function addAccessory(bytes calldata _accessory)
        external
        override
        onlyOwner
        whenPartsNotLocked
    {
        _addAccessory(_accessory);
    }

    /**
     * @notice Add a Noun head.
     * @dev This function can only be called by the owner when not locked.
     */
    function addHead(bytes calldata _head)
        external
        override
        onlyOwner
        whenPartsNotLocked
    {
        _addHead(_head);
    }

    /**
     * @notice Add Noun glasses.
     * @dev This function can only be called by the owner when not locked.
     */
    function addGlasses(bytes calldata _glasses)
        external
        override
        onlyOwner
        whenPartsNotLocked
    {
        _addGlasses(_glasses);
    }

    /**
     * @notice Lock all Noun parts.
     * @dev This cannot be reversed and can only be called by the owner when not locked.
     */
    function lockParts() external override onlyOwner whenPartsNotLocked {
        arePartsLocked = true;

        emit PartsLocked();
    }

    /**
     * @notice Toggle a boolean value which determines if `tokenURI` returns a data URI
     * or an HTTP URL.
     * @dev This can only be called by the owner.
     */
    function toggleDataURIEnabled() external override onlyOwner {
        bool enabled = !isDataURIEnabled;

        isDataURIEnabled = enabled;
        emit DataURIToggled(enabled);
    }

    /**
     * @notice Set the base URI for all token IDs. It is automatically
     * added as a prefix to the value returned in {tokenURI}, or to the
     * token ID if {tokenURI} is empty.
     * @dev This can only be called by the owner.
     */
    function setBaseURI(string calldata _baseURI) external override onlyOwner {
        baseURI = _baseURI;

        emit BaseURIUpdated(_baseURI);
    }

    /**
     * @notice Given a token ID and seed, construct a token URI for an official Nouns DAO noun.
     * @dev The returned value may be a base64 encoded data URI or an API URL.
     */
    function tokenURI(uint256 tokenId, INounsSeeder.Seed memory seed)
        external
        view
        override
        returns (string memory)
    {
        if (isDataURIEnabled) {
            return dataURI(tokenId, seed);
        }
        return string(abi.encodePacked(baseURI, tokenId.toString()));
    }

    /**
     * @notice Given a token ID and seed, construct a base64 encoded data URI for an official Nouns DAO noun.
     */
    function dataURI(uint256 tokenId, INounsSeeder.Seed memory seed)
        public
        view
        override
        returns (string memory)
    {
        string memory nounId = tokenId.toString();
        string memory name = string(abi.encodePacked("Noun ", nounId));
        string memory description = string(
            abi.encodePacked("Noun ", nounId, " is a member of the Nouns DAO")
        );

        return genericDataURI(name, description, seed);
    }

    /**
     * @notice Given a name, description, and seed, construct a base64 encoded data URI.
     */
    function genericDataURI(
        string memory name,
        string memory description,
        INounsSeeder.Seed memory seed
    ) public view override returns (string memory) {
        NFTDescriptor.TokenURIParams memory params = NFTDescriptor
            .TokenURIParams({
                name: name,
                description: description,
                parts: _getPartsForSeed(seed),
                background: backgrounds[seed.background]
            });
        return NFTDescriptor.constructTokenURI(params, palettes);
    }

    /**
     * @notice Given a seed, construct a base64 encoded SVG image.
     */
    function generateSVGImage(INounsSeeder.Seed memory seed)
        external
        view
        override
        returns (string memory)
    {
        MultiPartRLEToSVG.SVGParams memory params = MultiPartRLEToSVG
            .SVGParams({
                parts: _getPartsForSeed(seed),
                background: backgrounds[seed.background]
            });
        return NFTDescriptor.generateSVGImage(params, palettes);
    }

    /**
     * @notice Add a single color to a color palette.
     */
    function _addColorToPalette(uint8 _paletteIndex, string calldata _color)
        internal
    {
        palettes[_paletteIndex].push(_color);
    }

    /**
     * @notice Add a Noun background.
     */
    function _addBackground(string calldata _background) internal {
        backgrounds.push(_background);
    }

    /**
     * @notice Add a Noun body.
     */
    function _addBody(bytes calldata _body) internal {
        bodies.push(_body);
    }

    /**
     * @notice Add a Noun accessory.
     */
    function _addAccessory(bytes calldata _accessory) internal {
        accessories.push(_accessory);
    }

    /**
     * @notice Add a Noun head.
     */
    function _addHead(bytes calldata _head) internal {
        heads.push(_head);
    }

    /**
     * @notice Add Noun glasses.
     */
    function _addGlasses(bytes calldata _glasses) internal {
        glasses.push(_glasses);
    }

    /**
     * @notice Get all Noun parts for the passed `seed`.
     */
    function _getPartsForSeed(INounsSeeder.Seed memory seed)
        internal
        view
        returns (bytes[] memory)
    {
        bytes[] memory _parts = new bytes[](4);
        _parts[0] = bodies[seed.body];
        _parts[1] = accessories[seed.accessory];
        _parts[2] = heads[seed.head];
        _parts[3] = glasses[seed.glasses];
        return _parts;
    }
}

File 2 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 9 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 4 of 9 : ILilNounsDescriptor.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for NounsDescriptor

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

import { INounsSeeder } from "./INounsSeeder.sol";

interface ILilNounsDescriptor {
    event PartsLocked();

    event DataURIToggled(bool enabled);

    event BaseURIUpdated(string baseURI);

    function arePartsLocked() external returns (bool);

    function isDataURIEnabled() external returns (bool);

    function baseURI() external returns (string memory);

    function palettes(uint8 paletteIndex, uint256 colorIndex) external view returns (string memory);

    function backgrounds(uint256 index) external view returns (string memory);

    function bodies(uint256 index) external view returns (bytes memory);

    function accessories(uint256 index) external view returns (bytes memory);

    function heads(uint256 index) external view returns (bytes memory);

    function glasses(uint256 index) external view returns (bytes memory);

    function backgroundCount() external view returns (uint256);

    function bodyCount() external view returns (uint256);

    function accessoryCount() external view returns (uint256);

    function headCount() external view returns (uint256);

    function glassesCount() external view returns (uint256);

    function addManyColorsToPalette(uint8 paletteIndex, string[] calldata newColors) external;

    function addManyBackgrounds(string[] calldata backgrounds) external;

    function addManyBodies(bytes[] calldata bodies) external;

    function addManyAccessories(bytes[] calldata accessories) external;

    function addManyHeads(bytes[] calldata heads) external;

    function addManyGlasses(bytes[] calldata glasses) external;

    function addColorToPalette(uint8 paletteIndex, string calldata color) external;

    function addBackground(string calldata background) external;

    function addBody(bytes calldata body) external;

    function addAccessory(bytes calldata accessory) external;

    function addHead(bytes calldata head) external;

    function addGlasses(bytes calldata glasses) external;

    function lockParts() external;

    function toggleDataURIEnabled() external;

    function setBaseURI(string calldata baseURI) external;

    function tokenURI(uint256 tokenId, INounsSeeder.Seed memory seed) external view returns (string memory);

    function dataURI(uint256 tokenId, INounsSeeder.Seed memory seed) external view returns (string memory);

    function genericDataURI(
        string calldata name,
        string calldata description,
        INounsSeeder.Seed memory seed
    ) external view returns (string memory);

    function generateSVGImage(INounsSeeder.Seed memory seed) external view returns (string memory);
}

File 5 of 9 : INounsSeeder.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.6;

import {ILilNounsDescriptor} from "./ILilNounsDescriptor.sol";

interface INounsSeeder {
    struct Seed {
        uint48 background;
        uint48 body;
        uint48 accessory;
        uint48 head;
        uint48 glasses;
    }

    function generateSeed(uint256 nounId, ILilNounsDescriptor descriptor)
        external
        view
        returns (Seed memory);
}

File 6 of 9 : NFTDescriptor.sol
// SPDX-License-Identifier: GPL-3.0

/// @title A library used to construct ERC721 token URIs and SVG images
/// Copy pasta from Noun contract (thx nounders!)

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

import { Base64 } from "base64-sol/base64.sol";
import { MultiPartRLEToSVG } from "./MultiPartRLEToSVG.sol";

library NFTDescriptor {
    struct TokenURIParams {
        string name;
        string description;
        bytes[] parts;
        string background;
    }

    /**
     * @notice Construct an ERC721 token URI.
     */
    function constructTokenURI(TokenURIParams memory params, mapping(uint8 => string[]) storage palettes)
        public
        view
        returns (string memory)
    {
        string memory image = generateSVGImage(
            MultiPartRLEToSVG.SVGParams({ parts: params.parts, background: params.background }),
            palettes
        );

        // prettier-ignore
        return string(
            abi.encodePacked(
                'data:application/json;base64,',
                Base64.encode(
                    bytes(
                        abi.encodePacked('{"name":"', params.name, '", "description":"', params.description, '", "image": "', 'data:image/svg+xml;base64,', image, '"}')
                    )
                )
            )
        );
    }

    /**
     * @notice Generate an SVG image for use in the ERC721 token URI.
     */
    function generateSVGImage(MultiPartRLEToSVG.SVGParams memory params, mapping(uint8 => string[]) storage palettes)
        public
        view
        returns (string memory svg)
    {
        return Base64.encode(bytes(MultiPartRLEToSVG.generateSVG(params, palettes)));
    }
}

File 7 of 9 : MultiPartRLEToSVG.sol
// SPDX-License-Identifier: GPL-3.0

/// @title A library used to convert multi-part RLE compressed images to SVG
/// Copy pasta from Noun contract (thx nounders!)

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

library MultiPartRLEToSVG {
    struct SVGParams {
        bytes[] parts;
        string background;
    }

    struct ContentBounds {
        uint8 top;
        uint8 right;
        uint8 bottom;
        uint8 left;
    }

    struct Rect {
        uint8 length;
        uint8 colorIndex;
    }

    struct DecodedImage {
        uint8 paletteIndex;
        ContentBounds bounds;
        Rect[] rects;
    }

    /**
     * @notice Given RLE image parts and color palettes, merge to generate a single SVG image.
     */
    function generateSVG(SVGParams memory params, mapping(uint8 => string[]) storage palettes)
        internal
        view
        returns (string memory svg)
    {
        // prettier-ignore
        return string(
            abi.encodePacked(
                '<svg width="320" height="320" viewBox="0 0 320 320" xmlns="http://www.w3.org/2000/svg" shape-rendering="crispEdges">',
                '<rect width="100%" height="100%" fill="#', params.background, '" />',
                _generateSVGRects(params, palettes),
                '</svg>'
            )
        );
    }

    /**
     * @notice Given RLE image parts and color palettes, generate SVG rects.
     */
    // prettier-ignore
    function _generateSVGRects(SVGParams memory params, mapping(uint8 => string[]) storage palettes)
        private
        view
        returns (string memory svg)
    {
        string[33] memory lookup = [
            '0', '10', '20', '30', '40', '50', '60', '70', 
            '80', '90', '100', '110', '120', '130', '140', '150', 
            '160', '170', '180', '190', '200', '210', '220', '230', 
            '240', '250', '260', '270', '280', '290', '300', '310',
            '320' 
        ];
        string memory rects;
        for (uint8 p = 0; p < params.parts.length; p++) {
            DecodedImage memory image = _decodeRLEImage(params.parts[p]);
            string[] storage palette = palettes[image.paletteIndex];
            uint256 currentX = image.bounds.left;
            uint256 currentY = image.bounds.top;
            uint256 cursor;
            string[16] memory buffer;

            string memory part;
            for (uint256 i = 0; i < image.rects.length; i++) {
                Rect memory rect = image.rects[i];
                if (rect.colorIndex != 0) {
                    buffer[cursor] = lookup[rect.length];          // width
                    buffer[cursor + 1] = lookup[currentX];         // x
                    buffer[cursor + 2] = lookup[currentY];         // y
                    buffer[cursor + 3] = palette[rect.colorIndex]; // color

                    cursor += 4;

                    if (cursor >= 16) {
                        part = string(abi.encodePacked(part, _getChunk(cursor, buffer)));
                        cursor = 0;
                    }
                }

                currentX += rect.length;
                if (currentX == image.bounds.right) {
                    currentX = image.bounds.left;
                    currentY++;
                }
            }

            if (cursor != 0) {
                part = string(abi.encodePacked(part, _getChunk(cursor, buffer)));
            }
            rects = string(abi.encodePacked(rects, part));
        }
        return rects;
    }

    /**
     * @notice Return a string that consists of all rects in the provided `buffer`.
     */
    // prettier-ignore
    function _getChunk(uint256 cursor, string[16] memory buffer) private pure returns (string memory) {
        string memory chunk;
        for (uint256 i = 0; i < cursor; i += 4) {
            chunk = string(
                abi.encodePacked(
                    chunk,
                    '<rect width="', buffer[i], '" height="10" x="', buffer[i + 1], '" y="', buffer[i + 2], '" fill="#', buffer[i + 3], '" />'
                )
            );
        }
        return chunk;
    }

    /**
     * @notice Decode a single RLE compressed image into a `DecodedImage`.
     */
    function _decodeRLEImage(bytes memory image) private pure returns (DecodedImage memory) {
        uint8 paletteIndex = uint8(image[0]);
        ContentBounds memory bounds = ContentBounds({
            top: uint8(image[1]),
            right: uint8(image[2]),
            bottom: uint8(image[3]),
            left: uint8(image[4])
        });

        uint256 cursor;
        Rect[] memory rects = new Rect[]((image.length - 5) / 2);
        for (uint256 i = 5; i < image.length; i += 2) {
            rects[cursor] = Rect({ length: uint8(image[i]), colorIndex: uint8(image[i + 1]) });
            cursor++;
        }
        return DecodedImage({ paletteIndex: paletteIndex, bounds: bounds, rects: rects });
    }
}

File 8 of 9 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 9 of 9 : base64.sol
// SPDX-License-Identifier: MIT

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides a function for encoding some bytes in base64
library Base64 {
    string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';
        
        // load the table into memory
        string memory table = TABLE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)
            
            // prepare the lookup table
            let tablePtr := add(table, 1)
            
            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))
            
            // result ptr, jump over length
            let resultPtr := add(result, 32)
            
            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
               dataPtr := add(dataPtr, 3)
               
               // read 3 bytes
               let input := mload(dataPtr)
               
               // write 4 characters
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(        input,  0x3F)))))
               resultPtr := add(resultPtr, 1)
            }
            
            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }
        
        return result;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {
    "contracts/libs/NFTDescriptor.sol": {
      "NFTDescriptor": "0x0bbad8c947210ab6284699605ce2a61780958264"
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"DataURIToggled","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":[],"name":"PartsLocked","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"accessories","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accessoryCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_accessory","type":"bytes"}],"name":"addAccessory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_background","type":"string"}],"name":"addBackground","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_body","type":"bytes"}],"name":"addBody","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_paletteIndex","type":"uint8"},{"internalType":"string","name":"_color","type":"string"}],"name":"addColorToPalette","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_glasses","type":"bytes"}],"name":"addGlasses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_head","type":"bytes"}],"name":"addHead","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"_accessories","type":"bytes[]"}],"name":"addManyAccessories","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"_backgrounds","type":"string[]"}],"name":"addManyBackgrounds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"_bodies","type":"bytes[]"}],"name":"addManyBodies","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"paletteIndex","type":"uint8"},{"internalType":"string[]","name":"newColors","type":"string[]"}],"name":"addManyColorsToPalette","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"_glasses","type":"bytes[]"}],"name":"addManyGlasses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"_heads","type":"bytes[]"}],"name":"addManyHeads","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"arePartsLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"backgroundCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"backgrounds","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bodies","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bodyCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct INounsSeeder.Seed","name":"seed","type":"tuple"}],"name":"dataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct INounsSeeder.Seed","name":"seed","type":"tuple"}],"name":"generateSVGImage","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct INounsSeeder.Seed","name":"seed","type":"tuple"}],"name":"genericDataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"glasses","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"glassesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"headCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"heads","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isDataURIEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockParts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"palettes","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleDataURIEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct INounsSeeder.Seed","name":"seed","type":"tuple"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061025c5760003560e01c8063715018a6116101455780639a796205116100bd578063ce2f4f531161008c578063eba8180611610071578063eba81806146104e8578063f2fde38b146104f0578063f9da88631461050357600080fd5b8063ce2f4f53146104ba578063dfe8478b146104e057600080fd5b80639a79620514610479578063a51e41241461048c578063b982d1b91461049f578063cc2aa091146104b257600080fd5b8063839644da116101145780638a85a1e8116100f95780638a85a1e81461042b5780638da5cb5b1461043e57806391b7916a1461046657600080fd5b8063839644da1461040557806387db11bd1461041857600080fd5b8063715018a6146103a2578063773b9771146103aa5780637a34aad3146103df5780637ca94210146103f257600080fd5b80634531c0a8116101d85780635a503f13116101a7578063615bda101161018c578063615bda1014610374578063638ac270146103875780636c0360eb1461039a57600080fd5b80635a503f131461034e5780635e70664c1461036157600080fd5b80634531c0a8146103185780634daebac21461032057806355f804b314610328578063598fa9da1461033b57600080fd5b80632a1d07691161022f5780633cfdafd3116102145780633cfdafd3146102e05780634479cef2146102f357806344cee73c1461030557600080fd5b80632a1d0769146102c55780632ea04300146102cd57600080fd5b80630475d8631461026157806304bde4dd1461027657806317b552ab1461029f5780632715c90e146102b2575b600080fd5b61027461026f36600461237d565b610516565b005b6102896102843660046124f4565b61063b565b6040516102969190612820565b60405180910390f35b6102746102ad3660046123bf565b6106e7565b6102746102c03660046123bf565b6107c7565b6102746108a3565b6102896102db3660046124d8565b6109dd565b6102896102ee36600461250d565b610b46565b6007545b604051908152602001610296565b6102896103133660046124f4565b610bb2565b6003546102f7565b6005546102f7565b6102746103363660046123bf565b610bc2565b6102896103493660046125d3565b610c73565b61028961035c3660046124f4565b610cab565b61027461036f3660046123bf565b610cbb565b6102746103823660046123bf565b610d97565b61028961039536600461250d565b610e73565b610289610edf565b610274610eec565b6000546103cf9074010000000000000000000000000000000000000000900460ff1681565b6040519015158152602001610296565b6102746103ed36600461237d565b610f5f565b6102896104003660046124f4565b61107a565b61027461041336600461253a565b61108a565b610289610426366004612463565b6111d7565b61027461043936600461237d565b61134e565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610296565b61027461047436600461237d565b611469565b6102746104873660046123bf565b611584565b61027461049a36600461237d565b611660565b6102896104ad3660046124f4565b61177b565b6006546102f7565b6000546103cf907501000000000000000000000000000000000000000000900460ff1681565b61027461178b565b6004546102f7565b6102746104fe366004612347565b611875565b61027461051136600461258d565b611971565b60005473ffffffffffffffffffffffffffffffffffffffff1633146105825760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b60005474010000000000000000000000000000000000000000900460ff16156105ed5760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b60005b818110156106365761062483838381811061060d5761060d612b88565b905060200281019061061f919061295c565b611a6d565b8061062e81612add565b9150506105f0565b505050565b6003818154811061064b57600080fd5b90600052602060002001600091509050805461066690612a89565b80601f016020809104026020016040519081016040528092919081815260200182805461069290612a89565b80156106df5780601f106106b4576101008083540402835291602001916106df565b820191906000526020600020905b8154815290600101906020018083116106c257829003601f168201915b505050505081565b60005473ffffffffffffffffffffffffffffffffffffffff16331461074e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60005474010000000000000000000000000000000000000000900460ff16156107b95760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b6107c38282611a6d565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461082e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60005474010000000000000000000000000000000000000000900460ff16156108995760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b6107c38282611aaa565b60005473ffffffffffffffffffffffffffffffffffffffff16331461090a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60005474010000000000000000000000000000000000000000900460ff16156109755760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001781556040517f1680ee6d421f70ed6030d2fc4fcb50217a5dd617858d56562b119eca59172e579190a1565b6060600060405180604001604052806109f585611ae7565b81526020016003856000015165ffffffffffff1681548110610a1957610a19612b88565b906000526020600020018054610a2e90612a89565b80601f0160208091040260200160405190810160405280929190818152602001828054610a5a90612a89565b8015610aa75780601f10610a7c57610100808354040283529160200191610aa7565b820191906000526020600020905b815481529060010190602001808311610a8a57829003601f168201915b50505050508152509050730bbad8c947210ab6284699605ce2a617809582646366b8c2418260026040518363ffffffff1660e01b8152600401610aeb929190612862565b60006040518083038186803b158015610b0357600080fd5b505af4158015610b17573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b3f91908101906123f5565b9392505050565b6000546060907501000000000000000000000000000000000000000000900460ff1615610b7e57610b778383610e73565b9050610bac565b6001610b8984611e60565b604051602001610b9a92919061269a565b60405160208183030381529060405290505b92915050565b6004818154811061064b57600080fd5b60005473ffffffffffffffffffffffffffffffffffffffff163314610c295760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b610c35600183836120ef565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8282604051610c67929190612833565b60405180910390a15050565b60026020528160005260406000208181548110610c8f57600080fd5b9060005260206000200160009150915050805461066690612a89565b6006818154811061064b57600080fd5b60005473ffffffffffffffffffffffffffffffffffffffff163314610d225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60005474010000000000000000000000000000000000000000900460ff1615610d8d5760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b6107c38282611f9a565b60005473ffffffffffffffffffffffffffffffffffffffff163314610dfe5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60005474010000000000000000000000000000000000000000900460ff1615610e695760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b6107c38282611fd7565b60606000610e8084611e60565b9050600081604051602001610e95919061276f565b6040516020818303038152906040529050600082604051602001610eb991906127b4565b6040516020818303038152906040529050610ed58282876111d7565b9695505050505050565b6001805461066690612a89565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b610f5d6000612014565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fc65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60005474010000000000000000000000000000000000000000900460ff16156110315760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b60005b818110156106365761106883838381811061105157611051612b88565b9050602002810190611063919061295c565b612089565b8061107281612add565b915050611034565b6005818154811061064b57600080fd5b60005473ffffffffffffffffffffffffffffffffffffffff1633146110f15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60ff831660009081526002602052604090205461012090611113908390612a1a565b11156111875760405162461bcd60e51b815260206004820152602160248201527f50616c65747465732063616e206f6e6c7920686f6c642032383820636f6c6f7260448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610579565b60005b818110156111d1576111bf848484848181106111a8576111a8612b88565b90506020028101906111ba919061295c565b6120c6565b806111c981612add565b91505061118a565b50505050565b6060600060405180608001604052808681526020018581526020016111fb85611ae7565b81526020016003856000015165ffffffffffff168154811061121f5761121f612b88565b90600052602060002001805461123490612a89565b80601f016020809104026020016040519081016040528092919081815260200182805461126090612a89565b80156112ad5780601f10611282576101008083540402835291602001916112ad565b820191906000526020600020905b81548152906001019060200180831161129057829003601f168201915b50505050508152509050730bbad8c947210ab6284699605ce2a6178095826463bf1deae28260026040518363ffffffff1660e01b81526004016112f19291906128c9565b60006040518083038186803b15801561130957600080fd5b505af415801561131d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261134591908101906123f5565b95945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146113b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60005474010000000000000000000000000000000000000000900460ff16156114205760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b60005b818110156106365761145783838381811061144057611440612b88565b9050602002810190611452919061295c565b611aaa565b8061146181612add565b915050611423565b60005473ffffffffffffffffffffffffffffffffffffffff1633146114d05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60005474010000000000000000000000000000000000000000900460ff161561153b5760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b60005b818110156106365761157283838381811061155b5761155b612b88565b905060200281019061156d919061295c565b611f9a565b8061157c81612add565b91505061153e565b60005473ffffffffffffffffffffffffffffffffffffffff1633146115eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60005474010000000000000000000000000000000000000000900460ff16156116565760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b6107c38282612089565b60005473ffffffffffffffffffffffffffffffffffffffff1633146116c75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60005474010000000000000000000000000000000000000000900460ff16156117325760405162461bcd60e51b815260206004820152601060248201527f506172747320617265206c6f636b6564000000000000000000000000000000006044820152606401610579565b60005b818110156106365761176983838381811061175257611752612b88565b9050602002810190611764919061295c565b611fd7565b8061177381612add565b915050611735565b6007818154811061064b57600080fd5b60005473ffffffffffffffffffffffffffffffffffffffff1633146117f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff811675010000000000000000000000000000000000000000009182900460ff1615918202179091556040518181527f360c3d72ee193226275b842f85231c259c934e85459fed80fa68e502ffa9dbde9060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff1633146118dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b73ffffffffffffffffffffffffffffffffffffffff81166119655760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610579565b61196e81612014565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146119d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610579565b60ff831660009081526002602052604090205461011f1015611a625760405162461bcd60e51b815260206004820152602160248201527f50616c65747465732063616e206f6e6c7920686f6c642032383820636f6c6f7260448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610579565b6106368383836120c6565b60058054600181018255600091909152610636907f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00183836120ef565b60048054600181018255600091909152610636907f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0183836120ef565b60408051600480825260a0820190925260609160009190816020015b6060815260200190600190039081611b035790505090506004836020015165ffffffffffff1681548110611b3957611b39612b88565b906000526020600020018054611b4e90612a89565b80601f0160208091040260200160405190810160405280929190818152602001828054611b7a90612a89565b8015611bc75780601f10611b9c57610100808354040283529160200191611bc7565b820191906000526020600020905b815481529060010190602001808311611baa57829003601f168201915b505050505081600081518110611bdf57611bdf612b88565b60200260200101819052506005836040015165ffffffffffff1681548110611c0957611c09612b88565b906000526020600020018054611c1e90612a89565b80601f0160208091040260200160405190810160405280929190818152602001828054611c4a90612a89565b8015611c975780601f10611c6c57610100808354040283529160200191611c97565b820191906000526020600020905b815481529060010190602001808311611c7a57829003601f168201915b505050505081600181518110611caf57611caf612b88565b60200260200101819052506006836060015165ffffffffffff1681548110611cd957611cd9612b88565b906000526020600020018054611cee90612a89565b80601f0160208091040260200160405190810160405280929190818152602001828054611d1a90612a89565b8015611d675780601f10611d3c57610100808354040283529160200191611d67565b820191906000526020600020905b815481529060010190602001808311611d4a57829003601f168201915b505050505081600281518110611d7f57611d7f612b88565b60200260200101819052506007836080015165ffffffffffff1681548110611da957611da9612b88565b906000526020600020018054611dbe90612a89565b80601f0160208091040260200160405190810160405280929190818152602001828054611dea90612a89565b8015611e375780601f10611e0c57610100808354040283529160200191611e37565b820191906000526020600020905b815481529060010190602001808311611e1a57829003601f168201915b505050505081600381518110611e4f57611e4f612b88565b602090810291909101015292915050565b606081611ea057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611eca5780611eb481612add565b9150611ec39050600a83612a32565b9150611ea4565b60008167ffffffffffffffff811115611ee557611ee5612bb7565b6040519080825280601f01601f191660200182016040528015611f0f576020820181803683370190505b5090505b8415611f9257611f24600183612a46565b9150611f31600a86612b16565b611f3c906030612a1a565b60f81b818381518110611f5157611f51612b88565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611f8b600a86612a32565b9450611f13565b949350505050565b60038054600181018255600091909152610636907fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0183836120ef565b60078054600181018255600091909152610636907fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880183836120ef565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60068054600181018255600091909152610636907ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0183836120ef565b60ff831660009081526002602090815260408220805460018101825590835291206111d1910183835b8280546120fb90612a89565b90600052602060002090601f01602090048101928261211d5760008555612181565b82601f10612154578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555612181565b82800160010185558215612181579182015b82811115612181578235825591602001919060010190612166565b5061218d929150612191565b5090565b5b8082111561218d5760008155600101612192565b60008083601f8401126121b857600080fd5b50813567ffffffffffffffff8111156121d057600080fd5b6020830191508360208260051b85010111156121eb57600080fd5b9250929050565b60008083601f84011261220457600080fd5b50813567ffffffffffffffff81111561221c57600080fd5b6020830191508360208285010111156121eb57600080fd5b600082601f83011261224557600080fd5b8135612258612253826129f2565b6129c1565b81815284602083860101111561226d57600080fd5b816020850160208301376000918101602001919091529392505050565b600060a0828403121561229c57600080fd5b60405160a0810181811067ffffffffffffffff821117156122bf576122bf612bb7565b6040529050806122ce8361231b565b81526122dc6020840161231b565b60208201526122ed6040840161231b565b60408201526122fe6060840161231b565b606082015261230f6080840161231b565b60808201525092915050565b803565ffffffffffff8116811461233157600080fd5b919050565b803560ff8116811461233157600080fd5b60006020828403121561235957600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610b3f57600080fd5b6000806020838503121561239057600080fd5b823567ffffffffffffffff8111156123a757600080fd5b6123b3858286016121a6565b90969095509350505050565b600080602083850312156123d257600080fd5b823567ffffffffffffffff8111156123e957600080fd5b6123b3858286016121f2565b60006020828403121561240757600080fd5b815167ffffffffffffffff81111561241e57600080fd5b8201601f8101841361242f57600080fd5b805161243d612253826129f2565b81815285602083850101111561245257600080fd5b611345826020830160208601612a5d565b600080600060e0848603121561247857600080fd5b833567ffffffffffffffff8082111561249057600080fd5b61249c87838801612234565b945060208601359150808211156124b257600080fd5b506124bf86828701612234565b9250506124cf856040860161228a565b90509250925092565b600060a082840312156124ea57600080fd5b610b3f838361228a565b60006020828403121561250657600080fd5b5035919050565b60008060c0838503121561252057600080fd5b82359150612531846020850161228a565b90509250929050565b60008060006040848603121561254f57600080fd5b61255884612336565b9250602084013567ffffffffffffffff81111561257457600080fd5b612580868287016121a6565b9497909650939450505050565b6000806000604084860312156125a257600080fd5b6125ab84612336565b9250602084013567ffffffffffffffff8111156125c757600080fd5b612580868287016121f2565b600080604083850312156125e657600080fd5b6125ef83612336565b946020939093013593505050565b600081518084526020808501808196508360051b8101915082860160005b85811015612645578284038952612633848351612652565b9885019893509084019060010161261b565b5091979650505050505050565b6000815180845261266a816020860160208601612a5d565b601f01601f19169290920160200192915050565b60008151612690818560208601612a5d565b9290920192915050565b600080845481600182811c9150808316806126b657607f831692505b60208084108214156126ef577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b81801561270357600181146127325761275f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0086168952848901965061275f565b60008b81526020902060005b868110156127575781548b82015290850190830161273e565b505084890196505b505050505050611345818561267e565b7f4e6f756e200000000000000000000000000000000000000000000000000000008152600082516127a7816005850160208701612a5d565b9190910160050192915050565b7f4e6f756e200000000000000000000000000000000000000000000000000000008152600082516127ec816005850160208701612a5d565b7f2069732061206d656d626572206f6620746865204e6f756e732044414f0000006005939091019283015250602201919050565b602081526000610b3f6020830184612652565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b604081526000835160408084015261287d60808401826125fd565b905060208501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08483030160608501526128b88282612652565b925050508260208301529392505050565b6040815260008351608060408401526128e560c0840182612652565b905060208501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0808584030160608601526129218383612652565b9250604087015191508085840301608086015261293e83836125fd565b925060608701519150808584030160a0860152506128b88282612652565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261299157600080fd5b83018035915067ffffffffffffffff8211156129ac57600080fd5b6020019150368190038213156121eb57600080fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156129ea576129ea612bb7565b604052919050565b600067ffffffffffffffff821115612a0c57612a0c612bb7565b50601f01601f191660200190565b60008219821115612a2d57612a2d612b2a565b500190565b600082612a4157612a41612b59565b500490565b600082821015612a5857612a58612b2a565b500390565b60005b83811015612a78578181015183820152602001612a60565b838111156111d15750506000910152565b600181811c90821680612a9d57607f821691505b60208210811415612ad7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612b0f57612b0f612b2a565b5060010190565b600082612b2557612b25612b59565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220baebdacf7d6f709de66fb88e2c37c8ddc17792d193453170389b98e94e134b6d64736f6c63430008060033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.