-
Notifications
You must be signed in to change notification settings - Fork 31
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: mint large amount of coins(gov mint) #709
feat: mint large amount of coins(gov mint) #709
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #709 +/- ##
==========================================
+ Coverage 61.83% 61.93% +0.09%
==========================================
Files 874 874
Lines 98557 98776 +219
==========================================
+ Hits 60944 61177 +233
+ Misses 33982 33965 -17
- Partials 3631 3634 +3
|
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.
According to the current design, OneTimeMintMaxCount
has the max count of the mints.
- One executes the minting, then the count is decreased. I think it must not change the value, as the name of value suggests.
- When the value is exported, it may have a zero-value, which will throw an error in the next chain initiation.
Therefore, I suggest you change the name of the value (e.g. NumberOfMintingLeft), which would mean the number of times you have left, and set the default value to zero. And modify the corresponding codes as the name suggests.
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.
Overall, I think the updated design has no flaws.
One side note: Can you be sure that this "one time" spec won't change? If there is even the slightest chance of such a case, the names of the relevant variables should be changed, and also the literal should be replaced by a config.
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.
How about using GovMint
or governanceMint
the value name instead of OneTimeMint
proto/lbm/foundation/v1/tx.proto
Outdated
@@ -50,6 +50,9 @@ service Msg { | |||
// Revoke revokes any authorization corresponding to the provided method name on the | |||
// granter that has been granted to the grantee. | |||
rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); | |||
|
|||
// OneTimeMint defines a one-time mint coins to the treasury. | |||
rpc OneTimeMint(MsgOneTimeMint) returns (MsgOneTimeMintResponse); |
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.
Please add cli and cli unittest.
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.
In the case of one-time mint, it is not appropriate to expose it to the cli because it should be performed only through proposals.
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.
The other proposal tx also has cli and cli test. For example, WithdrawFromTreasury
and Grant
. Check it please.
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 added cli and cli test. Thank you.
Please update swagger and statik file. |
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 forgot to mention query.proto. You need to add the corresponding endpoint to show the number of minting left.
@@ -37,6 +37,9 @@ message GenesisState { | |||
|
|||
// pool | |||
Pool pool = 8 [(gogoproto.nullable) = false]; | |||
|
|||
// govMintLeftCount is one time mint max count |
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.
How about changing one time mint
comment?
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 changed all one time mint
to gov mint
.
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.
Please update statik.go
file also. And could you change the title more easier to understand about this changes?
My system's statik.go is a little difference with upstream. But the code is not difference, just comment and new line. So it is not problem. Sorry. |
Description
It is necessary to mint a large amount of coins.
For this, x/foundation provides a minting function(one time mint) through proposals.
However, this function is limited to only 1 time.
closes: #XXXX
Motivation and context
How has this been tested?
Screenshots (if appropriate):
Checklist:
CHANGELOG.md
client/docs/swagger-ui/swagger.yaml