Fix Leaderboard Distribution Compilation Errors and Add Tests#45
Open
ayomideadeniran wants to merge 6 commits intoNetwalls:mainfrom
Open
Fix Leaderboard Distribution Compilation Errors and Add Tests#45ayomideadeniran wants to merge 6 commits intoNetwalls:mainfrom
ayomideadeniran wants to merge 6 commits intoNetwalls:mainfrom
Conversation
Author
|
@GoSTEAN Kindly review this PR . Thank you. |
Contributor
|
@ayomideadeniran fix conflict |
Author
|
@GoSTEAN Am facing lot of issues with the latest merged code. Buh am still fixing conflict. |
Author
|
@GoSTEAN Please check it out. |
Author
|
@GoSTEAN I was unassigned, but I already created a PR for this issue: Please let me know if there’s any problem. |
…y mocks, fix test assertions
This file contains hidden or 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
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.
This PR fixes compilation warnings in the
treasury.rscontract and completes unit test coverage for thedistribute_leaderboardfunction by adding proper admin authentication tests.Changes
contracts/contracts/boxmeout/src/treasury.rsPrefixed unused variables with
_to silence compiler warnings in the following functions:distribute_creator_rewardsget_treasury_balanceget_treasury_statsemergency_withdrawset_fee_distributionset_reward_multiplierget_treasury_reportcontracts/contracts/boxmeout/src/test_treasury.rstest_distribute_leaderboard_not_adminto ensuredistribute_leaderboardcorrectly enforces admin-only access.MockAuth,MockAuthInvoke) to support authentication testing.HostError: Error(Auth, InvalidAction)when called by a non-admin.Cleanup
Removed temporary build/test artifacts:
test_output*.txtbuild_error.logcheck_output.txtAdded missing test snapshots for:
test_treasuryoracle_testVerification
cargo check— compilation errors and warnings resolved.cargo test— all tests pass, including new admin authorization coverage.Checklist
close issue #17