vm,compiler: replace APPCALL with System.Contract.Call

Contract calls are performed via syscall System.Contract.Call
in NEO3. This implements this in compiler and removes APPCALL from the
VM.
This commit is contained in:
Evgenii Stratonikov 2020-05-07 14:38:19 +03:00
parent ec900c7ff7
commit 73c82584a3
13 changed files with 108 additions and 241 deletions

View file

@ -24,11 +24,11 @@ import (
// up for current blockchain.
func SpawnVM(ic *interop.Context) *vm.VM {
vm := vm.New()
bc := ic.Chain.(*Blockchain)
vm.SetScriptGetter(ic.GetContract)
vm.RegisterInteropGetter(getSystemInterop(ic))
vm.RegisterInteropGetter(getNeoInterop(ic))
vm.RegisterInteropGetter(bc.contracts.GetNativeInterop(ic))
if ic.Chain != nil {
vm.RegisterInteropGetter(ic.Chain.(*Blockchain).contracts.GetNativeInterop(ic))
}
return vm
}