Skip to content

Commit

Permalink
Make extrinsic call types, upload, and events public (#1873)
Browse files Browse the repository at this point in the history
* make extrinsic calls types, upload, and events pub

chore: make events public

chore: make types pub for use in other crates

* chore: update changelog
  • Loading branch information
peterwht authored Dec 16, 2024
1 parent 413ccc7 commit 62dfbcf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[Unreleased]
### Changed
- Make extrinsic call types, upload, and events public - [#1873](https://github.com/use-ink/cargo-contract/pull/1873)

## [5.0.1]

### Changed
Expand Down
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 62dfbcf

Please sign in to comment.