All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
deploy_at
cheatcode
- fixed misleading error message when there was no scarb in PATH and
--path-to-scarb-toml
was passed - modified
multicall new
command output, to be in line with other commands outputs
- support for
keccak_syscall
syscall. It can be used directly in cairo tests l1_handler_execute
cheatcode- support for
roll
ing/warp
ing/prank
ing the constructor logic (precalculate address, prank, assert pranked state in constructor) spy_events
cheatcode- Functions
read_json
andFileParser<T>::parse_json
to load data from json files and deserialize it
- rename
TxtParser
trait toFileParser
- rename
parse_txt
trait toread_txt
- support for printing in contracts
spoof
cheatcode- snforge command-line flag
--init
- Support for custom networks - accounts created on custom networks are saved in
accounts-file
under network's chain_id accounts-file
field in Scarb.toml profile- Include the class hash of an account contract in the
accounts-file
--network
option together with thenetwork
field in Scarb.toml profile — previously used as a validation factor; now networks are identified by their chain_id
#[should_panic]
attribute support- Documentation to public methods
- Information sections to documentation about importing
snforge_std
- Print support for basic numeric data types
- Functions
parse_txt
andTxtParser<T>::deserialize_txt
to load data from plain text files and serialize it get_class_hash
cheatcodemock_call
cheatcodeprecalculate_address
cheatcode
- Exported
snforge_std
as a Scarb package, now you have to import it explicitly with e.g.use snforge_std::declare
and add it as a dependency to your Scarb.toml
[dependencies]
# ...
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry", tag = "v0.4.0" }
-
Moved
ForgeConfigFromScarb
toscarb.rs
and renamed toForgeConfig
-
Made private:
print_collected_tests_count
print_running_tests
print_test_result
print_test_summary
TestCaseSummary::from_run_result
TestCaseSummary::skipped
extract_result_data
StarknetArtifacts
StarknetContractArtifactPaths
StarknetContract
-
Split
dependencies_for_package
into separate methods:paths_for_package
corelib_for_package
target_name_for_package
compilation_unit_for_package
-
Fails test when user tries to use syscalls not supported by forge test runner
-
Updated cairo-lang to 2.1.0, starknet-api to 0.4.1 and blockifier to 0.2.0-rc0
- Added
--class-hash
flag to account create/deploy, allowing for custom openzeppelin account contract class hash
warp
cheatcoderoll
cheatcodeprank
cheatcode- Most unsafe libfuncs can now be used in contracts
declare
return type tostarknet::ClassHash
, doesn't return aResult
PreparedContract
class_hash
changed tostarknet::ClassHash
deploy
return type tostarknet::ContractAddress
- Using the same cairo file names as corelib files no longer fails test execution
- multicall as a single transaction
- account creation and deployment
--wait
flag to wait for transaction to be accepted/rejected
- sierra and casm artifacts are now required in Scarb.toml for contract declaration
- improved error messages
class_hash
es calculation- Test collection
- Initial release