-
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
feat!: Refactor ownership pallet to transfer ownership of spaces, posts and domains #255
Conversation
- Refactor other providers traits
Fix runtime
* Add tests for ownership pallet * Add utility function to ownership for benchmarking * Update benchmarks in ownership pallet --------- Co-authored-by: Oleh Mell <[email protected]>
Extirnsics ordering (metadata comparison) check results:
|
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.
Rename to ownership_utils.rs
?
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.
All appropriate renames will be considered in a separate pull request.
/// Account is already an owner of a space. | ||
AlreadyASpaceOwner, | ||
/// Account is already an owner of an entity. | ||
AlreadyOwner, | ||
/// Cannot transfer ownership, because a space is registered as an active creator. | ||
ActiveCreatorCannotTransferOwnership, |
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.
This error is pretty specific to Creator Staking.
But from another side, we are cleaning up creator staking and this should not be relevant anymore.
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.
As the creator staking logic still exists on a chain, we should consider it properly. Once creator-staking is removed/refactored, we will eliminate this error case.
@@ -108,7 +108,7 @@ fn accept_pending_ownership_should_fail_if_origin_is_already_an_owner() { | |||
|
|||
assert_noop!( | |||
_accept_pending_ownership(Some(RuntimeOrigin::signed(ACCOUNT1)), None), | |||
SpaceOwnershipError::<TestRuntime>::AlreadyASpaceOwner | |||
SpaceOwnershipError::<TestRuntime>::NotAllowedToAcceptOwnershipTransfer, |
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.
why renamed?
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.
Previously this error was related to space ownership, from now on we need more generalized error for it.
We can do CurrentOwnerCannotAcceptOwnershipTransfer
, then this error will be more specific.
Co-Authored-By: Alex Siman <[email protected]>
Co-authored-by: Alex Siman <[email protected]>
Co-Authored-By: Alex Siman <[email protected]>
Co-Authored-By: Alex Siman <[email protected]>
Try-runtime results:
|
Release Checklist
spec_version
has been incremented since the last release.transaction_version
if not.BaseCallFilter
( refactor: Adjust fees configuration and refactor social related proxy types #257 )
( chore: Rename space-ownership to ownership #259 )