Uniswap / v2-core

🦄 🦄 Core smart contracts of Uniswap V2
https://uniswap.org/docs
GNU General Public License v3.0
2.97k stars 3.18k forks source link

Generate metadata #78

Closed chriseth closed 4 years ago

chriseth commented 4 years ago

The compilation metadata is essential to establish a link between the deployed bytecode and the source code. It is crucial that it is made available so that users can re-compile and verify the smart contracts.

NoahZinsmeister commented 4 years ago

@moodysalem this may warrant a 1.0.1 release, what do you think?

moodysalem commented 4 years ago

@moodysalem this may warrant a 1.0.1 release, what do you think?

Yeah it doesn’t hurt, and we can put the network addresses in the build json artifacts too if we want

NoahZinsmeister commented 4 years ago

ok, want to take point on this? rough action plan:

1) pull this PR down 2) generate new artifacts (potentially adding the addresses if it makes sense) 3) bump to 1.0.1 4) release 5) push back to this PR 6) squash + merge

moodysalem commented 4 years ago

Figured it's not worth in the end unless it's automated, since we're likely to forget the next time we publish

Edit: to clarify I’m referring to adding the network addresses to the compiler output, this PR was merged and a 1.0.1 release was created

chriseth commented 4 years ago

@moodysalem I'm not sure what you deem "not worth", but if it is the 1.0.1 release, then please at least publish the metadata of the 1.0.0 release. Since building is automated, it should not be too hard to re-created it. The main thing to keep in mind is that the paths need to be the same as in the original compilation.

moodysalem commented 4 years ago

Why do you need the compiler settings of 1.0.0? Everything except this PR and the output of metadata should be exactly the same and verify against the smart contracts we have deployed and the compiled bytecode

Edit: Sorry I had just woken up, I see the misunderstanding now, when I said “not worth” i was referring to adding the addresses to the compiler output. I did a 1.0.1 release with this PR included

chriseth commented 4 years ago

Ah I see! Indeed it matches! Thanks a lot!

chriseth commented 4 years ago

Added the factory here: https://contractrepo.komputing.org/contract/mainnet/0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f/