Skip to content
Python library to Etheroll smart contract
Python Makefile
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
pyetheroll
requirements
tests
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
Makefile
README.md
pyproject.toml
requirements.txt
setup.cfg
setup.py
setup_meta.py
tox.ini

README.md

pyetheroll

Build Status Coverage Status PyPI version Documentation Status

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

Latest stable release:

pip install pyetheroll

Development branch:

pip install --process-dependency-links \
https://github.com/AndreMiras/pyetheroll/archive/develop.zip
You can’t perform that action at this time.