2018-08-31 08:23:57 +00:00
|
|
|
package iterator_contract
|
|
|
|
|
|
|
|
import (
|
2019-08-15 16:41:51 +00:00
|
|
|
"github.com/CityOfZion/neo-go/pkg/interop/iterator"
|
|
|
|
"github.com/CityOfZion/neo-go/pkg/interop/runtime"
|
|
|
|
"github.com/CityOfZion/neo-go/pkg/interop/storage"
|
2018-08-31 08:23:57 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|