foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.33k stars 1.76k forks source link

Ability to remove the return value from the console output when executing a script #4806

Open wighawag opened 1 year ago

wighawag commented 1 year ago

Component

Forge

Describe the feature you would like

my tool forge-deploy is currently using the return value of forge scripts (the value returned from the run function call) to export the data it need to synchronise deployments data via the broadcast files.

The amount of data returned can be quite big and this can obfuscate the console output forge generate normally.

Having an option to not display such return data (which ends up in the broadcast file anyway) in the console (irrespective of the verbose flag) would be great

Additional context

No response

zerosnacks commented 4 months ago

Hi @wighawag

forge script includes the --json flag but it currently outputs the JSON result https://github.com/foundry-rs/foundry/issues/7817 amongst all kinds of other output (which is incorrect behavior)

Does your request aim to achieve the same thing? In that case I suggest we move the conversation to https://github.com/foundry-rs/foundry/issues/7817