uniswap.EtherClient package¶
Submodules¶
uniswap.EtherClient.web3_client module¶
- class uniswap.EtherClient.web3_client.EtherClient(http_url: str | None = None, ws_url: str | None = None, http_async: bool = False, my_address: str | None = None, my_wallet_pass: str | None = None, my_keyfile_json: str | None = None, skip_validation_eth_call: bool = False, cache_chain_id: bool = False, latest_block_based_cache: bool = False)[source]¶
Bases:
objectClient helper to connect to with interact with the Ethereum blockchain. It should work with all supported blockchains under web3.py.
- Parameters:
http_url (str) – URL for HTTPProvider. Required, if ws_url not provided.
ws_url (str, optional) – URL for WSProvider. Required, if http_url not provided.
http_async (bool, optional, default = False) – True for use AsyncHTTPProvider instead of HTTPProvider. By default is False.
my_address (str, optional) – Address of the wallet
my_wallet_pass (str, optional) – Password for the wallet
my_keyfile_json (str, optional) – Secret file encrypted with my_wallet_pass
skip_validation_eth_call (bool, optional, default = False) –
cache_chain_id (bool, optional, default = False) –
latest_block_based_cache (bool, optional, default = False) –
- url¶
URL for web3.providers.rpc.HTTPProvider. Required, if ws_url not provided.
- Type:
str, optional
- ws_url¶
URL for web3.providers.rpc.WSProvider. Required, if url not provided.
- Type:
str, optional
- http_async¶
True for use AsyncHTTPProvider instead of HTTPProvider.
- Type:
bool, default=False
- address¶
Address of the wallet
- Type:
str
- skip_validation_eth_call¶
- Type:
bool, optional, default=False
- cache_chain_id¶
- Type:
bool, optional, default=False
- latest_block_based_cache¶
- Type:
bool, optional, default=False
- _wallet_pass¶
Password for the wallet
- Type:
str, optional
- _keyfile_json¶
Secret file encrypted with self._wallet_pass
- Type:
json, optional
- _w3¶
web3.Web3 instance to interact with the Ethereum blockchain.
- Type:
web3.Web3
- Return type:
- property chain_id¶
Cache the chain id once.
- Type:
int
- property w3: Web3¶
web3.Web3 instance to interact with the Ethereum blockchain.
- Type:
Web3