-
Notifications
You must be signed in to change notification settings - Fork 364
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
Create a package for external contract interfaces #1209
Comments
Maybe I am missing something but are you aware of https://www.npmjs.com/package/@matterlabs/zksync-contracts/v/beta? From what I can tell it is hitting all the checkmarks on your list but is admittedly hard to find as it was never "finished" and publicly announced. It should be fairly easy to resurrect that effort if we want (AFAIK it even has a CI script for pulling era-contracts changes automatically). |
This is not a foundry package, this is npm/js Forge uses either git submodules for dependencies or the newer Soldeer Ideally both would be supported as they are widely used in the foundry ecosystem |
Well, the README even mentions that you can install it with foundry/forge by running Very likely that it needs more love on Soldeer front but I fail to see how it is not a valid foundry package? |
ah, I did not look at the actual js package readme, just that it was an npm link. Is the matter-labs/v2-testnet-contracts repo safe to use in production? |
|
Description
External projects are increasingly making use of
era-contracts
for their Foundry projects. However, issues like #802 and #457 hinder the developer experience. Additionally, theera-contracts
repo includes components that are not relevant or intended for external use.To address these challenges, propose creating a new repo or package dedicated to external useful contracts.
Why This Is Needed
Improve External Usability
The current
era-contracts
repo does not distinguish internal and external usage, potentially leading to confusion. A dedicated package for external-facing contracts will improve clarity and usability for developers.Enable Floating Pragma
pragma solidity 0.8.20
), creating friction for developers using these contracts as libraries in their projects.pragma solidity ^0.8.0
) allows greater flexibility. This change is particularly necessary for compatibility with various Solidity versions in external projects.Resolve Placeholder Issues
When users install
matter-labs/era-contracts
via Foundry (forge install matter-labs/era-contracts
), compilation fails due to unresolved placeholders in files likeConstants.sol
. This package should address this issue.Streamline Integration
Developers should only need external-facing contracts, not the entire repo. A streamlined package will simplify project dependencies.
Proposed Solution
Create a Repo
Scope Floating Pragmas
Resolve Constants
{{SYSTEM_CONTRACTS_OFFSET}}
with actual value.Tasks
Repository Setup
Contract Refinement
pragma solidity ^0.8.0
) where applicable.Constants.sol
.Documentation
The text was updated successfully, but these errors were encountered: