eth-brownie / brownie

A Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.
https://eth-brownie.readthedocs.io
MIT License
2.63k stars 550 forks source link

brownie defaults to compiling with istanbul for vyper #1613

Open mhorsley30896 opened 1 year ago

mhorsley30896 commented 1 year ago

Environment information

What was wrong?

brownie defaults to compiling with evm_version = "istanbul" for vyper

https://github.com/eth-brownie/brownie/blob/73bb8c02fc4c4f54ea7fca232045a71a8f965d59/brownie/project/compiler/__init__.py#L183

this version is now behind the one used by default for the vyper compiler

this causes brownie compile and vyper compilation bytecode to be different, causing issues with source code verification

How can it be fixed?

Instead of hardcoding the evm_version read the version used by the installed vyper version

dejanko25 commented 1 year ago

Hey, this sounds interesting. I will look into this further.

chanhosuh commented 1 year ago

Vyper's default currently is "paris". I don't believe brownie or ganache supports that. I found this works fine in my case (set in brownie config):

compiler:
  evm_version: berlin
magnetto90 commented 6 months ago

What about solidity? It should also be able to select paris.