converted vm

This commit is contained in:
obscuren
2015-03-16 18:42:18 +01:00
parent bfcd2cf132
commit 91b0b14845
6 changed files with 75 additions and 58 deletions

View File

@ -9,7 +9,7 @@ import (
type ContextRef interface {
ReturnGas(*big.Int, *big.Int)
Address() []byte
Address() common.Address
SetCode([]byte)
}
@ -18,7 +18,7 @@ type Context struct {
self ContextRef
Code []byte
CodeAddr []byte
CodeAddr common.Address
value, Gas, UsedGas, Price *big.Int
@ -100,7 +100,7 @@ func (c *Context) ReturnGas(gas, price *big.Int) {
/*
* Set / Get
*/
func (c *Context) Address() []byte {
func (c *Context) Address() common.Address {
return c.self.Address()
}
@ -108,7 +108,7 @@ func (self *Context) SetCode(code []byte) {
self.Code = code
}
func (self *Context) SetCallCode(addr, code []byte) {
func (self *Context) SetCallCode(addr common.Address, code []byte) {
self.Code = code
self.CodeAddr = addr
}