Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(forge-cli): Add --no-metadata as CLI compiler option #7684

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Apr 16, 2024

Motivation

Closes #7488

Adds --no-metadata as CLI option, equivalent to passing --no-cbor-metadata --metadata-hash none to solc or defining:

bytecode_hash = "none"
cbor_metadata = false

in foundry.toml.

Solution

Considering the requirement for deterministic builds is common I think it makes sense to add a CLI option that bundles the two as requested.

For comparison between forge build and forge build --no-metadata: https://jsoncompare.com/#!/diff/id=f0200fd7445202aefdf057a353664f29/

Open to feedback, it may make more sense to decouple the two, contrary to the proposal, and allow users to pass --no-cbor-metadata --bytecode-hash="none".

@zerosnacks zerosnacks marked this pull request as ready for review April 16, 2024 14:30
Co-authored-by: DaniPopes <[email protected]>
@zerosnacks zerosnacks merged commit b56176e into master Apr 16, 2024
19 checks passed
@zerosnacks zerosnacks deleted the zerosnacks/add-disable-metadata-to-forge-build-cli branch April 16, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: --disable-metadata as CLI option to forge build
3 participants