55966c7e07
* 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).
18 lines
442 B
Go
18 lines
442 B
Go
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
|
|
}
|