diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/vm/contracts_stateful.go | 4 | ||||
-rw-r--r-- | core/vm/jump_table.go | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/core/vm/contracts_stateful.go b/core/vm/contracts_stateful.go index 3ef7a9e..b91acfb 100644 --- a/core/vm/contracts_stateful.go +++ b/core/vm/contracts_stateful.go @@ -27,8 +27,8 @@ var PrecompiledContractsApricot = map[common.Address]StatefulPrecompiledContract common.BytesToAddress([]byte{8}): newWrappedPrecompiledContract(&bn256PairingIstanbul{}), common.BytesToAddress([]byte{9}): newWrappedPrecompiledContract(&blake2F{}), common.HexToAddress("0x0100000000000000000000000000000000000000"): &deprecatedContract{msg: "hardcoded genesis contract has been deprecated"}, - common.HexToAddress("0xffffffffffffffffffffffffffffffffffffff"): &nativeAssetBalance{gasCost: params.AssetBalanceApricot}, - common.HexToAddress("0xfffffffffffffffffffffffffffffffffffffe"): &nativeAssetCall{gasCost: params.AssetCallApricot}, + common.HexToAddress("0x0100000000000000000000000000000000000001"): &nativeAssetBalance{gasCost: params.AssetBalanceApricot}, + common.HexToAddress("0x0100000000000000000000000000000000000002"): &nativeAssetCall{gasCost: params.AssetCallApricot}, } // StatefulPrecompiledContract is the interface for executing a precompiled contract diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go index fc12f93..44e2ebc 100644 --- a/core/vm/jump_table.go +++ b/core/vm/jump_table.go @@ -63,6 +63,16 @@ var ( // JumpTable contains the EVM opcodes supported at a given fork. type JumpTable [256]*operation +// newApricotInstructionSet returns a new instruction set +// compatible with the Apricot release, which deprecates +// added instructions: CALLEX and BALANCEMC +func newApricotInstructionSet() JumpTable { + instructionSet := newIstanbulInstructionSet() + instructionSet[CALLEX] = nil + instructionSet[BALANCEMC] = nil + return instructionSet +} + func newYoloV1InstructionSet() JumpTable { instructionSet := newIstanbulInstructionSet() @@ -1044,13 +1054,3 @@ func newFrontierInstructionSet() JumpTable { }, } } - -// newApricotInstructionSet returns a new instruction set -// compatible with the Apricot release, which deprecates -// added instructions: CALLEX and BALANCEMC -func newApricotInstructionSet() JumpTable { - instructionSet := newFrontierInstructionSet() - instructionSet[CALLEX] = nil - instructionSet[BALANCEMC] = nil - return instructionSet -} |