Function provwasm_std::transfer_marker_coins [−][src]
pub fn transfer_marker_coins<S: Into<String>, H: Into<Addr>>(
amount: u128,
denom: S,
to: H,
from: H
) -> StdResult<CosmosMsg<ProvenanceMsg>>
Expand description
Create a message that will transfer a marker amount from one account to another.
Example
// Imports required use cosmwasm_std::{Addr, Response, StdResult}; use provwasm_std::{transfer_marker_coins, ProvenanceMsg}; // Create and dispatch a message that will transfer marker coins from one account to another. // NOTE: Transfer is only enabled for restricted markers. fn try_transfer_marker_coins( amount: u128, denom: String, to: Addr, from: Addr, ) -> StdResult<Response<ProvenanceMsg>> { let msg = transfer_marker_coins(amount, &denom, to, from)?; let mut res = Response::new(); res.add_message(msg); Ok(res) }