OGCATS randomization notes

some notes for about the randomization process in OGCats

future of OGCATS

Random number from Chainlink https://dashboard.tenderly.co/tx/polygon/0xde5e65da5017c7cb852ab7e21aaad54ee638f2cae7d68c4cc1697c59f141cc2b/logs

too big to work with, cut it to 18 decimals. shuffle an array from 0–1000 using it as seed.

code:

returning: 786,555,370,779,622,375,418,816,598,273,905,822,503,130,…. etc

Hash of the original images (unrandomized). Note that the rare ones are first 23!

ipfs://QmUNYwW8Pp89P7QpLR7ZVbf2vxXc5er5Tu9zZ24MgoZEBj

sha256sum random_images/786.jpg

7510500f1f2a51942e50c97c70063be76ee5f81d76f0cbf5165199a33a019bdc random_images/786.jpg

sha256sum images/0.jpg

7510500f1f2a51942e50c97c70063be76ee5f81d76f0cbf5165199a33a019bdc images/0.jpg

match!

since the NFTs start from 1, I moved the 0.jpg/json to 1000.jpg/json (note to self: tweak the script next time)

Q.E.D

PS. Q.E.D. or QED is an initialism of the Latin phrase quod erat demonstrandum, meaning “which was to be demonstrated”. Literally it states “what was to be shown”.[1] Traditionally, the abbreviation is placed at the end of mathematical proofs and philosophical arguments in print publications, to indicate that the proof or the argument is complete.

meaning the randomization process was random and we didn’t keep the rare ones for ourselves.

PS2. Looking for a smart contract audit ? https://to.wtf is the best place to start. Competitive rates and (usually) 24h delivery

--

--

Crypto / Security… mostly

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store