@@ -12,7 +12,7 @@ use crate::memory::{consume_region, release_buffer, Region};
12
12
use crate :: results:: ContractResult ;
13
13
use crate :: serde:: { from_slice, to_vec} ;
14
14
use crate :: types:: Env ;
15
- use crate :: { IbcAcknowledgement , IbcPacket , IbcReceiveResponse } ;
15
+ use crate :: { IbcAcknowledgementWithPacket , IbcPacket , IbcReceiveResponse } ;
16
16
17
17
// TODO: replace with https://doc.rust-lang.org/std/ops/trait.Try.html once stabilized
18
18
macro_rules! r#try_into_contract_result {
@@ -177,7 +177,11 @@ where
177
177
/// contract_fn is called when this chain receives an IBC Acknowledgement for a packet
178
178
/// that this contract previously sent
179
179
pub fn do_ibc_packet_ack < C , E > (
180
- contract_fn : & dyn Fn ( DepsMut , Env , IbcAcknowledgement ) -> Result < IbcBasicResponse < C > , E > ,
180
+ contract_fn : & dyn Fn (
181
+ DepsMut ,
182
+ Env ,
183
+ IbcAcknowledgementWithPacket ,
184
+ ) -> Result < IbcBasicResponse < C > , E > ,
181
185
env_ptr : u32 ,
182
186
msg_ptr : u32 ,
183
187
) -> u32
@@ -191,7 +195,11 @@ where
191
195
}
192
196
193
197
fn _do_ibc_packet_ack < C , E > (
194
- contract_fn : & dyn Fn ( DepsMut , Env , IbcAcknowledgement ) -> Result < IbcBasicResponse < C > , E > ,
198
+ contract_fn : & dyn Fn (
199
+ DepsMut ,
200
+ Env ,
201
+ IbcAcknowledgementWithPacket ,
202
+ ) -> Result < IbcBasicResponse < C > , E > ,
195
203
env_ptr : * mut Region ,
196
204
msg_ptr : * mut Region ,
197
205
) -> ContractResult < IbcBasicResponse < C > >
@@ -203,7 +211,7 @@ where
203
211
let msg: Vec < u8 > = unsafe { consume_region ( msg_ptr) } ;
204
212
205
213
let env: Env = try_into_contract_result ! ( from_slice( & env) ) ;
206
- let msg: IbcAcknowledgement = try_into_contract_result ! ( from_slice( & msg) ) ;
214
+ let msg: IbcAcknowledgementWithPacket = try_into_contract_result ! ( from_slice( & msg) ) ;
207
215
208
216
let mut deps = make_dependencies ( ) ;
209
217
contract_fn ( deps. as_mut ( ) , env, msg) . into ( )
0 commit comments