Skip to content

Commit

Permalink
feat: Add feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kulikthebird committed Feb 13, 2025
1 parent c1f9897 commit 56d219d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/std/src/exports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use core::{marker::PhantomData, ptr};
use serde::de::DeserializeOwned;

use crate::deps::OwnedDeps;
#[cfg(feature = "eureka")]
use crate::eureka::EurekaPacketReceiveMsg;
#[cfg(any(feature = "stargate", feature = "eureka"))]
use crate::ibc::IbcReceiveResponse;
Expand Down
2 changes: 2 additions & 0 deletions packages/vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ staking = ["cosmwasm-std/staking"]
stargate = ["cosmwasm-std/stargate"]
# For heap profiling. Only used in the "heap_profiling" example.
dhat-heap = ["dep:dhat"]
# eureka enables eureka-dependent messages, entrypoints and queries
eureka = ["cosmwasm-std/eureka"]

# Legacy no-op feature. This is kept for compatibility with older contracts.
# Delete this with the next major release.
Expand Down
5 changes: 3 additions & 2 deletions packages/vm/src/calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ use cosmwasm_std::{
IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse,
};

#[cfg(feature = "eureka")]
use cosmwasm_std::EurekaPayload;

use crate::backend::{BackendApi, Querier, Storage};
use crate::conversion::ref_to_u32;
use crate::errors::{VmError, VmResult};
Expand Down Expand Up @@ -766,8 +769,6 @@ where
S: Storage + 'static,
Q: Querier + 'static,
{
use cosmwasm_std::EurekaPayload;

let env = to_vec(env)?;
let msg = to_vec(msg)?;
let data = call_eu_packet_receive_raw(instance, &env, &msg)?;
Expand Down
2 changes: 1 addition & 1 deletion packages/vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub use crate::backend::{
};
pub use crate::cache::{AnalysisReport, Cache, Metrics, PerModuleMetrics, PinnedMetrics, Stats};
#[cfg(feature = "eureka")]
pub use crate::calls::call_eu_packet_receive;
pub use crate::calls::{call_eu_packet_receive, call_eu_packet_receive_raw};
pub use crate::calls::{
call_execute, call_execute_raw, call_ibc_destination_callback,
call_ibc_destination_callback_raw, call_ibc_source_callback, call_ibc_source_callback_raw,
Expand Down

0 comments on commit 56d219d

Please sign in to comment.