Closed fjarri closed 8 months ago
According to the information provided on https://www.evm.codes/?fork=cancun, the opcode MCOPY(0X5E) was introduced in the Cancun fork. However, in your code snippet:
klass = MiningChain.configure(vm_configuration=((0, ShanghaiVM),))
you are using the ShanghaiVM, where 0x5e is not defined. To address the issue, you may consider either using an older version of the compiler to escape using new opcode or a newer version of the VM that supports the MCOPY opcode.
@Alleysira has the right idea. You'll need to use the CancunVM
from the latest available version of py-evm
in order to support MCOPY
.
Macos 14.3.1, Python 3.10.10, py-evm 0.10.0b2
Trying to call a method of a compiled contract, getting an "invalid opcode" error from the VM. Solidity compiler version is set to 0.8.25 in
solcx
.Full reproducing example:
Output: