Storing Nakamigos Fully Onchain.

The collection is preserved on Ethereum using compact token bytes, reusable SVG fragments, and a renderer contract that reconstructs each token's metadata and image onchain.

Data contract 0xB37a75DF18b8a0ca8631aFF5E387138375c5F545
Renderer contract 0x940a40A10d0066f4ae650CE1cf82465d19c794B1
What is stored 20 chunks of 1k token data, 186 SVG traits, and 39 post-processing SVG fragments.
How to read Use tokenTraitIds(tokenId) for bytes and tokenURI(tokenId) for metadata + image.

Try A Token

Enter a token ID. The tool reads the token's 16 packed bytes, calls tokenURI, decodes the base64 metadata, and displays the onchain SVG image.

Open Image Etherscan

Ready.

Rendered SVG will appear here after the contract call returns.
0x

How It Works

The system stores the reusable parts of the art instead of storing 20,000 finished image files. Each token points to the traits it needs, and the renderer assembles the final SVG when it is read.

Token bytesEvery token is represented by 16 one-byte trait IDs.
SVG fragmentsReusable pixel-art fragments are stored for each trait and overlay.
RendererThe renderer reads the bytes, pulls the needed fragments, and returns standard token metadata plus an SVG image URI.

Data Contract

NakamigosArtData is the registry. Each stored byte blob lives in a small bytecode-storage contract, and the registry keeps the pointer address.

tokenTraitChunks[0..19]Each pointer targets 1,000 tokens worth of packed trait IDs.
traitImages[1..186]Each pointer targets one trait SVG fragment.
conditionalImages[1..39]Each pointer targets one conditional overlay SVG fragment.

Renderer Contract

NakamigosRenderer reads the registry, copies stored bytes with extcodecopy, assembles the SVG, and returns the same kind of metadata NFT viewers expect.

imageSVG(tokenId)Returns the raw SVG for a token.
tokenURI(tokenId)Returns base64 JSON metadata. The image field points to the renderer's SVG image URI.