web3research.common
Classes
str(object='') -> str |
|
Address is a class for representing an address. |
|
Hash is a class for representing a hash. |
Functions
|
Get Ethereum web3 endpoint, supports both HTTP and WS protocols. |
|
Package Contents
- web3research.common.get_ethereum_web3_endpoint(endpoint: str = ETH_WEB3_ENDPOINT) web3.Web3 | web3.AsyncWeb3
Get Ethereum web3 endpoint, supports both HTTP and WS protocols. Other ethereum-based chains can also use this function. By default, it uses the endpoint from the environment variable W3R_WEB3_ENDPOINT. If the environment variable is not set, it uses our default endpoint, which is “https://eth.web3resear.ch/v1/mainnet”.
- Args:
endpoint (str): The endpoint URL.
- Returns:
Web3: The web3 instance.
- Parameters:
endpoint (str)
- Return type:
Union[web3.Web3, web3.AsyncWeb3]
- web3research.common.get_tron_web3_endpoint(endpoint: str = ETH_WEB3_ENDPOINT) web3.Web3
- Parameters:
endpoint (str)
- Return type:
web3.Web3