Merge branch 'develop' into poc8
This commit is contained in:
@ -16,8 +16,10 @@ type Execution struct {
|
||||
SkipTransfer bool
|
||||
}
|
||||
|
||||
func NewExecution(vm vm.VirtualMachine, address, input []byte, gas, gasPrice, value *big.Int) *Execution {
|
||||
return &Execution{vm: vm, address: address, input: input, Gas: gas, price: gasPrice, value: value}
|
||||
func NewExecution(env vm.Environment, address, input []byte, gas, gasPrice, value *big.Int) *Execution {
|
||||
evm := vm.New(env, vm.DebugVmTy)
|
||||
|
||||
return &Execution{vm: evm, address: address, input: input, Gas: gas, price: gasPrice, value: value}
|
||||
}
|
||||
|
||||
func (self *Execution) Addr() []byte {
|
||||
|
@ -43,9 +43,7 @@ func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error {
|
||||
}
|
||||
|
||||
func (self *VMEnv) vm(addr, data []byte, gas, price, value *big.Int) *Execution {
|
||||
evm := vm.New(self, vm.DebugVmTy)
|
||||
|
||||
return NewExecution(evm, addr, data, gas, price, value)
|
||||
return NewExecution(self, addr, data, gas, price, value)
|
||||
}
|
||||
|
||||
func (self *VMEnv) Call(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) {
|
||||
|
Reference in New Issue
Block a user