Skip to content

Commit

Permalink
Limit state_version to wasm target
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Apr 26, 2024
1 parent 7d067a1 commit 3f8bd84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl Parse for Options {
///
/// The VM will use this as a hint whether it needs to run the migrate function of your contract or not.
///
/// ```no_run
/// ```
/// # use cosmwasm_std::{
/// # DepsMut, entry_point, Env,
/// # Response, StdResult,
Expand Down Expand Up @@ -151,6 +151,7 @@ fn expand_attributes(func: &mut ItemFn) -> syn::Result<TokenStream> {

#[allow(unused)]
#[doc(hidden)]
#[cfg(target_arch = "wasm32")]
#[link_section = "cw_state_version"]
/// This is an internal constant exported as a custom section denoting the contract state version.
/// The format and even the existence of this value is an implementation detail, DO NOT RELY ON THIS!
Expand Down Expand Up @@ -262,6 +263,7 @@ mod test {
let expected = quote! {
#[allow(unused)]
#[doc(hidden)]
#[cfg(target_arch = "wasm32")]
#[link_section = "cw_state_version"]
/// This is an internal constant exported as a custom section denoting the contract state version.
/// The format and even the existence of this value is an implementation detail, DO NOT RELY ON THIS!
Expand Down

0 comments on commit 3f8bd84

Please sign in to comment.