COZ has airdropped 10 Puppet NFTs to participating members of the NEOFORCEONE community. The airdrop served as a demonstration of how the Collection prop and SDK can be used to perform fair, transparent sampling from a list on-chain.

Over 100 unique community members registered for the event on Discord by providing a Neo N3 address. COZ shared the code sample which shows how this list of addresses (substituted for hash slices to lower GAS costs) can be passed to the Collection contract for sampling.

Under the hood, Collection sampling makes use of the Dice prop, which wraps the random number generation feature on Neo N3 in order to make it more accessible to developers. The sampleFromRuntimeCollection method used in the example takes a list of options to sample from, a number of options to draw, and a boolean that determines whether or not an option can be selected multiple times.

The execution process occurs on-chain, using the random number from the block the transaction is included in to determine winners in a fair and verifiable manner.

Similarly, any developer can use the Collection prop to store or sample from lists, making it easy to implement various use cases. For example, a list of playing cards could be sampled to implement provably fair card games such as Blackjack on the blockchain.

Developers can get started with Collection or other props at the link below: