pub struct SubspacesMsg {}Expand description
SubspacesMsg is the builder to generate Desmos x/subspaces messages.
Implementations§
Source§impl SubspacesMsg
impl SubspacesMsg
Sourcepub fn create_subspace(
name: &str,
description: &str,
owner: Addr,
creator: Addr,
) -> MsgCreateSubspace
pub fn create_subspace( name: &str, description: &str, owner: Addr, creator: Addr, ) -> MsgCreateSubspace
Creates a new instance of MsgCreateSubspace.
name- Subspace name.description- Subspace description.owner- Address of who will be the subspace owner.creator- Address of who wants to create the subspace.
Sourcepub fn edit_subspace(
subspace_id: u64,
name: &str,
description: &str,
owner: Addr,
signer: Addr,
) -> MsgEditSubspace
pub fn edit_subspace( subspace_id: u64, name: &str, description: &str, owner: Addr, signer: Addr, ) -> MsgEditSubspace
Creates a new instance of MsgEditSubspace.
subspace_id- Id of the subspace to edit.name- New subspace name.description- New subspace description.owner- Address of who will be the subspace owner.signer- Address of who wants edit the subspace.
Sourcepub fn delete_subspace(subspace_id: u64, signer: Addr) -> MsgDeleteSubspace
pub fn delete_subspace(subspace_id: u64, signer: Addr) -> MsgDeleteSubspace
Creates a new instance of MsgDeleteSubspace.
subspace_id- id of the subspace to delete.signer- Address of who wants delete the subsapce.
Sourcepub fn create_section(
subspace_id: u64,
name: &str,
description: &str,
parent_id: u32,
creator: Addr,
) -> MsgCreateSection
pub fn create_section( subspace_id: u64, name: &str, description: &str, parent_id: u32, creator: Addr, ) -> MsgCreateSection
Creates a new instance of MsgCreateSection.
subspace_id- Id of the subspace inside which the section will be placed.name- Name of the section to be created.description- Description of the section.parent_id- Id of the parent section.creator- User creating the section.
Sourcepub fn edit_section(
subspace_id: u64,
section_id: u32,
name: Option<&str>,
description: Option<&str>,
editor: Addr,
) -> MsgEditSection
pub fn edit_section( subspace_id: u64, section_id: u32, name: Option<&str>, description: Option<&str>, editor: Addr, ) -> MsgEditSection
Creates a new instance of MsgEditSection.
subspace_id - Id of the subspace inside which the section to be edited is.
section_id - Id of the section to be edited.
name - New name of the section.
description - New description of the section.
editor - User editing the section.
Sourcepub fn move_section(
subspace_id: u64,
section_id: u32,
new_parent_id: u32,
signer: Addr,
) -> MsgMoveSection
pub fn move_section( subspace_id: u64, section_id: u32, new_parent_id: u32, signer: Addr, ) -> MsgMoveSection
Creates a new instance of MsgMoveSection.
subspace_id - Id of the subspace inside which the section lies.
section_id - Id of the section to be moved.
new_parent_id - Id of the new parent.
signer - User moving the section.
Sourcepub fn delete_section(
subspace_id: u64,
section_id: u32,
signer: Addr,
) -> MsgDeleteSection
pub fn delete_section( subspace_id: u64, section_id: u32, signer: Addr, ) -> MsgDeleteSection
Creates a new instance of MsgDeleteSection.
subspace_id - Id of the subspace inside which the section to be deleted is.
section_id - Id of the section to delete.
signer - User deleting the section.
Sourcepub fn create_user_group(
subspace_id: u64,
section_id: u32,
name: &str,
description: &str,
default_permissions: Vec<Permission>,
initial_members: Vec<Addr>,
creator: Addr,
) -> MsgCreateUserGroup
pub fn create_user_group( subspace_id: u64, section_id: u32, name: &str, description: &str, default_permissions: Vec<Permission>, initial_members: Vec<Addr>, creator: Addr, ) -> MsgCreateUserGroup
Creates a new instance of MsgCreateUserGroup.
subspace_id- Subspace id to which the group will belong.section_id- Id of the section inside which the group will be created.name- Group name.description- Group description.default_permission- Permissions that the members will inherit.creator- Address of who wants to create the group.
Sourcepub fn edit_user_group(
subspace_id: u64,
group_id: u32,
name: Option<&str>,
description: Option<&str>,
signer: Addr,
) -> MsgEditUserGroup
pub fn edit_user_group( subspace_id: u64, group_id: u32, name: Option<&str>, description: Option<&str>, signer: Addr, ) -> MsgEditUserGroup
Creates a new instance of MsgEditUserGroup.
subspace_id- Subspace id to which the group belongs.group_id- Id of the group to edit.name- New group name.description- New group description.signer- Address of who wants edit the user group.
Sourcepub fn move_user_group(
subspace_id: u64,
group_id: u32,
new_section_id: u32,
signer: Addr,
) -> MsgMoveUserGroup
pub fn move_user_group( subspace_id: u64, group_id: u32, new_section_id: u32, signer: Addr, ) -> MsgMoveUserGroup
Creates a new instance of MsgMoveUserGroup.
subspace_id- Id of the subspace inside which the group to move is.group_id- Id of the group to be moved.new_section_id- d of the new section where to move the group.signer- Address of who wants move the user group.
Sourcepub fn set_user_group_permissions(
subspace_id: u64,
group_id: u32,
permissions: Vec<Permission>,
signer: Addr,
) -> MsgSetUserGroupPermissions
pub fn set_user_group_permissions( subspace_id: u64, group_id: u32, permissions: Vec<Permission>, signer: Addr, ) -> MsgSetUserGroupPermissions
Creates a new instance of MsgSetUserGroupPermissions.
subspace_id- Subspace to which the user group belongs.group_id- Id of user group of interest.permissions- The new permissions that will be set to the group.signer- Address of who wants set the group permissions.
Sourcepub fn delete_user_group(
subspace_id: u64,
group_id: u32,
signer: Addr,
) -> MsgDeleteUserGroup
pub fn delete_user_group( subspace_id: u64, group_id: u32, signer: Addr, ) -> MsgDeleteUserGroup
Creates a new instance of MsgDeleteUserGroup.
subspace_id- Id of the subspace to which the group belongs.group_id- Id of the group to delete.signer- Address of who wants to delete the group.
Sourcepub fn add_user_to_user_group(
subspace_id: u64,
group_id: u32,
user: Addr,
signer: Addr,
) -> MsgAddUserToUserGroup
pub fn add_user_to_user_group( subspace_id: u64, group_id: u32, user: Addr, signer: Addr, ) -> MsgAddUserToUserGroup
Creates a new instance of MsgAddUserToUserGroup.
subspace_id- Subspace id to which the group belongs.group_id- Id of the group to which will be added the user.user- Address of the user to add to the group.signer- Address of who wants to add the user to the group.
Sourcepub fn remove_user_from_user_group(
subspace_id: u64,
group_id: u32,
user: Addr,
signer: Addr,
) -> MsgRemoveUserFromUserGroup
pub fn remove_user_from_user_group( subspace_id: u64, group_id: u32, user: Addr, signer: Addr, ) -> MsgRemoveUserFromUserGroup
Creates a new instance of MsgRemoveUserFromUserGroup.
subspace_id- Subspace id to which the group belongs.group_id- Id of the group from which will be removed the user.user- Address of the user to remove from the group.signer- Address of who wants to remove the user from the group.
Sourcepub fn set_user_permissions(
subspace_id: u64,
section_id: u32,
user: Addr,
permissions: Vec<Permission>,
signer: Addr,
) -> MsgSetUserPermissions
pub fn set_user_permissions( subspace_id: u64, section_id: u32, user: Addr, permissions: Vec<Permission>, signer: Addr, ) -> MsgSetUserPermissions
Creates a new instance of MsgSetUserPermissions.
subspace_id- Subspace id to which the user belongs.section_id- Id of the section for which to set the permissions.user- User address.permissions- New user’s permissions.signer- Address of who wants to update the user’s permissions.
Creates a new instance of MsgGrantTreasuryAuthorization.
subspace_id- Id of the subspace where the authorization should be granted.granter- Address of the user granting a treasury authorization.grantee- Address of the user who is being granted a treasury authorization.grant- Grant represents the authorization to execute the provided methods.
Creates a new instance of MsgRevokeTreasuryAuthorization.
subspace_id- Id of the subspace from which the authorization should be revoked.granter- Address of the user revoking the treasury authorization.grantee- Address of the user who is being revoked the treasury authorization.msg_type_url- Type url of the authorized message which is being revoked.
Sourcepub fn grant_allowance(
subspace_id: u64,
granter: Addr,
grantee: Grantee,
allowance: Allowance,
) -> MsgGrantAllowance
pub fn grant_allowance( subspace_id: u64, granter: Addr, grantee: Grantee, allowance: Allowance, ) -> MsgGrantAllowance
Creates a new instance of MsgGrantAllowance.
subspace_id- Id of the subspace inside which where the allowance should be granted.granter- Address of the user granting the allowance.grantee- Target being granted the allowance.allowance- Allowance to be granted to the grantee.
Sourcepub fn revoke_allowance(
subspace_id: u64,
granter: Addr,
grantee: Grantee,
) -> MsgRevokeAllowance
pub fn revoke_allowance( subspace_id: u64, granter: Addr, grantee: Grantee, ) -> MsgRevokeAllowance
Creates a new instance of MsgRevokeAllowance.
subspace_id- Id of the subspace inside which the allowance to be deleted is.granter- Address of the user being revoking the allowance.grantee- Target being revoked the allowance.