Releases: foundry-rs/starknet-foundry
Releases · foundry-rs/starknet-foundry
0.24.0
Forge
Removed
prank
,warp
,roll
,elect
,spoof
cheatcodes in favour ofcheat_execution_info
Added
cheat_execution_info
cheatcode and per variable helpers for it
Changed
-
SignerTrait::sign
now returnsResult
instead of failing the test -
L1HandlerTrait::execute()
takes source address and payloads as arguments Read more here -
When calling to an address which does not exists, error is forwarded to cairo runtime instead of failing the test
Cast
Added
- New required flag
--type
toaccount add
command
0.23.0
Forge
Removed
event_name_hash
removal, in favour ofselector!
usage
Changed
- the tool now always compiles Sierra contract artifacts to CASM using
USC
- before it used to consume CASM artifacts
produced by Scarb if they were present. Setting upcasm = true
inScarb.toml
is no longer recommended - it may slow
down the compilation.
Cast
Changed
- the tool now always compiles Sierra contract artifacts to CASM using
USC
- before it used to consume CASM artifacts
produced by Scarb if they were present. Setting upcasm = true
inScarb.toml
is no longer recommended - it may slow
down the compilation.
Fixed
- scripts built with release profile are now properly recognized and ran
0.22.0
Forge
Changed
deploy
/deploy_at
now additionally return the constructor return data viaSyscallResult<(ContractAddress, Span<felt252>)>
declare
returnsResult<ContractClass, Array<felt252>>
instead ofContractClass
L1HandlerTrait::execute()
returnsSyscallResult<()>
SyscallResultStringErrorTrait::map_string_error
renamed toSyscallResultStringErrorTrait::map_error_to_string
var
now supportsByteArray
with double quoting, and returnsArray<felt252>
instead of a singlefelt252
Removed
snforge_std::RevertedTransaction
0.21.0
Forge
Changed
read_txt
andread_json
now supportsByteArray
Cast
Added
- sncast script idempotency feature - every action done by the script that alters the network state will be tracked in state file,
and won't be replayed if previously succeeded
0.20.1
v0.20.1 Patch version 0.20.1 (#1933)
0.20.0
Forge
Added
- variants of cheatcodes with
CheatSpan
(read more here) - Providing configuration data with env variables DOCS
Fixed
- Events emitted in cairo 0 contracts are now properly collected
--build-profile
no longer fails silently (compatible withcairo-profiler
0.2.0)
Changed
- Default
chain_id
has been changed fromSN_GOERLI
toSN_SEPOLIA
- Supported RPC version is now 0.7.0
- Gas calculation is in sync with starknet 0.13.1 (with EIP 4844 blob usage enabled)
- Resources displayed (steps, builtins) now include OS costs of syscalls
Cast
Added
- Support for OpenZeppelin Cairo 1 (or higher) accounts creation, deployment and usage
- Providing configuration data with env variables DOCS
Changed
- Supported RPC version is now 0.7.0
- Default class hash in
account create
andaccount deploy
has been changed to cairo2 class hash
0.19.0
Forge
Added
replace_bytecode
cheatcode- result of the call to the trace
- added
--build-profile
flag to the--test
command. Saves trace data and then builds profiles of test cases which pass and are not fuzz tests. You need cairo-profiler installed on your system. - dependency on the universal-sierra-compiler
binary, which will allow forge to be independent of sierra version
Changed
var()
,read_txt()
,read_json()
,FileTrait::new()
,declare()
now use regular strings (ByteArray
) instead of short strings (felt252
)start_mock_call()
,stop_mock_call()
,L1Handler
now use selector (selector!()
) instead of names
Cast
Changed
declare()
now uses regular strings (ByteArray
) instead of short strings (felt252
)call()
andinvoke()
now require function selector (selector!()
) instead of function name in scripts (sncast_std)
Removed
--path-to-scarb-toml
optional flag that allowed to specify the path to theScarb.toml
file--deployed
flag fromaccount add
subcommand
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()