core/vm: enable cancun instruction set

This commit is contained in:
Daniel Liu 2025-02-11 18:42:24 +08:00
parent 000ace69f4
commit 30195e88ee
3 changed files with 4 additions and 1 deletions

View file

@ -29,7 +29,7 @@ var DevnetConstant = constant{
tipXDCXMinerDisable: big.NewInt(0),
tipXDCXReceiverDisable: big.NewInt(0),
eip1559Block: big.NewInt(0),
cancunBlock: big.NewInt(9999999999),
cancunBlock: big.NewInt(1702800),
trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"),
trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"),

View file

@ -56,6 +56,8 @@ func NewEVMInterpreter(evm *EVM) *EVMInterpreter {
// If jump table was not initialised we set the default one.
var table *JumpTable
switch {
case evm.chainRules.IsCancun:
table = &cancunInstructionSet
case evm.chainRules.IsEIP1559:
table = &eip1559InstructionSet
case evm.chainRules.IsShanghai:

View file

@ -57,6 +57,7 @@ var (
mergeInstructionSet = newMergeInstructionSet()
shanghaiInstructionSet = newShanghaiInstructionSet()
eip1559InstructionSet = newEip1559InstructionSet()
cancunInstructionSet = newCancunInstructionSet()
)
// JumpTable contains the EVM opcodes supported at a given fork.