Skip to main content

Python library to Etheroll smart contract

Project description


Build Status Coverage Status PyPI version Documentation Status

Python library to Etheroll smart contract


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/

API keys

Both Etherscan and Infura require API keys which are retrieved from the following environment variables:

  • ETHERSCAN_API_KEY (consumed by pyetheroll directly)
  • WEB3_INFURA_PROJECT_ID (consumed by


Latest stable release:

pip install pyetheroll

Development branch:

pip install --process-dependency-links \

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyetheroll, version 20200527
Filename, size File type Python version Upload date Hashes
Filename, size pyetheroll-20200527-py3-none-any.whl (12.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pyetheroll-20200527.tar.gz (10.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page