2019-09-03 18:00:10 +03:00
|
|
|
package iteratorcontract
|
2018-08-31 10:23:57 +02:00
|
|
|
|
|
|
|
import (
|
2020-03-03 17:21:42 +03:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/iterator"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/storage"
|
2018-08-31 10:23:57 +02:00
|
|
|
)
|
|
|
|
|
2020-08-10 13:42:02 +03:00
|
|
|
// NotifyKeysAndValues sends notification with `foo` storage keys and values
|
|
|
|
func NotifyKeysAndValues() bool {
|
2021-01-12 13:39:31 +03:00
|
|
|
iter := storage.Find(storage.GetContext(), []byte("foo"), storage.None)
|
2021-01-12 12:30:21 +03:00
|
|
|
for iterator.Next(iter) {
|
|
|
|
runtime.Notify("found storage key-value pair", iterator.Value(iter))
|
|
|
|
}
|
2018-08-31 10:23:57 +02:00
|
|
|
return true
|
|
|
|
}
|