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

Added validate precision and subunit #380

Merged
merged 5 commits into from
Feb 13, 2023
Merged

Added validate precision and subunit #380

merged 5 commits into from
Feb 13, 2023

Conversation

miladz68
Copy link
Contributor

@miladz68 miladz68 commented Feb 7, 2023

This change is Reviewable

Copy link
Collaborator

@wojtek-coreum wojtek-coreum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @miladz68, @silverspase, and @ysv)


x/asset/ft/types/token.go line 98 at r1 (raw file):

// ValidatePrecision checks the provided precision is valid.
func ValidatePrecision(precision uint32) error {
	if precision == 0 || precision > maxPrecision {

precision 0 is a pretty valid usecase

Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not reference to certik in the PRs and comment. Update the final comment message with the content you provide please.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @silverspase, @wojtek-coreum, and @ysv)


x/asset/ft/types/token.go line 98 at r1 (raw file):

Previously, wojtek-coreum (Wojtek) wrote…

precision 0 is a pretty valid usecase

Do we handle a case with zero precision? Seems like we don't need to add additional denom to the metadata in that case.

@miladz68 miladz68 changed the title fixed issues found by certik round 2 Added validate precision and subunit Feb 8, 2023
Copy link
Contributor Author

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @silverspase, @wojtek-coreum, and @ysv)


x/asset/ft/types/token.go line 98 at r1 (raw file):

Previously, dzmitryhil (Dzmitry Hil) wrote…

Do we handle a case with zero precision? Seems like we don't need to add additional denom to the metadata in that case.

precision 0 is not supported by cosmos sdk, if we want to regsiter with bank metatdata, a precision higher than zero must be provided.

wojtek-coreum
wojtek-coreum previously approved these changes Feb 8, 2023
Copy link
Collaborator

@wojtek-coreum wojtek-coreum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @silverspase and @ysv)

wojtek-coreum
wojtek-coreum previously approved these changes Feb 10, 2023
Copy link
Collaborator

@wojtek-coreum wojtek-coreum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @silverspase and @ysv)

Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r3.
Reviewable status: 4 of 5 files reviewed, all discussions resolved (waiting on @silverspase, @wojtek-coreum, and @ysv)

Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 3 files at r1, 2 of 3 files at r2, 1 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @silverspase and @ysv)

Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @silverspase and @ysv)

Copy link
Contributor

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @silverspase and @ysv)

Copy link
Collaborator

@wojtek-coreum wojtek-coreum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @silverspase and @ysv)

@miladz68 miladz68 merged commit 3a2d9ef into master Feb 13, 2023
@miladz68 miladz68 deleted the milad/fix-certik-2 branch February 13, 2023 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants