Changed context and ADDMOD, MULMOD

* Cleaned up VM execution. VM run now takes a context
* ADDMOD/MULMOD - removed incorrect cast
This commit is contained in:
obscuren
2015-03-13 13:44:15 +01:00
parent 80592f244d
commit f76cc6699e
6 changed files with 44 additions and 24 deletions

View File

@ -1,10 +1,8 @@
package vm
import "math/big"
type VirtualMachine interface {
Env() Environment
Run(me, caller ContextRef, code []byte, value, gas, price *big.Int, data []byte) ([]byte, error)
Run(context *Context, data []byte) ([]byte, error)
Printf(string, ...interface{}) VirtualMachine
Endl() VirtualMachine
}