Reputation: 1
I am trying to write a smart contract and line 1 is bringing up an error : ParserError: Found version pragma, but failed to parse it. Please ensure there is a trailing semicolon. --> contracts/Mycontract.sol:1:1: | 1 | pragma solidity ^.0.8.1; |
I already have a semi colon in the contract what am I missing here? I am attemping this on the browser in Remix.
Upvotes: 0
Views: 1719
Reputation: 129
The correct format for first line for importing pragma shall be like
pragma solidity ^0.5.2;
Upvotes: 1
Reputation: 43571
You have a syntax error.
The correct format is ^0.8.1
(no dot after the caret ^
).
Upvotes: 0