mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-09 02:35:08 +00:00
Add opCodeExec to allow computation to execute code
This commit is contained in:
parent
213aebde7d
commit
7cd7a73a1f
@ -14,6 +14,8 @@ import
|
|||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
OpcodeExecutor* = proc(computation: var BaseComputation)
|
||||||
|
|
||||||
BaseComputation* = ref object of RootObj
|
BaseComputation* = ref object of RootObj
|
||||||
# The execution computation
|
# The execution computation
|
||||||
vmState*: BaseVMState
|
vmState*: BaseVMState
|
||||||
@ -32,6 +34,7 @@ type
|
|||||||
opcodes*: Table[Op, proc(computation: var BaseComputation){.nimcall.}]
|
opcodes*: Table[Op, proc(computation: var BaseComputation){.nimcall.}]
|
||||||
precompiles*: Table[string, Opcode]
|
precompiles*: Table[string, Opcode]
|
||||||
gasCosts*: GasCosts # TODO - will be hidden at a lower layer
|
gasCosts*: GasCosts # TODO - will be hidden at a lower layer
|
||||||
|
opCodeExec*: OpcodeExecutor
|
||||||
|
|
||||||
Error* = ref object
|
Error* = ref object
|
||||||
info*: string
|
info*: string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user