-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add tests for creator-staking pallet #234
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
F3Joule
changed the title
Add compilable tests for creator-staking pallet
Add tests for creator-staking pallet
Oct 6, 2023
F3Joule
force-pushed
the
f3/cs-tests-and-benches
branch
from
October 6, 2023 10:25
fa34e6d
to
79e2b65
Compare
olehmell
suggested changes
Oct 9, 2023
olehmell
reviewed
Oct 10, 2023
olehmell
reviewed
Oct 10, 2023
olehmell
reviewed
Oct 10, 2023
olehmell
reviewed
Oct 10, 2023
olehmell
reviewed
Oct 10, 2023
olehmell
reviewed
Oct 10, 2023
olehmell
reviewed
Oct 10, 2023
olehmell
reviewed
Oct 10, 2023
olehmell
reviewed
Oct 10, 2023
}) | ||
} | ||
|
||
// FIXME: how to be here? |
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.
So, are you going to fix?
olehmell
reviewed
Oct 10, 2023
siman
reviewed
Oct 10, 2023
siman
reviewed
Oct 10, 2023
siman
reviewed
Oct 10, 2023
siman
reviewed
Oct 10, 2023
siman
reviewed
Oct 10, 2023
siman
requested changes
Oct 11, 2023
siman
approved these changes
Oct 11, 2023
- Rename to RewardDistributionConfig - Rename impl fn `is_consistent` to `is_sum_equal_to_one` Co-Authored-By: siman <[email protected]>
Co-Authored-By: siman <[email protected]> Co-Authored-By: olehmell <[email protected]>
- Fixed accross the creator staking pallet
F3Joule
force-pushed
the
f3/cs-tests-and-benches
branch
from
October 12, 2023 13:29
b98590c
to
16c1400
Compare
F3Joule
added a commit
that referenced
this pull request
Oct 18, 2023
* Rename staker to backer in creator staking pallet - Fix all ledger occurrences - Introduce CreatorId type alias (for SpaceId) for consistency purposes * Apply suggestions from docs review Co-authored-by: Yung Beef 4.2 <[email protected]> * Apply more suggestions from docs review Co-authored-by: Yung Beef 4.2 <[email protected]> * Remove unnecessary doc * Update update_backer_info arguments names * Rename UnlockingChunk > UnbondingChunk * Rename impl unstake to decrease_stake * Rename GeneralBackerInfo to BackerStakesByCreator - Consistently renamed backer_info to backer_stakes * Fix typo in creator staking pallet docs * Rename total to total_staked in CreatorStakeInfo * Rename all unlocking to unbonding in creator staking pallet * Add tests for creator-staking pallet (#234) * Add tests for creator staking * Add inflation tests * Add new event on changing distribution config * Update RewardsDistributionConfig struct - Rename to RewardDistributionConfig - Rename impl fn `is_consistent` to `is_sum_equal_to_one` Co-Authored-By: siman <[email protected]> * Apply suggestions from code review Co-Authored-By: siman <[email protected]> Co-Authored-By: olehmell <[email protected]> * Rename unregister_era to unregistration_era * Fix doc in tests * FIx visibility modificators in creator staking pallet * Fix unlocking_chunks and backer_info namings - Fixed accross the creator staking pallet --------- Co-authored-by: siman <[email protected]> Co-authored-by: olehmell <[email protected]> * Apply fixes after final code review (#236) * Refactor ensure_creator_active_in_era * Rename `should_restake` to `can_restake` * Rename a few events in creator staking pallet - Fix on_initialize weights * Fix namings * Rename ensure fn in creator staking pallet Co-Authored-By: siman <siman@ [email protected]> * Fix error name Co-Authored-By: siman <siman@ [email protected]> * Fix namings in RPCs functions * Add creator_id to StakeWithdrawnFromInactiveCreator event * Add transfer space ownership restrictions For now it's not possible to transfer space ownership if space is registered as a creator * Refactor transfer space ownership restriction * Update doc for CreatorStakingProvider * Introduce ensure_not_active_creator in space-ownership pallet - Fix impl for empty tuple to make tests pass. --------- Co-authored-by: siman <siman@ [email protected]> * Add more RPCs to creator staking pallet (#235) * Fix creator staking RPCs * Fix bug in claim function for backers * Add more RPCs to creator staking pallet There are 2 RPCs: the first one to get estimated rewards, the second one to get claimable eras. * Apply suggestions from code review - Fix code formating --------- Co-authored-by: Yung Beef 4.2 <[email protected]> Co-authored-by: siman <[email protected]> Co-authored-by: olehmell <[email protected]>
F3Joule
added a commit
that referenced
this pull request
Oct 18, 2023
* Improve docs and grammar in creator staking pallet (#233) * Add tests for creator-staking pallet (#234) * Apply fixes after final code review (#236) * Add more RPCs to creator staking pallet (#235) --------- Co-authored-by: siman <[email protected]> Co-authored-by: Alex Siman <[email protected]> Co-authored-by: Yung Beef 4.2 <[email protected]> Co-authored-by: olehmell <[email protected]>
F3Joule
added a commit
that referenced
this pull request
Oct 21, 2023
* Add custom RPC to creator staking pallet * Add RPC functions' logic to a runtime - Add creator-staking RPC to the node - Update Cargo.lock * Add claims count RPC * Apply grammar fixes from code review Co-authored-by: Oleh Mell <[email protected]> * Apply suggestions after creator staking code review (#232) * Improve docs and grammar in creator staking pallet (#233) * Add tests for creator-staking pallet (#234) * Apply fixes after final code review (#236) * Add more RPCs to creator staking pallet (#235) --------- Co-authored-by: Oleh Mell <[email protected]> Co-authored-by: siman <[email protected]> Co-authored-by: Alex Siman <[email protected]> Co-authored-by: Yung Beef 4.2 <[email protected]> Co-authored-by: olehmell <[email protected]>
F3Joule
added a commit
that referenced
this pull request
Oct 21, 2023
* Add custom RPCs to creator staking (#231) * Apply suggestions after creator staking code review (#232) * Improve docs and grammar in creator staking pallet (#233) * Add tests for creator-staking pallet (#234) * Apply fixes after final code review (#236) * Add more RPCs to creator staking pallet (#235) * Bump crates version to 0.1.10 * Update spec_version to 29 * Remove redundant migration from runtime --------- Co-authored-by: olehmell <[email protected]> Co-authored-by: Alex Siman <[email protected]> Co-authored-by: Oleh Mell <[email protected]> Co-authored-by: siman <[email protected]> Co-authored-by: Yung Beef 4.2 <[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.
No description provided.