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

Add support for specifying separate addresses for non-inlinable libraries on different networks #1531

Closed
dutterbutter opened this issue Nov 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@dutterbutter
Copy link
Contributor

🌟 Feature Request for hardhat-zksync plugin

Related discussion from vmaark here: zkSync-Community-Hub/zksync-developers#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:

module.exports = {
  solidity: "0.8.7",
  networks: {
    mainnet: {
      libraryAddresses: {
        SomeLibrary: "0xMainnetAddress",
      },
    },
    testnet: {
      libraryAddresses: {
        SomeLibrary: "0xTestnetAddress",
      },
    },
  },
};

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

@dutterbutter dutterbutter added the enhancement New feature or request label Nov 6, 2024
@kiriyaga-txfusion
Copy link
Contributor

kiriyaga-txfusion commented Nov 7, 2024

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

@dutterbutter
Copy link
Contributor Author

Closing in favour of #1505

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants