Function provwasm_std::write_scope

source ·
pub fn write_scope<S: Into<Scope>, H: Into<Addr>>(
    scope: S,
    signers: Vec<H>
) -> Result<CosmosMsg<ProvenanceMsg>, StdError>
Expand description

Create a message that will create, or update, a scope.

Example

// Imports required
use cosmwasm_std::{Addr, Response, StdError};
use provwasm_std::{ProvenanceMsg, Scope, write_scope};

// Create and dispatch a message that will create, or update, a scope.
fn try_write_scope(scope: Scope, signers: Vec<Addr>) -> Result<Response<ProvenanceMsg>, StdError> {
    let msg = write_scope(scope, signers)?;
    let mut res = Response::new().add_message(msg);
    Ok(res)
}