layer_climb_core/signing/
msg.rs

1use crate::prelude::*;
2
3impl SigningClient {
4    pub fn transfer_msg<'a, D: Into<Option<&'a str>> + std::fmt::Debug>(
5        &self,
6        amount: u128,
7        recipient: &Address,
8        denom: D,
9    ) -> Result<layer_climb_proto::bank::MsgSend> {
10        let denom = denom.into().unwrap_or(&self.querier.chain_config.gas_denom);
11
12        let amount = layer_climb_proto::Coin {
13            amount: amount.to_string(),
14            denom: denom.to_string(),
15        };
16
17        Ok(layer_climb_proto::bank::MsgSend {
18            from_address: self.addr.to_string(),
19            to_address: recipient.to_string(),
20            amount: vec![amount],
21        })
22    }
23}