metamask turn on is required (done this way for easy check, "nostyle"-style)
https://block-soft.github.io/luckyLottery/index.html
-
create public / private rsa key for chats
-
create lottery (and you will be the owner)
-
change metamask account to player and reload
-
buy tickets (and you will be the player)
-
wait till all tickets will be sold (reload with different accounts)
-
got winner after lottery finish (any account could fire)
-
send message to lottery owner from winner account (only winner or owner could chat in lottery contract)
-
unfreeze lottery owner money (only winner could do)
-
actually get lottery money (any account could fire - but will directly to owner)