Skip to content

Releases: foundry-rs/starknet-foundry

0.16.0

26 Jan 09:00
f58e0ab
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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

0.12.0

06 Dec 13:40
0c3d2fe
Compare
Choose a tag to compare

Forge

Added

  • print gas usage for each test
  • Support for test collector built-in in Scarb with the --use-scarb-collector flag. Requires at least nightly-2023-12-04 version of Scarb.

Cast

Added

  • --wait-timeout to set timeout for waiting for tx on network using --wait flag (default 60s)
  • --wait-retry-interval to adjust the time between consecutive attempts to fetch tx from network using --wait flag (default 5s)
  • allow setting nonce in declare, deploy and invoke (using --nonce and in deployment scripts)
  • add get_nonce function to cast_std
  • --private-key-file option to account add command that allows to provide a path to the file holding account private key

0.11.0

22 Nov 13:22
5465c41
Compare
Choose a tag to compare

Forge

Added

  • elect cheatcode for mocking the sequencer address. Read more here.
  • --rerun-failed option to run tests that failed during the last run.

Changed

  • start_warp and stop_warp now take CheatTarget as the first argument instead of ContractAddress. Read more here.
  • start_prank and stop_prank now take CheatTarget as the first argument instead of ContractAddress. Read more here.
  • start_roll and stop_roll now take CheatTarget as the first argument instead of ContractAddress. Read more here.

PS: Credits to @bllu404 for the help with the new interfaces for cheats!

Fixed

  • using unsupported available_gas attribute now fails the specific test case instead of the whole runner

Cast

Added

  • MVP for cairo deployment scripts with declare, deploy, invoke and call

0.10.2

13 Nov 16:38
9c04e09
Compare
Choose a tag to compare

Forge

Changed

  • Bump cairo to 2.3.1

Removed

  • available_gas attribute, it didn't compute correctly gas usage. Contract functions execution cost would not be included.

0.10.1

09 Nov 11:13
2f1597f
Compare
Choose a tag to compare

Cast

Fixed

  • scarb metadata in declare subcommand now takes manifest path from cli if passed instead of looking for it

0.10.0

08 Nov 12:29
886e650
Compare
Choose a tag to compare

Forge

Removed

  • forking of the Pending block

Added

  • --color option to control when colored output is used
  • when specifying BlockId::Tag(Latest) block number of the used block will be printed
  • printing number of ignored and filtered out tests

Fixed

  • Segment Arena Builtin crashing with CairoResourcesNotContainedInFeeCosts when Felt252Dict was used
  • Fixed issue with parsing fork cache values

Cast

Fixed

  • account commands now always return valid json when --json flag is passed
  • allow passing multiple calldata argument items without quotes
  • display correct error message when account file is invalid