ethereum / sourcify

Decentralized Solidity contract source code verification service
https://sourcify.dev
MIT License
769 stars 378 forks source link

Fix storage of metadata files #1475

Closed manuelwedler closed 1 month ago

manuelwedler commented 1 month ago

We found that the metadata file which the server stores is the one provided by the user. This can be a problem when a user uploads a wrong metadata file which still yields a verification match. In this case, we were storing the wrong metadata file. This PR fixes that by assigning the metadata of the recompilation to the CheckedContract. I added tests on lib-sourcify and on the server.