Skip to content

ParserError: Source file requires different compiler version #522

Answered by cromewar
gorkemkeles asked this question in Q&A

You must be logged in to vote

Hello @gorkemkeles it happens when the pragma solidity is not the same as the one your compiler is using, however I wonder which vscode extension are you using? The Solidity extension by Juan Blanco allows to compile different versions as far the one you are using is superior than the required.

also change this:

solidity >=0.6.0 <0.9.0

to this

solidity ^0.6.0

Finally if you have linting warning you could refer to this apart.

Replies: 6 comments 34 replies

You must be logged in to vote
1 reply
@gorkemkeles

Answer selected by cromewar

You must be logged in to vote
25 replies
@WeTheArtist

@cromewar

@WeTheArtist

@cromewar

@cromewar

You must be logged in to vote
3 replies
@cromewar

@WeTheArtist

@cromewar

You must be logged in to vote
1 reply
@cromewar

You must be logged in to vote
4 replies
@cromewar

@WeTheArtist

@cromewar

@neerajnerlekar

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants