pub fn mock_env<T: Api, U: Into<HumanAddr>>(api: &T, sender: U, sent: &[Coin]) -> Env {
    Env {
        block: BlockInfo {
            height: 12_345,
            time: 1_571_797_419,
            chain_id: "cosmos-testnet-14002".to_string(),
        },
        message: MessageInfo {
            sender: api.canonical_address(&sender.into()).0.unwrap(),
            sent_funds: sent.to_vec(),
        },
        contract: ContractInfo {
            address: api
                .canonical_address(&HumanAddr::from(MOCK_CONTRACT_ADDR))
                .0
                .unwrap(),
        },
    }
}
/// Just set sender and sent funds for the message. The rest uses defaults.
/// The sender will be canonicalized internally to allow developers pasing in human readable senders.
/// This is intended for use in test code only.
Just set sender and sent funds for the message. The rest uses defaults.
The sender will be canonicalized internally to allow developers pasing in human readable senders.
This is intended for use in test code only.
Just set sender and sent funds for the message . The rest uses defaults . The sender will be canonicalized internally to allow developers pasing in human readable senders . This is intended for use in test code only .
pub fn mock_env<T: Api, U: Into<HumanAddr>>(api: &T, sender: U, sent: &[Coin]) -> Env {
    Env {
        block: BlockInfo {
            height: 12_345,
            time: 1_571_797_419,
            chain_id: "cosmos-testnet-14002".to_string(),
        },
        message: MessageInfo {
            sender: api.canonical_address(&sender.into()).0.unwrap(),
            sent_funds: sent.to_vec(),
        },
        contract: ContractInfo {
            address: api
                .canonical_address(&HumanAddr::from(MOCK_CONTRACT_ADDR))
                .0
                .unwrap(),
        },
    }
}
pub fn mock_env < T : Api , U : Into < HumanAddr > > ( api : & T , sender : U , sent : & [ Coin ] ) -> Env { Env { block : BlockInfo { height : 12_345 , time : 1_571_797_419 , chain_id : " " . to_string ( ) , } , message : MessageInfo { sender : api . canonical_address ( & sender . into ( ) ) . 0 . unwrap ( ) , sent_funds : sent . to_vec ( ) , } , contract : ContractInfo { address : api . canonical_address ( & HumanAddr :: from ( MOCK_CONTRACT_ADDR ) ) . 0 . unwrap ( ) , } , } }
Just set sender and sent funds for the message.
Just set sender and sent funds for the message .
api
&T
sender
U
sent
&[Coin]
api
&T
sender
U
sent
&[Coin]