Skip to content

Commit

Permalink
move secret module outside of cosmwasm module
Browse files Browse the repository at this point in the history
  • Loading branch information
kent-3 committed Dec 23, 2023
1 parent a7e70d5 commit 645dcc0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
26 changes: 13 additions & 13 deletions cosmos-sdk-proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,21 +238,21 @@ pub mod cosmwasm {
}
}

#[cfg(feature = "secret-cosmwasm")]
#[cfg_attr(docsrs, doc(cfg(feature = "secret-cosmwasm")))]
pub mod secret {
pub mod compute {
pub mod v1beta1 {
include!("prost/secret/secret.compute.v1beta1.rs");
}
}

/// SecretWasm protobuf definitions.
#[cfg(feature = "secret-cosmwasm")]
#[cfg_attr(docsrs, doc(cfg(feature = "secret-cosmwasm")))]
pub mod secret {
pub mod compute {
pub mod v1beta1 {
include!("prost/secret/secret.compute.v1beta1.rs");
}
}

#[cfg(feature = "secret-cosmwasm")]
#[cfg_attr(docsrs, doc(cfg(feature = "secret-cosmwasm")))]
pub mod registration {
pub mod v1beta1 {
include!("prost/secret/secret.registration.v1beta1.rs");
}
pub mod registration {
pub mod v1beta1 {
include!("prost/secret/secret.registration.v1beta1.rs");
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions cosmrs/src/secret_cosmwasm.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{proto, tx::Msg, AccountId, Coin, ErrorReport, Result};
use proto::cosmwasm::secret::compute::v1beta1 as cosmwasm_proto;
use proto::secret::compute::v1beta1 as cosmwasm_proto;

#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
/// MsgStoreCode submit Wasm code to the system
Expand Down Expand Up @@ -56,7 +56,7 @@ pub struct MsgInstantiateContract {
/// Sender is the that actor that signed the messages
pub sender: AccountId,
/// Admin is an optional address that can execute migrations
pub admin: Option<AccountId>,
pub admin: Option<String>,
/// The code id of the stored contract code
pub code_id: u64,
/// The label to give this contract instance
Expand All @@ -78,6 +78,7 @@ impl TryFrom<cosmwasm_proto::MsgInstantiateContract> for MsgInstantiateContract
code_id: proto.code_id,
label: proto.label,
init_msg: proto.init_msg,
admin: Some(proto.admin),
})
}
}
Expand All @@ -92,6 +93,7 @@ impl From<MsgInstantiateContract> for cosmwasm_proto::MsgInstantiateContract {
init_msg: msg.init_msg,
init_funds: vec![],
callback_sig: vec![],
admin: "".to_string(),
}
}
}
Expand Down

0 comments on commit 645dcc0

Please sign in to comment.