Skip to content

Releases: foundry-rs/starknet-foundry

0.20.0

20 Mar 13:29
423eecf

Choose a tag to compare

Forge

Added

  • variants of cheatcodes with CheatSpan (read more here)
  • Providing configuration data with env variables DOCS

Fixed

  • Events emitted in cairo 0 contracts are now properly collected
  • --build-profile no longer fails silently (compatible with cairo-profiler 0.2.0)

Changed

  • Default chain_id has been changed from SN_GOERLI to SN_SEPOLIA
  • Supported RPC version is now 0.7.0
  • Gas calculation is in sync with starknet 0.13.1 (with EIP 4844 blob usage enabled)
  • Resources displayed (steps, builtins) now include OS costs of syscalls

Cast

Added

  • Support for OpenZeppelin Cairo 1 (or higher) accounts creation, deployment and usage
  • Providing configuration data with env variables DOCS

Changed

  • Supported RPC version is now 0.7.0
  • Default class hash in account create and account deploy has been changed to cairo2 class hash

0.19.0

06 Mar 16:24
a3391dc

Choose a tag to compare

Forge

⚠️ This version requires installing external universal-sierra-compiler (v2.0.0) Please consider re-installing snfoundryup and/or asdf plugin for automatic installation and upgrades ⚠️

Added

  • replace_bytecode cheatcode
  • result of the call to the trace
  • added --build-profile flag to the --test command. Saves trace data and then builds profiles of test cases which pass and are not fuzz tests. You need cairo-profiler installed on your system.
  • dependency on the universal-sierra-compiler
    binary, which will allow forge to be independent of sierra version

Changed

  • var(), read_txt(), read_json(), FileTrait::new(), declare() now use regular strings (ByteArray) instead of short strings (felt252)
  • start_mock_call(), stop_mock_call(), L1Handler now use selector (selector!()) instead of names

Cast

Changed

  • declare() now uses regular strings (ByteArray) instead of short strings (felt252)
  • call() and invoke() now require function selector (selector!()) instead of function name in scripts (sncast_std)

Removed

  • --path-to-scarb-toml optional flag that allowed to specify the path to the Scarb.toml file
  • --deployed flag from account add subcommand

0.18.0

21 Feb 14:29
48f909a

Choose a tag to compare

Forge

⚠️ This and next releases of snforge require Scarb >= 2.5.4 to work - breaking changes to prepare for migration to USC ⚠️

Added

  • contract names to call trace
  • --max-n-steps argument that allows setting own steps limit

Changed

  • Unknown entry point error when calling a contract counts as a panic
  • Cairo edition set to 2023_11

Fixed

  • Calling Cairo 0 contract no longer cancels cheatcodes in further calls

Cast

Added

  • script init command to generate a template file structure for deployment scripts
  • Warning is emitted when executing sncast commands if the node's JSON-RPC version is incompatible

Changed

  • to run a deployment script it is required to use script run subcommand

0.17.1

12 Feb 15:06
f3237f2

Choose a tag to compare

Cast

Changed

  • fixed a bug where a profile was passed to scarb even when it did not exist

Forge

Added

  • map_string_error for use with dispatchers, which automatically converts string errors from the syscall result (read more here)

0.17.0

07 Feb 12:53
63f7f0b

Choose a tag to compare

Forge

Added

  • get_call_trace library function for retrieving call trace in tests

Changed

  • Gas estimation is now aligned with the Starknet v0.13

Removed

  • snforge_std::PrintTrait - use print!, println! macros and / or core::debug::PrintTrait instead

Fixed

  • Gas used in constructors and handling of L1 messages is now properly included in total gas cost

Cast

Changed

  • sncast tool configuration is now moved away from Scarb.toml to snfoundry.toml file. This file must be present in current or any parent directories in order to use profiles.

Added

  • --package flag for declare and script subcommands, that specifies scarb package to work with
  • Debug and Display impls for script subcommand responses - use print!, println! macros instead of calling .print()

0.16.0

26 Jan 09:00
f58e0ab

Choose a tag to compare

Forge

Added

  • Bump to cairo 2.5.0

Changed

  • SafeDispatchers usages need to be tagged with #[feature("safe_dispatcher)] (directly before usage), see the shamans post

0.15.0

24 Jan 13:05
7747a2d

Choose a tag to compare

Forge

Added

  • store and load cheatcodes
  • --save-trace-data flag to snforge test command. Traces can be used for profiling purposes.

Changed

  • available_gas attribute is now supported (Scarb >= 2.4.4 is required)

Fixed

  • Error message for tests that should panic but pass

Cast

Changed

  • the 'pending' block is used instead of 'latest' as the default when obtaining the nonce

0.14.0

11 Jan 13:26
e8cbece

Choose a tag to compare

Forge

Added

  • Secp256k1 and Secp256r1 curves support for KeyPair in snforge_std

Changed

  • maximum number of computational steps per call set to current Starknet limit (3M)
  • mean and std deviation fields are displayed for gas usage while running fuzzing tests
  • Cairo edition in snforge_std and sncast_std set to 2023_10
  • snforge_std::signature module with stark_curve, secp256k1_curve and secp256r1_curve submodules

Fixed

  • Safe library dispatchers in test code no longer propagate errors when not intended to

0.13.1

20 Dec 17:07
e1412ed

Choose a tag to compare

Forge

Changed

  • fields from starknet::info::v2::TxInfo are now part of TxInfoMock from snforge_std::cheatcodes::tx_info
  • consistent latest block numbers for each url are now used across the whole run when testing against forks

Fixed

  • Parsing panic data from call contract result

Cast

Added

  • add support for sepolia network
  • --yes option to account delete command that allows to skip confirmation prompt

Changed

  • Argument max-fee in account deploy is now optional

0.13.0

14 Dec 10:54
99c2f9d

Choose a tag to compare

Changed

  • Bump cairo to 2.4.0.
  • Migrated test compilation and collection to Scarb, snforge should now be compatible with every Scarb version >= 2.4.0 unless breaking changes happen