1

When I try to use brownie to compile my solidity code on VS Code using brownie compile, it throws an error, saying my contract should be labeled as an abstract. However, the parser is not recognizing my constructor:

constructor(address _VFRCoordinator, address _LinkToken, bytes32 _keyhash) public 

This is what I am typing but VSCode is telling me that the first "(" is incorrect, by saying

"Expected Identifier but got "LParen"

Is there any way to fix the parser. What Solidity extension should I be using to write code on VSCode?

Edit: It seems that issue has resolved itself when I messed around with the code some more. I think it was an issue of my compiler version not matching the version of code I specifying. Now however, I get this issue:

enter image description here

with the code:

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";

I am on solidity 0.8.9

1
  • Thanks for making this! Could you add a screenshot of where vscode is error? I normally tell people to not but in this case I'm not exactly sure what you're seeing. Oct 26 '21 at 18:35
0

I am using WebStorm IDE. Solidity plugin is working, you can try.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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