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

Remappings Support #121

Closed
wants to merge 17 commits into from
Closed

Remappings Support #121

wants to merge 17 commits into from

Conversation

sammyshakes
Copy link

@sammyshakes sammyshakes commented Sep 12, 2023

Info

This PR revisits the feature initially proposed in #115 Enable Remappings, taking into consideration the significant updates to the main branch. The objective remains to ensure compatibility with zksolc by handling remappings appropriately.

Motivation

As discussed previously in #115 zksolc currently lacks native support for remappings, necessitating a solution where remapping transformations are performed before the source code is sent to the compiler. This PR aims to perfect the solution by accommodating the substantial changes that have occurred in the main branch since the original proposal.

Updated State of Remappings with This PR

With the updates in this PR:

  • Remappings are now handled appropriately.

Note: The sample-fzksync-project referenced in the README has been adapted to utilize the newly implemented remappings in the use-remappings branch of sample-fzksync-project repo..

Progress and Next Steps

  • Ensure comprehensive handling of remappings, including those referring to external directory structures.
  • Conduct extensive testing to validate the functionality in a variety of scenarios.
  • Solicit feedback and collaboratively refine the solution to align with the project's evolving requirements.

mm-zk and others added 2 commits August 10, 2023 06:36
Re-applying all the zksync speicific changes on top of the fresh fork

* chore(security): add workflow for leaked secrets monitoring

* Implement zk-build, zk-create, zk-cast, & zk-deposit cmds

* improve the error message for missing zk compiler output (#82)

Co-authored-by: Tamer Tas <tmrtx@noreply>

* Zkutils comments (#81)

* zk_utils comment

* update developer comments for zkutils and zksolc

* update doc

* Update README.md

* Update README.md

* Added troubleshooting section to README. (#84)

Better error handling for failed transactions

* Added better error messages when file or contract name is not correct (#86)

* updated cargo lock to use the newer version of zksync era (#87)

* Added support for Macs with Apple Silicon (#90)

Added support for Macs with Apple Silicon:

selecting proper zksync compiler
information on where to get the most recent solidity

* Improved message on compiler error and added support for 1.3.10 (#91)

* added better compiler error passing and support for version 1.3.10

* added comments

* more instructions

* more info

* Added a dependency on ethers-rs fork to support latest solidity (#92)

We're currently based off the old fork of foundry, that was depending on the old version of ethers-rs, which supported the solc compiler only up to 0.8.17 (especially on Apple Silicon).

With this PR, I'm moving us to depend on a fork of ethers-rs, that has svm (solidity version manager) patched to the newest release - therefore allowing us to support 0.8.20.

In the near future, we'll rebase ourselves to newer version of foundry, and this dependency would be switched back to original ethers repo.

* fix test compilation issue (#88)

* Adding support for the newest 1.3.11 zksolc compiler (#95)

* Fix flags for zk deposit (#94)

Fix flags used by zk-deposit:

Use --l1-url and --l2-url (and ignore the --rpc-url flag)

* edited README

* typos

* one more typo

* updates from comments

* Fixed compilation issue (#101)

* fix(readme): --is-system flag image (#103)

* Replace `zksync` crate with `zksync_web3_rs` (#110)

* WIP deposit using zksync_ethers_rs

* WIP deposit and test script

* Add zksync rust sdk as dependency

* Use withdraw from Rust SDK

* Add to address as parameter for withdraw

* WIP test

* Add support for multiple flags in withdraw

* Update cargo.lock

* Use Rust SDK to send transactions to contracts

* Fix deposit test

* Support all parameter types for send command

* Add optional fields to deposit

* Add missing deposit parameters

* Cleanup

* wip.

* Deploy with constructor parameters

* Remove unwraps and commented code

* Fix operator_tip setter

* Remove legacy test script

* point zksync-web3-rs to main

* revert cargo.toml autoformat

* Fix create.

* Remove zksync dependencies.

* Update deploy with new signature from Rust SDK

* Add support for construction parameters from file.

* Update function to get constructor arguments

* Add back chain id to every zk function.

* Minor cleanups and consistency. (#9)

* Add transaction id to print after deploy

* Fix compiler warnings

* Update zksync-web3-rs commit in dependencies

* Add necessary changes with new SDK version

---------

Co-authored-by: Joaquín P. Centeno <[email protected]>
Co-authored-by: IAvecilla <[email protected]>
Co-authored-by: Matías Onorato <[email protected]>

* fixed compilation issues

---------

Co-authored-by: Maksym <[email protected]>
Co-authored-by: sam shakespeare <[email protected]>
Co-authored-by: tmrtx <[email protected]>
Co-authored-by: Tamer Tas <tmrtx@noreply>
Co-authored-by: Sam Shakespeare <[email protected]>
Co-authored-by: Katharine <[email protected]>
Co-authored-by: niramisa <[email protected]>
Co-authored-by: evmcheb <[email protected]>
Co-authored-by: Martin Paulucci <[email protected]>
Co-authored-by: Joaquín P. Centeno <[email protected]>
Co-authored-by: IAvecilla <[email protected]>
Co-authored-by: Matías Onorato <[email protected]>
@sammyshakes sammyshakes marked this pull request as draft September 12, 2023 16:18
@sammyshakes sammyshakes requested a review from mm-zk September 15, 2023 17:57
@sammyshakes sammyshakes marked this pull request as ready for review September 15, 2023 17:57
@sammyshakes
Copy link
Author

This PR should now handle named and nested remappings, readme has been updated with usage examples

@sammyshakes sammyshakes changed the title [WIP] Remappings Support Remappings Support Sep 15, 2023
@sammyshakes sammyshakes marked this pull request as draft September 20, 2023 16:25
@dutterbutter
Copy link
Collaborator

Hey @sammyshakes 👋

We recently updated to sync with upstream as we were 230+ commits behind and foundry had changed their project structure this has resulted in a lot of conflicts on this draft PR. I suggest closing the PR and reopening with latest changes from main. Apologies for the inconvenience!

@Karrq Karrq deleted the remappings-support branch October 9, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants