-
Notifications
You must be signed in to change notification settings - Fork 121
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: add deploy and rebuild on missing library dependencies #274
feat: add deploy and rebuild on missing library dependencies #274
Conversation
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.
Can we do the following:
- Can we update so that when this is hit:
Error:
Failed to compile smart contracts with zksolc: Missing libraries detected [ZkMissingLibrary { contract_name: "Maths", contract_path: "src/Maths.sol", missing_libraries: [] }]
We also inform the user to run the command:
zkforge zkcreate --deploy-missing-libraries --private-key <PRIVATE_KEY> --rpc-url <RPC_URL> --chain
- Can we also update the README.md to reflect the new flow.
Other then that it worked as described! LGTM
@aon do you know which lib is triggering the cargo deny? |
Yes, the libraries are
|
I'm working on the proposed changes, will push the changes in a minute |
@aon The |
…ion-for-non-inlinable-libraries-deployment
@dutterbutter Done! I updated failing packages and now cargo deny is passing. |
What 💻
The flow for detecting and deploing missing library dependencies is the following:
a. Contract Counter depends on library Math which itself depends on library FixedPoint.
b. Zkforge detects this dependency tree, and starts by building and deploying FixedPoint.
c. After FixedPoint has been deployed, Math library is built and deployed linking the address of the deployed FixedPoint library.
d. Finally, the
foundry.toml
configuration file is updated with the deployed addresses of the librariesWhy ✋
Evidence 📷