Running 'scripts\deployFundMe.py::main'...
Active network is development
Deploying Mocks...
File "C:\Users\Siddique, line line, in in
return_value, frame = run(
File "C:\Users\Siddique, line line, in in
return_value = f_locals[method_name](*args, **kwargs)
File ".\scripts\deployFundMe.py", line 19, in main
deploy()
File ".\scripts\deployFundMe.py", line 10, in deploy
aggregator = MockV3Aggregator.deploy(18, 2000000000000000, {'from':get_account()})
File "C:\Users\Siddique, line line, in in
return tx["from"].deploy(
File "C:\Users\Siddique, line line, in in
receipt, exc = self._make_transaction(
File "C:\Users\Siddique, line line, in in
tx = _apply_fee_to_tx(tx, gas_price, max_fee, priority_fee)
File "C:\Users\Siddique, line line, in in
base_fee = Chain().base_fee
File "C:\Users\Siddique, line line, in in
return Wei(block.baseFeePerGas)
AttributeError: 'AttributeDict' object has no attribute 'baseFeePerGas'
Terminating local RPC client...
getBlock function of web3.py does not have any attribute baseFeePerGas
[see docs](https://web3py.readthedocs.io/en/v5/web3.eth.html?highlight=getBlock#web3.eth.Eth.getBlock)
Note:- The mocks are deployed once you start the local chain through ganache-GUI and NOT with ganache-cli. Assuming that the GUI defines some kind of base fee for transactions which cli do not.
Environment information
brownie
Version: 1.19.3ganache-cli
Version: 6.12.2solc
Version: ^0.6.0What was wrong?
brownie run scripts/deployFundMe.py
def deploy(): print(f'Active network is {network.show_active()}') if network.show_active()!='development': priceFeedAddress = config['networks'][network.show_active()]['priceFeed'] else: print('Deploying Mocks...') aggregator = MockV3Aggregator.deploy(18, 2000000000000000, {'from':get_account()}) print('Mocks deployed') priceFeedAddress = aggregator.address
def main(): network.priority_fee('1.5 gwei') deploy()
Brownie v1.19.3 - Python development framework for Ethereum
BrownieProject is the active project.
Launching 'ganache-cli.cmd --accounts 10 --hardfork istanbul --gasLimit 12000000 --mnemonic brownie --port 8545'...
Running 'scripts\deployFundMe.py::main'... Active network is development Deploying Mocks... File "C:\Users\Siddique, line line, in in return_value, frame = run( File "C:\Users\Siddique, line line, in in return_value = f_locals[method_name](*args, **kwargs) File ".\scripts\deployFundMe.py", line 19, in main deploy() File ".\scripts\deployFundMe.py", line 10, in deploy aggregator = MockV3Aggregator.deploy(18, 2000000000000000, {'from':get_account()})
File "C:\Users\Siddique, line line, in in return tx["from"].deploy( File "C:\Users\Siddique, line line, in in receipt, exc = self._make_transaction( File "C:\Users\Siddique, line line, in in tx = _apply_fee_to_tx(tx, gas_price, max_fee, priority_fee) File "C:\Users\Siddique, line line, in in base_fee = Chain().base_fee File "C:\Users\Siddique, line line, in in return Wei(block.baseFeePerGas) AttributeError: 'AttributeDict' object has no attribute 'baseFeePerGas' Terminating local RPC client...