Releases: software-mansion/protostar
v0.9.0
Highlights
Added protostar multicall
command
Multicall executes multiple calls as a single transaction. If one call fails, the entire operation is aborted. Use it to prevent leaving your system in an inconsistent state.
Changed protostar deploy
to use Universal Deployer Contract
protostar deploy
invokes a Universal Deployer Contract, which deploys the contract with the given class hash and constructor arguments.
Removed deprecated protostar migrate
The migrations functionality has been removed in favor of using JSON outputs of the commands, and creating the deployment scripts in a language of your choice.
Changelog
- Added
protostar multicall
command. - Added
estimate-gas
argument toprotostar test
command. - Added Uint256 fuzzing strategy.
- Updated cairo-lang to version 0.10.3.
- Improved
--inputs
argument ofcall
,deploy
andinvoke
commands by adding a custom parser that allows passing keyword arguments. - Improved
expect_call
cheatcode by making it return an assertion that can be used to limit a scope. - Improved
prepare
cheatcode by allowing providingsalt
in order to generate contract address deterministically. - Changed
protostar deploy
to use Universal Deployer Contract. - Changed
protostar init
to not create a Git repository. Instead,protostar install
creates a Git repository if it doesn't exist. - Fixed loading arguments from the configuration file when profile is used.
- Fixed showing "upgraded successfully" message when no upgrade was done by @ptisserand.
- Removed deprecated
protostar migrate
command. - Removed unsigned transactions support.
v0.8.1
Disabled cairo-path
existence validation, because it prevented running protostar install
.
v0.8.0
- added support for profiling builtins
- removed using implicit dependencies-related cairo-paths
This behavior was undocumented, and it didn't work most of the time as expected. In case of problems, update yourcairo-path
configuration.
EDIT: You may also need to append the directory keeping your dependencies to the cairo-path
configuration.
For example, in order to import in the following way:
from cairo_contracts... import ...
and your project has the following structure
├── protostar.toml
├── src
│ ├── main.cairo
└── lib
└── cairo_contracts
include lib
in your cairo-path
configuration:
[project]
cairo-path = ["lib"]
- removed deprecated network names (
alpha-goerli
andalpha-mainnet
) in favor ofmainnet
andtestnet
- added
calculate-account-address
command - added an option to print the output in JSON for various commands
- added
max-steps
argument to control Cairo execution step limit - added an ability to choose a block explorer link after interacting with StarkNet
- fixed calling/invoking though proxies
- fixed non-string values in the configuration file not being validated properly
- fixed a profiler bug for builtins and memory holes
v0.7.0
Highlights
-
Simpler configuration file. Migrate your configuration file by running
protostar migrate-configuration-file
.protostar.toml V1 protostar.toml V2 ["protostar.config"]
[project]
["protostar.project"]
[project]
["protostar.shared_command_configs"]
[project]
["protostar.contracts"]
,["protostar.<COMMAND>"]
[contracts]
,[<COMMAND>]
cairo_path = ...
,cairo-path = ...
cairo-path = ...
-
Protostar now uses Cairo v0.10.1 under the hood and allows sending DEPLOY_ACCOUNT transactions from the CLI.
-
Migrations feature is deprecated and is scheduled for removal before Cairo 1.0 release.
Declaring and deploying contracts via Protostar CLI is the recommended approach. Alternatively, one can only build contracts with Protostar and use custom scripts using one of StarkNet's SDKs available.
Changelog
- added
protostar call
command - added
protostar deploy-account
command - added
expect_call
cheatcode - improved configuration file
- improved profiler performance
- fixed
send_message_to_l2
cheatcode - removed rollbacks option from
protostar migrate
- deprecated
protostar migrate
functionality - minor error messages and documentation improvements
v0.6.0
Highlights
- Contract profiler — Protostar can dynamically analyze your contracts and help you optimize it.
- Protostar documentation discussions — Comments and ask questions directly in Protostar documentation.
send_message_to_l2
cheatcode — Simulate L1 message to L2 in your test cases- invoke command — Send invoke transactions from the Protostar CLI.
- Performance improvements ~25%
Changelog
- added test case profiling
- added support for commenting below the Protostar documentation
- added an option to run recently failed tests (
--last-failed
) - added
send_message_to_l2
cheatcode - added invoke command
- added ability to provide a contract name instead of path in
declare
anddeploy_contract
test cheatcodes - improved performance (thanks @Solpatium )
- improved error messages
- improved documentation
- changed how the contract name is provided to the migration cheatcodes — it is now resolved to the path in the
compiled-contracts-dir
directory - changed the
init
command to allow creating projects noninteractively - fixed mixing building output when the contract didn’t have entrypoints by creating an empty ABI file
- made
max_fee
required in commands and migration cheatcodes for v1 transactions - removed
auto_estimate_fee
from the migration cheatcodes configuration in favor ofmax_fee=“auto”
v0.5.0
What's Changed
- Update Python to v3.9.14
- Added test skipping cheatcode
- Added short string strategy to fuzzing
- Bug fixes, documentation changes
Full Changelog: v0.4.2...v0.5.0
v0.4.2 Hotfix
- Fixed
index out of range
exception reported by users of https://github.com/OpenZeppelin/cairo-contracts
v0.4.1
What's Changed
- Fixed critical bug when deploying contracts with no constructor args (by @MaksymilianDemitraszek)
Full Changelog: v0.4.0...v0.4.1
v0.4.0
Breaking changes
Cairo syntax changed
Cairo v0.10 changed language syntax, adding non-tuple function return types, replacing : ... end
with braces, new structs syntax and adding semicolons after statements. You can migrate your projects automatically to new syntax, by calling the new command in your project's root directory:
$ protostar cairo-migrate
Note: Official Cairo migrator is known to fail without trailing new line in input files. protostar cairo-migrate
fixes that.
Note: There are some new features in Cairo v0.10 release, like transactions v1 and fee estimation, that we have not exposed via Protostar yet. Expect these changes to land in next Protostar releases.
Python 3.9
If your hints depended on any features removed in Python 3.9 and 3.8, you have to manually upgrade your code. Consult Python's 3.9 and 3.8 release notes.
From Protostar's perspective, Python 3.8 has changed the execution strategy of the multiprocessing
module on macOS, which Protostar heavily depends on. We have updated Protostar to the new environment, but if anything breaks in this release, we kindly ask to promptly submit issues to our bug tracker.
What's Changed
- Protostar now works on Cairo v0.10 🎉 by @mkaput, @Arcticae & @MaksymilianDemitraszek
- Upgraded Python to v3.9.13 by @mkaput
- Fixed sharing state between fuzz test (#527) by @Radinyn
Full Changelog: v0.3.3...v0.4.0
v0.3.3
Changelog
- added signing functionality to
declare
command - added
format
command - added an option to specify Protostar version to the installation script (thanks @EdgarBarrantes)
- added
invoke
migration cheatcode - added constructor inputs validation (#636)
- updated migrator deploy cheatcode to accept a contract name defined in the
protostar.toml
and support data transformed - updated testing output to differentiate broken and failed test cases
- fixed activity indicator when running Protostar from CI
About cairo-lang 0.10
We will release a version with the cairo-lang 0.10 support as soon as we can. You can track the progress here https://github.com/software-mansion/protostar/milestone/19.