Skip to content

Commit

Permalink
make extrinsic calls types, upload, and events pub
Browse files Browse the repository at this point in the history
chore: make events public

chore: make types pub for use in other crates
  • Loading branch information
peterwht committed Dec 16, 2024
1 parent 413ccc7 commit 2f8213a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions crates/extrinsics/src/extrinsic_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl<Hash> RemoveCode<Hash> {
/// 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<Balance> {
pub struct UploadCode<Balance> {
code: Vec<u8>,
storage_deposit_limit: Option<Compact<Balance>>,
determinism: Determinism,
Expand All @@ -104,7 +104,7 @@ impl<Balance> UploadCode<Balance> {
/// 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<Balance> {
pub struct InstantiateWithCode<Balance> {
#[codec(compact)]
value: Balance,
gas_limit: Weight,
Expand Down Expand Up @@ -141,7 +141,7 @@ impl<Balance> InstantiateWithCode<Balance> {
/// 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<Hash, Balance>
pub struct Instantiate<Hash, Balance>
where
Hash: EncodeAsType,
{
Expand Down Expand Up @@ -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<AccountId, Balance> {
pub struct Call<AccountId, Balance> {
dest: MultiAddress<AccountId, ()>,
#[codec(compact)]
value: Balance,
Expand Down
8 changes: 4 additions & 4 deletions crates/extrinsics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/extrinsics/src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub struct UploadResult<C: Config> {
#[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.
///
Expand Down

0 comments on commit 2f8213a

Please sign in to comment.