Content
@
https://opensea.io/collection/evm-6
0 reply
0 recast
2 reactions
Spencer Graham 🧢
@spengrah.eth
Is anybody aware of an existing generic create2 factory that serves as the create2 msg.sender? I believe that would allow for deployment to deterministic address agnostic of who is actually initiating the deploy, which would be quite nice for enabling a team to deploy as needed across networks.
4 replies
0 recast
2 reactions
✳️ dcposch
@dcposch.eth
Arachnid/0age factory is the default in Foundry All u need is a deploy script with vm.broadcast(); new MyContract{salt: 0}(); Works on all major evm chains
1 reply
0 recast
2 reactions
Spencer Graham 🧢
@spengrah.eth
great! this is what I use for all my contracts. For some reason I feel like I and another team member have been getting different deployment addresses, but perhaps we were doing something else different as well. Will re-test
1 reply
0 recast
0 reaction
Matt Solomon
@msolomon.eth
Likely due to the metadata hash, which can vary by machine due to different filepaths. I recommend setting it to ‘none’ to ensure identical bytecode -> same address, regardless of who builds the contracts
2 replies
0 recast
2 reactions
Spencer Graham 🧢
@spengrah.eth
looks like this creates an issue for source code verification. any way around that? https://book.getfoundry.sh/forge/deploying?highlight=metadata%20hash#verifying-contracts-with-no-bytecode-hash
1 reply
0 recast
0 reaction
Spencer Graham 🧢
@spengrah.eth
my best current idea is to put the latest compiled contract in the git repo and then deploy that. A little bit annoying, but not so bad (especially since forge's file loading is so slick).
1 reply
0 recast
0 reaction
Matt Solomon
@msolomon.eth
That part of the book is outdated, I just verified some contracts without a metadata hash a few days ago via-ir verification support is still a bit rough though https://github.com/foundry-rs/foundry/issues/3507
1 reply
0 recast
1 reaction