Pardon me, but am a novice to blockchain programming.

Having followed several tutorials on how to use The OpenZeppelin library to quicken the solidity development process, I cant seem to shake this following error message:

ParseError: Function, variable, struct or modifier declaration expected. What am I doing wrong? enter image description here

Find below my code:

// SPDX-License-Identifier: MIT

pragma solidity >=0.7.0 <0.9.0;

import "https://github.com/OpenZeppelin/openzeppelin- 

contract cryptoTest is ERC721 {

constructor() ERC721("SirNobble in the house", "SNB") public {};


ParseError: Function, varialbe, struct or modifier declaration expected.

Looking forward to your help!

  • Please include the code and not an screenshot, we cannot see the full ingeritance line
    – Julissa DC
    Feb 1, 2022 at 13:24
  • 1
    @JulissaDC done
    – SirBT
    Feb 1, 2022 at 13:31

2 Answers 2


The reason for the error is the semicolon after the constructor function definition.

constructor() ERC721("SirNobble in the house", "SNB")  {


This should work. Also, the public keyword is not required for the constructor.


Solidity is just complaining about the semicolon after your function body. Please delete it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.