You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running 'scripts/deployment_v2.py::main'...
Transaction sent: 0x56c5e5dd7826e1460f0ff79aa81f0fa30d3bd07e39c7a5c704faedc456bac0f1
Gas price: 30.0 gwei Gas limit: 1245447 Nonce: 6
Waiting for confirmation... Exception in thread Gas strategy 0x56c5e5dd7826e1460f0ff79aa81f0fa30d3bd07e39c7a5c704faedc456bac0f1:
Traceback (most recent call last):
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/mikewelsh/.local/pipx/venvs/eth-brownie/lib/python3.8/site-packages/brownie/network/gas/bases.py", line 65, in _loop
gas_price = next(gas_iter)
File "/Users/mikewelsh/.local/pipx/venvs/eth-brownie/lib/python3.8/site-packages/brownie/network/gas/strategies.py", line 77, in get_gas_price
last_gas_price = min(int(last_gas_price * self.increment), self.max_gas_price)
ValueError: invalid literal for int() with base 10: '30 gwei'
I tried to deploy a contract to mainnet with with the following...
brownie run scripts/deployment_v2.py --network mainnet
deployment_v2.py
from brownie import MyContract, accounts, config, network
from brownie.network.gas.strategies import GasNowStrategy
from brownie.network.gas.strategies import GasNowScalingStrategy
from brownie.network.gas.strategies import LinearScalingStrategy
from brownie.network import gas_price
def main():
gas_strategy = LinearScalingStrategy("30 gwei", "30 gwei", 1)
gas_price(gas_strategy)
acct = accounts.add(
config["wallets"]["from_key"]
)
contract = MyContract.deploy(
{"from": acct},
)
return contract
How can it be fixed?
I don't know how Brownie interprets gwei into int, but I suspect that's where it's failing. Happy to create a PR if you can point me to where the interpretation or type definition is for gwei
The text was updated successfully, but these errors were encountered:
Environment information
brownie
Version: 1.14.6ganache-cli
Version: 6.12.2solc
Version: x.x.xWhat was wrong?
I tried to deploy a contract to mainnet with with the following...
brownie run scripts/deployment_v2.py --network mainnet
deployment_v2.py
How can it be fixed?
I don't know how Brownie interprets gwei into int, but I suspect that's where it's failing. Happy to create a PR if you can point me to where the interpretation or type definition is for gwei
The text was updated successfully, but these errors were encountered: