diff --git a/nimbus/rpc/p2p.nim b/nimbus/rpc/p2p.nim index 58a2ff89c..ae856fc82 100644 --- a/nimbus/rpc/p2p.nim +++ b/nimbus/rpc/p2p.nim @@ -247,7 +247,7 @@ proc setupEthRpc*(node: EthereumNode, chain: BaseChainDB, rpcsrv: RpcServer) = let source = send.source.toAddress destination = send.to.toAddress - data = send.data.string.fromHex + data = nimcrypto.utils.fromHex(send.data.string) contractCreation = false # TODO: Check if has code v = 0.byte # TODO r = 0.u256 @@ -322,7 +322,7 @@ proc setupEthRpc*(node: EthereumNode, chain: BaseChainDB, rpcsrv: RpcServer) = # if no wallets, remains as ZERO_ADDRESS # TODO: Wallets destination = if call.to.isSome: call.to.get.toAddress else: ZERO_ADDRESS - data = if call.data.isSome: call.data.get.string.fromHex else: @[] + data = if call.data.isSome: nimcrypto.utils.fromHex(call.data.get.string) else: @[] value = if call.value.isSome: call.value.get else: 0.u256 comp = setupComputation(vmState, header.blockNumber, value, data, sender, destination, gasLimit, gasPrice, call.to.isNone) diff --git a/nimbus/vm/interpreter/gas_costs.nim b/nimbus/vm/interpreter/gas_costs.nim index 400b0f886..90de3b2bf 100644 --- a/nimbus/vm/interpreter/gas_costs.nim +++ b/nimbus/vm/interpreter/gas_costs.nim @@ -358,7 +358,7 @@ template gasCosts(fork: Fork, prefix, ResultGasCostsName: untyped) = # ################################################################################################### # TODO - change this `let` into `const` - pending: https://github.com/nim-lang/Nim/issues/8015 - let `ResultGasCostsName`*{.inject.}: GasCosts = block: + let `ResultGasCostsName`*{.inject, compileTime.}: GasCosts = block: # We use a block expression to avoid name redefinition conflicts # with "fixed" and "dynamic" diff --git a/nimbus/vm/precompiles.nim b/nimbus/vm/precompiles.nim index 5234087d8..90ab55243 100644 --- a/nimbus/vm/precompiles.nim +++ b/nimbus/vm/precompiles.nim @@ -179,8 +179,8 @@ proc modExpInternal(computation: BaseComputation, base_len, exp_len, mod_len: in # we should return a 256-bit big-endian byte array # Force static evaluation - func zero(): static array[T.bits div 8, byte] = discard - func one(): static array[T.bits div 8, byte] = + func zero(): array[T.bits div 8, byte] {.compileTime.} = discard + func one(): array[T.bits div 8, byte] {.compileTime.} = when cpuEndian == bigEndian: result[0] = 1 else: