vscode-solidity icon indicating copy to clipboard operation
vscode-solidity copied to clipboard

add support to configure `evm_version`

Open zhiqiangxu opened this issue 1 year ago • 4 comments

Foundry can compile successfully but vscode is prompting: Undeclared identifier. Did you mean "blockhash"?(7576):

image

This error is the same error I get from foundry if evm_version is not configured here.

Currently there's no way to configure evm_version for a foundry project:

{
    "solidity.formatter": "forge",
    "solidity.defaultCompiler": "localNodeModule"
}

It would be great if vscode-solidity can read foundry.toml automatically.

Here's the repo that's trigering this issue:

https://github.com/zhiqiangxu/es-op-batchinbox

zhiqiangxu avatar Feb 05 '24 14:02 zhiqiangxu

Added an option on settings now, yes importing from foundry.toml will be ideal

juanfranblanco avatar Feb 07 '24 17:02 juanfranblanco

@zhiqiangxu it is out now

juanfranblanco avatar Feb 13 '24 15:02 juanfranblanco

@juanfranblanco It works great! Is there a plan to import from foundry.toml ?

zhiqiangxu avatar Feb 16 '24 12:02 zhiqiangxu

Yes there is, as the settings import directly, hopefully I get some time to do it soon.

juanfranblanco avatar Feb 17 '24 14:02 juanfranblanco