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

Using immutableReferences in verification #972

Closed
kuzdogan opened this issue Mar 28, 2023 · 0 comments · Fixed by #973
Closed

Using immutableReferences in verification #972

kuzdogan opened this issue Mar 28, 2023 · 0 comments · Fixed by #973
Assignees

Comments

@kuzdogan
Copy link
Member

kuzdogan commented Mar 28, 2023

We haven't really been aware that the compiler outputs a field called immutableReferences, which shows where exactly the values of the immutable variables are stored in the runtime bytecode. By leaving out these fields we can basically verify any contract with immutables.

This could eliminate the need for different types of verification like "simulation" etc. Additionally we would no longer need the extra information msg.sender etc. and saving those in a extra files in the repo. This would enable reproducing verification only with the information found in metadata.json.

As these fields will only be values it should be ok to verify without looking at these positions.

  • Add evm.deployedBytecode.immutableReferences to the outputSettings in CheckedContract
  • Return immutableReferences from recompile()
  • Pass these optional parameters to matchWithDeployedBytecode()
  • Take these fields into considerations when matching in the function.

View in Huly HI-384

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 a pull request may close this issue.

1 participant