-
Notifications
You must be signed in to change notification settings - Fork 393
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
feat(gno.land): add read-only metadata support to packages #3740
base: master
Are you sure you want to change the base?
Conversation
This message type allows to set metadata for a realm or package.
🛠 PR Checks Summary🔴 Maintainers must be able to edit this pull request (more info) Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🔴 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
func (ds *defaultStore) SetPackageMetaField(pkgPath, field string, value []byte) { | ||
key := backendPackageMetaFieldKey(pkgPath, field) | ||
ds.iavlStore.Set([]byte(key), value) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively a realm could be considered to save the metadata fields
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
Changes in this PR aim to explore adding support for metadata to packages.
Multiple user defined fields can be assigned as metadata.
An important part of metadata is also to allow keeping track of any tools within the gno.land ecosystem, including off chain tools, so they can optionally be associated to packages and realms. This can be done though the "tools" metadata field. This field accepts a JSON string with the following format:
For example:
Metadata can be optionally added to
addpkg
messages and once metadata fields are setted they can't be modified.Metadata can also be setted using the
gnokey maketx addpkg
command using the-meta
flag.