connect wallet

Technical details

Smart contract

CRPTL tokens adhere to the ERC-721 standard. It’s incorporating a seed that fully defines the player and metadata necessary for correct display on marketplaces and in wallets. The smart contract provides methods to extract all player characteristics from this seed, such as:
  • First Name
  • Last Name
  • Skill
  • Pace
  • Physical
  • Position
  • Rating
  • Face Seed
The list of names and the neural network are immutable and stored in a decentralized storage (IPFS). Their location is indicated by the path ipfs://bafybeib2eboxq4btyi6op237stmpyobsfhzf5nhfc2mpakbt6vbzdatx2a which is also recorded in the smart contract.
View contract on etherscan

Creating a seed

The seed is a crucial element that defines the entirety of the player. It is generated pseudo-randomly (as there is no true randomness in the Ethereum blockchain) and represented as a 32-byte number

The seed is divided in two parts: the first is used to determine the player's primary characteristics, while the second serves as a starting point for creating the Face Seed.

All of the probabilities and rules that determine how a player's characteristics are formed are unchangeable and recorded in a smart contract. This ensures that the process of creating players remains consistent and transparent.

Face Seed

The seed for the neural network is obtained by invoking the faceSeed( ) method in the smart contract. It is represented as an array that consists of 512 uint8 numbers (0 to 255).
For true-nerds → The faceSeed( ) method extends the part of the seed responsible for face generation in a pseudo-random fashion, enabling the provision of a sufficient amount of data to be used as input for the neural network.
To replicate a player on your computer, simply get the face seed associated with that player and provide it to the downloaded neural network.

AI and creating player’s face

As previously mentioned, the Face Seed serves as the starting point for the neural network. Our modified version of StyleGAN2, licensed under Apache 2.0, generates high-resolution (1024x1024) faces with transparent backgrounds in the PNG format, which is then saved in the NFT's metadata.
For true-nerds → Conventional StyleGANs typically utilize normally distributed initial vectors. However, since the numbers obtained from the token are uniformly distributed, there is a modification in our network's initial layer. This modification involves splitting the initial vector into pairs and performing the Box-Muller transform. The resulting vector of pseudo-random normally distributed values is what determines the player’s face.
CRPTL AI is a deterministic neural network, which means it consistently produces the same output for a given input at any given point in time.
You can download it from IPFS to recreate the player on your machine. Download from IPFS

Creating player card

The CRPTL server performs a series of actions to ensure the correct display of players in wallets and marketplaces:
  1. It takes the player's face generated by the neural network, along with the characteristics obtained from the smart contract, and combines them to create a player card
  2. The player's face and card are then saved in the distributed IPFS storage
  3. All the relevant information about the player, including the IPFS paths, is consolidated and written into the token metadata.
To retrieve the metadata, you can simply call the tokenURI( )

Image storage

As previously mentioned, each CRPTL-NFT contains links to 2 images in its metadata:
  • A face image in PNG format, which is created from the face seed and required to generate the player's card.
  • A card image that is displayed on marketplaces and in wallets.
Both images are stored on the IPFS service, a decentralized and distributed storage system.