diff --git a/nimbus/vm/computation.nim b/nimbus/vm/computation.nim index 7455cee74..989981ddf 100644 --- a/nimbus/vm/computation.nim +++ b/nimbus/vm/computation.nim @@ -11,7 +11,7 @@ import ../constants, ../errors, ../vm_state, ../vm_types, ./interpreter/[opcode_values, gas_meter, gas_costs, vm_forks], ./code_stream, ./memory, ./message, ./stack, ../db/[state_db, db_chain], - ../utils/header, stew/[byteutils, ranges], precompiles, + ../utils/header, stew/[byteutils, ranges, ranges/ptr_arith], precompiles, transaction_tracer, ../utils when defined(evmc_enabled): diff --git a/nimbus/vm/evmc_host.nim b/nimbus/vm/evmc_host.nim index 6686dbd22..ae1298535 100644 --- a/nimbus/vm/evmc_host.nim +++ b/nimbus/vm/evmc_host.nim @@ -116,7 +116,7 @@ proc hostEmitLogImpl(ctx: Computation, address: EthAddress, for i in 0 ..< topicsCount: log.topics[i] = topics[i].bytes - log.data = @makeOpenArray(data, dataSize) + log.data = @(makeOpenArray(data, dataSize)) log.address = address ctx.addLogEntry(log) @@ -128,7 +128,7 @@ template createImpl(c: Computation, m: nimbus_message, res: nimbus_result) = gas: m.gas, sender: m.sender, value: Uint256.fromEvmc(m.value), - data: @makeOpenArray(m.inputData, m.inputSize.int) + data: @(makeOpenArray(m.inputData, m.inputSize.int)) ) let child = newComputation(c.vmState, childMsg, Uint256.fromEvmc(m.create2_salt)) @@ -159,7 +159,7 @@ template callImpl(c: Computation, m: nimbus_message, res: nimbus_result) = codeAddress: m.destination, contractAddress: if m.kind == EVMC_CALL: m.destination else: c.msg.contractAddress, value: Uint256.fromEvmc(m.value), - data: @makeOpenArray(m.inputData, m.inputSize.int) + data: @(makeOpenArray(m.inputData, m.inputSize.int)), flags: MsgFlags(m.flags) ) diff --git a/nimbus/vm/interpreter/opcodes_impl.nim b/nimbus/vm/interpreter/opcodes_impl.nim index 24aa99149..8abf0cdfc 100644 --- a/nimbus/vm/interpreter/opcodes_impl.nim +++ b/nimbus/vm/interpreter/opcodes_impl.nim @@ -614,7 +614,7 @@ template genCreate(callName: untyped, opCode: Op): untyped = ) var res = c.host.call(msg) - c.returnData = @makeOpenArray(res.outputData, res.outputSize.int) + c.returnData = @(makeOpenArray(res.outputData, res.outputSize.int)) c.gasMeter.returnGas(res.gas_left) if res.status_code == EVMC_SUCCESS: @@ -780,7 +780,7 @@ template genCall(callName: untyped, opCode: Op): untyped = ) var res = c.host.call(msg) - c.returnData = @makeOpenArray(res.outputData, res.outputSize.int) + c.returnData = @(makeOpenArray(res.outputData, res.outputSize.int)) let actualOutputSize = min(memOutLen, c.returnData.len) if actualOutputSize > 0: