1use warp_controller_pkg::account::{AssetInfo, Fund};
2use cosmwasm_schema::cw_serde;
3use cosmwasm_std::{Addr, CosmosMsg};
4use schemars::JsonSchema;
5use serde::{Deserialize, Serialize};
6
7#[cw_serde]
8pub struct Config {
9 pub owner: Addr,
10 pub warp_addr: Addr,
11}
12
13#[cw_serde]
14pub struct InstantiateMsg {
15 pub owner: String,
16 pub funds: Option<Vec<Fund>>,
17}
18
19#[cw_serde]
20#[allow(clippy::large_enum_variant)]
21pub enum ExecuteMsg {
22 Generic(GenericMsg),
23 WithdrawAssets(WithdrawAssetsMsg),
24 IbcTransfer(IbcTransferMsg),
25}
26
27#[cw_serde]
28pub struct GenericMsg {
29 pub msgs: Vec<CosmosMsg>,
30}
31
32#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, prost::Message)]
33pub struct Coin {
34 #[prost(string, tag = "1")]
35 pub denom: String,
36 #[prost(string, tag = "2")]
37 pub amount: String,
38}
39
40#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, prost::Message)]
41pub struct TimeoutBlock {
42 #[prost(uint64, optional, tag = "1")]
43 pub revision_number: Option<u64>,
44 #[prost(uint64, optional, tag = "2")]
45 pub revision_height: Option<u64>,
46}
47#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, prost::Message)]
48pub struct TransferMsg {
49 #[prost(string, tag = "1")]
50 pub source_port: String,
51
52 #[prost(string, tag = "2")]
53 pub source_channel: String,
54
55 #[prost(message, optional, tag = "3")]
56 pub token: Option<Coin>,
57
58 #[prost(string, tag = "4")]
59 pub sender: String,
60
61 #[prost(string, tag = "5")]
62 pub receiver: String,
63
64 #[prost(message, optional, tag = "6")]
65 pub timeout_block: Option<TimeoutBlock>,
66
67 #[prost(uint64, optional, tag = "7")]
68 pub timeout_timestamp: Option<u64>,
69
70 #[prost(string, tag = "8")]
71 pub memo: String,
72}
73
74#[cw_serde]
75pub struct IbcTransferMsg {
76 pub transfer_msg: TransferMsg,
77 pub timeout_block_delta: Option<u64>,
78 pub timeout_timestamp_seconds_delta: Option<u64>,
79}
80
81#[cw_serde]
82pub struct WithdrawAssetsMsg {
83 pub asset_infos: Vec<AssetInfo>,
84}
85
86#[cw_serde]
87pub struct ExecuteWasmMsg {}
88
89#[cw_serde]
90pub enum QueryMsg {
91 Config,
92}
93
94#[cw_serde]
95pub struct MigrateMsg {}