agent0.ethpy.base.web3_setup ============================ .. py:module:: agent0.ethpy.base.web3_setup .. autoapi-nested-parse:: Functions and classes for setting up a web3py interface .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: agent0.ethpy.base.web3_setup.initialize_web3_with_http_provider Module Contents --------------- .. py:function:: initialize_web3_with_http_provider(ethereum_node: eth_typing.URI | str, request_kwargs: dict | None = None, reset_provider: bool = False) -> web3.Web3 Initialize a Web3 instance using an HTTP provider and inject a geth Proof of Authority (poa) middleware. .. note:: The geth_poa_middleware is required to connect to geth --dev or the Goerli public network. It may also be needed for other EVM compatible blockchains like Polygon or BNB Chain (Binance Smart Chain). See more `here `_. :param ethereum_node: Address of the http provider :type ethereum_node: URI | str :param request_kwargs: The HTTPProvider uses the python requests library for making requests. If you would like to modify how requests are made, you can use the request_kwargs to do so. :type request_kwargs: dict | None, optional :param reset_provider: If true, will call anvil_reset before returning the Web3 instance. :type reset_provider: bool, optional :returns: The connected web3 instance :rtype: Web3 .. !! processed by numpydoc !!