Skip to content

Commit 3946f2b

Browse files
committed
feat: Update CosmosMsg with Eureka variant
1 parent 84ba46a commit 3946f2b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to
1212

1313
- cosmwasm-schema: The schema export now doesn't overwrite existing
1414
`additionalProperties` values anymore ([#2310])
15+
- cosmwasm-std: Added new `EurekaMsg` and `CosmosMsg::Eureka` variant ([#2340])
1516

1617
[#2310]: https://github.com/CosmWasm/cosmwasm/pull/2310
1718

packages/std/src/results/cosmos_msg.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use schemars::JsonSchema;
66
use serde::{Deserialize, Serialize};
77

88
use crate::coin::Coin;
9+
use crate::eureka::EurekaMsg;
910
#[cfg(feature = "stargate")]
1011
use crate::ibc::IbcMsg;
1112
use crate::prelude::*;
@@ -84,6 +85,7 @@ pub enum CosmosMsg<T = Empty> {
8485
Wasm(WasmMsg),
8586
#[cfg(feature = "stargate")]
8687
Gov(GovMsg),
88+
Eureka(EurekaMsg),
8789
}
8890

8991
impl<T> CosmosMsg<T> {
@@ -108,6 +110,7 @@ impl<T> CosmosMsg<T> {
108110
CosmosMsg::Wasm(msg) => CosmosMsg::Wasm(msg),
109111
#[cfg(feature = "stargate")]
110112
CosmosMsg::Gov(msg) => CosmosMsg::Gov(msg),
113+
CosmosMsg::Eureka(msg) => CosmosMsg::Eureka(msg),
111114
})
112115
}
113116
}
@@ -485,6 +488,12 @@ impl<T> From<GovMsg> for CosmosMsg<T> {
485488
}
486489
}
487490

491+
impl<T> From<EurekaMsg> for CosmosMsg<T> {
492+
fn from(msg: EurekaMsg) -> Self {
493+
CosmosMsg::Eureka(msg)
494+
}
495+
}
496+
488497
#[cfg(test)]
489498
mod tests {
490499
use super::*;

0 commit comments

Comments
 (0)