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
I have a library that my contracts use as a dependency.
library HuffDeployer {
When I compile this, I get:
Error:
Failed to compile with zksolc: Missing libraries detected [ZkMissingLibrary { contract_name: "HuffDeployer", contract_path: "lib/foundry-huff/src/HuffDeployer.sol", missing_libraries: [] }]
Run the following command in order to deploy the missing libraries:
forge create --deploy-missing-libraries --private-key <PRIVATE_KEY> --rpc-url <RPC_URL> --chain <CHAIN_ID> --zksync
But in my missing_library_dependencies.json I have this:
@PatrickAlphaC yes, you have to deploy all libraries even for testing locally as this is imposed by the compiler. You can refer to the docs on compiling non-inlinable libraries here.
If you have suggestions on how to improve the process of detecting, and informing the user to deploy, and re-compiling please comment accordingly.
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.0.2 (a7196c2 2024-05-09T00:24:42.563510000Z)
What command(s) is the bug in?
forge build
Operating System
macOS (Intel)
Describe the bug
I have a library that my contracts use as a dependency.
When I compile this, I get:
But in my
missing_library_dependencies.json
I have this:Why is the
missing_libraries
empty? Even for testing locally do I have to deploy the library?The text was updated successfully, but these errors were encountered: