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

LastMetadataId key #217

Open
giorgionocera opened this issue Oct 5, 2022 · 0 comments
Open

LastMetadataId key #217

giorgionocera opened this issue Oct 5, 2022 · 0 comments
Assignees
Labels
NFT question Further information is requested

Comments

@giorgionocera
Copy link
Contributor

In the nft module, why do we use both CollId and LastMetadataId as values in the store?

info := types.LastMetadataIdInfo {
	CollId:         collId,
	LastMetadataId: id,
}

Since we are using the CollID as the key, why don't we use only the LastMetadataId as the value?

func (k Keeper) SetLastMetadataId(ctx sdk.Context, collId, id uint64) {
info := types.LastMetadataIdInfo{
CollId: collId,
LastMetadataId: id,
}
bz := k.cdc.MustMarshal(&info)
store := ctx.KVStore(k.storeKey)
store.Set(types.LastMetadataId(collId), bz)
}

@giorgionocera giorgionocera added question Further information is requested NFT labels Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NFT question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants