Releases: foundry-rs/starknet-foundry
Releases · foundry-rs/starknet-foundry
0.51.2
0.51.1
Forge
Fixed
- A bug that caused
meta_tx_v0to panic when tracked resources are Sierra gas.
0.51.0
Forge
Added
Fuzzabletrait implementations forboolandContractAddress- Type aliases for
StarkCurveKeyPair,Secp256k1CurveKeyPair,Secp256r1CurveKeyPair - Option to display L2 gas for each call in the debugging trace
Changed
- Updated the error message returned when calling a nonexistent method on a contract to better align with the format used by the network
- The default tracked resource is now Sierra gas, so gas reporting results may differ compared to previous versions. For more information refer to the documentation
- When using the
--detailed-resourcesflag, the used Sierra gas key is now shown assierra gasinstead ofsierra_gas_consumption
Cast
Added
- Debug logging for
sncastcommands that can be enabled by settingSNCAST_LOGenv variable. sncast declarecommand now outputs a ready-to-use deployment command after successful declaration.- Possibility to use
starknet-devnetpredeployed accounts directly insncastwithout needing to import them. They are available under specific names -devnet-1,devnet-2, ...,devnet-<N>. Read more here - Support for
--network devnetflag that attempts to auto-detect runningstarknet-devnetinstance and connect to it. - Support for automatically declaring the contract when running
sncast deploy, by providing--contract-nameflag instead of--class-hash. sncast balancecommand to fetch the balance of an account for a specified token.
Fixed
sncast declarenow shows a correct error message when contract is already declared.
0.50.0
Forge
Added
#[test_case]attribute for parameterized testing. Read more here
Changed
- Minimal supported
Scarbversion is now2.10.0(updated from2.9.1) - Minimal supported
snforge_stdandsnforge_std_deprecatedversion is now0.50.0
Fixed
core::testing::get_available_gasnow works correctly in snforge tests
Removed
- Possibility to use
#[available_gas]with unnamed argument. Use named arguments instead, e.g.#[available_gas(l2_gas: 5)]. - The deprecated command
snforge init. Usesnforge newto initialize newForgeprojects
Cast
Added
sncast declare-fromcommand to declare a contract by fetching it from a different Starknet instance
0.49.0
Forge
Added
- Support for
meta_tx_v0syscall with cheatcode compatibility snforgenow supports oracles with--experimental-oraclesflag.--trace-componentsflag to allow selecting which components of the trace to do display. Read more here
Cast
Added
--test-filesflag toverifycommand to include test files under src/ for verification (only applies to voyager)--tipflag toinvoke,declare,deploy,multicall runandaccount deploycommands to set the transaction tip--estimate-tipflag which automatically adds an estimated tip to the transaction. The tip is calculated based on the current network conditions and added to the transaction feeutils class-hashcommand to calculate the class hash for a contract
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_stdis 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.0or not usingallow-prebuild-plugins, the minimal required rust version to runsnforgeis now1.87.0
Cast
Fixed
- Block explorer links are now hidden by default when using
starknet-devnet. SetSNCAST_FORCE_SHOW_EXPLORER_LINKS=1env variable to display them.
0.47.0
Forge
Added
interact_with_statecheatcode to enable effective use ofcontract_state_for_testingin 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 completioncommand. Usesnforge completionsinstead
Fixed
- Passing a cheatcode span of 0 was incorrectly treated as
CheatSpan::Indefinite. This is now resolved by makingCheatSpan::TargetCallsacceptNonZero<usize>instead of justusizeinsnforge_std.
Cast
Added
readyoption for--typeflag inaccount createandaccount importcommands (Argent wallet has rebranded as Ready)
Changed
- Braavos accounts with all class hashes are now supported
Deprecated
argentoption for--typeflag inaccount createandaccount importcommands. Usereadyinstead- The
sncast completioncommand. Usesncast completionsinstead
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 serializecommand to serialize Cairo expressions into calldatasncast verifynow supports verifying against voyager block explorer.
Changed
- Improved commands output readability with colors and simplified layout.
sncast verifyno longer defaults to using walnut.
Fixed
- Bug where
account createraised an error if no--namewas provided and the file specified by--accounts-filewas empty
Removed
--int-formatand--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::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.