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

feat(zk): zksolc linking #800

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat(zk): zksolc linking #800

wants to merge 1 commit into from

Conversation

Karrq
Copy link
Contributor

@Karrq Karrq commented Dec 20, 2024

What πŸ’»

  • Add functions to use zksolc --link
  • Process deploy-time linking (CREATE only)

Why βœ‹

  • Allow tests & scripts to rely on contracts with libraries that have not been deployed yet

Notes πŸ“

There's a simple merge conflicts due to the lack of access to DualCompiledContracts during the MultiContractRunner instantiation.

This is a working yet incomplete implementation, as such there are a few quirks, in particular: unlinked factory deps are not supported (zksolc 1.5.9 should have some extra info that we can use), linking via CREATE2 is not supported either yet.

Currently there's an issue with trying to actually run the library, I believe due to a missing storage migration:

2024-12-20T21:22:57.842992Z ERROR suite{name=CounterTest}:test{kind=test name=testIncrement}:call:inspect: foundry_zksync_core::vm::tracers::cheatcode: call may fail or behave unexpectedly due to empty code target=0x0e93455c2327dc24ac46d3a2edade6dbb6260629 calldata="771602f70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

@Karrq Karrq self-assigned this Dec 20, 2024
@Karrq Karrq requested a review from a team as a code owner December 20, 2024 21:37
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.

1 participant