Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces support for zkSync Era into the project, enabling deployments and interactions with zkSync networks.
Added zkSync support: Installed and configured the following plugins:
Updated hardhat.config.ts to include zkSync Era mainnet and testnet configurations:
Updated deployment scripts:
- Modified deploy-mastercopies.ts to use Wallet from zksync-ethers instead of zksync-web3 for compatibility with the Deployer from @matterlabs/hardhat-zksync-deploy.
- Resolved type incompatibility issues between Wallet instances.
- Adjusted import statements to ensure correct versions of Wallet and Deployer are used.
- Implemented conditional logic to handle deployments on zkSync networks versus Ethereum networks.
- For zkSync networks, used Deployer and Wallet from zkSync tools.
- For Ethereum networks, maintained existing deployment flow using ethers and custom providers.
Compiled and deployed missing libraries:
- Addressed compilation warnings about missing libraries by running npx hardhat deploy-zksync:libraries.
- This step compiles and deploys any Solidity libraries that the contracts depend on, which is required by zkSync.
- Updated hardhat.config.ts with the addresses of deployed libraries under zksolc.settings.libraries to enable proper linking during contract compilation.