Skip to content

[Deployment] Generating metadata hash from compiler metadata #784

Discussion options

You must be logged in to vote

Hi @akroeger-circle 👋 ! You are correct that the metadata field you've found contains the information needed for this hash. You can find the struct Metadata here in the era-compiler-solidity Rust code to confirm: https://github.com/matter-labs/era-compiler-solidity/blob/a6bb196b2a0ac60aece76442924707137d37b858/era-compiler-solidity/src/project/contract/metadata.rs#L11

I'm not entirely sure the exact shell code needed to replicate the generation of this keccack256 has from the JSON/string form of the metadata, but here's the Rust version of converting the Metadata JSON into bytes and then into the hash: https://github.com/matter-labs/era-compiler-solidity/blob/a6bb196b2a0ac60aece7644292470…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@MexicanAce
Comment options

@akroeger-circle
Comment options

@akroeger-circle
Comment options

Answer selected by MexicanAce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Questions for deployment
2 participants