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

Merged
merged 15 commits into from
Oct 22, 2024

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
Karrq
Karrq previously approved these changes Oct 16, 2024
@dutterbutter
Copy link
Collaborator

@Jrigada can this be merged?

@dutterbutter dutterbutter added the approved ✅ PR is ready to be merged label Oct 22, 2024
@nbaztec nbaztec merged commit e498b34 into main Oct 22, 2024
11 checks passed
@nbaztec nbaztec deleted the jrigada-vm-getCode-for-zksolc-contracts branch October 22, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ✅ PR is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants