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

Bugs in getSchema for key of Array indexes #483

Open
1 of 4 tasks
CJ42 opened this issue Nov 5, 2024 · 0 comments
Open
1 of 4 tasks

Bugs in getSchema for key of Array indexes #483

CJ42 opened this issue Nov 5, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@CJ42
Copy link
Collaborator

CJ42 commented Nov 5, 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 getSchema contains the following 3x bugs:

returns keyType = Singleton for data keys of Array Indexes.

const erc725.js = new ERC725([
    {
        "name": "LSP12IssuedAssets[]",
        "key": "0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd",
        "keyType": "Array",
        "valueType": "address",
        "valueContent": "Address"
    }
])

// data key for `LSP12IssuedAssets[4]` at index 4
erc725js.getSchema("0x7c8c3416d6cda87cd42c71ea1843df2800000000000000000000000000000004")
image

returns null for data key of array indexes bigger than 9.

const erc725.js = new ERC725([
    {
        "name": "LSP12IssuedAssets[]",
        "key": "0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd",
        "keyType": "Array",
        "valueType": "address",
        "valueContent": "Address"
    }
])

// data key for `LSP12IssuedAssets[10]` at index 10
erc725js.getSchema("0x7c8c3416d6cda87cd42c71ea1843df280000000000000000000000000000000a")
image

Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

@CJ42 CJ42 added bug Something isn't working help wanted Extra attention is needed labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant