SubspacesMsg

Struct SubspacesMsg 

Source
pub struct SubspacesMsg {}
Expand description

SubspacesMsg is the builder to generate Desmos x/subspaces messages.

Implementations§

Source§

impl SubspacesMsg

Source

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.
Source

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.
Source

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.
Source

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.
Source

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.

Source

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.

Source

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.

Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

pub fn grant_treasury_authorization( subspace_id: u64, granter: Addr, grantee: Addr, grant: AuthzGrant, ) -> MsgGrantTreasuryAuthorization

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.
Source

pub fn revoke_treasury_authorization( subspace_id: u64, granter: Addr, grantee: Addr, msg_type_url: &str, ) -> MsgRevokeTreasuryAuthorization

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.
Source

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.
Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<U> As for U

Source§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.