-
Notifications
You must be signed in to change notification settings - Fork 33
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: support indexing denom metadata denom units #247
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.
Nice fix in addition with the changes to querier as well! LGTM
// Note, it is the caller's responsibility to ensure they are not overwriting | ||
// denomination metadata for assets with the same base denom, or rather to | ||
// ensure that metadata cannot exist for more than one base denom. The same | ||
// applies for base units. In other words, the caller must ensure base denoms | ||
// and their denom units are globally unique. | ||
func (k BaseKeeper) SetDenomMetaData(ctx sdk.Context, denomMetadata types.Metadata) { |
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.
What's the reason for having secondary validation here to ensure duplicate meta data deos not exist? Is it due to computational overhead compared to the benefit it can have?
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.
If say you have duplicate denom units in metadata, how do you know what unit to use? Also, it will overwrite any units if duplicates exist.
This reverts commit f97eb2c.
DenomUnits
acting a reverse lookup to the base denom's metadata. This will allow us to retrieve the base denomination and the corresponding metadata for IBC assets.BaseDenom
gRPC queryE.g. by providing
uatom
(assuming that's exists as a denom unit for the IBC atom metadata), one could fetch the true base denom (i.e.ibc/...
).closes: osmosis-labs/osmosis#1510