nspcc-dev / neo-go

Go Node and SDK for the NEO blockchain
MIT License
118 stars 77 forks source link

Iterator support in the RPC binding generator #2768

Open roman-khimov opened 1 year ago

roman-khimov commented 1 year ago

On one hand it's pretty simple, any InteropInterface{} return item can be treated as an iterator by default (other types are very rare), but on the other we have no idea what's the type of an individual iterator element. Even #2767 doesn't help a lot without additional annotations.

roman-khimov commented 1 year ago

Something like storage.Find(..., returnValue interface{}) with type derived from returnValue can help in absence of generics (#2376).

roman-khimov commented 10 months ago

Generics can fix it easily though.