Open dutterbutter opened 1 week ago
Hello @dutterbutter, The ML team has worked on compiler improvements to support linking libraries during deployment. As a result, this feature is no longer necessary. We will be releasing a new version of the plugins that allows users to link libraries when deploying a contract, similar to the functionality we have on L1. Here a link to the PR
π Feature Request for hardhat-zksync plugin
Related discussion from vmaark here: https://github.com/zkSync-Community-Hub/zksync-developers/discussions/763
π₯ Plugin name
hardhat-zksync
π Description
Add support for specifying separate addresses for non-inlinable libraries on different networks in the compiler settings. Currently, non-inlinable libraries need to be deployed separately, with the address specified in the hardhat config. However, this single address setup poses issues when deploying to multiple networks, such as a testnet and mainnet, or different chains built with ZK Stack.
This new feature would allow users to provide a mapping with unique library addresses for each network, enabling seamless deployment to multiple targets without needing to manually change configuration files.
π€ Rationale
This feature is essential for teams working with multiple deployment targets, as it ensures flexibility and efficiency when deploying to various networks. By supporting network-specific addresses, developers can automate deployments across different environments more effectively, saving time and reducing potential for error.
πΌοΈ Mockups/Examples
If implemented, the configuration could look like this:
π Additional Context
This enhancement would be particularly useful for projects utilizing ZK Stack or deploying across both mainnet and testnet environments. It provides a streamlined approach for managing library dependencies across various network configurations.