@@ -64,64 +64,6 @@ impl<'a> CwIbcCoreContext<'a> {
64
64
. save ( store, port_id, & module_id) ?)
65
65
}
66
66
67
- /// This function looks up a module ID based on a given channel message and port ID.
68
- ///
69
- /// Arguments:
70
- ///
71
- /// * `store`: `store` is a mutable reference to a trait object of type `Storage`. It is used to
72
- /// interact with the storage of the smart contract.
73
- /// * `msg`: A reference to a ChannelMsg enum, which represents different types of messages that can
74
- /// be sent over a channel in the Cosmos SDK.
75
- ///
76
- /// Returns:
77
- ///
78
- /// a `Result` with either a `ModuleId` or a `ContractError`.
79
- // pub fn lookup_module_channel(
80
- // &self,
81
- // store: &mut dyn Storage,
82
- // msg: &ChannelMsg,
83
- // ) -> Result<ModuleId, ContractError> {
84
- // let port_id = match msg {
85
- // ChannelMsg::OpenInit(msg) => &msg.port_id_on_a,
86
- // ChannelMsg::OpenTry(msg) => &msg.port_id_on_b,
87
- // ChannelMsg::OpenAck(msg) => &msg.port_id_on_a,
88
- // ChannelMsg::OpenConfirm(msg) => &msg.port_id_on_b,
89
- // ChannelMsg::CloseInit(msg) => &msg.port_id_on_a,
90
- // ChannelMsg::CloseConfirm(msg) => &msg.port_id_on_b,
91
- // };
92
- // let module_id = self.lookup_module_by_port(store, port_id)?;
93
- // Ok(module_id)
94
- // }
95
-
96
- /// This function looks up a module ID based on a packet message and a storage object.
97
- ///
98
- /// Arguments:
99
- ///
100
- /// * `store`: A mutable reference to a trait object of type `Storage`. This is likely an interface
101
- /// for interacting with some kind of storage system, such as a database or a key-value store.
102
- /// * `msg`: `msg` is a reference to a `PacketMsg` enum, which represents different types of
103
- /// messages that can be sent or received over a packet-based communication protocol. The function
104
- /// uses this parameter to determine which port ID to use when looking up the corresponding module
105
- /// ID.
106
- ///
107
- /// Returns:
108
- ///
109
- /// a `Result` containing either a `ModuleId` or a `ContractError`.
110
- // pub fn lookup_module_packet(
111
- // &self,
112
- // store: &mut dyn Storage,
113
- // msg: &PacketMsg,
114
- // ) -> Result<ModuleId, ContractError> {
115
- // let port_id = match msg {
116
- // PacketMsg::Recv(msg) => &msg.packet.port_id_on_b,
117
- // PacketMsg::Ack(msg) => &msg.packet.port_id_on_a,
118
- // PacketMsg::Timeout(msg) => &msg.packet.port_id_on_a,
119
- // PacketMsg::TimeoutOnClose(msg) => &msg.packet.port_id_on_a,
120
- // };
121
- // let module_id = self.lookup_module_by_port(store, &port_id.clone())?;
122
- // Ok(module_id)
123
- // }
124
-
125
67
/// This function binds a port to a given address and returns a response with relevant attributes.
126
68
///
127
69
/// Arguments:
0 commit comments