OGCATS randomization notes

future of OGCATS
package main

import (

const chainlinkRandomNumber = "33481218050282424732010044081128699987812287782893023053970080888682140917516"

//max int64 -> random number from chainlink will be cut to 18 digits
//9223372036854775807 -> this is max int64 in go, as max value for 'seed'
func main() {
fmt.Printf("running script at @ unix nano %d\n", time.Now().UnixNano())

//chainlinkRandomNumber is too big, get the first 18 digits
seedStr := chainlinkRandomNumber[0:18]
seed, err := strconv.ParseInt(seedStr, 10, 64)
if err != nil {


var nftIDs []int
for i := 1; i <= 1000; i++ {
nftIDs = append(nftIDs, i)

rand.Shuffle(len(nftIDs), func(i, j int) {
nftIDs[i], nftIDs[j] = nftIDs[j], nftIDs[i]

printToFile("shuffled.txt", nftIDs)

func printToFile(filePath string, values []int) {
f, err := os.Create(filePath)
if err != nil {
defer f.Close()
for _, value := range values {
fmt.Fprintln(f, value) // print values to f, one per line

Crypto / Security… mostly

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Deploying Angular 9 ivy packages

RelayHooks vs. RelayContainers

Using the async-hooks API to integrate Envoy with our RPC library — Part I

How to use firebase with react app

Architect a Blockchain Supply Chain Solution Part B Project FAQ — Udacity Blockchain

Install Bulma into React.js

Install Bulma into React.js


Comparing 5 Node.js Logging Libraries for You To Make the Optimal Choice

Wood logs

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
Xyz Zyx

Xyz Zyx

Crypto / Security… mostly

More from Medium

NFT (ERC721) with Physical Asset Delivery and Secondary Royalties (ERC2981)

Deploying an IPFS-backed NFT

Interaction between Smart Contracts

Deploying a Smart Contract and Selling NFTs