Automate the process of passing the create2Salt
#810
Closed
andreivladbrg
started this conversation in
Ideas
Replies: 2 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
4 replies
-
I like the proposal a lot, @andreivladbrg. Feel free to go ahead with implementing it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current version of the deterministic deployment scripts requires manually passing the
create2Salt
which is a slow procces and prone to errors:v2-core/script/DeployDeterministicCore.s.sol
Lines 22 to 43 in 7819a3b
To automate this process, I've developed a utility that builds the salt using the ffi cheatcode, which allows you to execute an arbitrary shell command and capture the output:
Note: it would require to import and use a library to convert uint256 to string
I've personally tested this and it works. https://app.warp.dev/block/5564ry0K2Lxbq9seHWJKsx
The most appropriate place to implement this is in a function named
getCreate2Salt
withinBase_Script
.wdyt @PaulRBerg @smol-ninja ?
I believe you are going to like it 😁
Beta Was this translation helpful? Give feedback.
All reactions