mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-25 13:56:35 +00:00
37cb60a0b5
Add Next() and Value() to interop.Iterator and corresponding syscalls to compiler
39 lines
881 B
Go
39 lines
881 B
Go
package iterator
|
|
|
|
// Package iterator provides function signatures that can be used inside
|
|
// smart contracts that are written in the neo-go framework.
|
|
|
|
// Iterator stubs a NEO iterator object type.
|
|
type Iterator struct{}
|
|
|
|
// Create creates an iterator from the given items.
|
|
func Create(items []interface{}) Iterator {
|
|
return Iterator{}
|
|
}
|
|
|
|
// Key returns the iterator key.
|
|
// TODO: Better description for this.
|
|
func Key(it Iterator) interface{} {
|
|
return nil
|
|
}
|
|
|
|
// Keys returns the iterator keys.
|
|
func Keys(it Iterator) []interface{} {
|
|
return nil
|
|
}
|
|
|
|
// Next advances the iterator, return true if it is was successful
|
|
// and false otherwise.
|
|
func Next(it Iterator) bool {
|
|
return true
|
|
}
|
|
|
|
// Value returns the current iterator value.
|
|
func Value(it Iterator) interface{} {
|
|
return nil
|
|
}
|
|
|
|
// Values returns the iterator values.
|
|
func Values(it Iterator) []interface{} {
|
|
return nil
|
|
}
|