execution-spec-tests icon indicating copy to clipboard operation
execution-spec-tests copied to clipboard

Add the `supported_evm_code_types` property to the `Opcode` class

Open danceratopz opened this issue 1 year ago • 1 comments

Add a supported_evm_code_types to the Opcode such that, for example:

print(Op.PUSH1.supported_evm_code_types)
# -> {EVMCodeType.LEGACY, EVMCodeType.EOF_V1}
print(Op.CALL.supported_evm_code_types)
# -> {EVMCodeType.LEGACY}

This would allow the generation and deployment of contract code based on its type for tests that are parametrized or use all opcodes, cf #748 and this discussion: https://github.com/ethereum/execution-spec-tests/pull/748#discussion_r1733311523

danceratopz avatar Aug 28 '24 11:08 danceratopz

Maybe becomes interesting again when EOF becomes relevant again

felix314159 avatar Sep 03 '25 12:09 felix314159