neoneo-go/pkg/core/interop/iterator/interop.go

32 lines
726 B
Go
Raw Normal View History

package iterator
import (
"github.com/nspcc-dev/neo-go/pkg/core/interop"
"github.com/nspcc-dev/neo-go/pkg/vm"
)
// Concat concatenates 2 iterators into a single one.
2020-08-07 11:37:49 +00:00
func Concat(ic *interop.Context) error {
return vm.IteratorConcat(ic.VM)
}
// Create creates an iterator from array-like or map stack item.
2020-08-07 11:37:49 +00:00
func Create(ic *interop.Context) error {
return vm.IteratorCreate(ic.VM)
}
// Key returns current iterator key.
2020-08-07 11:37:49 +00:00
func Key(ic *interop.Context) error {
return vm.IteratorKey(ic.VM)
}
// Keys returns keys of the iterator.
2020-08-07 11:37:49 +00:00
func Keys(ic *interop.Context) error {
return vm.IteratorKeys(ic.VM)
}
// Values returns values of the iterator.
2020-08-07 11:37:49 +00:00
func Values(ic *interop.Context) error {
return vm.IteratorValues(ic.VM)
}