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

Differentiating between a Deleted Data Key and an Unset Data Key #162

Open
b00ste opened this issue Jan 12, 2023 · 1 comment
Open

Differentiating between a Deleted Data Key and an Unset Data Key #162

b00ste opened this issue Jan 12, 2023 · 1 comment

Comments

@b00ste
Copy link
Member

b00ste commented Jan 12, 2023

Currently, we do not differentiate between these two types of Data Keys in the ERC725Y. But maybe there should be a standard way of treating data depending on the type of the Data

Querying any Unset Data Key should return: 0x
Querying a Deleted Data Key should return a specific value based on the previous Data Value of that Data key:

  • bytes - 0x00

  • bytes1 - 0x00

  • bytes2 - 0x0000
    [...]

  • bytes31 - 0x00000000000000000000000000000000000000000000000000000000000000

  • bytes32 - 0x0000000000000000000000000000000000000000000000000000000000000000

  • uint8 - 0x00

  • uint16 - 0x0000
    [...]

  • uint248 - 0x00000000000000000000000000000000000000000000000000000000000000

  • uint256 - 0x0000000000000000000000000000000000000000000000000000000000000000

  • string - 0x00

  • address - 0x0000000000000000000000000000000000000000

  • BitArray - 0x0000000000000000000000000000000000000000000000000000000000000000

  • CompactBytesArray: 0x0000

@CJ42
Copy link
Member

CJ42 commented Jan 12, 2023

@b00ste we cannot use the case of BitArray for this issue because it is not a valueType, it is a valueContent.

A BitArray can be used as a way to represent value stored as different type, whether as a bytes1, bytes2, etc... In the Key Manager we use bytes32 for the permission ranges to have up to 256 possible permission, but any other bytesN , can be used if less options are necessary (for instance 8 options would only need bytes1).

So I guess BitArray does not apply in this case, and this issue is only related to valueTypes defined in LSP2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants