Skip to main content

juno_tokenfactory_core/
msg.rs

1use cosmwasm_schema::{cw_serde, QueryResponses};
2
3#[cw_serde]
4pub struct InstantiateMsg {
5    // the manager of the contract is the one who can transfer the admin to another address
6    // Typically this should be a multisig or a DAO (https://daodao.zone/)
7    // Default is the contract initializer
8    pub manager: Option<String>,
9    pub allowed_mint_addresses: Vec<String>,
10
11    // We can manage multiple denoms
12    pub existing_denoms: Option<Vec<String>>, // ex: factory/juno1xxx/test
13    pub new_denoms: Option<Vec<NewDenom>>,
14}
15
16#[cw_serde]
17pub struct NewDenom {
18    pub name: String,
19    pub description: Option<String>,
20    pub symbol: String,
21    pub decimals: u32,
22    pub initial_balances: Option<Vec<InitialBalance>>,
23}
24
25#[cw_serde]
26pub struct InitialBalance {
27    pub address: String,
28    pub amount: Uint128,
29}
30
31use cosmwasm_std::{Coin, Uint128};
32pub use juno_tokenfactory_types::msg::ExecuteMsg;
33
34#[cw_serde]
35#[derive(QueryResponses)]
36pub enum QueryMsg {
37    #[returns(crate::state::Config)]
38    GetConfig {},
39
40    #[returns(Coin)]
41    GetBalance { address: String, denom: String },
42
43    #[returns(Vec<Coin>)]
44    GetAllBalances { address: String },
45}