-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore(interchain-token-service): verify input validation #208
base: main
Are you sure you want to change the base?
Conversation
- prohibit deploying token with negative supply - minor cleanup on docstring
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #208 +/- ##
=======================================
Coverage 95.43% 95.43%
=======================================
Files 62 62
Lines 3593 3595 +2
=======================================
+ Hits 3429 3431 +2
Misses 164 164 ☔ View full report in Codecov by Sentry. |
@@ -229,6 +229,8 @@ impl InterchainTokenServiceInterface for InterchainTokenService { | |||
|
|||
caller.require_auth(); | |||
|
|||
ensure!(initial_supply >= 0, ContractError::InvalidSupply); |
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.
no minter and 0 initial supply is a weird case that we can check for too
/// Returns `ContractError` if the deployment fails, the token ID is invalid, or token metadata is invalid. | ||
/// - `ContractError::InvalidDestinationChain`: If the `destination_chain` is the current chain. | ||
/// - `ContractError::InvalidTokenId`: If the token ID is invalid. | ||
/// - Errors propagated from `token_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.
nit: Is this necessary? If so, we need to update similar docstrings for other functions for consistency.
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.
It's consistent with the rest of the ITS docstring
AXE-7246