Skip to content

Commit 6cc4d6f

Browse files
committed
Remove stargate msg
1 parent 025ff70 commit 6cc4d6f

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

packages/std/src/results/cosmos_msg.rs

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ pub enum CosmosMsg<T = Empty> {
3333
Staking(StakingMsg),
3434
#[cfg(feature = "staking")]
3535
Distribution(DistributionMsg),
36-
/// A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto).
37-
/// This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)
38-
#[cfg(feature = "stargate")]
39-
Stargate {
40-
type_url: String,
41-
value: Binary,
42-
},
4336
Any(AnyMsg),
4437
#[cfg(feature = "stargate")]
4538
Ibc(IbcMsg),
@@ -121,6 +114,8 @@ pub enum DistributionMsg {
121114
},
122115
}
123116

117+
/// A message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto).
118+
/// This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)
124119
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
125120
pub struct AnyMsg {
126121
pub type_url: String,
@@ -495,20 +490,6 @@ mod tests {
495490
}
496491
}
497492

498-
#[test]
499-
#[cfg(feature = "stargate")]
500-
fn stargate_msg_serializes_to_correct_json() {
501-
let msg: CosmosMsg = CosmosMsg::Stargate {
502-
type_url: "/cosmos.foo.v1beta.MsgBar".to_string(),
503-
value: Binary::from_base64("5yu/rQ+HrMcxH1zdga7P5hpGMLE=").unwrap(),
504-
};
505-
let json = to_json_string(&msg).unwrap();
506-
assert_eq!(
507-
json,
508-
r#"{"stargate":{"type_url":"/cosmos.foo.v1beta.MsgBar","value":"5yu/rQ+HrMcxH1zdga7P5hpGMLE="}}"#,
509-
);
510-
}
511-
512493
#[test]
513494
fn any_msg_serializes_to_correct_json() {
514495
// Same serialization as CosmosMsg::Stargate (see above), except the top level key

0 commit comments

Comments
 (0)