provide vm_utils_numeric as import/export wrapper
details: moved original vm/interpreter/utils/utils_numeric.nim => vm/interpreter/utils/utils_numeric.nim
This commit is contained in:
parent
99568c9b46
commit
7c28d5d362
|
@ -7,7 +7,7 @@
|
|||
|
||||
import
|
||||
math, eth/common/eth_types,
|
||||
vm/interpreter/utils/[macros_gen_opcodes, utils_numeric],
|
||||
vm/interpreter/utils/[macros_gen_opcodes, nvm_utils_numeric],
|
||||
vm/interpreter/[nvm_opcode_values, nvm_forks], errors
|
||||
|
||||
when defined(evmc_enabled):
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import
|
||||
strformat, times, sets, sequtils, options,
|
||||
chronicles, stint, nimcrypto, stew/ranges/ptr_arith, eth/common,
|
||||
vm/interpreter/utils/[macros_procs_opcodes, utils_numeric],
|
||||
vm/interpreter/utils/[macros_procs_opcodes, nvm_utils_numeric],
|
||||
vm/interpreter/[gas_meter, nvm_gas_costs, nvm_opcode_values, nvm_forks],
|
||||
vm/[nvm_memory, stack, code_stream, nvm_computation, nvm_state, nvm_types],
|
||||
errors, constants,
|
||||
|
|
|
@ -12,7 +12,7 @@ import
|
|||
macros, strformat, stint, eth/common,
|
||||
vm/[nvm_computation, stack, code_stream, nvm_memory],
|
||||
vm/nvm_types, errors, vm/interpreter/[gas_meter, nvm_opcode_values],
|
||||
vm/interpreter/utils/utils_numeric
|
||||
vm/interpreter/utils/nvm_utils_numeric
|
||||
|
||||
when defined(evmc_enabled):
|
||||
import vm/evmc_api, evmc/evmc
|
||||
|
|
|
@ -9,7 +9,7 @@ import
|
|||
sequtils,
|
||||
chronicles, eth/common/eth_types,
|
||||
errors, validation,
|
||||
vm/interpreter/utils/utils_numeric
|
||||
vm/interpreter/utils/nvm_utils_numeric
|
||||
|
||||
logScope:
|
||||
topics = "vm memory"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import
|
||||
vm/nvm_types,
|
||||
vm/interpreter/[gas_meter, nvm_gas_costs, utils/utils_numeric, nvm_forks],
|
||||
vm/interpreter/[gas_meter, nvm_gas_costs, utils/nvm_utils_numeric, nvm_forks],
|
||||
errors, stint, eth/[keys, common], chronicles, tables, macros,
|
||||
math, nimcrypto, bncurve/[fields, groups], vm/blake2b_f, vm/blscurve
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# Nimbus
|
||||
# Copyright (c) 2018 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
||||
# http://www.apache.org/licenses/LICENSE-2.0)
|
||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
||||
# http://opensource.org/licenses/MIT)
|
||||
# at your option. This file may not be copied, modified, or distributed except
|
||||
# according to those terms.
|
||||
|
||||
# At the moment, this header file interface is only used for testing, so it
|
||||
# might be worth merging it into a vm_internals.nim (or so) header file.
|
||||
import
|
||||
./vm/interpreter/utils/nvm_utils_numeric as vmn
|
||||
|
||||
export
|
||||
vmn.GasNatural,
|
||||
vmn.calcMemSize,
|
||||
vmn.ceil32,
|
||||
vmn.cleanMemRef,
|
||||
vmn.log2,
|
||||
vmn.log256,
|
||||
vmn.rangeToPadded,
|
||||
vmn.rangeToPadded2,
|
||||
vmn.safeInt,
|
||||
vmn.setSign,
|
||||
vmn.toInt,
|
||||
vmn.wordCount
|
||||
|
||||
# End
|
|
@ -1,7 +1,7 @@
|
|||
import
|
||||
unittest2, stew/byteutils,
|
||||
eth/common/eth_types,
|
||||
../nimbus/vm/interpreter/utils/utils_numeric
|
||||
../nimbus/vm_utils_numeric
|
||||
|
||||
func toAddress(n: int): EthAddress =
|
||||
result[19] = n.byte
|
||||
|
|
Loading…
Reference in New Issue