Skip to content

Releases: foundry-rs/starknet-foundry

0.37.0

04 Feb 10:38
05c840d
Compare
Choose a tag to compare

Forge

Added

  • Rust is no longer required to use snforge if using Scarb >= 2.10.0 on supported platforms - precompiled snforge_scarb_plugin plugin binaries are now published to package registry for new versions.
  • Added a suggestion for using the --max-n-steps flag when the Cairo VM returns the error: Could not reach the end of the program. RunResources has no remaining steps.
  • Environmental variables in both Scarb.toml and snfoundry.toml can be now used either with or without curly braces (e.g. ${MY_ENV} or $MY_ENV)

Fixed

  • coverage validation now supports comments in Scarb.toml

Cast

Added

  • Default RPC providers under --network flag

Changed

  • Renamed --network flag to --network-name in sncast account delete command

Fixed

  • Bug resulting in value passed for max_fee being ignored in cast scripts when using deploy with STRK token

Removed

  • --fee-token and --version flags, subsequently support for transaction versions other than v3
  • Support for ETH transactions in scripts

0.36.0

15 Jan 14:33
6af1722
Compare
Choose a tag to compare

Forge

Changed

  • Trace files saved in snfoundry_trace directory will now use _ as separators instead of ::

Cast

Added

  • When using --max-fee with transactions v3, calculated max gas and max gas unit price are automatically validated to ensure they are greater than 0 after conversion
  • interactive interface that allows setting created or imported account as the default

Changed

  • Values passed to the --max-fee, --max-gas, and --max-gas-unit-price flags must be greater than 0

Deprecated

  • --version flag

0.35.1

17 Dec 12:10
089de2c
Compare
Choose a tag to compare

Forge

Fixed

  • Minimal Rust version in requirements check is the same as in docs (1.80.1)
  • snforge produces trace for contracts even if they fail or panic (assuming test passed)

0.35.0

16 Dec 11:32
281bd6b
Compare
Choose a tag to compare

⚠️ Minimal required Rust version is incorrectly set to 1.81.0 instead of 1.80.1 in this release. Fix is being published.

Forge

Added

  • Requirements validation during snforge runtime
  • snforge check-requirements command
  • snforge new command

Changed

  • snforge_scarb_plugin will now also emit warnings when errors occur
  • snforge_std migrated to 2024_07 edition
  • snforge_std from scarbs package registry is now used in snforge new template

Deprecated

  • snforge init command

Cast

Added

  • account create command shows prepared deployment command

Changed

  • --version flag is now optional and v3 will be used by default
  • Displaying underlying RPC error instead of "Unknown RPC error" in edge cases

Deprecated

  • --fee-token flag - strk will be used by default

0.34.0

27 Nov 09:49
d6976d4
Compare
Choose a tag to compare

Forge

Added

  • generate_random_felt() for generating (pseudo) random felt value.
  • Printing information about compiling Sierra using universal-sierra-compiler
  • Displaying backtrace when contract call fails

Changed

  • Tests config run is now executed in parallel resulting in faster snforge test setup in some cases

Cast

Added

  • You can skip --name flag when using account import - a default name will be generated.
  • Addresses outputted when calling sncast account create, sncast deploy and sncast declare are now padded to 64 characters length and prefixed with 0x0
  • Globally available configuration to store profiles to share between projects.

Changed

  • Changed return type of declare in Cairo Deployment Scripts so it can handle already declared contracts without failing
  • Allow using show-config command without providing rpc url

0.33.0

05 Nov 11:40
221b1db
Compare
Choose a tag to compare

Cast

Added

  • You can now use numbers without quotes as inputs for calls in multicall config file.
  • New --arguments flag to call, invoke and deploy for automatic conversion of Cairo expressions instead of serialized form.

Forge

Changed

  • You can now pass arguments to cairo-profiler and cairo-coverage. Everything after -- will be passed to underlying binary. E.g.
    snforge test --build-profile -- --show-inlined-functions
  • You can't use now --coverage and --build-profile flags at the same time. If you want to use both, you need to run
    snforge test twice with different flags.
  • Contract artifacts are compiled to CASM concurrently.
  • Starknet artifacts are now loaded from all tests targets
  • Cairo Edition in snforge init template set to 2024_07

Fixed

  • Scarb features work with optimized compilation
  • Custom test targets are now supported with optimized compilation
  • Calling contract functions via safe-dispatcher now returns an Err when attempting to invoke a non-existent entry point, instead of causing a panic.

0.32.0

17 Oct 14:32
Compare
Choose a tag to compare

Cast

Changed

  • Short option for --accounts-file flag has been removed.
  • Short option for --contract-address is now -d instead of -a.
  • account add is renamed to account import.
  • account import can be now used without specifying --private-key or --private-key-file flags. Instead private key will be read interactively from the user.

Fixed

  • account delete command: It is no longer necessary to provide the --url argument each time. Either the --url or --network argument must be provided, but not both, as they are mutually exclusive.

Forge

Changed

  • When using test name filter with --exact flag, forge will try to compile only the selected test.

0.31.0

26 Sep 19:09
72ea785
Compare
Choose a tag to compare

Cast

Changed

  • declare and verify commands now use the Scarb release profile instead of the dev profile as the default for building artifacts
  • StarkScan links now point to specific pages for transactions, contracts and classes.

Fixed

  • Explorer links displayed upon committing transactions are now properly formatted
  • sncast declare no longer fails for flat contracts (i.e. CASM artifacts with bytecode_segment_lengths being a number)

Forge

Added

Changed

  • For Scarb >= 2.8.3 contract artifacts are built as part of the test target now. This process speeds up the compilation time, but the behavior of the contracts potentially may not be 100% consistent with the real networks. It can be disabled using the --no-optimization flag
  • snforge now validates if your project is setup to generate debug info needed for cairo-coverage when running --coverage flag

snforge_scarb_plugin

Fixed

  • The package is now correctly versioned

0.30.0

04 Sep 11:22
196f06b
Compare
Choose a tag to compare

Forge

Added

  • Derived Debug and Clone on trace.cairo items
  • --coverage flag to the test command. Saves trace data and then generates coverage report of test cases which pass and are not fuzz tests. You need cairo-coverage installed on your system.

Fixed

  • latest fork block id tag validation in Scarb.toml is now consistent
  • RangeCheck96, AddMod, MulMod builtins are now properly supported
  • Fixed escaping ' in #[should_panic]s
  • Fixed scarb init with snforge runner

0.29.0

29 Aug 16:16
d37d227
Compare
Choose a tag to compare

Forge

Added

  • Support for Scarb features in snforge test - flags the same as in Scarb. Read more here

Fixed

  • snforge init no longer emits warnings
  • Project template generated by snforge init matches new declare cheatcode interface and compiles properly