-
Hi everyone,
It creates a problem, because all the files and my solc is set to 0.8.20. I have tried changing my solc to 0.8.21 or changing each file to ^0.8.20 however it also created more errors. This is the errors i got while changing the versions:
I have ran out of ideas how to repair it and it unables me to continue with the course as i cannot Do you have any idea how to solve it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hello @Trisial, I haven't encountered this error before so it is tough for me to figure out what could be wrong but I asked Gemini Ai and below is what it suggested. The error message you're encountering suggests an issue with the Solidity compiler's internal logic, specifically related to how it handles Natspec documentation. Natspec is a documentation format used in Solidity to describe the purpose, parameters, and return values of contracts and functions. Here's a breakdown of the error and potential solutions:
Troubleshooting Steps:
Example of Incorrect Natspec: contract MyContract {
// Incorrect: Missing closing tag
@notice This is a contract
function myFunction() public {
// ...
}
} Example of Correct Natspec: contract MyContract {
/**
* @notice This is a contract description.
*/
function myFunction() public {
// ...
}
} I hope this helps! If you can provide the specific Solidity code snippet that's causing the error, I might be able to give you more tailored guidance. |
Beta Was this translation helpful? Give feedback.
Hi, thanks for the help. I tried your solution but unfortunately it did not work. However, I managed to solve the issue. I figured out that by cloning the repository it was installing a different version of openzeppelin-contracts than the repo used (v5.1.0), which is why it was not compiling as the newer version used solidity 0.8.21. So I installed the older version of openzeppelin v5.0.0 and it managed to compile.