neo-modules icon indicating copy to clipboard operation
neo-modules copied to clipboard

RpcServer convert enumerator to array for rpcclient

Open Tommo-L opened this issue 5 years ago • 7 comments

When we meet enumerator type in contract, we can convert to array in rpcserver for rpclient to use.

E.g:

// NFT contract
public static enumerator tokensOf(byte[] owner)

Tommo-L avatar Apr 23 '20 08:04 Tommo-L

When we meet enumerator type in contract, we can convert to array in rpcserver for rpclient to use.

E.g:

// NFT contract
public static enumerator tokensOf(byte[] owner)

Highly Agree with it. It is too difficult for front-end developers and SDK to handle the enumerator directly.

steven1227 avatar Apr 23 '20 09:04 steven1227

I think this is also needed on neo-cli invoke.

ProDog avatar May 26 '20 06:05 ProDog

It is better to add the pagination index parameter, which can be changed later

doubiliu avatar May 26 '20 08:05 doubiliu

@ProDog You can open an issue for neo-cli 👍

joeqian10 avatar May 26 '20 09:05 joeqian10

@ProDog You can open an issue for neo-cli 👍

https://github.com/neo-project/neo/issues/3010

ProDog avatar May 26 '20 09:05 ProDog

An enumerator can contain any number of elements, and you may have problems converting it to an array.

erikzhang avatar May 26 '20 12:05 erikzhang

@erikzhang Are you concerned about the size limit of an array? @doubiliu mentioned above to add paging to solve this problem.

joeqian10 avatar May 27 '20 02:05 joeqian10