Lottery by Ethereum Blockchain

Overview

Lottery by Ethereum Blockchain

Set your web3 provider url in .env

PROVIDER=https://mainnet.infura.io/v3/
   

   

Create your source file ./data/input.txt

For example:

lorem
ipsum
dolor
sit
amet
consectetur
adipiscing
elit
curabitur
curabitur
curabitur
curabitur
ornare
commodo
eros
sed
cursus

Run

$ lottery.py -n <block-number> -p <pick-out>

For example:

$ lottery.py -n 12345678 -p 10
#
# Read `input.txt`:
#  ... lorem
#  ... ipsum
#  ... dolor
#  ... sit
#  ... amet
#  ... consectetur
#  ... adipiscing
#  ... elit
#  ... curabitur
#  ... ornare
#  ... commodo
#  ... eros
#  ... sed
#  ... cursus
#
# --- Pick 10 from 14 ---
#
# Write `output.txt`:
#  #12345678 - 0xb2a8b39935a5eb4b7c9b0117bca06c8d2c0629e0937d20e62c44aace6f05bda3 % 14 =  9 :: ornare
#  #12345679 - 0xac7f164008dd1bdf29c6c8799cb737d41663fa7d3215b38dfee20135c87a12e4 % 14 =  4 :: amet
#  #12345680 - 0x189bad2344f34ac6332e522a2c3aceaa28b4eddee63f842109c67cb16360fc3f % 14 = 13 :: cursus
#  #12345681 - 0x7c9d621ef426c60824a7d5e9871cde3376bcb48f17d1c209d6a6f033f493a090 % 14 =  4
#  #12345682 - 0xb63493b5909cb9aebb7d7bc0078369aee6a8b4c4b6f928d15e6f101f8a8148e3 % 14 =  3 :: sit
#  #12345683 - 0xa22cc64c1bae76698b248b785f0aca52f6a4dc6731dc03c547e2092bfa359b91 % 14 = 11 :: eros
#  #12345684 - 0x5b1ba21686f1857970066a65f3f188c8b5b908c9abb786b5d69120c06f307f4f % 14 =  3
#  #12345685 - 0x8365b9c5db946eab0256bb222b1c8b9d2ff5b85cd43757dc14d45d5a52fc181c % 14 =  8 :: curabitur
#  #12345686 - 0xc013b70b96bc64f3cdcc14ce641889e48d4a24b1cb36afb5193521cf6a748e82 % 14 =  8
#  #12345687 - 0x7f5aead9d7bed1c727169eaefdf9f42f1364f3157b3a37d5b9509b3c8e9de3df % 14 =  3
#  #12345688 - 0xfd9e556381a0fb3b6334f0557bf63bd6255a8200839145686b49afc5148b45d7 % 14 =  1 :: ipsum
#  #12345689 - 0xb96530735699884090fbf9b52a12dd5db35fd26cc98c207a87b766b62ae39805 % 14 =  7 :: elit
#  #12345690 - 0x405ce038cd88d623ae37b788141b7ff598c1de2ee59884c647be467a0834c129 % 14 =  3
#  #12345691 - 0xff8792d8378fa1910fa543f467eaa6d00e6a662fcf11a061e30cb7c686967d02 % 14 =  2 :: dolor
#  #12345692 - 0x17884860627988547dc6d9d2789c4259df1cd9f12e30bb864fe525fbcde4852b % 14 =  7
#  #12345693 - 0x74778bb54485899a5aa3fad9f9f4f14290d02c9b84f137142e4c604310c4b156 % 14 =  4
#  #12345694 - 0x254ba055bd867281a872d4df639ef6af99671c0f7a430d3cdc972ae2954c8a5e % 14 =  6 :: adipiscing

Then

You will get a ./data/output.txt and a ./data/log.txt

./data/output.txt

amet
cursus
sit
eros
curabitur
ipsum
elit
dolor
adipiscing
commodo
Owner
John Torres
John Torres
😈 Shining is a tool that enables engineers to remotely pull smart contract code in multi-file situations.

👑 Shining 😈 Shining is a tool that enables engineers to remotely pull smart contract code in multi-file situations. Shining is the name of one of my

xxxeyJ 15 Jun 17, 2022
Python program that handles the creation, encryption and storage of log/journal files. Kinda works like a diary of sorts.

LucaSoft J.O.U.R.N.A.L The J.O.U.R.N.A.L (Just anOther User Redaction & Navigation Assistant by Lucaspec72) is a Python program that handles the creat

Lucaspec72 8 Oct 27, 2021
Python-RSA is a pure-Python RSA implementation.

Pure Python RSA implementation Python-RSA is a pure-Python RSA implementation. It supports encryption and decryption, signing and verifying signatures

Sybren A. Stüvel 418 Jan 04, 2023
Vhost password decrypt for python

vhost_password_decrypt Where is symkey.dat Windows:C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx\ssl\symkey.dat Linux:/etc/vmware-vpx/ssl/symkey.

Jing Ling 152 Dec 22, 2022
The Intelligent Bitcoin Miner, Part II

The Intelligent Bitcoin Miner, Part II At a Glance This app simulates the behavior and profitability of Bitcoin miners for The Intelligent Bitcoin Min

Karim Helmy 20 Dec 16, 2022
Accounting Cycle Program with Blockchain Component

In the first iteration of my accounting cycle program, I talked about adding in a blockchain component that allows the user to verify the inegrity of

J. Brandon Walker 1 Nov 29, 2021
Python implementation of a blockchain.

The goal of this project is to explain and to make clearer how is a blockchain structured at the very core. It's not built with the intention to replicate an advanced blockchain like Bitcoin or Ether

Rahul raikwar 5 Jan 28, 2022
A repository for Algogenous Smart Contracts created on the Algorand Blockchain.

Smart Contacts This Repository is dedicated to code for Alogrand Smart Contracts using Choice Coin. Read Docs for how to implement Algogenous Smart Co

Choice Coin 3 Dec 20, 2022
Simple python program to encrypt files with AES-256 encryption

simple-enc Simple python program to encrypt files with AES-256 encryption Setup First install "pyAesCrypt" using pip. Thats it! Optionally you can add

Hashm 2 Jan 19, 2022
Tutela: an Ethereum and Tornado Cash Anonymity Tool

Tutela: an Ethereum and Tornado Cash Anonymity Tool The repo contains open-source code for Tutela, an anonymity tool for Ethereum and Tornado Cash use

TutelaLabs 96 Dec 05, 2022
Hyval will store your information encrypted and decrypt it when needed

Hyval will store your information encrypted and decrypt it when needed

soroush safari 3 Oct 31, 2021
Blockchain Python Implementation

Blockchain Python Implementation

0918nobita 2 Nov 21, 2021
Encrypt Your Script Python

EncryptScritpPY Encrypt Your Script Python This Script For Encrypt Your File Python Tutorial Install [+] Open Termnal [+] Type: git clone https://gith

1 Oct 07, 2021
Simple one-time pad (OTP) encryption

Introduction What you will make In this resource you will learn how to create and use an encryption technique known as the one-time pad. This method o

Rabih ND 6 Nov 06, 2022
Zero-dependency Cryptography Python Module with a self made method

TesohhCrypt TesohhCrypt is a zero-dependency Cryptography Python Module, with a method that i made. (likely someone already made a similar one, but i

Simone Tesini 1 Oct 26, 2021
Python App To Encrypt Data (image, text, all data)

Python App To Encrypt Data (image, text, all data)

1 Oct 29, 2021
Algo-burner - Burner account for the Algorand blockchain

algo-burner Burner address for Algorand's blockchain Apparently it was a problem

1 Jan 12, 2022
Tool to compare smart contracts source code

smartdiffer Tool to compare smart contracts source code. Heavily relies on API of Etherscan and Diffchecker. Installation pip install smartdiffer API

Roman Moskalenko 23 Nov 16, 2022
一个关于摩斯密码解密与加密的库 / A library about encoding and decoding Morse code.

Morsecoder By Lemonix 介绍 一个关于摩斯密码解密与加密的库

Heat Studio 10 Jun 28, 2022
Certbot is EFF's tool to obtain certs from Let's Encrypt and (optionally) auto-enable HTTPS on your server.

Certbot is EFF's tool to obtain certs from Let's Encrypt and (optionally) auto-enable HTTPS on your server. It can also act as a client for any other CA that uses the ACME protocol.

29.5k Dec 31, 2022