def setup_w3(): genesis_overrides = {"gas_limit": 5500000} custom_genesis_params = PyEVMBackend._generate_genesis_params( overrides=genesis_overrides) pyevm_backend = PyEVMBackend(genesis_parameters=custom_genesis_params) t = EthereumTester(backend=pyevm_backend) w3 = Web3(Web3.EthereumTesterProvider(ethereum_tester=t)) w3.eth.defaultAccount = w3.eth.accounts[0] w3.eth.defaultContractFactory = LinkableContract w3.enable_unstable_package_management_api() return w3
def fresh_w3(): w3 = Web3(Web3.EthereumTesterProvider()) w3.eth.defaultAccount = w3.eth.accounts[0] w3.eth.defaultContractFactory = LinkableContract w3.enable_unstable_package_management_api() return w3