Skip to content

Releases: foundry-rs/starknet-foundry

0.9.1

30 Oct 15:09
da085bd
Compare
Choose a tag to compare

Forge

Fixed

  • diagnostic paths referring to tests folder
  • caching get_class_hash_at in forking test mode (credits to @jainkunal for catching the bug)

0.9.0

26 Oct 09:29
251761c
Compare
Choose a tag to compare

Forge

Added

  • #[ignore] attribute together with --ignored and include-ignored flags - read more here
  • support for deploy_syscall directly in the test code (alternative to deploy)
  • snforge_std::signature module for performing ecdsa signatures

Changed

  • updated Cairo version to 2.3.0 - compatible Scarb version is 2.3.0:
    • tests in src folder now have to be in a module annotated with #[cfg(test)]
  • snforge_std::PrintTrait will not convert values representing ASCII control characters to strings
  • separated snforge to subcommands: snforge test, snforge init and snforge clean-cache.
    Read more here.
  • starknet::get_block_info now returns correct block info in a forked block

Cast

Added

  • show-config subcommand to display currently used configuration
  • account delete command for removing accounts from the accounts file
  • --hex-format flag has been added

Removed

  • -i short for --int-format is removed, now have to use the full form --int-format

0.8.3

17 Oct 09:37
Compare
Choose a tag to compare

Forge

Changed

  • Test from different crates are no longer run in parallel
  • Test outputs are printed in non-deterministic order

Fixed

  • Test output are printed in real time again
  • Bug when application would not wait for tasks to terminate after execution was cancelled

0.8.3-alpha.1

16 Oct 10:55
Compare
Choose a tag to compare
0.8.3-alpha.1 Pre-release
Pre-release
v0.8.3-alpha.1

update version

0.8.2

12 Oct 11:33
6db50de
Compare
Choose a tag to compare

Forge

Fixed

  • incorrect caller address bug in called contracts

0.8.1

12 Oct 07:30
e6a47f1
Compare
Choose a tag to compare

Forge

Fixed

  • significantly reduced ram usage

0.8.0

11 Oct 13:46
a8ef6f1
Compare
Choose a tag to compare
0.8.0 Pre-release
Pre-release

⚠️ This release has some bugs and might not be usable in your projects ⚠️

Fixes are coming in the next few days

Forge

Added

  • #[fuzzer(...)] attribute allowing to specify a fuzzer configuration for a single test case
  • Support for u8, u16, u32, u64, u128, u256 types to fuzzer
  • --clean-cache flag
  • Changed interface of L1Handler.execute and L1Handler (dropped fee parameter, added result handling with RevertedTransaction)
  • Contract now has associated state, more about it here
  • cheatcodes (prank, roll, warp) now work on forked Cairo 0 contracts

Changed

  • Spying events interface is updated to enable the use of events defined inside contracts in assertions
  • Test are executed in parallel
  • Fixed inconsistent pointers bug #659
  • Fixed an issue where deploy_at would not trigger the constructors #805

0.7.1

27 Sep 16:58
d1bd8b9
Compare
Choose a tag to compare

Forge

Added

  • snforge_std var library function for reading environmental variables

Fixed

  • Crashes while using any concrete block_id when using forking mode in snforge

0.7.0

27 Sep 12:19
d8d546a
Compare
Choose a tag to compare

Forge

Added

  • Support for scarb workspaces
  • Initial version of fuzz testing with randomly generated values
  • #[fork(...)] attribute allowing testing against a network fork

Changed

  • Tests are collected only from a package tree (src/lib.cairo as an entrypoint) and tests folder:
    • If there is a lib.cairo file in tests folder, then it is treated as an entrypoint to the tests package from which tests are collected
    • Otherwise, all test files matching tests/*.cairo regex are treated as modules and added to a single virtual lib.cairo, which is treated as described above

You can read more about new test collection mechanism here

Cast

Added

  • account add command for importing accounts to the accounts file
  • account create command for creating openzeppelin accounts with starkli-style keystore
  • account deploy command for deploying openzeppelin accounts with starkli-style keystore

Changed

  • --add-profile no longer accepts -a for short
  • allow the id property in multicalls to be referenced in the inputs of deploy and invoke calls

0.6.0

13 Sep 13:44
edd2e35
Compare
Choose a tag to compare

Forge

Added

  • deploy_at cheatcode
  • printing failures summary at the end of an execution
  • filtering tests now uses an absolute module tree path — it is possible to filter tests by module names, etc.

Fixed

  • non-zero exit code is returned when any tests fail
  • mock_call works with dispatchers if contract does not exists

Cast

Added

  • support for starkli-style accounts, allowing the use of existing accounts

Changed

  • fixed misleading error message when there was no scarb in PATH and --path-to-scarb-toml was passed
  • modified multicall new command output, to be in line with other commands outputs