ibc_controller_package/
lib.rs

1use astroport_governance::assembly::ProposalStatus;
2use cosmwasm_schema::{cw_serde, QueryResponses};
3
4#[cw_serde]
5pub struct InstantiateMsg {
6    pub owner: String,
7    pub timeout: u64,
8}
9
10#[cw_serde]
11pub struct IbcProposal {
12    pub id: u64,
13    pub messages: Vec<CosmosMsg>,
14}
15
16#[cw_serde]
17pub enum ExecuteMsg {
18    /// Executes the IBC proposal that came from Assembly contract
19    IbcExecuteProposal {
20        channel_id: String,
21        proposal_id: u64,
22        messages: Vec<CosmosMsg>,
23    },
24    /// Updates the timeout for the IBC channel
25    UpdateTimeout { new_timeout: u64 },
26    /// Creates a request to change contract ownership
27    /// ## Executor
28    /// Only the current owner can execute this.
29    ProposeNewOwner {
30        /// The newly proposed owner
31        owner: String,
32        /// The validity period of the proposal to change the contract owner
33        expires_in: u64,
34    },
35    /// Removes a request to change contract ownership
36    /// ## Executor
37    /// Only the current owner can execute this
38    DropOwnershipProposal {},
39    /// Claims contract ownership
40    /// ## Executor
41    /// Only the newly proposed owner can execute this
42    ClaimOwnership {},
43    /// Sends heartbeats to specified satellites
44    SendHeartbeat { channels: Vec<String> },
45}
46
47#[cw_serde]
48pub struct MigrateMsg {
49    pub new_timeout: Option<u64>,
50}
51
52#[cw_serde]
53#[derive(QueryResponses)]
54pub enum QueryMsg {
55    #[returns(ProposalStatus)]
56    ProposalState { id: u64 },
57
58    #[returns(String)]
59    LastError {},
60}
61
62pub use astroport_governance;
63use cosmwasm_std::CosmosMsg;