Releases: foundry-rs/starknet-foundry
Releases · foundry-rs/starknet-foundry
0.49.0
Forge
Added
- Support for
meta_tx_v0
syscall with cheatcode compatibility snforge
now supports oracles with--experimental-oracles
flag.--trace-components
flag to allow selecting which components of the trace to do display. Read more here
Cast
Added
--test-files
flag toverify
command to include test files under src/ for verification (only applies to voyager)--tip
flag toinvoke
,declare
,deploy
,multicall run
andaccount deploy
commands to set the transaction tip--estimate-tip
flag which automatically adds an estimated tip to the transaction. The tip is calculated based on the current network conditions and added to the transaction fee
Changed
- The supported RPC version is now 0.9.0
- New UDC is now used during deployment
0.48.1
Forge
Fixed
- A bug that caused
#[fuzzer]
attribute to fail when used with generic structs
0.48.0
Forge
Added
snforge_std
is now compatible with Scarb procedural macros V2. Migration is required if using Scarb versions before2.12.0
. See migration guide.
Changed
- If using a Scarb version before
2.10.0
or not usingallow-prebuild-plugins
, the minimal required rust version to runsnforge
is now1.87.0
Cast
Fixed
- Block explorer links are now hidden by default when using
starknet-devnet
. SetSNCAST_FORCE_SHOW_EXPLORER_LINKS=1
env variable to display them.
0.47.0
Forge
Added
interact_with_state
cheatcode to enable effective use ofcontract_state_for_testing
in snforge tests- Support for using Scarb profiles with
snforge test
, allowing to pass the same profile flags as in Scarb (--release
,--dev
,--profile
) to build artifacts using a specific profile
Deprecated
- The
snforge completion
command. Usesnforge completions
instead
Fixed
- Passing a cheatcode span of 0 was incorrectly treated as
CheatSpan::Indefinite
. This is now resolved by makingCheatSpan::TargetCalls
acceptNonZero<usize>
instead of justusize
insnforge_std
.
Cast
Added
ready
option for--type
flag inaccount create
andaccount import
commands (Argent wallet has rebranded as Ready)
Changed
- Braavos accounts with all class hashes are now supported
Deprecated
argent
option for--type
flag inaccount create
andaccount import
commands. Useready
instead- The
sncast completion
command. Usesncast completions
instead
0.46.0
Forge
Added
- Total test summary when running tests across multiple packages (for example when running
snforge test --workspace
)
Fixed
- Bug where syscall execution resources from nested calls were being calculated twice
Cast
Added
sncast utils serialize
command to serialize Cairo expressions into calldatasncast verify
now supports verifying against voyager block explorer.
Changed
- Improved commands output readability with colors and simplified layout.
sncast verify
no longer defaults to using walnut.
Fixed
- Bug where
account create
raised an error if no--name
was provided and the file specified by--accounts-file
was empty
Removed
--int-format
and--hex-format
, all values are displayed with default format
0.45.0
Forge
Added
- ETH token is now pre-deployed by default in every test, and
Token::ETH
was added tosnforge_std
--skip
flag to allow excluding any test whose name contains the provided string
Changed
- Updated output format for
--exit-first
flag. Tests skipped due to preceding failures are no longer displayed in the summary. Alternative information is shown when applicable. storage address
was renamed tocontract address
in the output of--trace-verbosity
Fixed
- bug that caused
--trace-verbosity
to 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_std
version 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.0
whensierra-gas
was 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 braavos
use updated v1.2.0 class hash - Output of
sncast account create
is now clearer; the estimated fee is displayed in both STRK and FRI. - Renamed the field
max_fee
toestimated_fee
in thesncast account create
output.
0.43.1
Cast
Removed
- Broken Voyager RPC provider
0.43.0
Forge
Added
set_balance
cheatcode 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 call
the 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 = true
inScarb.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
--arguments
that started with a leading minus-
sign. - User is now prompted to save an imported or deployed account in
sncast
config even when using--network
flag