Skip to content

Releases: foundry-rs/starknet-foundry

0.51.2

31 Oct 18:00

Choose a tag to compare

Cast

Changed

  • Replaced the free RPC provider used.

0.51.1

23 Oct 09:42
6f5a02e

Choose a tag to compare

Forge

Fixed

  • A bug that caused meta_tx_v0 to panic when tracked resources are Sierra gas.

0.51.0

21 Oct 11:37
b05b202

Choose a tag to compare

Forge

Added

  • Fuzzable trait implementations for bool and ContractAddress
  • Type aliases for StarkCurveKeyPair, Secp256k1CurveKeyPair, Secp256r1CurveKeyPair
  • Option to display L2 gas for each call in the debugging trace

Changed

  • Updated the error message returned when calling a nonexistent method on a contract to better align with the format used by the network
  • The default tracked resource is now Sierra gas, so gas reporting results may differ compared to previous versions. For more information refer to the documentation
  • When using the --detailed-resources flag, the used Sierra gas key is now shown as sierra gas instead of sierra_gas_consumption

Cast

Added

  • Debug logging for sncast commands that can be enabled by setting SNCAST_LOG env variable.
  • sncast declare command now outputs a ready-to-use deployment command after successful declaration.
  • Possibility to use starknet-devnet predeployed accounts directly in sncast without needing to import them. They are available under specific names - devnet-1, devnet-2, ..., devnet-<N>. Read more here
  • Support for --network devnet flag that attempts to auto-detect running starknet-devnet instance and connect to it.
  • Support for automatically declaring the contract when running sncast deploy, by providing --contract-name flag instead of --class-hash.
  • sncast balance command to fetch the balance of an account for a specified token.

Fixed

  • sncast declare now shows a correct error message when contract is already declared.

0.50.0

30 Sep 09:28
bf0ade0

Choose a tag to compare

Forge

Added

  • #[test_case] attribute for parameterized testing. Read more here

Changed

  • Minimal supported Scarb version is now 2.10.0 (updated from 2.9.1)
  • Minimal supported snforge_std and snforge_std_deprecated version is now 0.50.0

Fixed

Removed

  • Possibility to use #[available_gas] with unnamed argument. Use named arguments instead, e.g. #[available_gas(l2_gas: 5)].
  • The deprecated command snforge init. Use snforge new to initialize new Forge projects

Cast

Added

  • sncast declare-from command to declare a contract by fetching it from a different Starknet instance

0.49.0

04 Sep 14:26
ddaa0a0

Choose a tag to compare

Forge

Added

  • Support for meta_tx_v0 syscall with cheatcode compatibility
  • snforge now supports oracles with --experimental-oracles flag.
  • --trace-components flag to allow selecting which components of the trace to do display. Read more here

Cast

Added

  • --test-files flag to verify command to include test files under src/ for verification (only applies to voyager)
  • --tip flag to invoke, declare, deploy, multicall run and account deploy commands to set the transaction tip
  • --estimate-tip flag which automatically adds an estimated tip to the transaction. The tip is calculated based on the current network conditions and added to the transaction fee
  • utils class-hash command to calculate the class hash for a contract

Changed

  • The supported RPC version is now 0.9.0
  • New UDC is now used during deployment

0.48.1

18 Aug 09:39

Choose a tag to compare

Forge

Fixed

  • A bug that caused #[fuzzer] attribute to fail when used with generic structs

0.48.0

06 Aug 09:34
2cb8b39

Choose a tag to compare

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.

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

Cast

Fixed

  • Block explorer links are now hidden by default when using starknet-devnet. Set SNCAST_FORCE_SHOW_EXPLORER_LINKS=1 env variable to display them.

0.47.0

30 Jul 06:37
c20c2b2

Choose a tag to compare

Forge

Added

  • interact_with_state cheatcode to enable effective use of contract_state_for_testing in snforge tests
  • Support for using Scarb profiles with snforge test, allowing to pass the same profile flags as in Scarb (--release, --dev, --profile) to build artifacts using a specific profile

Deprecated

  • The snforge completion command. Use snforge completions instead

Fixed

  • Passing a cheatcode span of 0 was incorrectly treated as CheatSpan::Indefinite. This is now resolved by making CheatSpan::TargetCalls accept NonZero<usize> instead of just usize in snforge_std.

Cast

Added

  • ready option for --type flag in account create and account import commands (Argent wallet has rebranded as Ready)

Changed

  • Braavos accounts with all class hashes are now supported

Deprecated

  • argent option for --type flag in account create and account import commands. Use ready instead
  • The sncast completion command. Use sncast completions instead

0.46.0

09 Jul 15:02
8586208

Choose a tag to compare

Forge

Added

  • Total test summary when running tests across multiple packages (for example when running snforge test --workspace)

Fixed

  • Bug where syscall execution resources from nested calls were being calculated twice

Cast

Added

  • sncast utils serialize command to serialize Cairo expressions into calldata
  • sncast verify now supports verifying against voyager block explorer.

Changed

  • Improved commands output readability with colors and simplified layout.
  • sncast verify no longer defaults to using walnut.

Fixed

  • Bug where account create raised an error if no --name was provided and the file specified by --accounts-file was empty

Removed

  • --int-format and --hex-format, all values are displayed with default format

0.45.0

17 Jun 07:53
f969d9c

Choose a tag to compare

Forge

Added

  • ETH token is now pre-deployed by default in every test, and Token::ETH was added to snforge_std
  • --skip flag to allow excluding any test whose name contains the provided string

Changed

  • Updated output format for --exit-first flag. Tests skipped due to preceding failures are no longer displayed in the summary. Alternative information is shown when applicable.
  • storage address was renamed to contract address in the output of --trace-verbosity

Fixed

  • bug that caused --trace-verbosity to panic in fork tests
  • fixed a bug in fork tests where resources used in nested calls were counted multiple times, leading to overestimated gas and resource usage

Removed

Cast

Removed