Simple package to access EVM blockchain explorers, currently supports Binance Smart Chain, Ethereum, Avalanche and Polygon
Project description
This package is a simple library to access the blockchain scanners for Ethereum, Binance Smart Chain, Polygon and Avalanche.
getABI(self, address: str)
Takes contract address as a string and returns the json of the ABI
getBalance(self, address: str)
Takes a single address as a string or a list of upto 20 addresses and returns the native token balance(s)
getBlockByTimestamp(self, timestamp: int)
Takes a unix timestamp as an int and turns the block number for that timestamp
getContractCreation(self, address: str)
Takes a single contract address as a string or a list of upto 5 contract addresses and returns the creator wallet and transaction hash as a list of dicts
getInternalTransactionList(self, contract_address: str, address: str, start_block: int = 0, end_block: int = 99999999)
Takes contract_address or wallet address as a string note - one needs to be set to None. Returns all the 'internal' transacations as a list of dicts
getInternalTransactionsByTx(self, tx: str)
Takes a transaction hash as a string and returns the internal transactions as a list of dicts
getSource(self, address: str)
Takes contract address as a string and returns the source code
getTransactionList(self, contract_address: str, address: str, start_block: int = 0, end_block: int = 99999999)
Takes contract_address or wallet address as a string note - one needs to be set to None. Returns all the 'normal' transacations as a list of dicts
getTransactions(self, contract_address: str, address: str, start_block: int = 0, end_block: int = 99999999)
Takes contract_address or wallet address as a string note - one needs to be set to None. Returns all the token transacations as a dict
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
Hashes for BlockChainExplorer-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09ee60ca7aa6b911be7916ca5ddcd3002ff0e2b9cd0547db4e8136c651cbd3c7 |
|
MD5 | 36f63f0b344367401921a8b21fbe2865 |
|
BLAKE2b-256 | 407fd29e2e73b844a1cb073ca15c50b1fd2f2a3cf312ef9e060d0ed5d24425a7 |