A Python client for accessing PancakeSwap Lottery smart contract information through Web3.py
Project description
PancakeSwap Lottery - Web3 client
A Python client for accessing PancakeSwap Lottery smart contract information through Web3.py.
Documentation
from pancakeswap_lottery import Lottery
lottery = Lottery()
Current lottery
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
Past lotteries (with 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
Past lotteries (with 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pancakeswap-lottery-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfd03f07679332bf24d4540a50cea957d4007fb6883f2ac890e82c24d3e76ed4 |
|
MD5 | 29f6a845cbc62251309035c29d4e8b33 |
|
BLAKE2b-256 | 7d694dd5213581da5277d324270d9da359eeb05558c9b1dd910d887e1f37b326 |
Close
Hashes for pancakeswap_lottery-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79359fce0ffdd6538b400f71d240d4eeffb4a164c828fc40613e5ca8a403fe6a |
|
MD5 | 4a04169db8dbb5837981c2783709a926 |
|
BLAKE2b-256 | 68f65498d09bfe325dd7f4e145c5bcfd8f3131644e449b43c3df44627e31f71a |