Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVM version selection when compiling contracts #11

Open
yarkinwho opened this issue Aug 17, 2023 · 1 comment
Open

EVM version selection when compiling contracts #11

yarkinwho opened this issue Aug 17, 2023 · 1 comment

Comments

@yarkinwho
Copy link

Some developers are encountering problems during contract deployment reporting "Bad Instruction" (my guess is the new PUSH0). Set EVM version to Istanbul when compiling the contract can solve the problem (at least for the case I see).

I believe now latest solidity compilers starts to use this new opcode, it's no longer safe to ignore the EVM version settings. We should add something to docs about this.

@nsjames
Copy link
Member

nsjames commented Oct 11, 2023

We have something about this in the docs already (https://docs.eosnetwork.com/evm/miscellaneous/evm-compatibility#push0-opcode) but the issue is that a lot of the defaults for tooling now use v0.8.20

OpenZeppelin contracts is a prime example.
If you npm i @openzeppelin/contracts without specifying a version, then you will get contracts that are pragma solidity ^0.8.20;

https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants