diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/chan_types.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/chan_types.rs deleted file mode 100644 index f31e6ff30..000000000 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/chan_types.rs +++ /dev/null @@ -1,13 +0,0 @@ -use super::*; - -#[cw_serde] -pub enum LightClientChannelMessage { - ChannelVerify { - proof_height: String, - counterparty_prefix: Vec, - proof: Vec, - root: Vec, - counterparty_chan_end_path: Vec, - expected_counterparty_channel_end: Vec, - }, -} diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler.rs index 60402c483..41e016960 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/handler.rs @@ -159,7 +159,7 @@ impl<'a> ValidateChannel for CwIbcCoreContext<'a> { let chan_end_path_on_a = self.channel_path(&port_id_on_a, &chan_id_on_a); let vector = to_vec(&expected_chan_end_on_a); - let create_client_message = LightClientChannelMessage::ChannelVerify { + let create_client_message = LightClientMessage::VerifyChannel { proof_height: message.proof_height_on_a.to_string(), counterparty_prefix: prefix_on_a.clone().into_vec(), proof: message.proof_chan_end_on_a.clone().into(), @@ -244,7 +244,7 @@ impl<'a> ValidateChannel for CwIbcCoreContext<'a> { ); let chan_end_path_on_b = self.channel_path(&port_id_on_b, &message.chan_id_on_b); let vector = to_vec(&expected_chan_end_on_b); - let create_client_message = LightClientChannelMessage::ChannelVerify { + let create_client_message = LightClientMessage::VerifyChannel { proof_height: message.proof_height_on_b.to_string(), counterparty_prefix: prefix_on_b.clone().into_vec(), proof: message.proof_chan_end_on_b.clone().into(), @@ -596,7 +596,9 @@ impl<'a> ExecuteChannel for CwIbcCoreContext<'a> { channel_end.counterparty().channel_id().unwrap().as_str(), channel_end.connection_hops()[0].as_str(), ); - Ok(Response::new().add_event(event)) + Ok(Response::new() + .add_event(event) + .add_attribute("method", "execute_channel_open_ack")) } None => { return Err(ContractError::IbcChannelError { diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/mod.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/mod.rs index eeed28e5b..79350dfb0 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/mod.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/mod.rs @@ -4,13 +4,11 @@ pub use channel::*; pub mod events; pub use events::*; pub mod handler; -pub use handler::*; -pub mod chan_types; pub use super::*; use crate::context::CwIbcCoreContext; pub use crate::types::*; -pub use chan_types::*; pub use channel::*; +pub use handler::*; use cosmwasm_std::Event; use cosmwasm_std::Reply; @@ -36,6 +34,7 @@ use ibc::core::{ ContextError, }; use ibc::events::IbcEventType; +pub use msg::LightClientMessage; use std::str::FromStr; pub use traits::*; diff --git a/contracts/cosmwasm-vm/cw-ibc-core/src/msg.rs b/contracts/cosmwasm-vm/cw-ibc-core/src/msg.rs index 6cee0a7fe..efe1b42b9 100644 --- a/contracts/cosmwasm-vm/cw-ibc-core/src/msg.rs +++ b/contracts/cosmwasm-vm/cw-ibc-core/src/msg.rs @@ -27,6 +27,14 @@ pub enum LightClientMessage { proof_upgrade_client: Vec, proof_upgrade_consensus_state: Vec, }, + VerifyChannel { + proof_height: String, + counterparty_prefix: Vec, + proof: Vec, + root: Vec, + counterparty_chan_end_path: Vec, + expected_counterparty_channel_end: Vec, + }, } #[cw_serde]