Releases: foundry-rs/starknet-foundry
0.45.0
Forge
Added
- ETH token is now pre-deployed by default in every test, and
Token::ETHwas added tosnforge_std --skipflag to allow excluding any test whose name contains the provided string
Changed
- Updated output format for
--exit-firstflag. Tests skipped due to preceding failures are no longer displayed in the summary. Alternative information is shown when applicable. storage addresswas renamed tocontract addressin the output of--trace-verbosity
Fixed
- bug that caused
--trace-verbosityto panic in fork tests - fixed a bug in fork tests where resources used in nested calls were counted multiple times, leading to overestimated gas and resource usage
Removed
- Windows support. For details on migration, see the WSL installation guide.
Cast
Removed
- Windows support. For details on migration, see the WSL installation guide.
0.44.0
Warning
Make sure to upgrade snforge_std version in Scarb.toml to 0.44.0 otherwise test execution will fail.
Forge
Changed
- Minimal supported
snforge_stdversion is 0.44.0 - Changed the code generated by
snforge_std's#[test]attribute
Fixed
- "invalid syscall selector" error appearing when using arithmetic circuits
- Bug that caused incorrect gas tracking for contracts using Sierra version less than
1.7.0whensierra-gaswas passed as thetracked-resource
Cast
Added
- Displaying the path of the config file when adding a new profile
Changed
- OpenZeppelin account updated to v1.0.0 preset
- Restored support for Braavos accounts
- Accounts created with
--type braavosuse updated v1.2.0 class hash - Output of
sncast account createis now clearer; the estimated fee is displayed in both STRK and FRI. - Renamed the field
max_feetoestimated_feein thesncast account createoutput.
0.43.1
Cast
Removed
- Broken Voyager RPC provider
0.43.0
Forge
Added
set_balancecheatcode for setting an ERC-20 token balance for specified contract address. The STRK token is now pre-deployed in every test by default. This can be disabled by adding#[disable_predeployed_contracts]attribute to test.- added option to display trace of contracts execution. Read more here
Changed
- "Success data" message is no longer printed when a test using the
#[should_panic]attribute passes
Cast
Added
- when using
sncast callthe response will be printed as a Cairo-like string representation of the return values
Changed
- The supported RPC version is now 0.8.1
0.42.0
Forge
Added
- Safe dispatchers can now be used inside contracts
Note
Due to the change related to safe dispatchers the behavior of existing code can change. This might be especially relevant for tests using the attribute #[should_panic]
Changed
- Minimal supported Scarb version is now
2.9.1 - Improved display of backtrace for contracts that panicked, when
panic-backtrace = trueinScarb.toml. Without using this feature, the backtrace may be less accurate than before.
As of this release, this feature is available only inscarb nightly-2025-03-27.
Fixed
- The state correctly reverts after failed internal calls
Cast
Fixed
- Bug that prevented from passing values to
--argumentsthat started with a leading minus-sign. - User is now prompted to save an imported or deployed account in
sncastconfig even when using--networkflag
0.41.0
Forge
Added
--templateflag tosnforge newcommand that allows selecting a template for the new project. Possible values arebalance-contract(default),cairo-programanderc20-contract
Fixed
- fixed incorrect extra newlines in test summary
Cast
Added
- Support for
array![].span()in--argumentscommand
Changed
verifycommand now supports the--class-hashfor Walnut verification
Removed
NftScanis no longer supported asblock-exploreroption
0.40.0
Cast
Added
--l1-gas,--l1-gas-price,--l2-gas,--l2-gas-price,--l1-data-gas,--l1-data-gas-priceflags- methods for fee settings creation, in
FeeSettingsTrait:max_fee(),resource_bounds()andestimate()(insncast_std)
Changed
- Updated argent class hash used in account creation to v0.4.0
- wrapped error for
ContractErroris now of typeContractErrorData(insncast_std) - field
execution_errorinTransactionExecutionErrorDatais now of typeContractExecutionError(insncast_std) - Using Braavos accounts is temporarily disabled because they don't yet work with the RPC version supported by
sncast sncast script initcommand now initializes project with thesncast_stddependency from the registry
Removed
--max-gasand--max-gas-unit-priceflagsmax_gas,max_gas_unit_pricefields inFeeSettings(insncast_std)
0.39.0
Forge
Added
snforge completioncommand - used to generate autocompletion script- Cheats for
get_block_hash_syscall - new
--tracked-resourceflag, that will change currently tracked resource
(cairo-stepsfor vm resources - default;sierra-gasfor 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_gasnow 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 completioncommand - used to generate autocompletion script
0.38.3
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_stdto scarbs package registry that prevented it from including package reexports required in Scarb >= 2.11.0
0.38.2
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 withsnforge_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_pluginnow emits an error when parameters are passed without using the#[fuzzer]attribute- A bug that was causing execution to hang if using forking