@@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};
7
7
8
8
use crate :: coin:: Coin ;
9
9
use crate :: prelude:: * ;
10
- use crate :: results:: { Attribute , CosmosMsg , Empty , Event , SubMsg } ;
10
+ use crate :: results:: { Attribute , CosmosMsg , Event , SubMsg } ;
11
11
use crate :: StdResult ;
12
12
use crate :: { to_json_binary, Binary } ;
13
13
use crate :: { Addr , Timestamp } ;
@@ -560,12 +560,12 @@ impl IbcPacketTimeoutMsg {
560
560
/// will use other Response types
561
561
#[ derive( Serialize , Deserialize , Clone , Debug , PartialEq , Eq , JsonSchema ) ]
562
562
#[ non_exhaustive]
563
- pub struct IbcBasicResponse < T = Empty > {
563
+ pub struct IbcBasicResponse {
564
564
/// Optional list of messages to pass. These will be executed in order.
565
565
/// If the ReplyOn member is set, they will invoke this contract's `reply` entry point
566
566
/// after execution. Otherwise, they act like "fire and forget".
567
567
/// Use `SubMsg::new` to create messages with the older "fire and forget" semantics.
568
- pub messages : Vec < SubMsg < T > > ,
568
+ pub messages : Vec < SubMsg > ,
569
569
/// The attributes that will be emitted as part of a `wasm` event.
570
570
///
571
571
/// More info about events (and their attributes) can be found in [*Cosmos SDK* docs].
@@ -582,7 +582,7 @@ pub struct IbcBasicResponse<T = Empty> {
582
582
}
583
583
584
584
// Custom implementation in order to implement it for all `T`, even if `T` is not `Default`.
585
- impl < T > Default for IbcBasicResponse < T > {
585
+ impl Default for IbcBasicResponse {
586
586
fn default ( ) -> Self {
587
587
IbcBasicResponse {
588
588
messages : vec ! [ ] ,
@@ -592,7 +592,7 @@ impl<T> Default for IbcBasicResponse<T> {
592
592
}
593
593
}
594
594
595
- impl < T > IbcBasicResponse < T > {
595
+ impl IbcBasicResponse {
596
596
pub fn new ( ) -> Self {
597
597
Self :: default ( )
598
598
}
@@ -605,14 +605,14 @@ impl<T> IbcBasicResponse<T> {
605
605
606
606
/// This creates a "fire and forget" message, by using `SubMsg::new()` to wrap it,
607
607
/// and adds it to the list of messages to process.
608
- pub fn add_message ( mut self , msg : impl Into < CosmosMsg < T > > ) -> Self {
608
+ pub fn add_message ( mut self , msg : impl Into < CosmosMsg > ) -> Self {
609
609
self . messages . push ( SubMsg :: new ( msg) ) ;
610
610
self
611
611
}
612
612
613
613
/// This takes an explicit SubMsg (creates via e.g. `reply_on_error`)
614
614
/// and adds it to the list of messages to process.
615
- pub fn add_submessage ( mut self , msg : SubMsg < T > ) -> Self {
615
+ pub fn add_submessage ( mut self , msg : SubMsg ) -> Self {
616
616
self . messages . push ( msg) ;
617
617
self
618
618
}
@@ -664,7 +664,7 @@ impl<T> IbcBasicResponse<T> {
664
664
/// IbcBasicResponse::new().add_messages(msgs)
665
665
/// }
666
666
/// ```
667
- pub fn add_messages < M : Into < CosmosMsg < T > > > ( self , msgs : impl IntoIterator < Item = M > ) -> Self {
667
+ pub fn add_messages < M : Into < CosmosMsg > > ( self , msgs : impl IntoIterator < Item = M > ) -> Self {
668
668
self . add_submessages ( msgs. into_iter ( ) . map ( SubMsg :: new) )
669
669
}
670
670
@@ -679,7 +679,7 @@ impl<T> IbcBasicResponse<T> {
679
679
/// IbcBasicResponse::new().add_submessages(msgs)
680
680
/// }
681
681
/// ```
682
- pub fn add_submessages ( mut self , msgs : impl IntoIterator < Item = SubMsg < T > > ) -> Self {
682
+ pub fn add_submessages ( mut self , msgs : impl IntoIterator < Item = SubMsg > ) -> Self {
683
683
self . messages . extend ( msgs) ;
684
684
self
685
685
}
@@ -702,7 +702,7 @@ impl<T> IbcBasicResponse<T> {
702
702
/// and not inform the calling chain).
703
703
#[ derive( Serialize , Deserialize , Clone , Debug , PartialEq , Eq , JsonSchema ) ]
704
704
#[ non_exhaustive]
705
- pub struct IbcReceiveResponse < T = Empty > {
705
+ pub struct IbcReceiveResponse {
706
706
/// The bytes we return to the contract that sent the packet.
707
707
/// This may represent a success or error of execution.
708
708
/// In case of `None`, no acknowledgement is written.
@@ -711,7 +711,7 @@ pub struct IbcReceiveResponse<T = Empty> {
711
711
/// If the ReplyOn member is set, they will invoke this contract's `reply` entry point
712
712
/// after execution. Otherwise, they act like "fire and forget".
713
713
/// Use `call` or `msg.into()` to create messages with the older "fire and forget" semantics.
714
- pub messages : Vec < SubMsg < T > > ,
714
+ pub messages : Vec < SubMsg > ,
715
715
/// The attributes that will be emitted as part of a "wasm" event.
716
716
///
717
717
/// More info about events (and their attributes) can be found in [*Cosmos SDK* docs].
@@ -727,7 +727,7 @@ pub struct IbcReceiveResponse<T = Empty> {
727
727
pub events : Vec < Event > ,
728
728
}
729
729
730
- impl < T > IbcReceiveResponse < T > {
730
+ impl IbcReceiveResponse {
731
731
/// Create a new response with the given acknowledgement.
732
732
///
733
733
/// ## Examples
@@ -803,14 +803,14 @@ impl<T> IbcReceiveResponse<T> {
803
803
804
804
/// This creates a "fire and forget" message, by using `SubMsg::new()` to wrap it,
805
805
/// and adds it to the list of messages to process.
806
- pub fn add_message ( mut self , msg : impl Into < CosmosMsg < T > > ) -> Self {
806
+ pub fn add_message ( mut self , msg : impl Into < CosmosMsg > ) -> Self {
807
807
self . messages . push ( SubMsg :: new ( msg) ) ;
808
808
self
809
809
}
810
810
811
811
/// This takes an explicit SubMsg (creates via e.g. `reply_on_error`)
812
812
/// and adds it to the list of messages to process.
813
- pub fn add_submessage ( mut self , msg : SubMsg < T > ) -> Self {
813
+ pub fn add_submessage ( mut self , msg : SubMsg ) -> Self {
814
814
self . messages . push ( msg) ;
815
815
self
816
816
}
@@ -862,7 +862,7 @@ impl<T> IbcReceiveResponse<T> {
862
862
/// IbcReceiveResponse::new(StdAck::success(b"\x01")).add_messages(msgs)
863
863
/// }
864
864
/// ```
865
- pub fn add_messages < M : Into < CosmosMsg < T > > > ( self , msgs : impl IntoIterator < Item = M > ) -> Self {
865
+ pub fn add_messages < M : Into < CosmosMsg > > ( self , msgs : impl IntoIterator < Item = M > ) -> Self {
866
866
self . add_submessages ( msgs. into_iter ( ) . map ( SubMsg :: new) )
867
867
}
868
868
@@ -877,7 +877,7 @@ impl<T> IbcReceiveResponse<T> {
877
877
/// IbcReceiveResponse::new(StdAck::success(b"\x01")).add_submessages(msgs)
878
878
/// }
879
879
/// ```
880
- pub fn add_submessages ( mut self , msgs : impl IntoIterator < Item = SubMsg < T > > ) -> Self {
880
+ pub fn add_submessages ( mut self , msgs : impl IntoIterator < Item = SubMsg > ) -> Self {
881
881
self . messages . extend ( msgs) ;
882
882
self
883
883
}
0 commit comments