-
Notifications
You must be signed in to change notification settings - Fork 103
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
feat(ecocredit): allow denom proposal handler #1072
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1072 +/- ##
==========================================
- Coverage 68.05% 61.81% -6.25%
==========================================
Files 206 207 +1
Lines 20839 19063 -1776
==========================================
- Hits 14182 11783 -2399
- Misses 5352 6025 +673
+ Partials 1305 1255 -50
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Looking good. I didn't add suggestions for all the changes needed but we should consistently refer to this either "ask denom" or "allowed denom". I think I prefer the latter as this will be less work when we introduce buy orders and the proto state message is currently AllowedDenom
.
return err | ||
} | ||
askDenom := p.AllowedDenom | ||
if err := k.stateStore.AllowedDenomTable().Insert(sdk.WrapSDKContext(ctx), &api.AllowedDenom{ |
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.
Do we need remove ask denom? With params, we could update KeyAllowedAskDenoms
param to remove denom.
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.
I think its preferred to have them in ORM even if we lose the ability to remove denoms. if its needed, i could add another handler for removing denoms, or we can wait til v0.46 where we will do msg_server based parameters management, and we can have more robust adding/removing/updating commands
Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
This reverts commit 4499637.
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.
Not sure what's causing the following error:
--- FAIL: TestInitCmd (0.08s)
panic: allow-denom-proposal flag redefined: output [recovered]
panic: allow-denom-proposal flag redefined: output
Was attempting to manually test and it looks like the command is not included in the list of available commands. |
are you running the correct command? it's showing up for me when i do |
Whoops. I was not. Looks like the credit type proposal command is listed in |
ahh ok, i think having it show up in ecocredit's tx commands might cause errors.. if you are willing to test that lmk, i can remove if it bugs out |
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.
Nice work! Tested with the updated example and again with a new denom. Would be nice to query allowed denoms from the CLI and to include those changes here.
- submit a proposal (used updated example)
- able to query proposal and confirmed fields
- unable to confirm denom included in allowed denoms using the CLI
- confirmed denom included in allowed denoms using gRPC endpoint
Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
opened #1093 for the 3rd check. i would prefer to do in a follow up, might be overwhelming for an additional reviewer to consume in one go here imo |
Can we maybe add fixes to credit type proposal to the issue and handle in one pull request then? Adding the query command will be a small amount of changes and I'm assuming these fixes would be too. |
just added those fixes in 6fd0058 👍🏻 |
Tested. No longer listed in |
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.
tACK. Nice work. 💪
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.
lgtm
Description
Closes: #1045
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change