1#![allow(clippy::field_reassign_with_default)]
2use schemars::JsonSchema;
3use serde::{
4 Deserialize,
5 Serialize,
6};
7
8use cosmwasm_std::{
9 Addr,
10 Binary,
11 Uint128,
12};
13use cw20::Expiration;
14
15type HumanAddr = String;
16
17#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
18pub struct InstantiateMsg {
19 pub name: String,
20 pub symbol: String,
21 pub asset_chain: u16,
22 pub asset_address: Binary,
23 pub decimals: u8,
24 pub mint: Option<InitMint>,
25 pub init_hook: Option<InitHook>,
26}
27
28#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
29pub struct InitHook {
30 pub msg: Binary,
31 pub contract_addr: HumanAddr,
32}
33
34#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
35pub struct InitMint {
36 pub recipient: HumanAddr,
37 pub amount: Uint128,
38}
39
40#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
41#[serde(rename_all = "snake_case")]
42pub struct MigrateMsg {}
43
44#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
45#[serde(rename_all = "snake_case")]
46pub enum ExecuteMsg {
47 Transfer {
49 recipient: HumanAddr,
50 amount: Uint128,
51 },
52 Burn { account: HumanAddr, amount: Uint128 },
54 Send {
57 contract: HumanAddr,
58 amount: Uint128,
59 msg: Binary,
60 },
61 Mint {
64 recipient: HumanAddr,
65 amount: Uint128,
66 },
67 IncreaseAllowance {
71 spender: HumanAddr,
72 amount: Uint128,
73 expires: Option<Expiration>,
74 },
75 DecreaseAllowance {
79 spender: HumanAddr,
80 amount: Uint128,
81 expires: Option<Expiration>,
82 },
83 TransferFrom {
86 owner: HumanAddr,
87 recipient: HumanAddr,
88 amount: Uint128,
89 },
90 SendFrom {
93 owner: HumanAddr,
94 contract: HumanAddr,
95 amount: Uint128,
96 msg: Binary,
97 },
98 BurnFrom { owner: HumanAddr, amount: Uint128 },
100 UpdateMetadata { name: String, symbol: String },
102}
103
104#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
105#[serde(rename_all = "snake_case")]
106pub enum QueryMsg {
107 WrappedAssetInfo {},
109 Balance {
111 address: HumanAddr,
112 },
113 TokenInfo {},
115 Allowance {
118 owner: HumanAddr,
119 spender: HumanAddr,
120 },
121}
122
123#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
124pub struct WrappedAssetInfoResponse {
125 pub asset_chain: u16, pub asset_address: Binary, pub bridge: Addr, }