Releases: foundry-rs/starknet-foundry
Releases · foundry-rs/starknet-foundry
0.7.0
Forge
Added
- Support for scarb workspaces
- Initial version of fuzz testing with randomly generated values
#[fork(...)]
attribute allowing testing against a network fork
Changed
- Tests are collected only from a package tree (
src/lib.cairo
as an entrypoint) andtests
folder:- If there is a
lib.cairo
file intests
folder, then it is treated as an entrypoint to thetests
package from which tests are collected - Otherwise, all test files matching
tests/*.cairo
regex are treated as modules and added to a single virtuallib.cairo
, which is treated as described above
- If there is a
You can read more about new test collection mechanism here
Cast
Added
account add
command for importing accounts to the accounts fileaccount create
command for creating openzeppelin accounts with starkli-style keystoreaccount deploy
command for deploying openzeppelin accounts with starkli-style keystore
Changed
--add-profile
no longer accepts-a
for short- allow the
id
property in multicalls to be referenced in the inputs ofdeploy
andinvoke
calls
0.6.0
Forge
Added
deploy_at
cheatcode- printing failures summary at the end of an execution
- filtering tests now uses an absolute module tree path — it is possible to filter tests by module names, etc.
Fixed
- non-zero exit code is returned when any tests fail
- mock_call works with dispatchers if contract does not exists
Cast
Added
- support for starkli-style accounts, allowing the use of existing accounts
Changed
- 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
0.5.0
Forge
Added
- support for
keccak_syscall
syscall - it can be used directly in cairo tests l1_handler_execute
cheatcode by @glihm- support for
roll
ing/warp
ing/prank
ing the constructor logic (precalculate address, prank, assert pranked state in constructor) spy_events
cheatcode- support for printing in contracts
spoof
cheatcode
Cast
Added
- 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
Removed
--network
option together with thenetwork
field in Scarb.toml profile — previously used as a validation factor;
now networks are identified by their chain_id
Other contributors: @amlord , @tiagofneto
Compatible Scarb Versions
Tool | Scarb Version |
---|---|
snforge |
0.7.0 |
sncast |
>=0.4.1, <=0.7.0 |
0.4.1
Changed
- fixed version number (now
0.4.1
)
Compatible Scarb Versions
Tool | Scarb Version |
---|---|
snforge |
0.6.0 |
sncast |
>=0.4.1, <=0.6.0 |
0.4.0
Forge
Added
mock_call
cheatcodes- Functions
parse_txt
andTxtParser<T>::deserialize_txt
to load data from plain text files and serialize it #[should_panic]
attribute support by @enitratget_class_hash
cheatcode by @glihm- Print support for all basic numeric data types
Changed
- 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 = "0.4.0" }
- Gently 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
Cast
Added
- Added
--class-hash
flag to account create/deploy, allowing for custom openzeppelin account contract class hash
Other contributors: @Utilitycoder , @binsta,
Compatible Scarb Versions
Tool | Scarb Version |
---|---|
snforge |
0.6.0 |
sncast |
>=0.4.1, <=0.6.0 |
0.4.0-alpha.0
This is a pre-release of starknet-foundry
v0.4.0
What's Changed
Forge
Added
should_panic
attribute
Changed
- Cheatcodes now are a scarb package
0.3.0
What's Changed
Forge
Added
warp
cheatcoderoll
cheatcodeprank
cheatcode- Most unsafe libfuncs can now be used in contracts
Changed
declare
return type tostarknet::ClassHash
, doesn't return aResult
PreparedContract
class_hash
changed tostarknet::ClassHash
deploy
return type toResult::<starknet::ContractAddress, RevertedTransaction>
Fixed
- Using the same cairo file names as corelib files no longer fails test execution
Cast
Added
- multicall as a single transaction
- account creation and deployment
--wait
flag to wait for transaction to be accepted/rejected
Changed
- sierra and casm artifacts are now required in Scarb.toml for contract declaration
- improved error messages
Compatible Scarb Versions
Tool | Scarb Version |
---|---|
snforge |
0.6.0-alpha.2 |
sncast |
>=0.4.1, <=0.6.0-alpha.2 |
0.2.0
This release fixes bugs related to collecting tests within the package. This changes the logic of test collecting - all tests within package must now be imported in lib.cairo
or submodules.
Read the updated docs on test collecting for more details.
What's Changed
- Fixed finding tests when using
super
in imports - Fixed finding tests using imported code
Compatible Scarb Versions
Tool | Scarb Version |
---|---|
snforge |
0.5.2 |
sncast |
0.5.2 |
0.1.1
What's Changed
Various bugfixes from 0.1.0
- Fixed
class_hash
es calculation - Fixed test collection
Full Changelog: v0.1.0...v0.1.1
Compatible Scarb Versions
Tool | Scarb Version |
---|---|
snforge |
0.5.2 |
sncast |
0.5.2 |
0.1.0
Starknet Foundry
The first release of Starknet Foundry is out! 🔥🚀
Create, test and deploy Starknet contracts directly from one tool.
Check out the Starknet Foundry Book 📕 to learn how to utilize it in
your projects.
What's Changed
- Added
forge
- smart contract test runner - Added
cast
- all-in-one Starknet interactions tool
Compatible Scarb Versions
Tool | Scarb Version |
---|---|
snforge |
0.5.1 |
sncast |
0.5.2 |