Skip to content

Bugs in getSchema for key of Array indexes #483

Open

Description

@CJ42

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.)

Activity

  1. added
    bugSomething isn't working
    help wantedExtra attention is needed
    on Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions