Skip to content

Releases: foundry-rs/starknet-foundry

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

0.22.0

17 Apr 11:09
9b21594
Compare
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
Compare
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
Compare
Choose a tag to compare
v0.20.1

Patch version 0.20.1 (#1933)

0.20.0

20 Mar 13:29
423eecf
Compare
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
Compare
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
Compare
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