mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-07 15:07:36 +00:00
Draft of iterator and enumerator (CityOfZion/neo-storm#26)
* 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).
This commit is contained in:
parent
3fc25e1431
commit
55966c7e07
5 changed files with 85 additions and 2 deletions
28
interop/iterator/iterator.go
Normal file
28
interop/iterator/iterator.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package iterator
|
||||
|
||||
// Package iterator provides function signatures that can be used inside
|
||||
// smart contracts that are written in the neo-storm 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{}
|
||||
}
|
||||
|
||||
// TODO: Better description for this.
|
||||
// Key returns the iterator key.
|
||||
func Key(it Iterator) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Keys returns the iterator keys.
|
||||
func Keys(it Iterator) []interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Values returns the iterator values.
|
||||
func Values(it Iterator) []interface{} {
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue