No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A smart contract that enables a raffle/lottery on the Neo block chain. Surprisingly tricky.

Send GAS, win GAS!

The contract on TestNet is: AGbcQUTrFbK7xSJeUZgFHLVAxXE9R3RiKf

Here's an example round:


Ticket #1: e09083d2ac634092d2fc31ca56f8750fbd70749ba7944358f1054e3a040ebb6f 2.5 GAS

Ticker #2: 03dfeb213d99593a3c9666520c9e28cc24133224c969e7bb03504b0a248e93a6 3 GAS

Ticket #3: 4f918745534f3aac4af071fa0957028cfa53d3ca2cc3a85af5982ee0d7372007 1 GAS

The Drawing

The drawing happens in two steps, first a sweep transaction sweeps all the tickets into one transaction that gets sent back the contract address. This TXID is used as a parameter to invoke the contract's "drawing" operation, where the winner is picked from the sweep's inputs and saved in storage.

The Payout!

Winner was AYnmjohQjxiV9TRVjKTYZW9dth9YZJvy5B with 5.5 GAS (6.5 less the rake, capped at 1 GAS).