interop: move into pkg/interop, replace pkg/vm/api
neo-storm has developed more wrappers for syscall APIs, so they can and should be used as a drop-in replacement for pkg/vm/api. Moving it out of vm, as it's not exactly related to the VM itself.
This commit is contained in:
parent
7cd91610df
commit
a1e3655560
38 changed files with 58 additions and 281 deletions
29
pkg/interop/enumerator/enumerator.go
Normal file
29
pkg/interop/enumerator/enumerator.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package enumerator
|
||||
|
||||
// Package enumerator provides function signatures that can be used inside
|
||||
// smart contracts that are written in the neo-go framework.
|
||||
|
||||
// TODO: Check enumerator use cases and add them to the examples folder.
|
||||
|
||||
// Enumerator stubs a NEO enumerator type.
|
||||
type Enumerator struct{}
|
||||
|
||||
// Create creates a new enumerator from the given items.
|
||||
func Create(items []interface{}) Enumerator {
|
||||
return Enumerator{}
|
||||
}
|
||||
|
||||
// Next returns the next item in the iteration.
|
||||
func Next(e Enumerator) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the enumerator value.
|
||||
func Value(e Enumerator) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Concat concats the 2 given enumerators.
|
||||
func Concat(a, b Enumerator) Enumerator {
|
||||
return Enumerator{}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue