Open BlinkyStitt opened 2 years ago
Same issue:
$ brownie compile
Brownie v1.19.1 - Python development framework for Ethereum
Compiling contracts...
Solc version: 0.8.16
Optimizer: Enabled Runs: 200
EVM Version: Istanbul
CompilerError: solc returned the following errors:
TypeError: "basefee" is not supported by the VM version.
Error message from: https://github.com/ethereum/solidity/blob/2ddb26ad96e851e55c57c90d4841967717db4eb8/libsolidity/analysis/TypeChecker.cpp#L3299
Same issue:
$ brownie compile Brownie v1.19.1 - Python development framework for Ethereum Compiling contracts... Solc version: 0.8.16 Optimizer: Enabled Runs: 200 EVM Version: Istanbul CompilerError: solc returned the following errors: TypeError: "basefee" is not supported by the VM version.
Error message from: https://github.com/ethereum/solidity/blob/2ddb26ad96e851e55c57c90d4841967717db4eb8/libsolidity/analysis/TypeChecker.cpp#L3299
Looks like you are set to Istanbul. Can you set your hard fork to London (or later) and try again?
Yes, that worked, thank you.
compiler:
evm_version: london
solc:
version: 0.8.16
optimizer:
enabled: true
runs: 20000
remappings: null
The same issue persists when using module Contract.from_explorer, when writing tests.
How do I change the VM version in input_json
for imported contracts.
For testing I'm importing the Entry point contract from the mainnet "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789".
The same issue persists when using module Contract.from_explorer, when writing tests. How do I change the VM version in
input_json
for imported contracts.For testing I'm importing the Entry point contract from the mainnet "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789".
My brownie config:
project_structure:
build: brownie-build
networks:
default: mainnet-fork
mainnet-fork:
verify: True
cmd_settings:
accounts: 20
account_keys_path: "ganacheaccount.json"
evm_version: "london"
autofetch_sources: True
dependencies:
- OpenZeppelin/openzeppelin-contracts@4.8.3
- uniswap/v3-core@1.0.0
- uniswap/v2-core@1.0.1
- uniswap/v3-periphery@1.3.0
- uniswap/v2-periphery@1.0.0-beta.0
- smartcontractkit/chainlink@2.1.1
- uniswap/v2-periphery@1.0.0-beta.0
compiler:
evm_version: "london"
solc:
optimizer:
enabled: true
runs: 20000
remappings:
- '@openzeppelin=OpenZeppelin/openzeppelin-contracts@4.8.3'
- '@uniswap/v3-core=uniswap/v3-core@1.0.0'
- '@uniswap/v2-core=uniswap/v2-core@1.0.1'
- '@uniswap/v3-periphery=uniswap/v3-periphery@1.3.0'
- '@uniswap/v2-periphery=uniswap/v2-periphery@1.0.0-beta.0'
- '@chainlink=smartcontractkit/chainlink@2.1.1'
Environment information
brownie
Version: 1.18.1solc
Version: 0.8.12What was wrong?
How can it be fixed?
I don't know. Is my compiler version not getting passed through to from_explorer?