trufflesuite / truffle-compile

Compiler helper and artifact manager
22 stars 46 forks source link

Expose evmVersion as an option #72

Closed axic closed 6 years ago

axic commented 6 years ago

Recent compiler versions introduced evmVersion as a setting in the JSON. If the field is missing, it defaults to byzantium which enables the use of returndatacopy. This has caused some issues with non-compliant ERC20 token contracts (see https://github.com/ethereum/solidity/issues/4116 for more).

Other options include homestead, spuriousDragon and tangerineWhistle. It would make sense to support this option so that those requiring it could resort to the old, unsafe, behaviour.

axic commented 6 years ago

@cgewecke @gnidan I think this is now supported based on the two merged PRs?

cgewecke commented 6 years ago

@axic Apologies, missed this. It looks like we'll be releasing on Monday.

As a side-note - we moved all the truffle modules into a monorepo at trufflesuite/truffle this week. This repo is going to be archived and all the issues will be tracked in one place over there ;)

axic commented 6 years ago

Did this make it into one of the releases yet in the 4.x series? 😉

gnidan commented 6 years ago

@axic yep, looks like this went out with v4.1.12!

axic commented 6 years ago

Great thanks!

axic commented 5 years ago

@gnidan sorry to ask in this place, but how can this be used in the configuration?

gnidan commented 5 years ago

sorry to ask in this place, but how can this be used in the configuration?

At compilers.solc.settings.evmVersion. See docs here

axic commented 5 years ago

Thank you, that's great!