-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add get/set_prefixed_denom APIs + apply some improvements #504
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Farhad-Shabani
added
the
A: breaking
Admin: breaking change that may impact operators
label
Mar 7, 2023
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #504 +/- ##
==========================================
- Coverage 71.94% 71.90% -0.05%
==========================================
Files 126 127 +1
Lines 15771 15826 +55
==========================================
+ Hits 11347 11380 +33
- Misses 4424 4446 +22
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #502
Description
Following the review of the similar context on
IBC-go
and the revisiting codes that were related to thePrefixedDenom
, I have also applied and included some tweaks in this PR as follows. Did so for the sake of time-saving, I hope you'll like them ;)Added missing APIs
Some API adjustment
The
is_send_enabled
andis_receive_enabled
methods were returning a boolean whose sole purpose was to propagate errors. This does not correspond with Rust's error-handling convention and against the Result type mean. It was suitable, as long as no specific error reporting was requiredMore consistent naming
address
and othersaccount
for the variable/method names that are related toAccountId
type.Refactor the return type of
process_recv_packet_execute
I came up with an idea to simplify the return type to the
Result<ModuleExtras, TokenTransferError>
, to make it easier to understand and implement new changes.Changes around
hash
functionHash function moved to utils since it isn't called only by commitments. Furthermore, the return type of the hasher function has been changed to the
[u8;32]
type for a fix-sized and more solid type. The same proposal looks applicable forCommitmentRoot
,CommitmentProofBytes
, andCommitmentPrefix
to improve security matters, IMO.PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.