'Workings of web3.EthereumTesterProvider()?
Reading the web3.py docs, there are 3 providers, namely HTTPProvider, IPCProvider and WebsocketProvider.
Following the quickstart guide on deploying contracts, what does the following line do:
w3 = Web3(Web3.EthereumTesterProvider())
I could not find much information on Web3.EthereumTesterProvider(), is it different from the 3 providers mentioned above? If so, how?
Solution 1:[1]
You can find info here https://web3py.readthedocs.io/en/stable/providers.html
EthereumTesterProvider
WarningExperimental: This provider is experimental. There are still significant gaps in functionality. However it is being actively developed and supported.
classweb3.providers.eth_tester.EthereumTesterProvider(eth_tester=None) This provider integrates with the eth-tester library. The eth_tester constructor argument should be an instance of the EthereumTester or a subclass of BaseChainBackend class provided by the eth-tester library. If you would like a custom eth-tester instance to test with, see the eth-tester library documentation for details.
from web3 import Web3, EthereumTesterProvider
w3 = Web3(EthereumTesterProvider())
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | TylerH |
