From a2f77e86270256388fc81356b238a5ac904068c1 Mon Sep 17 00:00:00 2001 From: jangko Date: Sat, 15 May 2021 15:31:58 +0700 Subject: [PATCH] eip2718: rename vm2 ChainId op code to ChainIdOp this is to avoid clash with ChainId type imported from eth/common --- nimbus/vm2/interpreter/gas_costs.nim | 2 +- nimbus/vm2/interpreter/op_codes.nim | 2 +- nimbus/vm2/interpreter/op_handlers/oph_blockdata.nim | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nimbus/vm2/interpreter/gas_costs.nim b/nimbus/vm2/interpreter/gas_costs.nim index e0f219f6a..7eabbc6d0 100644 --- a/nimbus/vm2/interpreter/gas_costs.nim +++ b/nimbus/vm2/interpreter/gas_costs.nim @@ -505,7 +505,7 @@ template gasCosts(fork: Fork, prefix, ResultGasCostsName: untyped) = Number: fixed GasBase, Difficulty: fixed GasBase, GasLimit: fixed GasBase, - ChainID: fixed GasBase, + ChainIdOp: fixed GasBase, SelfBalance: fixed GasLow, # 50s: Stack, Memory, Storage and Flow Operations diff --git a/nimbus/vm2/interpreter/op_codes.nim b/nimbus/vm2/interpreter/op_codes.nim index ad4b3b171..2f753267b 100644 --- a/nimbus/vm2/interpreter/op_codes.nim +++ b/nimbus/vm2/interpreter/op_codes.nim @@ -101,7 +101,7 @@ type Difficulty = 0x44, ## Get the block's difficulty. GasLimit = 0x45, ## Get the block's gas limit. - ChainId = 0x46, ## Get current chain’s EIP-155 unique identifier. + ChainIdOp = 0x46, ## Get current chain’s EIP-155 unique identifier. SelfBalance = 0x47, ## Get current contract's balance. Nop0x48, Nop0x49, Nop0x4A, Nop0x4B, Nop0x4C, Nop0x4D, diff --git a/nimbus/vm2/interpreter/op_handlers/oph_blockdata.nim b/nimbus/vm2/interpreter/op_handlers/oph_blockdata.nim index 467245852..60d1b1057 100644 --- a/nimbus/vm2/interpreter/op_handlers/oph_blockdata.nim +++ b/nimbus/vm2/interpreter/op_handlers/oph_blockdata.nim @@ -123,7 +123,7 @@ const run: gasLimitOp, post: vm2OpIgnore)), - (opCode: ChainId, ## 0x46, EIP-155 chain identifier + (opCode: ChainIdOp, ## 0x46, EIP-155 chain identifier forks: Vm2OpIstanbulAndLater, name: "chainId", info: "Get current chain’s EIP-155 unique identifier",