Function provwasm_std::delete_attributes [−][src]
pub fn delete_attributes<H: Into<Addr>, S: Into<String>>(
address: H,
name: S
) -> StdResult<CosmosMsg<ProvenanceMsg>>
Expand description
Create a message that will remove all attributes with the given name from an account.
Example
// Imports required use cosmwasm_std::{Addr, Response, StdResult}; use provwasm_std::{delete_attributes, ProvenanceMsg}; // Delete all label attributes. NOTE: The name below must resolve to the contract address. fn exec_delete_labels( address: Addr, ) -> StdResult<Response<ProvenanceMsg>> { let attr_name = String::from("label.my-contract.sc.pb"); let msg = delete_attributes(address, &attr_name)?; let mut res = Response::new(); res.add_message(msg); Ok(res) }