Skip to content

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

Merged
zerosnacks merged 3 commits into
masterfrom
zerosnacks/add-disable-metadata-to-forge-build-cli
Apr 16, 2024
Merged

feat(forge-cli): Add --no-metadata as CLI compiler option #7684
zerosnacks merged 3 commits into
masterfrom
zerosnacks/add-disable-metadata-to-forge-build-cli

Conversation

@zerosnacks

@zerosnacks zerosnacks commented Apr 16, 2024

Copy link
Copy Markdown
Contributor

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
Comment thread crates/cli/src/opts/build/core.rs Outdated
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
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