From 2f8213a21e21af74d112ed1bc7f30fa750cbabed Mon Sep 17 00:00:00 2001 From: Peter White Date: Mon, 9 Dec 2024 00:02:50 -0700 Subject: [PATCH] make extrinsic calls types, upload, and events pub chore: make events public chore: make types pub for use in other crates --- crates/extrinsics/src/extrinsic_calls.rs | 8 ++++---- crates/extrinsics/src/lib.rs | 8 ++++---- crates/extrinsics/src/upload.rs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/extrinsics/src/extrinsic_calls.rs b/crates/extrinsics/src/extrinsic_calls.rs index 3330b3d33..97b803150 100644 --- a/crates/extrinsics/src/extrinsic_calls.rs +++ b/crates/extrinsics/src/extrinsic_calls.rs @@ -77,7 +77,7 @@ impl RemoveCode { /// A raw call to `pallet-contracts`'s `upload_code`. #[derive(Debug, EncodeAsType)] #[encode_as_type(crate_path = "subxt::ext::scale_encode")] -pub(crate) struct UploadCode { +pub struct UploadCode { code: Vec, storage_deposit_limit: Option>, determinism: Determinism, @@ -104,7 +104,7 @@ impl UploadCode { /// A raw call to `pallet-contracts`'s `instantiate_with_code`. #[derive(Debug, EncodeAsType)] #[encode_as_type(crate_path = "subxt::ext::scale_encode")] -pub(crate) struct InstantiateWithCode { +pub struct InstantiateWithCode { #[codec(compact)] value: Balance, gas_limit: Weight, @@ -141,7 +141,7 @@ impl InstantiateWithCode { /// A raw call to `pallet-contracts`'s `instantiate_with_code_hash`. #[derive(Debug, EncodeAsType)] #[encode_as_type(crate_path = "subxt::ext::scale_encode")] -pub(crate) struct Instantiate +pub struct Instantiate where Hash: EncodeAsType, { @@ -184,7 +184,7 @@ where /// A raw call to `pallet-contracts`'s `call`. #[derive(EncodeAsType)] #[encode_as_type(crate_path = "subxt::ext::scale_encode")] -pub(crate) struct Call { +pub struct Call { dest: MultiAddress, #[codec(compact)] value: Balance, diff --git a/crates/extrinsics/src/lib.rs b/crates/extrinsics/src/lib.rs index 126b3327b..3d1b2e4c9 100644 --- a/crates/extrinsics/src/lib.rs +++ b/crates/extrinsics/src/lib.rs @@ -21,14 +21,14 @@ mod contract_info; mod contract_storage; mod env_check; mod error; -mod events; -mod extrinsic_calls; -mod extrinsic_opts; +pub mod events; +pub mod extrinsic_calls; +pub mod extrinsic_opts; mod instantiate; pub mod pallet_contracts_primitives; mod remove; mod rpc; -mod upload; +pub mod upload; #[cfg(test)] mod contract_storage_tests; diff --git a/crates/extrinsics/src/upload.rs b/crates/extrinsics/src/upload.rs index 699227a67..f6b0a0d52 100644 --- a/crates/extrinsics/src/upload.rs +++ b/crates/extrinsics/src/upload.rs @@ -203,7 +203,7 @@ pub struct UploadResult { #[allow(dead_code)] #[derive(Debug, Encode, EncodeAsType)] #[encode_as_type(crate_path = "subxt::ext::scale_encode")] -pub(crate) enum Determinism { +pub enum Determinism { /// The execution should be deterministic and hence no indeterministic instructions /// are allowed. ///