all: add osaka instruction set

This commit is contained in:
lightclient 2025-06-10 15:43:52 +02:00
parent 4a197f960b
commit 9603d9547c
No known key found for this signature in database
GPG key ID: 657913021EF45A6A
2 changed files with 9 additions and 0 deletions

View file

@ -109,6 +109,8 @@ func NewEVMInterpreter(evm *EVM) *EVMInterpreter {
case evm.chainRules.IsVerkle:
// TODO replace with proper instruction set when fork is specified
table = &verkleInstructionSet
case evm.chainRules.IsOsaka:
table = &osakaInstructionSet
case evm.chainRules.IsPrague:
table = &pragueInstructionSet
case evm.chainRules.IsCancun:

View file

@ -62,6 +62,7 @@ var (
cancunInstructionSet = newCancunInstructionSet()
verkleInstructionSet = newVerkleInstructionSet()
pragueInstructionSet = newPragueInstructionSet()
osakaInstructionSet = newOsakaInstructionSet()
)
// JumpTable contains the EVM opcodes supported at a given fork.
@ -91,6 +92,12 @@ func newVerkleInstructionSet() JumpTable {
return validate(instructionSet)
}
func newOsakaInstructionSet() JumpTable {
instructionSet := newPragueInstructionSet()
enable7907(&instructionSet)
return validate(instructionSet)
}
func newPragueInstructionSet() JumpTable {
instructionSet := newCancunInstructionSet()
enable7702(&instructionSet) // EIP-7702 Setcode transaction type