PancakeSwap Lottery - Web3 client
A Python client for accessing PancakeSwap Lottery smart contract information through Web3.py.
Install
$ pip install pancakeswap-lottery
Documentation
from pancakeswap_lottery import Lottery
lottery = Lottery()
Realtime data
get_issue_index
>>> lottery.get_issue_index()
435
get_total_amount (Prize pool)
>>> lottery.get_total_amount()
34977.25
get_allocation (Prize pool allocation)
>>> lottery.get_allocation()
{'1': 50, '2': 20, '3': 10}
get_total_addresses
>>> lottery.get_total_addresses()
200
get_drawed
>>> lottery.get_drawed()
False
get_drawing_phase
>>> lottery.get_drawing_phase()
False
get_last_timestamp
>>> lottery.get_last_timestamp(epoch=False)
2021-03-27 11:38:49
Historical data (using issue index)
get_total_rewards (Prize pool)
>>> lottery.get_total_rewards(432)
51384.125
get_history_numbers
>>> lottery.get_history_numbers(432)
[2, 13, 7, 3]
get_history_amount (Numers of tickets matched)
>>> lottery.get_history_amount(432)
{'4': 1, '3': 34, '2': 718}
get_matching_reward_amount
>>> lottery.get_matching_reward_amount(432, 3)
34
Historical data (using tokenid)
get_lottery_numbers
>>> lottery.get_lottery_numbers(1328060)
[11, 5, 14, 6]
get_reward_view
>>> lottery.get_reward_view(1328060)
0
Lottery metadata
get_max_number
>>> lottery.get_max_number()
14
get_min_price
>>> lottery.get_min_price()
1
Other
get_cake (CAKE contract address)
>>> lottery.get_cake()
0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82
get_lotteryNFT (PLT-token contract address)
>>> lottery.get_lotteryNFT()
0x5e74094Cd416f55179DBd0E45b1a8ED030e396A1
get_balance_of(address)
>>> lottery.get_balance_of("0xc13456A34305e9265E907F70f76B1BA6E2055c8B")
2673
Metadata
Release files for pancakeswap-lottery 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pancakeswap-lottery-0.1.1.tar.gz | 5.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pancakeswap_lottery-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 kB
Release files / pancakeswap-lottery-0.1.1.tar.gz
| Download URL | pancakeswap-lottery-0.1.1.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f6252c48a3f9ecc7e3a61e76de273b0ace3b18a58149f05cceba3d4024f72e6
|
|
BLAKE2b-256 checksum How to use checksums |
ff25c38b78da67203ad43d179c807e5c9bb9fda4de95379a77bc4c3b91b0af0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.5 CPython/3.8.5 Linux/4.15.0-122-generic
|
Release files / pancakeswap_lottery-0.1.1-py3-none-any.whl
| Download URL | pancakeswap_lottery-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48b2ce6da12c0a483e4e95aff4087c573ab7e9076b450ffa9d3a44adbbdf7fb3
|
|
BLAKE2b-256 checksum How to use checksums |
7bba4454744ff16a0a37f6a030dd86e589eced496f826502a733cd558e46b25f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.5 CPython/3.8.5 Linux/4.15.0-122-generic
|
Security for pancakeswap-lottery 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.