a1e3655560
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.
18 lines
445 B
Go
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
|
|
}
|