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: Add support for vm.getCode in Zk context #604

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Jrigada
Copy link
Contributor

@Jrigada Jrigada commented Oct 9, 2024

Motivation

The vm.getCode cheatcode was not supported when executing it with the --zksync flag because we did not have access to the zk artifacts. Now that we do we were getting multiple artifacts for a same contract.

Solution

Whenever we need access to the known_contracts we have access to dual_compiled_contract so now we included the zk and non-zk paths in the struct so we can query the type (Zk, EVM) of contract given an artifact_id. With that we can filter and grab the correct contract depending which context we are in.

@Jrigada Jrigada changed the title Add integration for vm.getCode in Zk context feat: Add integration for vm.getCode in Zk context Oct 9, 2024
@Jrigada Jrigada changed the title feat: Add integration for vm.getCode in Zk context feat: Add support for vm.getCode in Zk context Oct 9, 2024
@Jrigada Jrigada marked this pull request as ready for review October 10, 2024 19:55
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