Releases: foundry-rs/starknet-foundry
Releases · foundry-rs/starknet-foundry
0.32.0
Cast
Changed
- Short option for
--accounts-file
flag has been removed. - Short option for
--contract-address
is now-d
instead of-a
. account add
is renamed toaccount import
.account import
can be now used without specifying--private-key
or--private-key-file
flags. Instead private key will be read interactively from the user.
Fixed
account delete
command: It is no longer necessary to provide the--url
argument each time. Either the--url
or--network
argument must be provided, but not both, as they are mutually exclusive.
Forge
Changed
- When using test name filter with
--exact
flag, forge will try to compile only the selected test.
0.31.0
Cast
Changed
declare
andverify
commands now use the Scarbrelease
profile instead of thedev
profile 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 declare
no longer fails for flat contracts (i.e. CASM artifacts withbytecode_segment_lengths
being a number)
Forge
Added
- Project generated by
snforge
containsassert_macros
dependency 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-optimization
flag 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.3
contract 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 snforge
now validates if your project is setup to generate debug info needed forcairo-coverage
when running--coverage
flag
snforge_scarb_plugin
Fixed
- The package is now correctly versioned
0.30.0
Forge
Added
- Derived
Debug
andClone
ontrace.cairo
items --coverage
flag to thetest
command. 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
latest
fork block id tag validation inScarb.toml
is now consistentRangeCheck96
,AddMod
,MulMod
builtins are now properly supported- Fixed escaping
'
in#[should_panic]
s - Fixed
scarb init
with snforge runner
0.29.0
0.28.0
Forge
Breaking Changes
- Forge 0.28.0 requires Scarb >= 2.7.0
- Asserts (eg
assert_eq!
) now have to be included as a scarb dependency by addingassert_macros = "0.1.0"
to dependencies section ofScarb.toml
Changed
- Cairo version is bumped to
2.7.0
- Max steps in tests (configured by argument
--max-n-steps
) now defaults to 10 million
if not provided (changed from 4 million). - Fork tests now discover chain ID via provided RPC URL, defaulting to
SN_SEPOLIA
#[fork]
attribute parameters format. Read more here- Steps counting
- Block tag changed name from
Latest
tolatest
declare
cheatcode now returnsResult<DeclareResult, Array<felt252>>
. Read more here
Cast
Added
- Commands that commit transactions now display links to block explorers. When in human-readable mode,
invoke
,declare
,deploy
,multicall run
,account create
andaccount deploy
will display additional information with an url. A new key in Cast configuration -block-explorer
determines which block explorer service the displayed link leads to. Possible options are:StarkScan
,Voyager
,ViewBlock
,OkLink
,NftScan
.
Changed
-
account create
outputs hint about the type of the tokens required to prefund a newly created account with before deployment -
sncast
no longer expects--url
as a common argument. It is now required specifically by commands that utilise it, i.e.account add
,account create
,account delete
,account deploy
,multicall run
,script run
,call
,declare
,deploy
,invoke
,show-config
,tx-status
.
Commands that do not require--url
anymore:account list
,multicall new
,script init
,verify
0.27.0
Forge
Added
spy_messages_to_l1()
for listening in on messages to L1 sent by your contracts. Read more here.
Changed
- Renamed global cheatcodes listed here - cheatcode invocations affecting the global scope and working indefinitely, already marked with a
_global
suffix, received astart_
prefix
Cast
Added
verify
subcommand to verify contract (walnut APIs supported as of this version). Read more here- support for v3 transactions on account deploy, deploy, declare, invoke
- Newest class hash for OpenZeppelin account contracts
account list
subcommand for listing all available accounts Read more here
Changed
multicall new
no longer prints generated template to stdout and now requires specifying output path. Read more here
0.26.0
0.25.0
Forge
Changed
SyscallResultStringErrorTrait::map_error_to_string
removed in favor of utility function (snforge_std::byte_array::try_deserialize_bytearray_error
)
Cast
Removed
--class-hash
flag fromaccount deploy
command
Added
tx-status
subcommand to get transaction status. Read more heretx_status
function to cast_std. Read more here- Support for creating argent accounts
- Support for creating braavos accounts
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