Skip to content

fix: update EVM version to cancun to resolve mcopy instruction error (#10)#30

Open
Tenerife-Q wants to merge 1 commit intoc2siorg:mainfrom
Tenerife-Q:fix-foundry-evm-version
Open

fix: update EVM version to cancun to resolve mcopy instruction error (#10)#30
Tenerife-Q wants to merge 1 commit intoc2siorg:mainfrom
Tenerife-Q:fix-foundry-evm-version

Conversation

@Tenerife-Q
Copy link
Copy Markdown

Summary

This Pull Request fixes Issue #10.

The Problem

Currently, running forge test fails with an mcopy instruction error.

Root Cause

This error occurs because the project's Solidity compiler (v0.8.24) is modern enough to generate the mcopy opcode, which was introduced in the Ethereum Cancun upgrade. However, the Foundry test environment's EVM version was not explicitly set, defaulting to an older version that does not recognize this new opcode.

The Solution

This PR resolves the issue by explicitly setting evm_version = "cancun" in the foundry.toml configuration file.

Impact

This change unblocks all contributors who wish to run the smart contract test suite locally, improving the overall developer experience and enabling further testing.

Comment thread contracts/foundry.toml
optimizer_runs = 200
via_ir = true
evm_version = "paris"
evm_version = "cancun"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already solved in #21 take a look

thank you.

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.

2 participants