Skip to content

Releases: foundry-rs/starknet-foundry

0.41.0

10 Apr 12:10
d6589e6
Compare
Choose a tag to compare

Forge

Added

  • --template flag to snforge new command that allows selecting a template for the new project. Possible values are balance-contract (default), cairo-program and erc20-contract

Fixed

  • fixed incorrect extra newlines in test summary

Cast

Added

  • Support for array![].span() in --arguments command

Changed

  • verify command now supports the --class-hash for Walnut verification

Removed

  • NftScan is no longer supported as block-explorer option

0.40.0

26 Mar 15:54
c20f769
Compare
Choose a tag to compare

Cast

Added

  • --l1-gas, --l1-gas-price, --l2-gas, --l2-gas-price, --l1-data-gas, --l1-data-gas-price flags
  • methods for fee settings creation, in FeeSettingsTrait: max_fee(), resource_bounds() and estimate() (in sncast_std)

Changed

  • Updated argent class hash used in account creation to v0.4.0
  • wrapped error for ContractError is now of type ContractErrorData (in sncast_std)
  • field execution_error in TransactionExecutionErrorData is now of type ContractExecutionError (in sncast_std)
  • Using Braavos accounts is temporarily disabled because they don't yet work with the RPC version supported by sncast
  • sncast script init command now initializes project with the sncast_std dependency from the registry

Removed

  • --max-gas and --max-gas-unit-price flags
  • max_gas, max_gas_unit_price fields in FeeSettings (in sncast_std)

0.39.0

20 Mar 09:20
13ee73d
Compare
Choose a tag to compare

Forge

Added

  • snforge completion command - used to generate autocompletion script
  • Cheats for get_block_hash_syscall
  • new --tracked-resource flag, that will change currently tracked resource
    (cairo-steps for vm resources - default; sierra-gas for sierra gas consumed resources in cairo native)

Changed

  • gas is now reported using resource bounds triplet (l1_gas, l1_data_gas and l2_gas)
  • available_gas now accepts named arguments denoting resource bounds (eg #[available_gas(l1_gas: 1, l1_data_gas: 2, l2_gas: 3)])

Fixed

  • Bug with file locking that prevented forking from working on Windows

Cast

Added

  • sncast completion command - used to generate autocompletion script

0.38.3

07 Mar 13:48
c845b1d
Compare
Choose a tag to compare

Migrating to Scarb 2.11.0

snforge relies on presence of both snforge_std and snforge_scarb_plugin dependencies. Due to changes in dependencies resolving in Scarb action might be necessary to continue using snforge.

If using Scarb version < 2.11.0 with any version of snforge_std

No action needed

If using Scarb version >= 2.11.0 with snforge_std >= 0.38.3

No action needed

If using Scarb version >= 2.11.0 with snforge_std < 0.38.3

Action required. In your Scarb.toml file, add snforge_scarb_plugin dependency with the version matching that of snforge_std

E.g. change this

snforge_std = "0.34.1"

to this

snforge_std = "0.34.1"
snforge_scarb_plugin = "0.34.1"

Alternatively, we strongly recommend upgrading to at least snforge version 0.38.3. Then, no action is needed as outlined above.

Changelog

Forge

Fixed

  • Issue with uploading snforge_std to scarbs package registry that prevented it from including package reexports required in Scarb >= 2.11.0

0.38.2

06 Mar 12:51
69d27d2
Compare
Choose a tag to compare

Migrating to Scarb 2.11.0

snforge relies on presence of both snforge_std and snforge_scarb_plugin dependencies. Due to changes in dependencies resolving in Scarb action might be necessary to continue using snforge.

If using Scarb version < 2.11.0 with any version of snforge_std

No action needed

If using Scarb version >= 2.11.0 with snforge_std >= 0.38.0

⚠️ We have uncovered the issue with package uploads to registry. Instead of "No action needed", please follow the "If using Scarb version >= 2.11.0 with snforge_std < 0.38.0" section

No action needed

If using Scarb version >= 2.11.0 with snforge_std < 0.38.0

Action required. In your Scarb.toml file, add snforge_scarb_plugin dependency with the version matching that of snforge_std

E.g. change this

snforge_std = "0.34.1"

to this

snforge_std = "0.34.1"
snforge_scarb_plugin = "0.34.1"

Alternatively, we strongly recommend upgrading to at least snforge version 0.38.2. Then, no action is needed as outlined above.

Changelog

Forge

Changed

  • Fork cache version is pinned to the forge version.

Fixed

  • snforge_scarb_plugin now emits an error when parameters are passed without using the #[fuzzer] attribute
  • A bug that was causing execution to hang if using forking

0.38.0

26 Feb 13:20
f2e7d0d
Compare
Choose a tag to compare

Forge

Added

  • snforge clean command - used to manage and remove files generated by snforge. It supports cleaning the following components: coverage, profile, cache, trace, all
  • snforge new now adds the snfoundry_trace, coverage, and profile directories to .gitignore.
  • Custom types can be used in fuzz testing by implementing the Fuzzable trait
  • Support for Cairo 2.10.0

Changed

  • It is now required to include the #[fuzzer] attribute for fuzz tests to work
  • Scarb 2.8.5 is now the minimal recommended version. Using Starknet Foundry with versions below it is no longer officially supported and may not work.

Deprecated

  • snforge clean-cache command

Cast

Changed

  • --name flag is now optional when using account create (default name is generated)

0.37.0

04 Feb 10:38
05c840d
Compare
Choose a tag to compare

Forge

Added

  • Rust is no longer required to use snforge if using Scarb >= 2.10.0 on supported platforms - precompiled snforge_scarb_plugin plugin binaries are now published to package registry for new versions.
  • Added a suggestion for using the --max-n-steps flag when the Cairo VM returns the error: Could not reach the end of the program. RunResources has no remaining steps.
  • Environmental variables in both Scarb.toml and snfoundry.toml can be now used either with or without curly braces (e.g. ${MY_ENV} or $MY_ENV)

Fixed

  • coverage validation now supports comments in Scarb.toml

Cast

Added

  • Default RPC providers under --network flag

Changed

  • Renamed --network flag to --network-name in sncast account delete command

Fixed

  • Bug resulting in value passed for max_fee being ignored in cast scripts when using deploy with STRK token

Removed

  • --fee-token and --version flags, subsequently support for transaction versions other than v3
  • Support for ETH transactions in scripts

0.36.0

15 Jan 14:33
6af1722
Compare
Choose a tag to compare

Forge

Changed

  • Trace files saved in snfoundry_trace directory will now use _ as separators instead of ::

Cast

Added

  • When using --max-fee with transactions v3, calculated max gas and max gas unit price are automatically validated to ensure they are greater than 0 after conversion
  • interactive interface that allows setting created or imported account as the default

Changed

  • Values passed to the --max-fee, --max-gas, and --max-gas-unit-price flags must be greater than 0

Deprecated

  • --version flag

0.35.1

17 Dec 12:10
089de2c
Compare
Choose a tag to compare

Forge

Fixed

  • Minimal Rust version in requirements check is the same as in docs (1.80.1)
  • snforge produces trace for contracts even if they fail or panic (assuming test passed)

0.35.0

16 Dec 11:32
281bd6b
Compare
Choose a tag to compare

⚠️ Minimal required Rust version is incorrectly set to 1.81.0 instead of 1.80.1 in this release. Fix is being published.

Forge

Added

  • Requirements validation during snforge runtime
  • snforge check-requirements command
  • snforge new command

Changed

  • snforge_scarb_plugin will now also emit warnings when errors occur
  • snforge_std migrated to 2024_07 edition
  • snforge_std from scarbs package registry is now used in snforge new template

Deprecated

  • snforge init command

Cast

Added

  • account create command shows prepared deployment command

Changed

  • --version flag is now optional and v3 will be used by default
  • Displaying underlying RPC error instead of "Unknown RPC error" in edge cases

Deprecated

  • --fee-token flag - strk will be used by default