Skip to content
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

Missing libraries is blank #369

Open
2 tasks done
PatrickAlphaC opened this issue May 9, 2024 · 2 comments
Open
2 tasks done

Missing libraries is blank #369

PatrickAlphaC opened this issue May 9, 2024 · 2 comments
Labels
compiler Issues specific to compiling T-bug

Comments

@PatrickAlphaC
Copy link
Collaborator

PatrickAlphaC commented May 9, 2024

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

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.

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:

[
  {
    "contract_name": "HuffDeployer",
    "contract_path": "lib/foundry-huff/src/HuffDeployer.sol",
    "missing_libraries": []
  }
]

Why is the missing_libraries empty? Even for testing locally do I have to deploy the library?

@dutterbutter
Copy link
Collaborator

@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.

@dutterbutter
Copy link
Collaborator

Re-opening as this seems to disrupt the experience a lot. Will investigate a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Issues specific to compiling T-bug
Projects
None yet
Development

No branches or pull requests

2 participants