-
Notifications
You must be signed in to change notification settings - Fork 21
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: support multiple coins for funding in stakers module #185
Conversation
WalkthroughThe recent changes in the KYVE Network codebase involve updating the representation of Changes
docs/static/openapi.yml: ## Alterations to the declarations of exported or public entities
proto/kyve/query/v1beta1/query.proto: ## Short summary In the proto/kyve/stakers/v1beta1/events.proto: ## Summary In the
proto/kyve/stakers/v1beta1/stakers.proto: ## Short summary In the proto/kyve/stakers/v1beta1/tx.proto: ## Short Summary In the testutil/integration/checks.go: ## Summary In the x/bundles/keeper/keeper_suite_inflation_splitting_test.go: ### Alterations to the declarations of exported or public entities:
x/bundles/keeper/keeper_suite_stakers_leave_test.go: ## Short summary In the x/bundles/keeper/keeper_suite_valid_bundles_test.go: ### Alterations to the declarations of exported or public entities:
x/bundles/keeper/keeper_suite_zero_delegation_test.go: ## Short Summary Alterations to the declarations of exported or public entities
CHANGELOG.md: ## Short summary The change introduces support for multiple coins in the x/bundles/keeper/logic_bundles.go: ## Short Summary In the Alterations to the declarations of exported or public entities
x/bundles/types/expected_keepers.go: ## Short Summary In the Alterations to the declarations of exported or public entities
x/stakers/keeper/logic_stakers.go: ## Short Summary The changes in Alterations to the declarations of exported or public entities
x/stakers/keeper/msg_server_claim_commission_rewards_test.go: ### Alterations to the declarations of exported or public entities
x/stakers/types/message_claim_commission_rewards.go: ## Update existing summary For this task, the existing summary is still valid. Short SummaryAdded validation for the Alterations to the declarations of exported or public entities
|
3c3776b
to
eb482c2
Compare
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.
Actionable comments posted: 0
Out of diff range and nitpick comments (6)
x/stakers/spec/03_messages.md (3)
Line range hint
25-25
: Add a comma after "passed".- After the `CommissionChangeTime` has passed the new commission is applied. + After the `CommissionChangeTime` has passed, the new commission is applied.
Line range hint
36-36
: Add a comma after "poolId".- For joining a pool the staker must provide the poolId and an address which is operated by the protocol node. + For joining a pool, the staker must provide the poolId and an address which is operated by the protocol node.
Line range hint
51-51
: Add a newline at the end of the file.+
x/stakers/spec/07_exported.md (2)
Line range hint
16-16
: Replace hard tabs with spaces.- LeavePool(ctx sdk.Context, staker string, poolId uint64) + LeavePool(ctx sdk.Context, staker string, poolId uint64)
Line range hint
24-24
: Replace hard tabs with spaces.- GetCommission(ctx sdk.Context, stakerAddress string) sdk.Dec + GetCommission(ctx sdk.Context, stakerAddress string) sdk.Decx/stakers/spec/05_events.md (1)
Line range hint
157-157
: Add a newline character at the end of the file for consistency.- } + } +
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (4)
x/query/types/query.pb.go
is excluded by!**/*.pb.go
x/stakers/types/events.pb.go
is excluded by!**/*.pb.go
x/stakers/types/stakers.pb.go
is excluded by!**/*.pb.go
x/stakers/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (22)
- docs/static/openapi.yml (6 hunks)
- proto/kyve/query/v1beta1/query.proto (1 hunks)
- proto/kyve/stakers/v1beta1/events.proto (2 hunks)
- proto/kyve/stakers/v1beta1/stakers.proto (2 hunks)
- proto/kyve/stakers/v1beta1/tx.proto (2 hunks)
- testutil/integration/checks.go (1 hunks)
- x/bundles/keeper/keeper_suite_inflation_splitting_test.go (12 hunks)
- x/bundles/keeper/keeper_suite_stakers_leave_test.go (1 hunks)
- x/bundles/keeper/keeper_suite_valid_bundles_test.go (7 hunks)
- x/bundles/keeper/keeper_suite_zero_delegation_test.go (2 hunks)
- x/bundles/keeper/logic_bundles.go (1 hunks)
- x/bundles/types/expected_keepers.go (1 hunks)
- x/stakers/client/cli/tx_claim_commission_rewards.go (2 hunks)
- x/stakers/keeper/getters_staker.go (1 hunks)
- x/stakers/keeper/keeper_suite_test.go (1 hunks)
- x/stakers/keeper/logic_stakers.go (3 hunks)
- x/stakers/keeper/msg_server_claim_commission_rewards.go (2 hunks)
- x/stakers/keeper/msg_server_claim_commission_rewards_test.go (6 hunks)
- x/stakers/spec/03_messages.md (1 hunks)
- x/stakers/spec/05_events.md (1 hunks)
- x/stakers/spec/07_exported.md (1 hunks)
- x/stakers/types/message_claim_commission_rewards.go (1 hunks)
Files skipped from review due to trivial changes (2)
- x/bundles/keeper/logic_bundles.go
- x/stakers/keeper/keeper_suite_test.go
Additional comments not posted (59)
x/stakers/client/cli/tx_claim_commission_rewards.go (2)
8-8
: LGTM! The import ofsdk
is necessary for handling multiple coins.
23-23
: LGTM! Parsing the amount assdk.Coins
is appropriate for handling multiple coins.x/stakers/types/message_claim_commission_rewards.go (1)
42-45
: LGTM! The validation logic correctly handles multiple coins.x/stakers/keeper/msg_server_claim_commission_rewards.go (3)
24-25
: LGTM! The check for sufficient rewards correctly handles multiple coins.
29-30
: LGTM! The transfer of multiple coins is handled correctly.
35-35
: LGTM! The update of commission rewards correctly handles multiple coins.x/stakers/spec/03_messages.md (1)
31-32
: LGTM! The documentation correctly reflects the support for multiple coins.x/bundles/types/expected_keepers.go (1)
31-31
: LGTM! The interface method correctly supports multiple coins.proto/kyve/stakers/v1beta1/events.proto (1)
71-76
: LGTM! The protobuf message correctly supports multiple coins.x/stakers/keeper/logic_stakers.go (2)
17-19
: LGTM! The function correctly handles multiple coins.
29-29
: LGTM! The transfer of multiple coins is handled correctly.x/stakers/spec/07_exported.md (1)
68-68
: LGTM! The documentation correctly reflects the support for multiple coins.proto/kyve/stakers/v1beta1/stakers.proto (1)
31-36
: The change to makecommission_rewards
a repeated field of typecosmos.base.v1beta1.Coin
looks good and aligns with the objective of supporting multiple coins for commission rewards.x/stakers/spec/05_events.md (1)
101-106
: The change to makeamount
a repeated field of typecosmos.base.v1beta1.Coin
in theEventClaimCommissionRewards
message is appropriate and aligns with the objective of supporting multiple coins for commission rewards.proto/kyve/stakers/v1beta1/tx.proto (1)
93-97
: The change to makeamount
a repeated field of typecosmos.base.v1beta1.Coin
in theMsgClaimCommissionRewards
message is appropriate and aligns with the objective of supporting multiple coins for commission rewards.proto/kyve/query/v1beta1/query.proto (1)
132-137
: The change to makecommission_rewards
a repeated field of typecosmos.base.v1beta1.Coin
in theStakerMetadata
message is appropriate and aligns with the objective of supporting multiple coins for commission rewards.x/stakers/keeper/getters_staker.go (1)
42-45
: The update to handlesdk.Coins
for theamount
parameter in theupdateStakerCommissionRewards
function is appropriate and aligns with the objective of supporting multiple coins for commission rewards.x/bundles/keeper/keeper_suite_stakers_leave_test.go (1)
257-257
: Update assertion to handle multiple denominations.The change correctly updates the assertion to handle multiple denominations by using
AmountOf(globalTypes.Denom).Uint64()
.x/stakers/keeper/msg_server_claim_commission_rewards_test.go (11)
199-211
: Ensure the calculation of commission rewards is accurate.The calculation of commission rewards
(10_000 - (10_000 * 0.01) - (100 * 0.5)) * 0.1 + (100 * 0.5)
should be verified for accuracy. Ensure that the logic aligns with the expected reward distribution.
221-238
: Good test coverage for non-staker account claiming rewards.The test case correctly verifies that a non-staker account cannot claim rewards and ensures the commission rewards remain unchanged.
242-260
: Good validation for claiming more rewards than available.The test case correctly verifies that claiming more rewards than available results in an error and ensures the commission rewards remain unchanged.
264-279
: Good validation for claiming zero rewards.The test case correctly verifies that claiming zero rewards does not alter the commission rewards or the staker's balance.
281-296
: Good validation for claiming partial rewards.The test case correctly verifies that claiming partial rewards updates the commission rewards and the staker's balance as expected.
299-368
: Good validation for claiming partial rewards twice.The test case correctly verifies that claiming partial rewards twice updates the commission rewards and the staker's balance as expected.
370-385
: Good validation for claiming all rewards.The test case correctly verifies that claiming all rewards updates the commission rewards and the staker's balance as expected.
388-459
: Good validation for claiming multiple coins.The test case correctly verifies that claiming multiple coins updates the commission rewards and the staker's balance as expected.
461-535
: Good validation for claiming one coin of multiple coins.The test case correctly verifies that claiming one coin of multiple coins updates the commission rewards and the staker's balance as expected.
Line range hint
537-614
: Good validation for claiming more rewards than available with multiple coins.The test case correctly verifies that claiming more rewards than available with multiple coins results in an error and ensures the commission rewards remain unchanged.
616-689
: Good validation for claiming a coin which does not exist.The test case correctly verifies that claiming a coin which does not exist results in an error and ensures the commission rewards remain unchanged.
testutil/integration/checks.go (4)
169-169
: InitializeexpectedBalance
assdk.NewCoins()
.The initialization of
expectedBalance
assdk.NewCoins()
is correct and aligns with the changes to handle multiple coins.
172-172
: UpdateexpectedBalance
by addingstaker.CommissionRewards
.The update to
expectedBalance
by addingstaker.CommissionRewards
usingexpectedBalance.Add(staker.CommissionRewards...)
is correct and ensures that all commission rewards are accounted for.
176-176
: RetrieveactualBalance
usingGetAllBalances
.The retrieval of
actualBalance
usingsuite.App().BankKeeper.GetAllBalances(suite.Ctx(), moduleAcc)
is appropriate for handling multiple coins.
178-178
: CompareactualBalance
withexpectedBalance
.The comparison of
actualBalance
withexpectedBalance
usingExpect(actualBalance.String()).To(Equal(expectedBalance.String()))
is correct and ensures the integrity of the stakers module assets.x/bundles/keeper/keeper_suite_zero_delegation_test.go (1)
476-476
: LGTM! The change to accessuploader.CommissionRewards
usingAmountOf(globaltypes.Denom).Uint64()
aligns with the update to handle multiple coins for commission rewards.x/bundles/keeper/keeper_suite_inflation_splitting_test.go (12)
184-184
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
277-277
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
370-370
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
476-476
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
583-583
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
690-690
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
795-795
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
902-902
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
1009-1009
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
1114-1114
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
1221-1221
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.
1328-1328
: Update assertion to check specific denomination inuploader.CommissionRewards
.This change correctly updates the assertion to check the amount of a specific denomination in
uploader.CommissionRewards
.x/bundles/keeper/keeper_suite_valid_bundles_test.go (7)
248-248
: Update assertion forCommissionRewards
.The change to use
AmountOf(globalTypes.Denom).Uint64()
forCommissionRewards
is correct and consistent with the new structure.
397-397
: Update assertion forCommissionRewards
.The change to use
AmountOf(globalTypes.Denom).Uint64()
forCommissionRewards
is correct and consistent with the new structure.
409-409
: Update assertion forCommissionRewards
.The change to use
AmountOf(globalTypes.Denom).Uint64()
forCommissionRewards
is correct and consistent with the new structure.
575-575
: Update assertion forCommissionRewards
.The change to use
AmountOf(globalTypes.Denom).Uint64()
forCommissionRewards
is correct and consistent with the new structure.
754-754
: Update assertion forCommissionRewards
.The change to use
AmountOf(globalTypes.Denom).Uint64()
forCommissionRewards
is correct and consistent with the new structure.
943-943
: Update assertion forCommissionRewards
.The change to use
AmountOf(globalTypes.Denom).Uint64()
forCommissionRewards
is correct and consistent with the new structure.
1094-1094
: Update assertion forCommissionRewards
.The change to use
AmountOf(globalTypes.Denom).Uint64()
forCommissionRewards
is correct and consistent with the new structure.docs/static/openapi.yml (6)
612-631
: Changes to support multiple coins forcommission_rewards
look good.
3946-3965
: Changes to support multiple coins forcommission_rewards
look good.
6323-6342
: Changes to support multiple coins forcommission_rewards
look good.
6781-6800
: Changes to support multiple coins forcommission_rewards
look good.
7345-7364
: Changes to support multiple coins forcommission_rewards
look good.
7852-7871
: Changes to support multiple coins forcommission_rewards
look good.
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- CHANGELOG.md (1 hunks)
Additional Context Used
LanguageTool (29)
CHANGELOG.md (29)
Near line 32: Unpaired symbol: ‘[’ seems to be missing
Context: ...ploader-role. ### Improvements - [#182](https://github.com/KYVENetwork/chain/pu...
Near line 43: Unpaired symbol: ‘[’ seems to be missing
Context: ... Add funders back to pool query. - [#163](https://github.com/KYVENetwork/chain/pu...
Near line 45: Unpaired symbol: ‘[’ seems to be missing
Context: ...YVE and Cosmos REST queries. ## [v1.4.0](https://github.com/KYVENetwork/chain/re...
Near line 50: Unpaired symbol: ‘[’ seems to be missing
Context: ...nhancing-kyves-funders-concept). - [#128](https://github.com/KYVENetwork/chain/pu...
Near line 59: Unpaired symbol: ‘[’ seems to be missing
Context: ...47.6-kyve-rc0)). ### Bug Fixes - [#149](https://github.com/KYVENetwork/chain/pu...
Near line 62: Unpaired symbol: ‘[’ seems to be missing
Context: ...gs amount for tx redelegate. ## [v1.3.2](https://github.com/KYVENetwork/chain/re...
Near line 73: Unpaired symbol: ‘[’ seems to be missing
Context: ...ap to genesis import/export. ## [v1.3.1](https://github.com/KYVENetwork/chain/re...
Near line 77: Unpaired symbol: ‘[’ seems to be missing
Context: ....1) - 2023-08-02 ### Bug Fixes - [#122](https://github.com/KYVENetwork/chain/pu...
Near line 79: Unpaired symbol: ‘[’ seems to be missing
Context: ...kefile go version parse cmd. ## [v1.3.0](https://github.com/KYVENetwork/chain/re...
Near line 96: Unpaired symbol: ‘[’ seems to be missing
Context: ...ds to be claimed. ### Bug Fixes - [#96](https://github.com/KYVENetwork/chain/pu...
Near line 100: Using many exclamation marks might seem excessive (in this case: 24 exclamation marks for a text that’s 11678 characters long)
Context: ...de auth module. ### Client Breaking - ! (x/stakers
) [#46](https://github.com/...
Near line 108: Unpaired symbol: ‘[’ seems to be missing
Context: ...for finalized bundles query. ## [v1.2.3](https://github.com/KYVENetwork/chain/re...
Near line 115: Unpaired symbol: ‘[’ seems to be missing
Context: ...for finalized bundles query. ## [v1.2.2](https://github.com/KYVENetwork/chain/re...
Near line 121: Unpaired symbol: ‘[’ seems to be missing
Context: ...security-advisory-barberry). ## [v1.2.1](https://github.com/KYVENetwork/chain/re...
Near line 127: Unpaired symbol: ‘[’ seems to be missing
Context: ...urity-advisory-huckleberry). ## [v1.2.0](https://github.com/KYVENetwork/chain/re...
Near line 131: Unpaired symbol: ‘[’ seems to be missing
Context: ...2.0) - 2023-05-16 ### Bug Fixes - [#48](https://github.com/KYVENetwork/chain/pu...
Near line 134: Unpaired symbol: ‘[’ seems to be missing
Context: ...iple KYVE Core Team members. ## [v1.1.3](https://github.com/KYVENetwork/chain/re...
Near line 140: Unpaired symbol: ‘[’ seems to be missing
Context: ...urity-advisory-huckleberry). ## [v1.1.2](https://github.com/KYVENetwork/chain/re...
Near line 146: Unpaired symbol: ‘[’ seems to be missing
Context: ...t` when submitting a bundle. ## [v1.1.1](https://github.com/KYVENetwork/chain/re...
Near line 150: Unpaired symbol: ‘[’ seems to be missing
Context: ...) - 2023-05-08 ### Improvements - [#34](https://github.com/KYVENetwork/chain/pu...
Near line 152: Unpaired symbol: ‘[’ seems to be missing
Context: ...ve-ventures/interchaintest). ## [v1.1.0](https://github.com/KYVENetwork/chain/re...
Near line 156: Unpaired symbol: ‘[’ seems to be missing
Context: ...) - 2023-04-18 ### Improvements - [#22](https://github.com/KYVENetwork/chain/pu...
Near line 163: Unpaired symbol: ‘[’ seems to be missing
Context: ...received via IBC. ### Bug Fixes - [#20](https://github.com/KYVENetwork/chain/pu...
Near line 172: Unpaired symbol: ‘[’ seems to be missing
Context: ...tadata fields. ### API Breaking - [#22](https://github.com/KYVENetwork/chain/pu...
Near line 186: Unpaired symbol: ‘[’ seems to be missing
Context: ... fields, deprecatingLogo
. ## [v1.0.1](https://github.com/KYVENetwork/chain/re...
Near line 190: Unpaired symbol: ‘[’ seems to be missing
Context: ...) - 2023-05-08 ### Improvements - [#34](https://github.com/KYVENetwork/chain/pu...
Near line 192: Unpaired symbol: ‘[’ seems to be missing
Context: ...ve-ventures/interchaintest). ## [v1.0.0](https://github.com/KYVENetwork/chain/re...
Near line 196: Unpaired symbol: ‘[’ seems to be missing
Context: ...the KYVE network launch. ## [v1.0.0-rc1](https://github.com/KYVENetwork/chain/re...
Near line 211: Unpaired symbol: ‘[’ seems to be missing
Context: ...param to typesdk.Dec
. ## [v1.0.0-rc0](https://github.com/KYVENetwork/chain/re...
Additional comments not posted (17)
CHANGELOG.md (17)
21-21
: New feature entry for supporting multiple coins in the stakers module looks good.
22-22
: New feature entry for supporting multiple coins in the bundles module looks good.
23-23
: New feature entry for supporting multiple coins for funding looks good.
24-24
: New feature entry for adding an end-key to the pool looks good.
Line range hint
25-25
: New feature entry for tallying bundle proposals on timeout looks good.
Line range hint
26-26
: New feature entry for supporting multiple denoms for delegation rewards looks good.
Line range hint
27-27
: New feature entry for storage-cost per storage-provider looks good.
Line range hint
28-28
: New feature entry for tallying bundle proposals on skip-uploader-role looks good.
Line range hint
30-30
: Improvement entry for making release builds reproducible looks good.
Line range hint
31-31
: Improvement entry for only charging coins which are whitelisted looks good.
Line range hint
32-32
: Improvement entry for adding the mainnet KYVE image to interchain tests looks good.
Line range hint
33-33
: Improvement entry for bumping the IBC version to v8.2.0 and removing an unnecessary dev-dependency looks good.
Line range hint
34-34
: Improvement entry for migrating to Cosmos-SDK v0.50 looks good.
Line range hint
35-35
: Improvement entry for bumping the IBC packet forward middleware looks good.
Line range hint
37-37
: Bug fix entry for adding pool params back to the KYVE params query looks good.
Line range hint
38-38
: Bug fix entry for adding funders back to the pool query looks good.
Line range hint
39-39
: Bug fix entry for adding back the swagger UI for KYVE and Cosmos REST queries looks good.
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- x/bundles/keeper/keeper_suite_inflation_splitting_test.go (12 hunks)
- x/bundles/keeper/logic_bundles.go (1 hunks)
- x/bundles/types/expected_keepers.go (1 hunks)
- x/stakers/keeper/logic_stakers.go (3 hunks)
- x/stakers/keeper/msg_server_claim_commission_rewards_test.go (6 hunks)
- x/stakers/types/message_claim_commission_rewards.go (1 hunks)
Files skipped from review as they are similar to previous changes (5)
- x/bundles/keeper/keeper_suite_inflation_splitting_test.go
- x/bundles/keeper/logic_bundles.go
- x/bundles/types/expected_keepers.go
- x/stakers/keeper/logic_stakers.go
- x/stakers/types/message_claim_commission_rewards.go
Additional comments not posted (11)
x/stakers/keeper/msg_server_claim_commission_rewards_test.go (11)
199-211
: The test case "Produce a valid bundle and check commission rewards" correctly verifies the commission rewards for multiple coins. The changes look good.
221-238
: The test case "Claim with non-staker account" correctly handles the scenario where a non-staker account attempts to claim rewards. The changes look good.
242-260
: The test case "Claim more rewards than available" correctly handles the scenario where more rewards than available are claimed. The changes look good.
264-282
: The test case "Claim zero rewards" correctly handles the scenario where zero rewards are claimed. The changes look good.
284-299
: The test case "Claim partial rewards" correctly handles the scenario where partial rewards are claimed. The changes look good.
302-371
: The test case "Claim partial rewards twice" correctly handles the scenario where partial rewards are claimed twice. The changes look good.
373-388
: The test case "Claim all rewards" correctly handles the scenario where all rewards are claimed. The changes look good.
391-462
: The test case "Claim multiple coins" correctly handles the scenario where multiple coins are claimed. The changes look good.
464-538
: The test case "Claim one coin of multiple coins" correctly handles the scenario where one coin out of multiple coins is claimed. The changes look good.
Line range hint
540-617
: The test case "Claim more rewards than available with multiple coins" correctly handles the scenario where more rewards than available with multiple coins are claimed. The changes look good.
619-692
: The test case "Claim coin which does not exist" correctly handles the scenario where a coin that does not exist is claimed. The changes look good.
This PR implements multiple coins for funding in the stakers module
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Tests