Skip to content
Ryu Games NFT Collectibles smart contract on Ontology
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
ontology-python-compiler @ fad563f

Ryu Games NFT Collectibles - Ontology

Ryu Games NFT Collectibles smart contract on Ontology

Ecosystem Overview

The Ryu Games NFT Collectibles smart contract awards players of games using the Ryu SDK with random NFT collectibles. Each collectible is given a non-unique name, and has a randomly generated DNA string. The DNA string is used to generate a color and a rarity for that collectible, as well as attributes determined by the games themselves.

Collectibles are awarded after the end of all matches in the Ryu Ecosystem, including both Ryu Coin and Practice Coin tournaments. They are also awarded for achievements/milestones.

The NFT contract is live on the Ontology mainnet at 1abb5c41911e0cc5d5994035789f483e96617c6c.

Technical Overview

The Ryu Games NFT Collectibles smart contract is developed and deployed on the Ontology blockchain. The contract is an implementation of the Ontology OEP5 Non-fungible Token Standard and the Ontology OEP10 Cross-contract Call Attack Prevention Standard.

DNA String

Each NFT collectible contains a 480-bit DNA string, represented by a 120 character hexadecimal string. Here's an example DNA string:


The first 8 characters are used to determine the color and rarity of the collectible. The first 8 from the example above, ffff00ff, is the hexadecimal representation of the color yellow. It is also given the rarity Uncommon. The remaining 112 characters are reserved for all other attributes, determined by the game developers. It can be used to calculate other UI/UX attributes, as well as statistics for in-game usage.


There are 14 different color combinations available. Each color has a corresponding rarity title and % chance that it is randomly generated:

Color Rarity Percentage
White Common 33%
Red Uncommon 9%
Yellow Uncommon 9%
Blue Uncommon 9%
Orange Rare 8%
Green Rare 8%
Purple Rare 8%
Pink Mega Rare 3%
Black Mega Rare 3%
Sky Mega Rare 3%
Clear Mythical 1%
Rainbow Mythical 1%
Gold Mythical 1%
Random Unique 4%
You can’t perform that action at this time.