-1

I've deployed that contract to rinkeby, and now I am trying to deploy to mumbai with no success.

  from brownie import Bbum, accounts, config, network


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

this is the code I'm using to deploy. I just changed the command to polygon-test from rinkeby.

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 8, in main
    deployed_contract = Bbum.deploy({"from": dev})
  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 752, in _make_transaction
    exc = VirtualMachineError(e)
  File "C:\Users\Omer\AppData\Local\Programs\Python\Python310\lib\site-packages\eth_brownie-1.17.2-py3.10.egg\brownie\exceptions.py", line 96, in __init__
    raise ValueError(exc["message"]) from None
ValueError: transaction underpriced
OmerS
  • 153
  • 2
  • 9

1 Answers1

0

So after some digging I found the answer solved when adding "priority_fee" next to account address when I deployed the contract

deployed_contract = Bbum.deploy({"from": dev, "priority_fee": 35000000000})

yet, I just inserted random fee. how can I get the minimal fee required for the transaction?

see same problem explanation here

OmerS
  • 153
  • 2
  • 9