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

[LSP2] add enum as valueContent (or valueType?) #149

Open
CJ42 opened this issue Dec 7, 2022 · 0 comments
Open

[LSP2] add enum as valueContent (or valueType?) #149

CJ42 opened this issue Dec 7, 2022 · 0 comments

Comments

@CJ42
Copy link
Member

CJ42 commented Dec 7, 2022

When looking at the following JSON Schema for the metadata key LSP8TokenIdType

{
    "name": "LSP8TokenIdType",
    "key": "0x715f248956de7ce65e94d9d836bfead479f7e70d69b718d47bfe7b00e05b4fe4",
    "keyType": "Singleton",
    "valueType": "uint256",
    "valueContent": "Number"
}

It is not clear by looking directly at the schema that there is only 3 possible values that can be stored under this data key.

image

It would be useful to identify when there are only 3 possible enumerable values.

It should also be flexible enough to allow possible enum values like:

  • numbers (e.g: Player level = 1, 2 or 3)
  • literal string (e.g: Proposal = Pending, Queued, Active, Expired)
  • literal bytesN

Related to:

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

1 participant