Skip to content

0xconstant/HashedPermutation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hashed Permutation

Notes

  • No guarantees on randomness properties
  • Use a secure seed
  • Shuffle may overflow if seed > 2^48. Other overflow issues may be present. Be careful.
  • Once seed is revealed, all items are known at once. Do not use for things like drawing cards off a deck where future cards need to remain hidden.
  • ~25k gas per shuffle call, not optimized. Assembly implementation may be possible for optimization.

About

Solidity implementation to deterministically shuffle N items based on a seed and length

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published