Python library to Etheroll smart contract
Project description
pyetheroll
Python library to Etheroll smart contract
Usage
Simply set bet size, chances and wallet settings before rolling:
from pyetheroll.etheroll import Etheroll
etheroll = Etheroll()
bet_size_ether = 0.1
bet_size_wei = int(bet_size_ether * 1e18)
chances = 50
wallet_path = 'wallet.json'
wallet_password = 'password'
transaction = etheroll.player_roll_dice(
bet_size_wei, chances, wallet_path, wallet_password)
It's also possible to set different contract address and chain ID:
from pyetheroll.constants import ChainID
from pyetheroll.etheroll import Etheroll
chain_id = ChainID.ROPSTEN
contract_address = '0xe12c6dEb59f37011d2D9FdeC77A6f1A8f3B8B1e8'
etheroll = Etheroll(chain_id, contract_address)
Find out more in docs/Examples.md.
Install
pip install pyetheroll
pip install --process-dependency-links \
https://github.com/AndreMiras/pyetheroll/archive/develop.zip
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyetheroll-20191018.tar.gz
(9.9 kB
view details)
Built Distribution
File details
Details for the file pyetheroll-20191018.tar.gz
.
File metadata
- Download URL: pyetheroll-20191018.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 955fe2acf193fd008a02e14363c55f19f189d072d5a1161e3abe365f77c7493d |
|
MD5 | ee058fc76303a838614aa9528d27c7d8 |
|
BLAKE2b-256 | 6652b8a9dbf067b03045235cbf9a8381a71748d1b17db69a9cf962b647c7d150 |
File details
Details for the file pyetheroll-20191018-py3-none-any.whl
.
File metadata
- Download URL: pyetheroll-20191018-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b53d06853c3752ecbceee1a8ed64d87bf90df7310ff1c333bdd09eba3e824d12 |
|
MD5 | a7284e878b7b1bd4ad8dd69a68a930f7 |
|
BLAKE2b-256 | 38d3b9bb3886182ed2240c11d71ca4ed9d711a48d44a020c08ed12f0b53d9685 |