-
Notifications
You must be signed in to change notification settings - Fork 19
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
init: static schemas package #2225
Conversation
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.
Some fixes for the exports and a few other notes, but looking good.
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.
👍 LGTM
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.
🥅
- Tested build locally
- Imported in typescript ✅
- Imported in cjs ✅
// Only way to silence PolkadotJS API warnings we don't want | ||
console.warn = () => {}; |
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.
💯
Co-authored-by: Joe Caputo <joseph.caputo@unfinished.com>
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.
Looks great--however I think we're missing a couple of key functions:
- Should have a method that can retrieve all versions of a given schema name
- Should be able to query
<schema.fullname>@latest
to get the latest version
Granted, these are easy enough for anyone to do with access to the underlying array, but I think this package should provide those lookups as a convenience.
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.
Please respond to:
#2225 (review)
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.
- Read through changes
🚢 it!
Added requested functionality. Have to dismiss it here to be able to merge
Goal
The goal of this PR is create a new js package for schema name and ID mappings
Closes #2176
Discussion
dsnp
schemas from chain. The issue is that currently there is no easy way to get all schema names without providing namespaces. We can get all using raw state but then we would need to scale decode it.