Skip to content

Releases: foundry-rs/starknet-foundry

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

0.28.0

22 Aug 10:52
4dfe39d
Compare
Choose a tag to compare

Forge

Breaking Changes

  • Forge 0.28.0 requires Scarb >= 2.7.0
  • Asserts (eg assert_eq!) now have to be included as a scarb dependency by adding assert_macros = "0.1.0" to dependencies section of Scarb.toml

Changed

  • Cairo version is bumped to 2.7.0
  • Max steps in tests (configured by argument --max-n-steps) now defaults to 10 million
    if not provided (changed from 4 million).
  • Fork tests now discover chain ID via provided RPC URL, defaulting to SN_SEPOLIA
  • #[fork] attribute parameters format. Read more here
  • Steps counting
  • Block tag changed name from Latest to latest
  • declare cheatcode now returns Result<DeclareResult, Array<felt252>>. Read more here

Cast

Added

  • Commands that commit transactions now display links to block explorers. When in human-readable mode, invoke, declare, deploy, multicall run, account create and account deploy will display additional information with an url. A new key in Cast configuration - block-explorer determines which block explorer service the displayed link leads to. Possible options are: StarkScan, Voyager, ViewBlock, OkLink, NftScan.

Changed

  • account create outputs hint about the type of the tokens required to prefund a newly created account with before deployment

  • sncast no longer expects --url as a common argument. It is now required specifically by commands that utilise it, i.e. account add, account create, account delete, account deploy, multicall run, script run, call, declare, deploy, invoke, show-config, tx-status.
    Commands that do not require --url anymore: account list, multicall new, script init, verify

0.27.0

24 Jul 10:42
2d99b7c
Compare
Choose a tag to compare

Forge

Added

  • spy_messages_to_l1() for listening in on messages to L1 sent by your contracts. Read more here.

Changed

  • Renamed global cheatcodes listed here - cheatcode invocations affecting the global scope and working indefinitely, already marked with a _global suffix, received a start_ prefix

Cast

Added

  • verify subcommand to verify contract (walnut APIs supported as of this version). Read more here
  • support for v3 transactions on account deploy, deploy, declare, invoke
  • Newest class hash for OpenZeppelin account contracts
  • account list subcommand for listing all available accounts Read more here

Changed

  • multicall new no longer prints generated template to stdout and now requires specifying output path. Read more here

0.26.0

03 Jul 13:57
50eb589
Compare
Choose a tag to compare

Forge

Changed

  • Updated event testing - read more here on how it now works and here
    about updated spy_events cheatcode

0.25.0

12 Jun 15:57
5b366e2
Compare
Choose a tag to compare

Forge

Changed

  • SyscallResultStringErrorTrait::map_error_to_string removed in favor of utility function (snforge_std::byte_array::try_deserialize_bytearray_error)

Cast

Removed

  • --class-hash flag from account deploy command

Added

  • tx-status subcommand to get transaction status. Read more here
  • tx_status function to cast_std. Read more here
  • Support for creating argent accounts
  • Support for creating braavos accounts

0.24.0

22 May 10:49
95e9fb0
Compare
Choose a tag to compare

Forge

Removed

  • prank, warp, roll, elect, spoof cheatcodes in favour of cheat_execution_info

Added

  • cheat_execution_info cheatcode and per variable helpers for it

Changed

  • SignerTrait::sign now returns Result instead of failing the test

  • L1HandlerTrait::execute() takes source address and payloads as arguments Read more here

  • When calling to an address which does not exists, error is forwarded to cairo runtime instead of failing the test

Cast

Added

  • New required flag --type to account add command

0.23.0

08 May 11:07
f2bff8f
Compare
Choose a tag to compare

Forge

Removed

  • event_name_hash removal, in favour of selector! usage

Changed

  • the tool now always compiles Sierra contract artifacts to CASM using
    USC - before it used to consume CASM artifacts
    produced by Scarb if they were present. Setting up casm = true in Scarb.toml is no longer recommended - it may slow
    down the compilation.

Cast

Changed

  • the tool now always compiles Sierra contract artifacts to CASM using
    USC - before it used to consume CASM artifacts
    produced by Scarb if they were present. Setting up casm = true in Scarb.toml is no longer recommended - it may slow
    down the compilation.

Fixed

  • scripts built with release profile are now properly recognized and ran