pub fn try_set_owner<'b>(
        &mut self,
        storage: &'b mut dyn Storage,
        name: &String,
        owner: Addr,
    ) -> Result<NameRecord> {
        let mut name_record = self.try_resolve_name(storage, name)?;
        let old_hash = name_record.hash();
        let old_hash = base32::encode(
            base32::Alphabet::RFC4648 { padding: false },
            old_hash.as_slice(),
        );

        name_record.owner = owner;
        name_record.lineage = Some(old_hash);

        self.try_save_record(storage, name, &name_record)?;

        Ok(name_record)
    }
/// Attempt to set the owner of a given name
/// NOTE: Access control validation must be performed by the caller
/// NOTE: If successful, this will unset the value associated with the name
Attempt to set the owner of a given name
NOTE: Access control validation must be performed by the caller
NOTE: If successful, this will unset the value associated with the name
Attempt to set the owner of a given name NOTE : Access control validation must be performed by the caller NOTE : If successful this will unset the value associated with the name
pub fn try_set_owner<'b>(
        &mut self,
        storage: &'b mut dyn Storage,
        name: &String,
        owner: Addr,
    ) -> Result<NameRecord> {
        let mut name_record = self.try_resolve_name(storage, name)?;
        let old_hash = name_record.hash();
        let old_hash = base32::encode(
            base32::Alphabet::RFC4648 { padding: false },
            old_hash.as_slice(),
        );
        name_record.owner = owner;
        name_record.lineage = Some(old_hash);
        self.try_save_record(storage, name, &name_record)?;
        Ok(name_record)
    }
pub fn try_set_owner < ' b > ( & mut self , storage : & ' b mut dyn Storage , name : & String , owner : Addr , ) -> Result < NameRecord > { let mut name_record = self . try_resolve_name ( storage , name ) ? ; let old_hash = name_record . hash ( ) ; let old_hash = base32 :: encode ( base32 :: Alphabet :: RFC4648 { padding : false } , old_hash . as_slice ( ) , ) ; name_record . owner = owner ; name_record . lineage = Some ( old_hash ) ; self . try_save_record ( storage , name , & name_record ) ? ; Ok ( name_record ) }
Attempt to set the owner of a given name
NOTE: Access control validation must be performed by the caller
NOTE: If successful, this will unset the value associated with the name
Attempt to set the owner of a given name NOTE : Access control validation must be performed by the caller NOTE : If successful this will unset the value associated with the name
&mut self
storage
&'b mut dyn Storage
name
&String
owner
Addr
&mut self
storage
&'b mut dyn Storage
name
&String
owner
Addr