-
Notifications
You must be signed in to change notification settings - Fork 52
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
Commitment Module Denom Checks #55
Merged
Merged
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
kenta-elys
reviewed
Apr 20, 2023
"github.com/elys-network/elys/x/commitment/types" | ||
) | ||
|
||
func (k msgServer) CommitTokens(goCtx context.Context, msg *types.MsgCommitTokens) (*types.MsgCommitTokensResponse, error) { | ||
ctx := sdk.UnwrapSDKContext(goCtx) | ||
|
||
assetProfile, found := k.apKeeper.GetEntry(ctx, msg.Denom) | ||
if !found { |
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 couldn't find eden boost in asset profile genesis list. How can we commit it as it isn't listed.
cosmic-vagabond
added a commit
that referenced
this pull request
Apr 25, 2023
* add: scaffold incentive * add: declare incentive params -LP &Stake * add: implement hook interface functions in incentive module * add: implement staking hook interface functions in incentive module * add: add commitmentKeeper as incentive newkeeper param, declare keeper functions for staking hooks * add: calls appropriate keeper functions ffrom hook functions * fix: add one more param in calling newkeeper of testutil-incentive.go * fix: remove exception handling for checking block height in hook functions in order to be succeed in unit test * feat: add commitment hook and integrated into incentive module * feat: calculated eden & eden boost uncomitted token amount * fix: add parms config for incentive module * fix: refactoring proto define of incentive param * fix: remove wrongly merged code - double incentive keeper initiate * fix: rebuild protobuf * fix: correct data type of incentive params in config.yml and add an exception handling in staking hook ignore 0 block height * Commitment Module Denom Checks (#55) * check denom for commit enabled * commitEnabled config * withdraw check * eden-boost assetprofile entry * fix assetprofile enty decimals * fix: addcurrent epoch in incentive param and refactoring code baseaccording to the comments * fix: update getproperincentive param function and handle current epoch number * fix: add eden boost APR and use it in eden boost calculation * fix: change function to calculate delegation amount per delegator * test: 💍 fix test --------- Co-authored-by: Austin Haines <[email protected]> Co-authored-by: Cosmic Vagabond <[email protected]>
cosmic-vagabond
added a commit
that referenced
this pull request
May 9, 2023
* add: scaffold incentive * add: declare incentive params -LP &Stake * add: implement hook interface functions in incentive module * add: implement staking hook interface functions in incentive module * add: add commitmentKeeper as incentive newkeeper param, declare keeper functions for staking hooks * add: calls appropriate keeper functions ffrom hook functions * fix: add one more param in calling newkeeper of testutil-incentive.go * fix: remove exception handling for checking block height in hook functions in order to be succeed in unit test * feat: add commitment hook and integrated into incentive module * feat: calculated eden & eden boost uncomitted token amount * fix: add parms config for incentive module * fix: refactoring proto define of incentive param * fix: remove wrongly merged code - double incentive keeper initiate * fix: rebuild protobuf * fix: correct data type of incentive params in config.yml and add an exception handling in staking hook ignore 0 block height * Commitment Module Denom Checks (#55) * check denom for commit enabled * commitEnabled config * withdraw check * eden-boost assetprofile entry * fix assetprofile enty decimals * fix: addcurrent epoch in incentive param and refactoring code baseaccording to the comments * fix: update getproperincentive param function and handle current epoch number * fix: add eden boost APR and use it in eden boost calculation * fix: change function to calculate delegation amount per delegator * feat: add a map to record elys staker and delegators * feat: add a data map to record elys standard staking * feat: calculate commission to validator and give it * feat: update the corresponding commistment to give each validator commissions * fix: get rid of manual map for recording elys stake info in incentive module * fix: get rid of manual map to record elys stake, currently havng issue with loading params * feat: add protos from distribution module * feat: add query for getting validator outstanding rewards * feat: add query validator commission * feat: add query for getting validator slashes * feat: add query for getting delegation rewards * feat: dd delegation total rewards * feat: add a query for getting validators of a delegator * feat: add community pool query * feat: add query for getting delegator withdraw address * feat: add a tx to set withdraw address in incentive module * feat: add a tx to withdaraw validator commission * feat: add a tx for withdrawing delegator reward * feat: finished toten allocation * feat: finish implementation of queryies and txs * feat: handle staking hook * feat: add place holder for converting Elys to USDC * fix: remove referene to standard distribution module and fix export.go with distribution keeper * feat: fix genesis paraams of incentive module in config.yml * fix: update initi genesis and export genesis functions * fix: fix issue with incentive module genesis initialization and unit testing * fix: update incentive param initialization to fix unit testing issue * fix: 🐛 duplicate maccperms --------- Co-authored-by: Austin Haines <[email protected]> Co-authored-by: Cosmic Vagabond <[email protected]>
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.
Add checks for denoms that can be committed and withdrawn from the commitment module.
Ex: