-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
R4R: Add custom validation for denom #6755
Conversation
@alessio I added the technique you described in #6744 but I'm still unsure how as an app developer I would utilize this change. When I add modules to my |
Codecov Report
@@ Coverage Diff @@
## master #6755 +/- ##
==========================================
- Coverage 55.50% 55.24% -0.26%
==========================================
Files 440 591 +151
Lines 29169 36949 +7780
==========================================
+ Hits 16190 20414 +4224
- Misses 11352 14427 +3075
- Partials 1627 2108 +481 |
This is unrelated to your question above, but with regards to IBC it would be cool if a custom denomination on chainA that is not supported by chainB could still be transferred to chainB without error. I think this should work fine if we represent denominations as hashes of the IBC path, assuming chainB supports hashes as denoms. cc/ @cwgoes @fedekunze |
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.
👍
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
sorry, making this a priority this week |
…om/cosmos/cosmos-sdk into okwme/6744-custom-denom-validation
…om/cosmos/cosmos-sdk into okwme/6744-custom-denom-validation
Would love some help understanding why test coverage is failing. |
@okwme 'cause codecov.io sucks in so many different ways. I will review again when it's ready, though so far code looks good, test cases seem sufficient. Don't bother please and keep up the good work! |
seems to be missing some values: # github.com/cosmos/cosmos-sdk/types_test [github.com/cosmos/cosmos-sdk/types.test]
types/coin_test.go:104:2: undefined: CoinDenomRegex
types/coin_test.go:109:14: undefined: Coin
types/coin_test.go:112:4: undefined: Coin
types/coin_test.go:113:4: undefined: Coin
types/coin_test.go:114:4: undefined: Coin
types/coin_test.go:115:4: undefined: Coin
types/coin_test.go:116:4: undefined: Coin
types/coin_test.go:120:3: undefined: require
types/coin_test.go:122:2: undefined: CoinDenomRegex
types/coin_test.go:122:19: undefined: DefaultCoinDenomRegex
types/coin_test.go:122:19: too many errors does this not happen when running tests locally? |
@marbar3778 oops the test format totally changed from |
@@ -163,6 +163,7 @@ be used to retrieve the actual proposal `Content`. Also the `NewMsgSubmitProposa | |||
|
|||
### Features | |||
|
|||
* [\#6755](https://github.com/cosmos/cosmos-sdk/pull/6755) Add custom regex validation for `Coin` denom by overwriting `CoinDenomRegex` when using `/types/coin.go`. |
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.
@okwme this should be moved across the the Launchpad branch as 0.39.2 will be the first release where this new feature is introduced.
Description
Allow
ValidateDenom
to be customized per application.closes: #6744
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes