Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
203 changes: 141 additions & 62 deletions Cargo.lock

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ cairo-lang-sierra-to-casm = "=2.12.3"
cairo-vm = "2.5.0"
cairo-annotations = { version = "0.6.1", features = ["cairo-lang"] }
dirs = "6.0.0"
dialoguer = "0.11.0"
dialoguer = "0.12.0"
starknet-types-core = { version = "0.2.4", features = ["hash", "prime-bigint"] }
anyhow = "1.0.100"
assert_fs = "1.1.2"
camino = { version = "1.2.1", features = ["serde1"] }
clap = { version = "4.5.48", features = ["derive", "deprecated"] }
clap_complete = "4.5.58"
console = "0.15.11"
console = "0.16.1"
include_dir = "0.7.4"
indoc = "2"
itertools = "0.14.0"
Expand All @@ -76,7 +76,7 @@ starknet-rust = "0.18.0"
starknet-rust-crypto = "0.9.0"
tempfile = "3.23.0"
thiserror = "2.0.17"
ctor = "0.4.1"
ctor = "0.6.2"
url = { "version" = "2.5.4", "features" = ["serde"] }
tokio = { version = "1.44.0", features = ["full"] }
futures = "0.3.31"
Expand All @@ -91,44 +91,44 @@ docs = { path = "./crates/docs" }
test-case = "3.3.1"
scarb-metadata = "1.14.0"
flatten-serde-json = "0.1.0"
snapbox = "0.4.17"
snapbox = "0.6.23"
scarb-ui = "0.1.7"
semver = "1.0.27"
bimap = "0.6.3"
primitive-types = { version = "0.13.1", features = ["serde"] }
primitive-types = { version = "0.14.0", features = ["serde"] }
shellexpand = "3.1.0"
toml = "0.8.20"
toml = "0.9.8"
rpassword = "7.3.1"
promptly = "0.3.1"
ptree = "0.5.2"
reqwest = { version = "0.12.21", features = ["json"] }
fs_extra = "1.3.0"
openssl = { version = "0.10", features = ["vendored"] }
toml_edit = "0.22.24"
toml_edit = "0.23.7"
axum = "0.8.6"
fs2 = "0.4.3"
flate2 = "1.1.0"
k256 = { version = "0.13.4", features = ["sha256", "ecdsa", "serde"] }
p256 = { version = "0.13.2", features = ["sha256", "ecdsa", "serde"] }
glob = "0.3.2"
sha3 = "0.10.8"
base16ct = { version = "0.2.0", features = ["alloc"] }
base16ct = { version = "0.3.0", features = ["alloc"] }
async-trait = "0.1.87"
serde_path_to_error = "0.1.20"
wiremock = "0.6.3"
const-hex = "1.16.0"
indicatif = "0.17.11"
indicatif = "0.18.3"
shell-words = "1.1.0"
sanitize-filename = "0.6.0"
derive_more = { version = "2.0.1", features = ["display"] }
derive_more = { version = "2.1.0", features = ["display"] }
paste = "1.0.15"
strum = "0.27"
strum_macros = "0.27"
scarb-oracle-hint-service = "0.1.1"
chrono = "0.4.42"
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
tracing = "0.1.41"
tracing = "0.1.43"
tracing-chrome = "0.7.2"
tracing-log = "0.2.0"
comfy-table = "7"
insta = { version = "1.43.1", features = ["filters"] }
insta = { version = "1.44.3", features = ["filters"] }
4 changes: 2 additions & 2 deletions crates/configuration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use anyhow::{Context, Result, anyhow};
use camino::Utf8PathBuf;
use std::fs::File;
use std::{env, fs};
use toml::Value;
use toml::Table;

pub mod core;
pub mod test_utils;
Expand Down Expand Up @@ -44,7 +44,7 @@ pub fn load_config<T: Config + Default>(
Some(path) => {
let raw_config_toml = fs::read_to_string(path)
.context("Failed to read snfoundry.toml config file")?
.parse::<Value>()
.parse::<Table>()
.context("Failed to parse snfoundry.toml config file")?;

let raw_config_json = serde_json::to_value(raw_config_toml)
Expand Down
3 changes: 2 additions & 1 deletion crates/forge/tests/e2e/common/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use camino::Utf8PathBuf;
use indoc::formatdoc;
use shared::command::CommandExt;
use shared::test_utils::node_url::node_rpc_url;
use snapbox::cmd::{Command as SnapboxCommand, cargo_bin};
use snapbox::cargo_bin;
use snapbox::cmd::Command as SnapboxCommand;
use std::path::{Path, PathBuf};
use std::process::Command;
use std::str::FromStr;
Expand Down
4 changes: 2 additions & 2 deletions crates/forge/tests/e2e/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use regex::Regex;
use scarb_api::ScarbCommand;
use shared::consts::FREE_RPC_PROVIDER_URL;
use shared::test_utils::output_assert::assert_stdout_contains;
use snapbox::assert_matches;
use snapbox::assert_data_eq;
use snapbox::cmd::Command as SnapboxCommand;
use std::ffi::OsString;
use std::path::{Path, PathBuf};
Expand Down Expand Up @@ -348,5 +348,5 @@ fn assert_manifest_matches(expected: &str, actual: &str) {
s.lines().sorted().join("\n")
}

assert_matches(sort_lines(expected), sort_lines(actual));
assert_data_eq!(sort_lines(actual), sort_lines(expected));
}
6 changes: 3 additions & 3 deletions crates/forge/tests/e2e/plugin_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use scarb_api::ScarbCommand;
use scarb_api::version::scarb_version_for_dir;
use shared::test_utils::output_assert::assert_stdout_contains;
use snapbox::cmd::Command;
use toml_edit::ImDocument;
use toml_edit::Document;

#[test]
#[cfg_attr(
Expand All @@ -23,7 +23,7 @@ fn new_with_new_scarb() {

let manifest = temp.path().join("abc").join("Scarb.toml");
let manifest = &std::fs::read_to_string(manifest).unwrap();
let manifest = ImDocument::parse(manifest).unwrap();
let manifest = Document::parse(manifest).unwrap();

let snforge_std = manifest
.get("dev-dependencies")
Expand Down Expand Up @@ -62,7 +62,7 @@ fn new_with_old_scarb() {

let manifest = temp.path().join("abc").join("Scarb.toml");
let manifest = &std::fs::read_to_string(manifest).unwrap();
let manifest = ImDocument::parse(manifest).unwrap();
let manifest = Document::parse(manifest).unwrap();

let snforge_std = manifest
.get("dev-dependencies")
Expand Down
32 changes: 16 additions & 16 deletions crates/sncast/tests/e2e/account/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use serde_json::{json, to_string_pretty};
use shared::test_utils::output_assert::{
AsOutput, assert_stderr_contains, assert_stdout, assert_stdout_contains,
};
use snapbox::assert_matches;
use snapbox::assert_data_eq;
use sncast::AccountType;
use sncast::helpers::constants::{
BRAAVOS_BASE_ACCOUNT_CLASS_HASH, BRAAVOS_CLASS_HASH, OZ_CLASS_HASH, READY_CLASS_HASH,
Expand Down Expand Up @@ -85,7 +85,7 @@ pub async fn test_happy_case(account_type: &str) {
}
);

assert_matches(to_string_pretty(&expected).unwrap(), contents);
assert_data_eq!(contents, to_string_pretty(&expected).unwrap());
}

// TODO(#3556): Remove this test once we drop Argent account type
Expand Down Expand Up @@ -153,7 +153,7 @@ pub async fn test_happy_case_argent_with_deprecation_warning() {
}
);

assert_matches(to_string_pretty(&expected).unwrap(), contents);
assert_data_eq!(contents, to_string_pretty(&expected).unwrap());
}

#[tokio::test]
Expand Down Expand Up @@ -214,7 +214,7 @@ pub async fn test_happy_case_generate_salt() {
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(temp_dir.path());

snapbox.assert().success().stdout_matches(indoc! {r"
snapbox.assert().success().stdout_eq(indoc! {r"
Success: Account created

Address: 0x0[..]
Expand Down Expand Up @@ -302,7 +302,7 @@ pub async fn test_happy_case_accounts_file_already_exists() {
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(temp_dir.path());

snapbox.assert().success().stdout_matches(indoc! {r"
snapbox.assert().success().stdout_eq(indoc! {r"
Success: Account created

Address: 0x0[..]
Expand Down Expand Up @@ -436,7 +436,7 @@ pub async fn test_happy_case_keystore(account_type: &str) {
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(temp_dir.path());

snapbox.assert().stdout_matches(formatdoc! {r"
snapbox.assert().stdout_eq(formatdoc! {r"
Success: Account created

Address: 0x0[..]
Expand All @@ -455,9 +455,9 @@ pub async fn test_happy_case_keystore(account_type: &str) {
let contents = fs::read_to_string(temp_dir.path().join(account_file))
.expect("Unable to read created file");

assert_matches(
get_keystore_account_pattern(account_type.parse().unwrap(), None),
assert_data_eq!(
contents,
get_keystore_account_pattern(account_type.parse().unwrap(), None),
);
}

Expand Down Expand Up @@ -486,7 +486,7 @@ pub async fn test_happy_case_keystore_argent_with_deprecation_warning() {
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(temp_dir.path());

snapbox.assert().stdout_matches(formatdoc! {r"
snapbox.assert().stdout_eq(formatdoc! {r"
[WARNING] Argent has rebranded as Ready. The `argent` option for the `--type` flag in `account create` is deprecated, please use `ready` instead.

Success: Account created
Expand All @@ -507,9 +507,9 @@ pub async fn test_happy_case_keystore_argent_with_deprecation_warning() {
let contents = fs::read_to_string(temp_dir.path().join(account_file))
.expect("Unable to read created file");

assert_matches(
get_keystore_account_pattern("argent".parse().unwrap(), None),
assert_data_eq!(
contents,
get_keystore_account_pattern("argent".parse().unwrap(), None),
);
}

Expand Down Expand Up @@ -692,7 +692,7 @@ pub async fn test_happy_case_keystore_int_format() {
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(temp_dir.path());

snapbox.assert().stdout_matches(formatdoc! {r"
snapbox.assert().stdout_eq(formatdoc! {r"
Success: Account created

Address: [..]
Expand Down Expand Up @@ -746,7 +746,7 @@ pub async fn test_happy_case_default_name_generation() {
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(tempdir.path())
.assert()
.stdout_matches(formatdoc! {r"
.stdout_eq(formatdoc! {r"
Success: Account created

Address: 0x0[..]
Expand Down Expand Up @@ -779,7 +779,7 @@ pub async fn test_happy_case_default_name_generation() {
.stdin("Y")
.assert()
.success()
.stdout_matches(indoc! {r"
.stdout_eq(indoc! {r"
Success: Account deleted

Account successfully removed
Expand Down Expand Up @@ -834,7 +834,7 @@ pub async fn test_happy_case_default_name_generation() {
}
);

assert_matches(to_string_pretty(&expected).unwrap(), contents);
assert_data_eq!(contents, to_string_pretty(&expected).unwrap());
}

fn get_formatted_account_type(account_type: &str) -> &str {
Expand Down Expand Up @@ -1010,7 +1010,7 @@ pub async fn test_json_output_format() {
let snapbox = runner(&args)
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(temp_dir.path());
snapbox.assert().stdout_matches(indoc! {r#"
snapbox.assert().stdout_eq(indoc! {r#"
{"add_profile":"Profile my_account successfully added to [..]/snfoundry.toml","address":"0x[..]","command":"account create","estimated_fee":"[..]","message":"Account successfully created but it needs to be deployed. The estimated deployment fee is [..] STRK. Prefund the account to cover deployment transaction fee/n/nAfter prefunding the account, run:/nsncast --accounts-file accounts.json account deploy --url [..] --name my_account","type":"response"}
{"links":"account: https://sepolia.starkscan.co/contract/0x[..]","title":"account creation","type":"notification"}
"#});
Expand Down
6 changes: 3 additions & 3 deletions crates/sncast/tests/e2e/account/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub fn test_happy_case() {
// Run test with an affirmative user input
let snapbox = runner(&args).current_dir(temp_dir.path()).stdin("Y");

snapbox.assert().success().stdout_matches(indoc! {r"
snapbox.assert().success().stdout_eq(indoc! {r"
Success: Account deleted

Account successfully removed
Expand All @@ -131,7 +131,7 @@ pub fn test_happy_case_url() {

let snapbox = runner(&args).current_dir(temp_dir.path()).stdin("Y");

snapbox.assert().success().stdout_matches(indoc! {r"
snapbox.assert().success().stdout_eq(indoc! {r"
Success: Account deleted

Account successfully removed
Expand Down Expand Up @@ -162,7 +162,7 @@ pub fn test_happy_case_with_yes_flag() {
let output = snapbox.assert().success();

assert!(output.as_stderr().is_empty());
output.stdout_matches(indoc! {r"
output.stdout_eq(indoc! {r"
Success: Account deleted

Account successfully removed
Expand Down
10 changes: 5 additions & 5 deletions crates/sncast/tests/e2e/account/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ pub async fn test_valid_class_hash() {
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(tempdir.path());

snapbox.assert().success().stdout_matches(indoc! {r"
snapbox.assert().success().stdout_eq(indoc! {r"
Success: Account deployed

Transaction Hash: 0x[..]
Expand Down Expand Up @@ -213,7 +213,7 @@ pub async fn test_valid_no_max_fee() {
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(tempdir.path());

snapbox.assert().success().stdout_matches(indoc! {r"
snapbox.assert().success().stdout_eq(indoc! {r"
Success: Account deployed

Transaction Hash: 0x[..]
Expand Down Expand Up @@ -311,7 +311,7 @@ pub async fn test_happy_case_keystore(account_type: &str) {
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(tempdir.path());

snapbox.assert().stdout_matches(indoc! {r"
snapbox.assert().stdout_eq(indoc! {r"
Success: Account deployed

Transaction Hash: 0x[..]
Expand Down Expand Up @@ -576,7 +576,7 @@ pub async fn test_deploy_keystore_other_args() {
let snapbox = runner(&args)
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(tempdir.path());
snapbox.assert().stdout_matches(indoc! {r"
snapbox.assert().stdout_eq(indoc! {r"
Success: Account deployed

Transaction Hash: 0x[..]
Expand Down Expand Up @@ -607,7 +607,7 @@ pub async fn test_json_output_format() {
let snapbox = runner(&args)
.env("SNCAST_FORCE_SHOW_EXPLORER_LINKS", "1")
.current_dir(tempdir.path());
snapbox.assert().stdout_matches(indoc! {r#"
snapbox.assert().stdout_eq(indoc! {r#"
{"command":"account deploy","transaction_hash":"0x0[..]","type":"response"}
{"links":"transaction: https://sepolia.starkscan.co/tx/0x0[..]","title":"account deployment","type":"notification"}
"#});
Expand Down
Loading
Loading