neo-go/examples/iterator/iterator.go
Roman Khimov a1e3655560 interop: move into pkg/interop, replace pkg/vm/api
neo-storm has developed more wrappers for syscall APIs, so they can and should
be used as a drop-in replacement for pkg/vm/api. Moving it out of vm, as it's
not exactly related to the VM itself.
2019-08-15 19:41:51 +03:00

18 lines
445 B
Go

package iterator_contract
import (
"github.com/CityOfZion/neo-go/pkg/interop/iterator"
"github.com/CityOfZion/neo-go/pkg/interop/runtime"
"github.com/CityOfZion/neo-go/pkg/interop/storage"
)
func Main() bool {
iter := storage.Find(storage.GetContext(), []byte("foo"))
values := iterator.Values(iter)
keys := iterator.Keys(iter)
runtime.Notify("found storage values", values)
runtime.Notify("found storage keys", keys)
return true
}