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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.48.0] - 2025-08-05

### Forge

#### Added

- `snforge_std` is now compatible with Scarb procedural macros V2. Migration is required if using Scarb versions before `2.12.0`. See [migration guide](https://foundry-rs.github.io/starknet-foundry/getting-started/0-47-0-migration-guide.html).

#### Changed

- If using a Scarb version before `2.10.0` or not using `allow-prebuild-plugins`, the minimal required rust version to run `snforge` is now `1.87.0`
Expand Down
73 changes: 37 additions & 36 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ members = [
exclude = ["crates/snforge-scarb-plugin", "crates/snforge-scarb-plugin-deprecated"]

[workspace.package]
version = "0.47.0"
version = "0.48.0"
edition = "2024"
repository = "https://github.com/foundry-rs/starknet-foundry"
license = "MIT"
Expand Down
6 changes: 2 additions & 4 deletions crates/forge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ const MINIMAL_RECOMMENDED_SCARB_VERSION: Version = Version::new(2, 9, 4);
const MINIMAL_SCARB_VERSION_PREBUILT_PLUGIN: Version = Version::new(2, 10, 0);
const MINIMAL_USC_VERSION: Version = Version::new(2, 0, 0);
const MINIMAL_SCARB_VERSION_FOR_SIERRA_GAS: Version = Version::new(2, 10, 0);
// TODO Set this to version from v2 macros release
const MINIMAL_SNFORGE_STD_VERSION: Version = Version::new(0, 44, 0);
// TODO Set this to version from v2 macros release
const MINIMAL_SNFORGE_STD_DEPRECATED_VERSION: Version = Version::new(0, 44, 0);
const MINIMAL_SNFORGE_STD_VERSION: Version = Version::new(0, 48, 0);
const MINIMAL_SNFORGE_STD_DEPRECATED_VERSION: Version = Version::new(0, 48, 0);
pub const MINIMAL_SCARB_VERSION_FOR_V2_MACROS_REQUIREMENT: Version = Version::new(2, 12, 0);

#[derive(Parser, Debug)]
Expand Down

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions crates/forge/tests/e2e/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ fn init_new_project() {

#[test_case(&Template::CairoProgram; "cairo-program")]
#[test_case(&Template::BalanceContract; "balance-contract")]
// TODO restore this test case after stable release
// #[test_case(&Template::Erc20Contract; "erc20-contract")]
#[test_case(&Template::Erc20Contract; "erc20-contract")]
fn create_new_project_dir_not_exist(template: &Template) {
let temp = tempdir_with_tool_versions().unwrap();
let project_path = temp.join("new").join("project");
Expand Down
14 changes: 2 additions & 12 deletions crates/forge/tests/e2e/plugin_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,22 +172,12 @@ fn new_scarb_old_macros() {
.output()
.unwrap();

let output = test_runner(temp.join("abc")).assert().success();
let current_package_version = env!("CARGO_PKG_VERSION");
let output = test_runner(temp.join("abc")).assert().failure();

assert_stdout_contains(
output,
formatdoc! {r"
[WARNING] Package snforge_std version does not meet the recommended version requirement ^{current_package_version}, it might result in unexpected behaviour
[..]Compiling[..]
[..]Finished[..]

Collected 2 test(s) from abc package
Running 0 test(s) from src/
Running 2 test(s) from tests/
[PASS] abc_integrationtest::test_contract::test_cannot_increase_balance_with_zero_value (l1_gas: ~[..], l1_data_gas: ~[..], l2_gas: ~[..])
[PASS] abc_integrationtest::test_contract::test_increase_balance (l1_gas: ~[..], l1_data_gas: ~[..], l2_gas: ~[..])
Tests: 2 passed, 0 failed, 0 ignored, 0 filtered out
[ERROR] Package snforge_std version does not meet the minimum required version >=0.48.0. Please upgrade snforge_std in Scarb.toml
", },
);
}
Expand Down
5 changes: 3 additions & 2 deletions crates/forge/tests/e2e/running.rs
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,9 @@ fn should_panic() {
);
}

#[ignore = "TODO Restore this test once there are at least 2 versions supporting v2 macros"]
#[test]
#[cfg_attr(feature = "skip_plugin_checks", ignore = "Plugin checks skipped")]
// #[cfg_attr(feature = "skip_plugin_checks", ignore = "Plugin checks skipped")]
fn incompatible_snforge_std_version_warning() {
let temp = setup_package("steps");
let manifest_path = temp.child("Scarb.toml");
Expand Down Expand Up @@ -979,7 +980,7 @@ fn incompatible_snforge_std_version_error() {
assert_stdout_contains(
output,
indoc! {r"
[ERROR] Package snforge_std version does not meet the minimum required version >=0.44.0. Please upgrade snforge_std in Scarb.toml
[ERROR] Package snforge_std version does not meet the minimum required version >=0.48.0. Please upgrade snforge_std in Scarb.toml
"},
);
}
Expand Down
Loading
Loading