neoneo-go/pkg/vm/interop.go

23 lines
542 B
Go
Raw Normal View History

package vm
import (
"fmt"
)
// InteropFunc allows to hook into the VM.
type InteropFunc func(vm *VM) error
2019-10-22 14:56:03 +00:00
// runtimeLog handles the syscall "Neo.Runtime.Log" for printing and logging stuff.
func runtimeLog(vm *VM) error {
item := vm.Estack().Pop()
fmt.Printf("NEO-GO-VM (log) > %s\n", item.Value())
return nil
}
2019-10-22 14:56:03 +00:00
// runtimeNotify handles the syscall "Neo.Runtime.Notify" for printing and logging stuff.
func runtimeNotify(vm *VM) error {
item := vm.Estack().Pop()
fmt.Printf("NEO-GO-VM (notify) > %s\n", item.Value())
return nil
}