docs
docs copied to clipboard
Provide guidance on how to reproduce bytecodes
Third-parties may be interested in reproducing the bytecodes deployed on Mainnet. To assist them, we should provide a wiki or some sort of docs for how to recompile the contracts and passing the appropriate constructor arguments.
More context here:
https://discord.com/channels/883432404780466176/1077650654396428348/1183046520975675462
This issue is stale because it has been open 182 days with no activity. Leave a comment or remove the "stale" label, otherwise this will be closed in 14 days.
We should keep this open.
This issue is stale because it has been open 182 days with no activity. Leave a comment or remove the "stale" label, otherwise this will be closed in 14 days.
The Discord link isn't showing the message anymore. May I know what the original ask was? I am curious as to why someone would be interested in "reproducing" the bytecode. If they need to use the bytecode, they can copy it from Etherscan.
I would keep this issue open.
It's a low-priority task, but somewhat important for decentralization purposes.
The bytecodes can be copied from Etherscan, but the purpose of reproducing them from a Foundry repo is to enable developers to trustlessly verify that the source code in the repo matches the contracts on Etherscan.
Another way would be to diff-check the verified source code, but this approach is way more time-consuming (because there are many different files to verify).
I see. Thanks for explaining.
But any experienced developer can verify it even right now. We log all deployment files in the deployments repo which contains all constructor arguments used at the time of deployment. So it's just a matter of printing the bytecode using the Foundry script and comparing it with Etherscan's displayed bytecode.
That said, would it not be more appropriate to provide the guidance in the docs repo?
But any experienced developer can verify it even right now
- Not all developers are experienced
- Even for experienced folks, a little guidance can be helpful, e.g. what Foundry profile and settings to use, etc.
it's just a matter of printing the bytecode using the Foundry script and comparing it with Etherscan's displayed bytecode
This 'matter' is precisely what should be documented.
would it not be more appropriate to provide the guidance in the docs repo?
Yes. I have transferred the issue to the docs repo.