Skip to content

Commit

Permalink
Update api to enable custom runtime (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou authored Feb 9, 2024
1 parent 4255618 commit d47e00c
Show file tree
Hide file tree
Showing 26 changed files with 423 additions and 402 deletions.
106 changes: 26 additions & 80 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ homepage = "https://github.com/Cardinal-Cryptography/drink"
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/Cardinal-Cryptography/drink"
version = "0.8.6"
version = "0.9.0"

[workspace.dependencies]
anyhow = { version = "1.0.71" }
Expand Down Expand Up @@ -57,5 +57,5 @@ sp-runtime-interface = { version = "24.0.0" }

# Local dependencies

drink = { version = "0.8.6", path = "drink" }
drink-test-macro = { version = "0.8.6", path = "drink/test-macro" }
drink = { version = "0.9.0", path = "drink" }
drink-test-macro = { version = "0.9.0", path = "drink/test-macro" }
6 changes: 1 addition & 5 deletions drink-cli/src/app_state/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
use std::{env, path::PathBuf};

pub use contracts::{Contract, ContractIndex, ContractRegistry};
use drink::{
runtime::{MinimalRuntime, Runtime},
session::Session,
Weight, DEFAULT_GAS_LIMIT,
};
use drink::{runtime::MinimalRuntime, session::Session, SandboxConfig, Weight, DEFAULT_GAS_LIMIT};
use sp_core::crypto::AccountId32;
pub use user_input::UserInput;

Expand Down
2 changes: 1 addition & 1 deletion drink-cli/src/app_state/print.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use drink::contract_api::decode_debug_buffer;
use drink::contracts_api::decode_debug_buffer;
use pallet_contracts::ContractResult;
use ratatui::{
style::{Color, Modifier, Style},
Expand Down
6 changes: 3 additions & 3 deletions drink/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ use parity_scale_codec::{Decode, Encode};
/// Export pallets that are used in the minimal runtime.
pub use {frame_support, frame_system, pallet_balances, pallet_contracts, pallet_timestamp};

pub use crate::runtime::minimal::{self, MinimalRuntime};
use crate::{
errors::MessageResult,
mock::MockRegistry,
runtime::{pallet_contracts_debugging::InterceptingExtT, *},
errors::MessageResult, mock::MockRegistry,
runtime::pallet_contracts_debugging::InterceptingExtT,
};

/// Alias for `frame-system`'s `RuntimeCall` type.
Expand Down
Loading

0 comments on commit d47e00c

Please sign in to comment.