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.
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
pip install pyetheroll
pip install --process-dependency-links \
https://github.com/AndreMiras/pyetheroll/archive/develop.zip
Metadata
Release files for pyetheroll 20200527
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyetheroll-20200527.tar.gz | 10.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyetheroll-20200527-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / pyetheroll-20200527.tar.gz
| Download URL | pyetheroll-20200527.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af22bd99f6af81d86143a50c1b4ed984005ef8ea100a7851a65f810a975c835b
|
|
BLAKE2b-256 checksum How to use checksums |
e18cee1a60f3bff3ec7d53c5e25191433fdc710f94126b7edf9fde8ec328914a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.1
|
Release files / pyetheroll-20200527-py3-none-any.whl
| Download URL | pyetheroll-20200527-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a785146361a4f1561827a64344c05a9999ac3092b181a4632babc945b2c9930
|
|
BLAKE2b-256 checksum How to use checksums |
8fae39a01653065433baaefde0080c4013a1349f27c6a7e34fccd4596104dafd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.1
|