Skip to content

Commit

Permalink
chore: update messages
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasbhat0 committed Apr 4, 2023
1 parent 68a0a81 commit 97e8180
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
13 changes: 0 additions & 13 deletions contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/chan_types.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions contracts/cosmwasm-vm/cw-ibc-core/src/ics04_channel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -36,6 +34,7 @@ use ibc::core::{
ContextError,
};
use ibc::events::IbcEventType;
pub use msg::LightClientMessage;
use std::str::FromStr;
pub use traits::*;

Expand Down
8 changes: 8 additions & 0 deletions contracts/cosmwasm-vm/cw-ibc-core/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ pub enum LightClientMessage {
proof_upgrade_client: Vec<u8>,
proof_upgrade_consensus_state: Vec<u8>,
},
VerifyChannel {
proof_height: String,
counterparty_prefix: Vec<u8>,
proof: Vec<u8>,
root: Vec<u8>,
counterparty_chan_end_path: Vec<u8>,
expected_counterparty_channel_end: Vec<u8>,
},
}

#[cw_serde]
Expand Down

0 comments on commit 97e8180

Please sign in to comment.