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.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb0b4dd30890dbd42ad65fa34a163870643ff5766f26527983318efeab6076d9 |
|
MD5 | 9fba753b83429afb800e850aa775d75b |
|
BLAKE2b-256 | 22636805c29be8bb0a0d738c8618e2b60df90599a4d66396c6ab0b92c08cbd81 |