0

I keep getting this error/warning on my vscode when I emit events and build constructors.

enter image description here

or

enter image description here

After a bit of googling I understand it is something about my compiler, since solc <0.4.18 does not support these features. This thread says I have to update truffle to fix this problem. Although, I'm not using truffle at all. I have

"solidity.compileUsingRemoteVersion": "v0.4.25+commit.59dbf8f1",

on my vscode settings and on my terminal I have

> $ solc --version 
> Version: 0.4.25+commit.59dbf8f1.Linux.g++

Would appreciate any help.

  • Please try to compile your contract using solc in terminal and provide the compiler's output. Seems like VS code does not support new syntax (may be you should update it). – Igor Sobolev Aug 14 at 9:11
  • 1
    It works fine. No errors. the normal outcome. There are several outputs depending on the flags, which one do you want? --ast ? --abi? --bytecode? – João Quintanilha Aug 14 at 12:40
  • Which plugin are you using in VS Code? I've Juan Blanco's solidity and it works without issues. – Ismael Aug 14 at 16:07
  • Yes, I'm using the same one. Everything works fine except for this warning. It's wired. It's like syntax checker is trying to use an older version of solc , although I don't know how to change it. Cause I trying changing the setting and it didn't fix the problem. – João Quintanilha Aug 16 at 10:20

Your Answer

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

Browse other questions tagged or ask your own question.