Skip to main content

Python library to Etheroll smart contract

Project description

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

Project details


Download files

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

Source Distribution

etheroll-20191018.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

etheroll-20191018-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file etheroll-20191018.tar.gz.

File metadata

  • Download URL: etheroll-20191018.tar.gz
  • Upload date:
  • Size: 9.3 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

Hashes for etheroll-20191018.tar.gz
Algorithm Hash digest
SHA256 08e0a2947bd19258979e8a5fb848c279c31b2c4823688337a74854ba07115111
MD5 d90bcc4d7acefbfee7ccbe92e627a733
BLAKE2b-256 fdc141fdf938e854a84bbe049579ff6c878adb207df063f9ebfa14907a174df7

See more details on using hashes here.

File details

Details for the file etheroll-20191018-py3-none-any.whl.

File metadata

  • Download URL: etheroll-20191018-py3-none-any.whl
  • Upload date:
  • Size: 12.0 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

Hashes for etheroll-20191018-py3-none-any.whl
Algorithm Hash digest
SHA256 734e306f6de12a2047445d00eb71c44f1eb537d2851253e2cebf676d8ed9c252
MD5 51df1f5965c1da7fb8bff6dc53c82289
BLAKE2b-256 56d1cef35d60b42442e66c7071b48725d554336994a878a7ba08e8fdbcb9714f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page