Skip to content

Releases: foundry-rs/starknet-foundry

0.29.0

29 Aug 16:16
d37d227

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

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

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

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

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

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

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

0.22.0

17 Apr 11:09
9b21594

Choose a tag to compare

Forge

Changed

  • deploy / deploy_at now additionally return the constructor return data via SyscallResult<(ContractAddress, Span<felt252>)>
  • declare returns Result<ContractClass, Array<felt252>> instead of ContractClass
  • L1HandlerTrait::execute() returns SyscallResult<()>
  • SyscallResultStringErrorTrait::map_string_error renamed to SyscallResultStringErrorTrait::map_error_to_string
  • var now supports ByteArray with double quoting, and returns Array<felt252> instead of a single felt252

Removed

  • snforge_std::RevertedTransaction

0.21.0

03 Apr 13:03
2996b8c

Choose a tag to compare

Forge

Changed

  • read_txt and read_json now supports ByteArray

Cast

Added

  • sncast script idempotency feature - every action done by the script that alters the network state will be tracked in state file,
    and won't be replayed if previously succeeded

0.20.1

22 Mar 14:05
fea2db8

Choose a tag to compare

v0.20.1

Patch version 0.20.1 (#1933)