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

Pragma Statement Warning on New Hardhat Installation #5202

Closed
JF0001 opened this issue May 13, 2024 · 2 comments
Closed

Pragma Statement Warning on New Hardhat Installation #5202

JF0001 opened this issue May 13, 2024 · 2 comments
Assignees
Labels
status:needs-more-info There's not enough information to start working on this issue

Comments

@JF0001
Copy link

JF0001 commented May 13, 2024

I have completed a new installation of Hardhat.
In the hardhat.config.js file, I have this code:
module.exports = { solidity: "0.8.24", };

While in the default Lock.sol contract, which is created during the installation, I have this pragma statement:
pragma solidity ^0.8.24;

However, I am getting the following warning on my pragma statement:
"Source file requires different compiler version (current compiler is 0.8.19+commit.7dd6d404.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version(5333)"

Originally posted by @JF0001 in #5201

@JF0001 JF0001 changed the title I have completed a new installation of Hardhat. Pragma Statement Warning on New Hardhat Installation May 13, 2024
@kanej
Copy link
Member

kanej commented May 13, 2024

Hey @JF0001, I have created a fresh project with v2.22.3 of Hardhat. But I have found no warning.

Is this a warning that appears on npx hardhat compile? Or shows up inline in your editor? If its in the editor, which plugin/extension do you use?

@kanej kanej added status:needs-more-info There's not enough information to start working on this issue and removed status:triaging labels May 13, 2024
@JF0001
Copy link
Author

JF0001 commented May 14, 2024

Hi @kanej The issue was with VS Code. It was set to use the "latest" version of Solidity, but it actually wasn't for some reason. After fixing the problem, the error has gone away. This "issue" may be closed. Thank you.

@JF0001 JF0001 closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:needs-more-info There's not enough information to start working on this issue
Projects
Archived in project
Development

No branches or pull requests

2 participants