Releases: foundry-rs/starknet-foundry
Releases · foundry-rs/starknet-foundry
0.38.0
Forge
Added
snforge cleancommand - used to manage and remove files generated by snforge. It supports cleaning the following components: coverage, profile, cache, trace, allsnforge newnow adds thesnfoundry_trace,coverage, andprofiledirectories to.gitignore.- Custom types can be used in fuzz testing by implementing the
Fuzzabletrait - Support for Cairo 2.10.0
Changed
- It is now required to include the
#[fuzzer]attribute for fuzz tests to work - Scarb
2.8.5is now the minimal recommended version. Using Starknet Foundry with versions below it is no longer officially supported and may not work.
Deprecated
snforge clean-cachecommand
Cast
Changed
--nameflag is now optional when usingaccount create(default name is generated)
0.37.0
Forge
Added
- Rust is no longer required to use
snforgeif using Scarb >= 2.10.0 on supported platforms - precompiledsnforge_scarb_pluginplugin binaries are now published to package registry for new versions. - Added a suggestion for using the
--max-n-stepsflag 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.tomlandsnfoundry.tomlcan 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
--networkflag
Changed
- Renamed
--networkflag to--network-nameinsncast account deletecommand
Fixed
- Bug resulting in value passed for
max_feebeing ignored in cast scripts when usingdeploywith STRK token
Removed
--fee-tokenand--versionflags, subsequently support for transaction versions other than v3- Support for ETH transactions in scripts
0.36.0
Forge
Changed
- Trace files saved in
snfoundry_tracedirectory will now use_as separators instead of::
Cast
Added
- When using
--max-feewith 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-priceflags must be greater than 0
Deprecated
--versionflag
0.35.1
Forge
Fixed
- Minimal Rust version in requirements check is the same as in docs (
1.80.1) snforgeproduces trace for contracts even if they fail or panic (assuming test passed)
0.35.0
Forge
Added
- Requirements validation during
snforgeruntime snforge check-requirementscommandsnforge newcommand
Changed
snforge_scarb_pluginwill now also emit warnings when errors occursnforge_stdmigrated to2024_07editionsnforge_stdfrom scarbs package registry is now used insnforge newtemplate
Deprecated
snforge initcommand
Cast
Added
account createcommand shows prepared deployment command
Changed
--versionflag is now optional andv3will be used by default- Displaying underlying RPC error instead of "Unknown RPC error" in edge cases
Deprecated
--fee-tokenflag -strkwill be used by default
0.34.0
Forge
Added
generate_random_felt()for generating (pseudo) random felt value.- Printing information about compiling Sierra using
universal-sierra-compiler - Displaying backtrace when contract call fails
Changed
- Tests config run is now executed in parallel resulting in faster
snforge testsetup in some cases
Cast
Added
- You can skip
--nameflag when usingaccount import- a default name will be generated. - Addresses outputted when calling
sncast account create,sncast deployandsncast declareare now padded to 64 characters length and prefixed with0x0 - Globally available configuration to store profiles to share between projects.
Changed
- Changed return type of
declarein Cairo Deployment Scripts so it can handle already declared contracts without failing - Allow using
show-configcommand without providing rpc url
0.33.0
Cast
Added
- You can now use numbers without quotes as inputs for calls in multicall config file.
- New
--argumentsflag tocall,invokeanddeployfor automatic conversion of Cairo expressions instead of serialized form.
Forge
Changed
- You can now pass arguments to
cairo-profilerandcairo-coverage. Everything after--will be passed to underlying binary. E.g.
snforge test --build-profile -- --show-inlined-functions - You can't use now
--coverageand--build-profileflags at the same time. If you want to use both, you need to run
snforge testtwice with different flags. - Contract artifacts are compiled to CASM concurrently.
- Starknet artifacts are now loaded from all tests targets
- Cairo Edition in
snforge inittemplate set to2024_07
Fixed
- Scarb features work with optimized compilation
- Custom test targets are now supported with optimized compilation
- Calling contract functions via safe-dispatcher now returns an
Errwhen attempting to invoke a non-existent entry point, instead of causing a panic.
0.32.0
Cast
Changed
- Short option for
--accounts-fileflag has been removed. - Short option for
--contract-addressis now-dinstead of-a. account addis renamed toaccount import.account importcan be now used without specifying--private-keyor--private-key-fileflags. Instead private key will be read interactively from the user.
Fixed
account deletecommand: It is no longer necessary to provide the--urlargument each time. Either the--urlor--networkargument must be provided, but not both, as they are mutually exclusive.
Forge
Changed
- When using test name filter with
--exactflag, forge will try to compile only the selected test.
0.31.0
Cast
Changed
declareandverifycommands now use the Scarbreleaseprofile instead of thedevprofile as the default for building artifacts- StarkScan links now point to specific pages for transactions, contracts and classes.
Fixed
- Explorer links displayed upon committing transactions are now properly formatted
sncast declareno longer fails for flat contracts (i.e. CASM artifacts withbytecode_segment_lengthsbeing a number)
Forge
Added
- Project generated by
snforgecontainsassert_macrosdependency with version 0.1.0 for Scarb <= 2.8.0, otherwise equal to Scarb - Support for overriding fork configuration in test attribute with a different block ID, tag, or hash.
--no-optimizationflag that can be used to build contracts using the [starknet contract target](https://docs.swmansion.com/scarb/docs/extensions/starknet/contract-target.html#starknet-contract-target. This is the default behavior when using Scarb < 2.8.3
Changed
- For Scarb >=
2.8.3contract artifacts are built as part of the test target now. This process speeds up the compilation time, but the behavior of the contracts potentially may not be 100% consistent with the real networks. It can be disabled using the --no-optimization flag snforgenow validates if your project is setup to generate debug info needed forcairo-coveragewhen running--coverageflag
snforge_scarb_plugin
Fixed
- The package is now correctly versioned
0.30.0
Forge
Added
- Derived
DebugandCloneontrace.cairoitems --coverageflag to thetestcommand. Saves trace data and then generates coverage report of test cases which pass and are not fuzz tests. You need cairo-coverage installed on your system.
Fixed
latestfork block id tag validation inScarb.tomlis now consistentRangeCheck96,AddMod,MulModbuiltins are now properly supported- Fixed escaping
'in#[should_panic]s - Fixed
scarb initwith snforge runner