Skip to content

Commit

Permalink
kairos: use cctl-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
marijanp committed Aug 26, 2024
1 parent 480fcc9 commit d54c778
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
27 changes: 27 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ license = "MIT OR Apache-2.0"
opt-level = 3

[workspace.dependencies]
cctl-rs = { git = "https://github.com/cspr-rad/cctl-rs" }
casper-client = "2.0"
casper-types = "4.0"
casper-client-types = { package = "casper-types", version = "3.0" }
Expand Down
1 change: 1 addition & 0 deletions kairos-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["std", "env-filter"] }
casper-client.workspace = true
casper-client-types = { workspace = true, features = ["std"] } # TODO: Change `std` -> `std-fs-io` in the future version.
cctl-rs.workspace = true
clap = { version = "4", features = ["derive", "deprecated"] }
chrono = { version = "0.4", optional = true }
hex = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions kairos-cli/src/commands/run_cctl.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::PathBuf;

use casper_client_types::{runtime_args, RuntimeArgs};
use kairos_test_utils::cctl::{CCTLNetwork, DeployableContract};
use cctl::{CCTLNetwork, DeployableContract};

use crate::error::CliError;

Expand All @@ -19,7 +19,7 @@ pub fn run() -> Result<String, CliError> {
let chainspec_path = PathBuf::from(std::env::var("CCTL_CHAINSPEC").unwrap());
let config_path = PathBuf::from(std::env::var("CCTL_CONFIG").unwrap());

let network = CCTLNetwork::run(None, Some(contract_to_deploy), Some(chainspec_path.as_path()), Some(config_path.as_path()))
let network = CCTLNetwork::run(None, Some(contract_to_deploy), Some(chainspec_path), Some(config_path))
.await
.unwrap();

Expand Down
6 changes: 2 additions & 4 deletions kairos-cli/tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ use std::path::PathBuf;

use casper_client::types::DeployHash;
use casper_client_hashing::Digest;
use cctl::{CCTLNetwork, DeployableContract};
use kairos_test_utils::kairos::Kairos;
#[cfg(feature = "database")]
use kairos_test_utils::postgres::PostgresDB;
use kairos_test_utils::{
cctl::{CCTLNetwork, DeployableContract},
kairos::Kairos,
};

// Helper function to get the path to a fixture file
fn fixture_path(relative_path: &str) -> PathBuf {
Expand Down
1 change: 1 addition & 0 deletions kairos-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ proptest = "1"
axum-test = "14"
kairos-test-utils = { path = "../kairos-test-utils" }
casper-client-types.workspace = true
cctl-rs.workspace = true
2 changes: 1 addition & 1 deletion kairos-server/tests/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ use casper_client_types::{
crypto::{PublicKey, SecretKey},
AsymmetricType, ContractHash,
};
use cctl::CCTLNetwork;
#[cfg(feature = "database")]
use kairos_data::new as new_pool;
use kairos_server::{
config::{BatchConfig, ServerConfig},
routes::deposit::DepositPath,
state::{BatchStateManager, ServerStateInner},
};
use kairos_test_utils::cctl::CCTLNetwork;
#[cfg(feature = "database")]
use kairos_test_utils::postgres::PostgresDB;

Expand Down

0 comments on commit d54c778

Please sign in to comment.