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

The EVM version used by the selected environment is not compatible with the compiler EVM version. #15114

Open
Iverson-cui opened this issue May 17, 2024 · 0 comments
Labels

Comments

@Iverson-cui
Copy link

Iverson-cui commented May 17, 2024

Description

I'm using geth to build a private chain and then deploy a smart contract using remix. But when I deploy and call some functions in remix this error comes out"The EVM version used by the selected environment is not compatible with the compiler EVM version." with some "invalid opcode" error. I prefer using geth of version I mentioned below. Can anybody tell me which version of solc is compatible with this version of geth? Or how to solve this problem?

Environment

  • Compiler version: 0.8.18
  • Target EVM version (as per compiler settings): geth 1.10.4
  • Framework/IDE (e.g. Truffle or Remix): remix
  • EVM execution environment / backend / blockchain client: both default and paris environment failed.
  • Operating system: windows

Steps to Reproduce

// Some *minimal* Solidity source code to reproduce the bug.
// This is the file I have tried. It's just a simple test file.
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.18;

contract SimpleStorage {
    uint256 public favoriteNumber;
    struct person {
        uint256 age;
        string name;
    }
    person[] public array_of_people;
    // type is person[], visibility is public and name is "array_of_people
    mapping(string => uint256) public findnum;
    function addperson(string memory _name, uint256 favnum) public {
        array_of_people.push(person(favnum,_name));
        findnum[_name] = favnum;
    }

    function store(uint256 _favoriteNumber) public  {
        favoriteNumber = _favoriteNumber;
    }
    function retrive() view public returns (uint256) {
        return favoriteNumber;
    }
    
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant