Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve functionalities of getData when dealing with arrays to retrieve array length only + entry at index #493

Open
1 of 4 tasks
CJ42 opened this issue Nov 21, 2024 · 0 comments
Labels
discussion enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@CJ42
Copy link
Collaborator

CJ42 commented Nov 21, 2024

I'm submitting a...

  • bug report
  • feature request
  • question about the decisions made in the repository
  • question about how to use this project

Summary

The function getData allows to query data keys of key type Array. However, it only allows to retrieve the full list of entries in the array. See code example in documentation below:

image

It would be useful if this function could be flexible enough to allow:

  • query a single entry at a specific index:
erc725js.getData("LSP12IssuedAssets[2]")

(should also handle the case if the index is over the array length.

  • query a subset in the array:
erc725js.getData("LSP12IssuedAssets[3:6]")
  • querying the array length only: TBD what the function call would look like
@CJ42 CJ42 added enhancement New feature or request help wanted Extra attention is needed question Further information is requested discussion labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant