-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: library deployments though CREATE2 #7711
Conversation
34e8cb2
to
c33d485
Compare
needs foundry-rs/compilers#108 and will be blocked by yansi update |
#108) I'm writing tests for foundry-rs/foundry#7711 which are hardcoding CREATE2 library deployment addreses and they are currently failing on Windows probably because \r\n line endings which are causing metadata differences. This PR tries to fix this by replacing such endings with \n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine, please rebase to remove the duplicate commits
9b229cd
to
08f3c41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL @mattsse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm,
sorry missed this one...
needs rebase
3a0ce36
to
e8cc161
Compare
e8cc161
to
d9820a1
Compare
Motivation
Closes #4810
ref #7027 (comment)
Solution
This PR introduces a new approach to library linking for scripts. If CREATE2 deployer is present on target chain, ibraries are deployed through it, and only if they have not been deployed before. This makes it possible for users to run scripts without ever thinking about library deployment and need to provide addresses in
foundry.toml
or via--libraries
args.Salt for deployments can be configured through
create2_library_salt
.It is not possible to link libraries with cyclic dependencies in such way, so we are still falling back to default linking algo if error occurs.