github foundry-rs/starknet-foundry v0.62.0
0.62.0

3 hours ago

Forge

Added

  • Support for structs, enums, tuples, arrays and spans in live debugging
    ⚠️ These features work best with Scarb >= 2.19.0 and [cairo] add-types-debug-info = true config (or equivalent) in Scarb.toml.
    You may still use other Scarb versions but names of structs, enums, their fields and variants will not be available.

  • Backtrace support for panics that originate directly in a test function body, not only inside called contracts. Read more here.

Changed

  • Backtrace output format: a single stack backtrace: header now groups frames by contract or test. Read more here.

Fixed

  • Debugging trace is now correctly displayed for predeployed contracts (STRK, ETH) in non-fork tests.
  • snforge_std::declare now fails with a clear, deterministic error when a contract name resolves to multiple contracts, instead of non-deterministically selecting one of them. The module tree path (e.g. my_package::module::MyContract or module::MyContract) can now be passed to declare to disambiguate contracts that share a name.
  • Fixed #[should_panic(expected: (...))] matching for panic data containing byte array values inside tuples.

Cast

Added

  • Aliases in snfoundry.toml. Read more here.
  • @alias syntax for felt arguments in sncast call, invoke, deploy, declare-from, account create, account import, get balance, get nonce, get class-hash-at, verify, utils serialize, utils contract-address, multicall execute, and multicall run. Read more here.
  • sncast alias list command for listing aliases. Read more here.
  • sncast config-path for printing the paths to the local and global snfoundry.toml config files. Read more here.
  • sncast get block command for fetching a block with transactions
  • --sierra-file flag to sncast utils class-hash for calculating the class hash directly from an already compiled Sierra contract class file.
  • --contract-name flag now accepts absolute/partial module tree paths (e.g. hello_sncast::contracts::HelloSncast or contracts::HelloSncast).

Changed

  • Unknown keys in snfoundry.toml ([sncast.<profile>], [sncast.<profile>.networks], wait-params) now emit a warning and are ignored instead of causing a hard error, so configs can be shared across sncast versions. Read more in configuration.
  • sncast account import/deploy interactive "make default account" prompt now emits a warning when global snfoundry.toml cannot be accessed/created.
  • sncast multicall run TOML inputs now always require the @ prefix for step id references. Bare step ids no longer resolve. Migration: update entries to new format (e.g. "map"->"@map"). Read more here.
  • sncast get nonce now displays the nonce in decimal instead of hexadecimal.

Fixed

  • Devnet accounts (devnet-<i>) no longer require the default accounts file to exist.
  • Commands that use --contract-name now return an error when multiple contracts with the same name are found in the compiled artifacts, instead of non-deterministically selecting one of them.

Warning

This is the final version to include Cairo Deployment Scripts and the sncast_std package. Both will be permanently removed in the next release.

Don't miss a new starknet-foundry release

NewReleases is sending notifications on new releases.