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
Marketplace but with cryptocurrencies only.

MoneroMarket Marketplace but with cryptocurrencies only. MoneroMarket was created as a way to be able to use cryptocurrencies as an actual currency to

Janoher 35 Jan 01, 2023
A Python script to implement Hill's Cipher Encryption and Decryption.

Hill_Cipher-Encryption_and_Decryption A Python script to implement Hill's Cipher Encryption and Decryption. Initially in the Encryption part, the Plai

Vishvendra Singh 1 Jan 19, 2022
An Etebase (EteSync 2.0) server so you can run your own.

Etebase - Encrypt Everything An Etebase (EteSync 2.0) server so you can run your own. Installation Requirements Etebase requires Python 3.7 or newer a

EteSync & Etebase 1.2k Dec 31, 2022
Privfiles - Encrypted file storage using Fernet with zero Javascript

Privfiles - Encrypted file storage using Fernet with zero Javascript Source code for the onion service: l3n6v6dm63frml22tlmzacnasvp7co7wylu4hhcs34ukxe

Ward 5 Jul 30, 2022
This program can encrypt/ decrypt any string

Ceasar_cipher Hey this is J0ey, this program is a very basic Caesar cipher encoder/decoder. In order to use this program, you will need to have Python

1 Jan 11, 2022
Gold(Gold) is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure

gold-blockchain (Gold) Gold(Gold) is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure. Here are some of

zcomputerwiz 3 Mar 09, 2022
Implementation of Smart Batch Auction for NFT launches on Tezos.

NFT Smart Batch Auction Smart Batch Auctions are an improvement over the traditional first come first serve (FCFS) NFT drops. FCFS design has been in

Anshu Jalan 5 May 06, 2022
Hide secret data within a digital image using good ol' terminal

pystego Hide secret data within a digital image using good ol' terminal Installation The recommended way for installing this package is using, python

Ayush Gupta 1 Jan 06, 2022
This demo is an on-chain NFT auction using smart contracts on the Algorand blockchain.

Algorand Auction Demo This demo is an on-chain NFT auction using smart contracts on the Algorand blockchain. Usage The file auction/operations.py prov

1 Jan 27, 2022
A workshop to build an NFT smart contract on the polygon blockchain

Polygon NFT Workshop This is an interactive workshop that guides you through the steps to deploy an NFT smart contract on the Polygon blockchain. By t

Banjo Obayomi 56 Oct 14, 2022
An BlockChain Based solution for storing the medical records

Blockchain-based Medical Records đź“„ Abstract Blockchain has the ability to keep an incorruptible, decentralized, and transparent log of all patient da

Yuvraj Singh Deora 3 Jan 14, 2022
FileGuard - File crypter and packing utility

FILEGUARD FILEGUARD is a file crypter and packing utility. This project was orig

11 Nov 28, 2022
This is simple Blockchain ,miner and wallet to send crypto using python

pythonBlockchain-SImple This is simple Blockchain ,miner and wallet to send crypto using python It is simple Blocchain so it can only dobasic work usi

3 Nov 22, 2022
SDU experiment of introduction to the cryptography

Lab 01 (2 hrs): Programming Basics Program 1: Type Hint, String, Bytes, Hex, Base64 Lab 02 (4 hrs): Classical Cryptography Part 1 (3 hrs): Program 1:

1 Jan 03, 2022
Python FFI bindings for libsecp256k1 (maintained)

secp256k1-py Python FFI bindings for libsecp256k1 (an experimental and optimized C library for EC operations on curve secp256k1). Previously maintaine

Rusty Russell 29 Dec 29, 2022
A simple key-based text encryption process that encrypts a string based in a list of characteres pairs.

Simple Cipher Encrypter About | New Features | Exemple | How To Use | License ℹ️ About A simple key-based text encryption process that encrypts a stri

Guilherme Farrel 1 Oct 21, 2021
A simple python program to sign text using either the RSA or ISRSAC algorithm with GUI built using tkinter library.

Digital Signatures using ISRSAC Algorithm A simple python program to sign text using either the RSA or ISRSAC algorithm with GUI built using tkinter l

Vasu Mandhanya 3 Nov 15, 2022
CertPy is a high level toolkit for generating x509 (e.g. SSL/TLS/HTTPS) certificates in Python.

CertPy CertPy is a high level toolkit for generating x509 (e.g. SSL/TLS/HTTPS) certificates in Python. Certificate “profiles” are implemented as Pytho

Ryan Castellucci 4 Feb 21, 2022
Simple crypto & blockchain implementation written in Python

JaamoCoin - simple Python blockchain example This is a very simple blockchain example written in Python. Based on this tutorial: https://medium.com/co

Jaakko Alajoki 1 Jan 07, 2022
Generate simple encrypted messages!

Premio's Shift is a very simple text encryption, you can use it to send secret messages to your friends. Table of Content Table of Content How it work

Peterson Adami Candido 3 Aug 06, 2021