Skip to content

Instantly share code, notes, and snippets.

View jjyr's full-sized avatar
🌊
Stay foolish

jjy jjyr

🌊
Stay foolish
View GitHub Profile
@jjyr
jjyr / lottery.py
Created November 6, 2019 08:54 — forked from Mine77/lottery.py
Lottery Program for Nervos CKB Mining Competition (6/15 - 6/28)
from hashlib import sha256
# the seed here is only an example.
# The seed for the lottery (of Nervos CKB Minning Competition between 6/15 and 6/28) will be the block hash of the block of height N.
# Here is the sha256 hash of the sentence that contains the information of N:0x24f7501665d4f59b7f65c0853f8dd2a68fe528d345ffe63721f391eec711c190
# Update: The message is "N = 77". According to the competition result, the block hash of height 77 is 0x73ba270324ee87ed8990acbc316380c584dea21a1b8b87f4e8c363595e08225f
seed = "0x73ba270324ee87ed8990acbc316380c584dea21a1b8b87f4e8c363595e08225f"
# This is the number of the participants in total.
# The number here should be replaced with the actual number after the competition conclude.