0

When I'm using GasNowStrategy("fast") in my contract deployment I get an error:

    from brownie.network.gas.strategies import GasNowStrategy


def main():
    dev = accounts.add(config["wallets"]["from_key"])
    print(dev)
    print(network.show_active())
    deployed_contract = Bbum.deploy(
        {"from": dev, "gas_price": GasNowStrategy("fast")}
    )

What is the problem here?

the error:

  File "C:\Users\Omer\AppData\Local\Programs\Python\Python310\lib\site-packages\eth_brownie-1.17.2-py3.10.egg\brownie\_cli\run.py", line 51, in main
    return_value, frame = run(
  File "C:\Users\Omer\AppData\Local\Programs\Python\Python310\lib\site-packages\eth_brownie-1.17.2-py3.10.egg\brownie\project\scripts.py", line 103, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File ".\scripts\deployERC.py", line 9, in main
    deployed_contract = Bbum.deploy({"from": dev, "gas_price": GasNowStrategy("fast")})
  File "C:\Users\Omer\AppData\Local\Programs\Python\Python310\lib\site-packages\eth_brownie-1.17.2-py3.10.egg\brownie\network\contract.py", line 531, in __call__
    return tx["from"].deploy(
  File "C:\Users\Omer\AppData\Local\Programs\Python\Python310\lib\site-packages\eth_brownie-1.17.2-py3.10.egg\brownie\network\account.py", line 510, in deploy
    receipt, exc = self._make_transaction(
  File "C:\Users\Omer\AppData\Local\Programs\Python\Python310\lib\site-packages\eth_brownie-1.17.2-py3.10.egg\brownie\network\account.py", line 727, in _make_transaction
    raise VirtualMachineError(e) from None
  File "C:\Users\Omer\AppData\Local\Programs\Python\Python310\lib\site-packages\eth_brownie-1.17.2-py3.10.egg\brownie\exceptions.py", line 93, in __init__
    raise ValueError(str(exc)) from None
ValueError: Expecting value: line 1 column 1 (char 0)

2 Answers 2

0

So, I understood that GasNowStrategy has been shut down, it may be related to domestic regulatory policies. So if anyone encounters this issue, please change to other gas strategy.

0

I'm working on a personal fix, but you are going to have to emulate_fetch_gasnow and the strategies in network.gas.bases under a new script so you can change the endpoint.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.