Skip to main content

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.

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 web3.py)

Install

Latest stable release:

pip install pyetheroll

Development branch:

pip install --process-dependency-links \
https://github.com/AndreMiras/pyetheroll/archive/develop.zip

Metadata

Release files for etheroll 20200320

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for etheroll 20200320
File Size Uploaded
etheroll-20200320.tar.gz 9.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for etheroll 20200320
File Interpreter ABI Platform
etheroll-20200320-py3-none-any.whl Python 3 none any Details

Total release size: 22.0 kB

Release files / etheroll-20200320.tar.gz

Download URL etheroll-20200320.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dfe641beed3b72273b44f342d9bc37108b4c5852684258a61c8c2e560b92e40e
BLAKE2b-256 checksum
How to use checksums
b94e92af4a8d11ff0d3470693af41cdb24a7eb1bf267c84d2d66b4ed51410afa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.9

Release files / etheroll-20200320-py3-none-any.whl

Download URL etheroll-20200320-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad80a101019c5b1d1cb375fef980de317dc14f66b3e255f9ce971454b4aa3e42
BLAKE2b-256 checksum
How to use checksums
c082c7e219c18b795181e8c2c18444e4759f59bb0eeae358fb65a20c6ccfeb2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.9

Release history Release notifications | RSS feed

This release

20200320 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page