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.
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.