Draft of iterator and enumerator (CityOfZion/neo-storm#26)

* Draft of iterator and enumerator

* Added iterator API to the syscall mapping

* Added draft of the enumerator.go file

* Added enumerator interop API.

* Updated the changelog

Imported from CityOfZion/neo-storm (156093318b8612e810965bb1ea26e1babfb46cdd).
This commit is contained in:
Anthony De Meulemeester 2018-08-31 10:23:57 +02:00 committed by Roman Khimov
parent 3fc25e1431
commit 55966c7e07
5 changed files with 85 additions and 2 deletions

View file

@ -0,0 +1,18 @@
package iterator_contract
import (
"github.com/CityOfZion/neo-storm/interop/iterator"
"github.com/CityOfZion/neo-storm/interop/runtime"
"github.com/CityOfZion/neo-storm/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
}