vrona / MetaHackers

100% On-chain NFTs (image 'n' metadata)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MetaHacker

This is 100% (images + metadata) on-chain NFTs. Unique soldier called MetaHacker which pairs up as teams to win cards combination game.

Illustration

MetaHackers representations and layers of svg traits used in this project have been designed by the artist RingoCoco.

The challenge

Creating a DApp which computes and stores on-chain 35 ko (avg.) svg images + metadata.
Some +50 ko images have passed the tests.

The solution

  • ✅ Upload and mapping of the Genes with variations as svgs -on-chain- + Skills | MetaHackerBase,
  • ✅ Creating -on-chain- a unique MetaHacker NFT | MetaHackerFactory,
  • ✅ Storing -on-chain- the MetaHacker's data URL as transaction ID (as input data in bytes format this needs off-chain convertion of data URL as bytes),MetaHackerMotorFactory,
  • ✅ Storing -on-chain- data URL shortened via tokenURI() (OpenSea compliances), MetaHackerMotorFactory,
  • ⭕ To Do developments 🚧
    • -on-chain-
      • Adding 'Polygon Basic Integration and Meta-transactions' OpenSea compliances into MetaHackerFactory,
    • -off-chain-

The details

Generation

Hector(Nazareth),   // Zero
Trinity,            // One
Morpheus,           // Two
AgentSmith,         // Three
Oracle              // Four

Genes see.: Genes

BackgroundColor,    // 4 variations (colors)
BodyColor,          // 4 variations (colors)
BackgroundShape,    // 1 variation (shape)
BodyShape,          // 1 variation (shape)
Eyesbrows,          // 6 variations (shapes)
Mouth,              // 7 variations (shapes)
Hair,               // 4 variations (shapes) down version (full: 6)
Glasses,            // 3 variations (shapes) down version (full: 6)
Clothes             // 5 variations (shapes)

Ranking

Privates,   // supply 1000 with Boost = 0%
Captains,   // supply 100  with Boost = +5%
Colonels,   // supply 10   with Boost = +10%
General     // supply 1    with Boost = +20%

Hector Nazareth: Generation 0
Skills

Bravery,                // 15%
Humor,                  // 5%
Imagination,            // 5%
Intelligence,           // 10%
Leadership,             // 10%
Metaversal,             // 20%
PressureResistance,     // 15%
Social,                 // 0%
Teamworking,            // 5%
Technological           // 15%

MetaHacker DNA

uint256 tokenId
uint256 traithash
uint8 generation
uint8 ranking
Gender gender
uint8 boosts
Skills skills
string dataURLhash
  • traithash: 256 bit hash of the struct (each, 8-bits, slot is a gene which can store a variation of value up to 255), see.: Trait Hash Bitmasking
  • dataURLhash: transaction id that contains dataURL as input data under bytes format.

Architecture

alt text

About

100% On-chain NFTs (image 'n' metadata)

License:MIT License


Languages

Language:Solidity 68.0%Language:JavaScript 18.4%Language:Jupyter Notebook 8.8%Language:Python 3.9%Language:Shell 1.0%