Function provwasm_std::bind_name [−][src]
pub fn bind_name<S: Into<String>, H: Into<Addr>>(
name: S,
address: H,
binding: NameBinding
) -> StdResult<CosmosMsg<ProvenanceMsg>>
Expand description
Create a message that will bind a restricted name to an address.
Example
// Imports required use cosmwasm_std::{Addr, Response, StdResult}; use provwasm_std::{bind_name, NameBinding, ProvenanceMsg}; // Bind a name to an address. fn exec_bind_name( name: String, address: Addr, ) -> StdResult<Response<ProvenanceMsg>> { let msg = bind_name(&name, address, NameBinding::Restricted)?; let mut res = Response::new(); res.add_message(msg); Ok(res) }