Releases: foundry-rs/starknet-foundry
Releases · foundry-rs/starknet-foundry
0.18.0
Forge
snforge
require Scarb >= 2.5.4 to work - breaking changes to prepare for migration to USC
Added
- contract names to call trace
--max-n-steps
argument that allows setting own steps limit
Changed
- Unknown entry point error when calling a contract counts as a panic
- Cairo edition set to
2023_11
Fixed
- Calling Cairo 0 contract no longer cancels cheatcodes in further calls
Cast
Added
script init
command to generate a template file structure for deployment scripts- Warning is emitted when executing sncast commands if the node's JSON-RPC version is incompatible
Changed
- to run a deployment script it is required to use
script run
subcommand
0.17.1
0.17.0
Forge
Added
get_call_trace
library function for retrieving call trace in tests
Changed
- Gas estimation is now aligned with the Starknet v0.13
Removed
snforge_std::PrintTrait
- useprint!
,println!
macros and / orcore::debug::PrintTrait
instead
Fixed
- Gas used in constructors and handling of L1 messages is now properly included in total gas cost
Cast
Changed
- sncast tool configuration is now moved away from
Scarb.toml
tosnfoundry.toml
file. This file must be present in current or any parent directories in order to use profiles.
Added
--package
flag fordeclare
andscript
subcommands, that specifies scarb package to work withDebug
andDisplay
impls for script subcommand responses - useprint!
,println!
macros instead of calling.print()
0.16.0
Forge
Added
- Bump to cairo 2.5.0
Changed
SafeDispatcher
s usages need to be tagged with#[feature("safe_dispatcher)]
(directly before usage), see the shamans post
0.15.0
Forge
Added
store
andload
cheatcodes--save-trace-data
flag tosnforge test
command. Traces can be used for profiling purposes.
Changed
available_gas
attribute is now supported (Scarb >= 2.4.4 is required)
Fixed
- Error message for tests that should panic but pass
Cast
Changed
- the 'pending' block is used instead of 'latest' as the default when obtaining the nonce
0.14.0
Forge
Added
Secp256k1
andSecp256r1
curves support forKeyPair
insnforge_std
Changed
- maximum number of computational steps per call set to current Starknet limit (3M)
mean
andstd deviation
fields are displayed for gas usage while running fuzzing tests- Cairo edition in
snforge_std
andsncast_std
set to2023_10
snforge_std::signature
module withstark_curve
,secp256k1_curve
andsecp256r1_curve
submodules
Fixed
- Safe library dispatchers in test code no longer propagate errors when not intended to
0.13.1
Forge
Changed
- fields from
starknet::info::v2::TxInfo
are now part ofTxInfoMock
fromsnforge_std::cheatcodes::tx_info
- consistent latest block numbers for each url are now used across the whole run when testing against forks
Fixed
- Parsing panic data from call contract result
Cast
Added
- add support for sepolia network
--yes
option toaccount delete
command that allows to skip confirmation prompt
Changed
- Argument
max-fee
inaccount deploy
is now optional
0.13.0
Changed
- Bump cairo to 2.4.0.
- Migrated test compilation and collection to Scarb, snforge should now be compatible with every Scarb version >= 2.4.0 unless breaking changes happen
0.12.0
Forge
Added
- print gas usage for each test
- Support for test collector built-in in Scarb with the
--use-scarb-collector
flag. Requires at leastnightly-2023-12-04
version of Scarb.
Cast
Added
--wait-timeout
to set timeout for waiting for tx on network using--wait
flag (default 60s)--wait-retry-interval
to adjust the time between consecutive attempts to fetch tx from network using--wait
flag (default 5s)- allow setting nonce in declare, deploy and invoke (using
--nonce
and in deployment scripts) - add
get_nonce
function to cast_std --private-key-file
option toaccount add
command that allows to provide a path to the file holding account private key
0.11.0
Forge
Added
elect
cheatcode for mocking the sequencer address. Read more here.--rerun-failed
option to run tests that failed during the last run.
Changed
start_warp
andstop_warp
now takeCheatTarget
as the first argument instead ofContractAddress
. Read more here.start_prank
andstop_prank
now takeCheatTarget
as the first argument instead ofContractAddress
. Read more here.start_roll
andstop_roll
now takeCheatTarget
as the first argument instead ofContractAddress
. Read more here.
PS: Credits to @bllu404 for the help with the new interfaces for cheats!
Fixed
- using unsupported
available_gas
attribute now fails the specific test case instead of the whole runner
Cast
Added
- MVP for cairo deployment scripts with declare, deploy, invoke and call