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-20191108.tar.gz
(9.9 kB
view hashes)
Built Distribution
Close
Hashes for pyetheroll-20191108-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 739a489f8453404a890001f4ad039ee54df68a7ea4cf6f15184f9d22df455a24 |
|
MD5 | 521bd075dc4a847636a22210a08c40ac |
|
BLAKE2b-256 | 992f2eeb66aeba98ba2ec48e65c9da4d442668235b3b0e8ab9d7b57cb56c3ced |