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

dev : Refactoring the crate deploy implementations #19

Open
ocdbytes opened this issue Jun 27, 2024 · 0 comments
Open

dev : Refactoring the crate deploy implementations #19

ocdbytes opened this issue Jun 27, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@ocdbytes
Copy link
Collaborator

Refactoring the crate deploy implementations

Currently the code structure is something like this :

--- crates 
     --- l2
           --- client_crate
                  --- src
                         --- artifacts
                         --- clients
                         --- interfaces
                         --- lib.rs

Here lib.rs file contains the deploy functions for contracts behind safe or unsafe proxy. But in the case of Core Contract Client we have two implementations :

  • Starknet Sovereign : For deploying starknet core contract without proof validation.
  • Starknet Validity : For deploying starknet core contract with proof validation (used by starknet in prod).

So what we expect here is that we have a separate crate For eg : helper.
Now helper crate will contain a trait for deployment of contracts and all other contract client crates will implement it. For core contract client we need a structure where deploy functions for both the implementations is separate not in lib.rs.

--- crates/
     --- l2/
           --- core_contract_client_crate/
                  --- src/
                         --- artifacts/
                         --- clients/
                               --- validity/
                               --- sovereign/
                               --- mod.rs
                         --- interfaces/
                         --- lib.rs (import deploy functions and export in this file.)
           --- helpers/
                         --- deploy/
                               --- mod.rs (implements deploy trait which is used by other deploy functions in other crates)

This is supposed to be a cleaner better design. Any suggestions are accepted.

Feel free to work on this issue : )

@apoorvsadana apoorvsadana added the good first issue Good for newcomers label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants