Created
February 10, 2020 13:27
-
-
Save jdkanani/1ee97b7657408187ddfdc2b7d7ea4acc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
"github.com/maticnetwork/heimdall/bor" | |
"github.com/maticnetwork/heimdall/helper" | |
) | |
func makeRange(min, max int) []uint64 { | |
a := make([]uint64, max-min+1) | |
for i := range a { | |
a[i] = uint64(min + i) | |
} | |
return a | |
} | |
func main() { | |
seed, _ := hex.DecodeString("") | |
result, err := bor.ShuffleList(makeRange(1, 116), helper.ToBytes32(seed)) | |
if err != nil { | |
fmt.Println(err) | |
return | |
} | |
fmt.Println(result[:20]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment