Skip to content
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

modifications for mint amount distribution #170

Conversation

antstalepresh
Copy link
Contributor

No description provided.

@antstalepresh antstalepresh marked this pull request as draft May 12, 2021 14:35
coin = mintKeeper.GetPoolAllocatableAsset(suite.ctx)
suite.Equal("316258stake", coin.String())
coin = mintKeeper.GetPoolAllocatableAsset(suite.ctx, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1481290)), sdk.NewCoin("test", sdk.NewInt(12389190))))
suite.Equal("296258stake", coin.String())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we pick some nicer numbers, or comment the choice of numbers / their relations? I have no idea what the % ratio between these numbers is by just looking at it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it's nicer now as logic is simplified

x/mint/keeper/keeper.go Outdated Show resolved Hide resolved
x/mint/keeper/keeper.go Outdated Show resolved Hide resolved
x/mint/keeper/keeper.go Outdated Show resolved Hide resolved
@antstalepresh antstalepresh changed the title possible modifications for mint amount distribution modifications for mint amount distribution May 17, 2021
@antstalepresh antstalepresh marked this pull request as ready for review May 17, 2021 18:02
@antstalepresh antstalepresh merged commit 94cf064 into pool_incentives_own_beginblocker_to_hooks May 17, 2021
@antstalepresh antstalepresh deleted the possible_modifications_for_mint_amount_distribution branch May 17, 2021 18:02
sunnya97 added a commit that referenced this pull request May 17, 2021
* merge pool incentives proposals into one

* portion of distribution into community pool

* pool incentives own beginblocker to hooks

* fix gamm tests for gas overflow

* add distribution test for community pool of portion

* add test for community pool increase when records are not set

* move allocation ratio from pool incentives to mint

* fix test anyway

* add logger for empty distribution event

* modifications for mint amount distribution (#170)

* possible modifications for mint amount distribution

* updates so far

* updates so far

* fix tests for distribution

* changes for BeginBlocker function call on mint distribution finish

* Apply suggestions from code review

Co-authored-by: Sunny Aggarwal <sunny@sikka.tech>
sunnya97 added a commit that referenced this pull request May 17, 2021
* Add `pool-incentives` module

* Update `app.go`

* Add the gov clients for the `pool-incentives` module

* Fix `CreatePoolPots` to create pots based on the denom of the pool’s share

* Add some tests

* Fix the missed initializer for the `EditPoolIncentivesProposal`

* Change the distr record to be able to be registered only

* Add initial docs

* Update x/pool-incentives/types/key.go

Co-authored-by: Sunny Aggarwal <sunny@sikka.tech>

* Update x/pool-incentives/spec/02_state.md

Co-authored-by: Sunny Aggarwal <sunny@sikka.tech>

* Merge pool incentives proposals into one (#161)

* merge pool incentives proposals into one

* Update x/pool-incentives/client/cli/tx.go

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>

* small fixes for comments and error handling for pool-incentives (#168)

* Portion of distribution into community pool (#166)

* merge pool incentives proposals into one

* portion of distribution into community pool

* fix gamm tests for gas overflow

* add distribution test for community pool of portion

* add test for community pool increase when records are not set

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>

* Update x/pool-incentives/spec/01_concepts.md

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>

* Update x/pool-incentives/keeper/distr_test.go

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>

* Update x/pool-incentives/keeper/distr_test.go

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>

* Update x/pool-incentives/keeper/distr_test.go

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>

* Update x/pool-incentives/keeper/distr_test.go

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>

* switch pool_incentives to use hooks instead of begin_blocker (#167)

* merge pool incentives proposals into one

* portion of distribution into community pool

* pool incentives own beginblocker to hooks

* fix gamm tests for gas overflow

* add distribution test for community pool of portion

* add test for community pool increase when records are not set

* move allocation ratio from pool incentives to mint

* fix test anyway

* add logger for empty distribution event

* modifications for mint amount distribution (#170)

* possible modifications for mint amount distribution

* updates so far

* updates so far

* fix tests for distribution

* changes for BeginBlocker function call on mint distribution finish

* Apply suggestions from code review

Co-authored-by: Sunny Aggarwal <sunny@sikka.tech>

* add right denom in preparegenesis

* should error if try to distribute to a pot that doesn't exist

* address @ValarDragon's comment

Co-authored-by: Sunny Aggarwal <sunny@sikka.tech>
Co-authored-by: antstalepresh <36045227+antstalepresh@users.noreply.github.com>
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Sunny Aggarwal <sunnya97@protonmail.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants