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

Check if Metadata settings match with compiler Standard-JSON settings #1248

Open
kuzdogan opened this issue Jan 8, 2024 · 0 comments
Open

Comments

@kuzdogan
Copy link
Member

kuzdogan commented Jan 8, 2024

In foundry-rs/foundry#6707 I raised it was said that the evmVersion field to metadata was added in 0.8.20 which was only a docs update by me ethereum/solidity@1a23b7a

This although leaves me thinking if it's true that the settings in metadata "Reflects the settings in the JSON input during compilation". Because for example the evmVersion field is not under jsonInput.settings but jsonInput.evmVersion whereas in the metadata this is metadata.settings.evmVersion. In contrast things like optimizer, remappings etc. are under both metadata.settings and jsonInput.settings.

JSON Input docs: https://docs.soliditylang.org/en/v0.8.20/using-the-compiler.html#input-description Metadata docs: https://docs.soliditylang.org/en/v0.8.20/metadata.html Example metadata: https://repo.sourcify.dev/contracts/full_match/11155111/0x2738d13E81e30bC615766A0410e7cF199FD59A83/metadata.json

I am not really sure this line we are using is correct in CheckedContract.ts

  solcJsonInput.settings = JSON.parse(JSON.stringify(metadata.settings));

View in Huly HI-495

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

No branches or pull requests

1 participant