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

Provide a set of displayType's for Trait struct #130

Open
ph0ph0 opened this issue Sep 21, 2022 · 7 comments
Open

Provide a set of displayType's for Trait struct #130

ph0ph0 opened this issue Sep 21, 2022 · 7 comments
Labels
Feature Feedback SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board

Comments

@ph0ph0
Copy link

ph0ph0 commented Sep 21, 2022

Instructions

Restricting the displayType's for the Trait struct would help with standardisation as it would inform off-chain consumers about what to expect and leave it up to them for how they consume the value contained in the Trait. I feel as though it is currently too vague to be truly useful, and a set of types should be provided that the dev can choose from.

There are many different names for the same/similar types across programming languages so we should probably settle on some sort of standard. ISO/IEC 11404 might be a place to start:

https://en.wikipedia.org/wiki/ISO/IEC_11404#:~:text=ISO%2FIEC%2011404%2C%20General%20Purpose,such%20as%20Fortran%20or%20C).
https://www.iso.org/standard/39479.html

@bjartek
Copy link
Contributor

bjartek commented Sep 21, 2022

Also relevant https://github.com/findonflow/find/blob/main/integratingMetadataViews.md

and https://docs.opensea.io/docs/metadata-standards

@joshuahannan
Copy link
Member

I'm not really sure what you're suggesting here. Can you please elaborate?

@ph0ph0
Copy link
Author

ph0ph0 commented Oct 12, 2022

Ye sure!

So in the comment above displayType property in Trait, it says:

"displayType is used to show some context about what this name and value represent for instance, you could set value to a unix timestamp, and specify displayType as "Date" to tell platforms to consume this trait as a date and not a number"

Since currently there is not list of displayTypes to choose from, anyone can put anything they like here. I think for this to be truly useful, there would have to be some standardisation? If there was a set of displayTypes to choose from, then apps would know what to expect and could handle each appropriately.

@joshuahannan
Copy link
Member

That is a good suggestion! So these would just be listed in the comments above displayType and in the documentation, or would it be something that is actually defined in the contract? And what are your suggestions for which ones we should use?

@bjartek
Copy link
Contributor

bjartek commented Oct 17, 2022

I think we should

  1. agree on a recommended way to display traits
  2. link to that documentation in the MetadataViews documentation

.find have already started that above in our github repo but I am not sure if that is where it should be/live.

Could we maybe setup a workshop to work on this with interested parties?

@joshuahannan
Copy link
Member

@bjartek If you'd like to organize and lead a workshop about it, please feel free to plan it, and we can help organize, and promote it in the Flow community. :)

@bjartek
Copy link
Contributor

bjartek commented Nov 2, 2022

I will see what I can cook together. I kind of like to have done some more internal thoughts about it first to present something that we at .find think is presentable before said meeting. Nothing that is set in stone I just like to have something coherent to send to participants in advance and present as a conversation-starter.

@joshuahannan joshuahannan added the SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feedback SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board
Projects
None yet
Development

No branches or pull requests

3 participants