Skip to content

ParserError: Source file requires different compiler version #522

Answered by cromewar
gorkemkeles asked this question in Q&A
Discussion options

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

Comment options

You must be logged in to vote
1 reply
@gorkemkeles
Comment options

Answer selected by cromewar
Comment options

You must be logged in to vote
25 replies
@WeTheArtist
Comment options

@cromewar
Comment options

@WeTheArtist
Comment options

@cromewar
Comment options

@cromewar
Comment options

Comment options

You must be logged in to vote
3 replies
@cromewar
Comment options

@WeTheArtist
Comment options

@cromewar
Comment options

Comment options

You must be logged in to vote
1 reply
@cromewar
Comment options

Comment options

You must be logged in to vote
4 replies
@cromewar
Comment options

@WeTheArtist
Comment options

@cromewar
Comment options

@neerajnerlekar
Comment options

Comment options

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