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

Enhance OpenZeppelin Documentation for Solidity Version Compatibility in Hardhat Projects #392

Open
ThomasCode92 opened this issue Dec 19, 2023 · 0 comments

Comments

@ThomasCode92
Copy link

After installing @openzeppelin/contracts in my Hardhat project, I encountered a VS Code status bar error when importing an OpenZeppelin contract.

Error message
image

Solidity code

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

import '@openzeppelin/contracts/access/Ownable.sol';

Upon investigation, I discovered that the issue originated from my hardhat.config.js, where I had specified Solidity version 0.8.18, while the OpenZeppelin contracts required version 0.8.20. Updating the Solidity version in my configuration resolved the error.

This addition to the documentation would help prevent similar issues for other users and enhance the overall developer experience.
Thank you for considering this suggestion. I would like to make the update to the documantation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant