ve3_shared/adapters/
mint_proxy.rs1use crate::error::SharedError;
2use cosmwasm_schema::cw_serde;
3use cosmwasm_std::{to_json_binary, Addr, CosmosMsg, Uint128, WasmMsg};
4
5#[cw_serde]
6pub enum ExecuteMsg {
7 Mint {
8 amount: Uint128,
9 },
10}
11
12pub struct MintProxy(pub Addr);
13
14impl MintProxy {
15 pub fn mint_msg(&self, amount: Uint128) -> Result<CosmosMsg, SharedError> {
16 Ok(CosmosMsg::Wasm(WasmMsg::Execute {
17 contract_addr: self.0.to_string(),
18 msg: to_json_binary(&ExecuteMsg::Mint {
19 amount,
20 })?,
21 funds: vec![],
22 }))
23 }
24}