matter-labs / foundry-zksync

Fork of Foundry tailored for zkSync environment
Apache License 2.0
296 stars 129 forks source link

Enable supressedErrors and supressedWarnings in zksolc #633

Open uF4No opened 1 week ago

uF4No commented 1 week ago

Component

Forge

Describe the feature you would like

in Hardhat we have this setting in zksolc to disable some errors thrown from the compiler, like when contracts use transfer or tx.origin:

zksolc:{
    settings:{
      suppressedErrors:["sendtransfer", "txorigin"]
    }
  },

This is passed to the zksolc compiler json input.

I have not found any setting in the config to enable this.

Additional context

Some projects fail to compile without this feature as the compiler sometimes throws these errors as false positives

Szczepoo13 commented 1 week ago

bump

dutterbutter commented 1 week ago

@elfedy can you look to include the argument to zksolc to configure suppressing errors / warnings as described here.

dutterbutter commented 1 week ago

@uF4No PR is progress here: https://github.com/Moonsong-Labs/compilers/pull/33

elfedy commented 1 week ago

@dutterbutter sure, this will be included in compilers v0.11.4 so will work on this after the dependency update that includes that version