You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow for dynamic library linking within Solidity by adding a libraries field to the contract creation syntax. This would enable linking libraries to contracts during deployment, akin to how it's done in Hardhat. The proposed syntax would be:
The proposed syntax adheres to existing practices within Foundry, requiring a list of strings in the format <libraryPath>:<libraryName>:<libraryAddress>.
This solution aims to bring Foundry's capabilities in line with other popular development environments while maintaining its unique all-Solidity approach.
The text was updated successfully, but these errors were encountered:
I initially created this issue due to experiencing a problem to similar to that described in foundry-rs/book#1361
However, I have since come up with a temporary workaround, regardless I've confirmed that the expected behaviour would be for foundry to deploy all libraries that a contract depends on and link those libraries automatically before deploying.
However, I still think the ask in this issue would be helpful in the case that the libraries have already been deployed at known addresses and so developers can avoid deploying duplicate libraries. I also like the idea of foundry using deterministic CREATE2 deploys of libraries as explained here.
Component
Forge
Describe the feature you would like
Allow for dynamic library linking within Solidity by adding a
libraries
field to the contract creation syntax. This would enable linking libraries to contracts during deployment, akin to how it's done in Hardhat. The proposed syntax would be:Additional context
I initially asked a question on the ethereum stackexchange
The proposed syntax adheres to existing practices within Foundry, requiring a list of strings in the format
<libraryPath>:<libraryName>:<libraryAddress>
.This solution aims to bring Foundry's capabilities in line with other popular development environments while maintaining its unique all-Solidity approach.
The text was updated successfully, but these errors were encountered: