quorum/vm/vm.go

39 lines
827 B
Go
Raw Normal View History

2014-10-18 04:31:20 -07:00
package vm
import "math/big"
2014-10-15 08:12:26 -07:00
// BIG FAT WARNING. THIS VM IS NOT YET IS USE!
// I want to get all VM tests pass first before updating this VM
type Vm struct {
env Environment
err error
2014-10-10 15:41:37 -07:00
depth int
}
func New(env Environment, typ Type) VirtualMachine {
switch typ {
case DebugVmTy:
return NewDebugVm(env)
case JitVmTy:
return NewJitVm(env)
default:
return &Vm{env: env}
}
2014-09-14 16:11:01 -07:00
}
2015-01-02 07:14:12 -08:00
func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.Int, data []byte) (ret []byte, err error) {
2014-12-12 13:24:27 -08:00
panic("not implemented")
}
func (self *Vm) Env() Environment {
return self.env
}
func (self *Vm) Depth() int {
return self.depth
2014-09-19 04:19:19 -07:00
}
2014-10-14 04:37:26 -07:00
func (self *Vm) Printf(format string, v ...interface{}) VirtualMachine { return self }
func (self *Vm) Endl() VirtualMachine { return self }