Cairo-lang

Latest version: v0.13.3

Safety actively analyzes 688792 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 11

0.11.1a0

**Starknet**:
* Upgrade Cairo 1.0 version to `v1.0.0-rc0`
* Charged transaction fee is now based on an *average* Ethereum gas price instead of a single sample (estimation API is unaffected)
* API changes:
* Remove the state root in `get_state_update` for pending blocks to allow faster responses in future versions
* Testing framework:
* Allow declaring (and interacting with) Cairo 1.0 contracts.
* Currently, the Cairo 1.0 ABI is not supported yet, so a Cairo 0 ABI should be supplied to `declare()` manually.
* Split `deploy()` to two phases declare and deploy: `deprecated_declare()` (for Cairo 0 contract) or `declare()` (for Cairo 1.0 contracts) and `deploy()` (for both)
* Add current block hash to the Starknet Core contract (currently not verified by the Starknet OS):
* **Breaking change**: The `LogStateUpdate` event's data is changed to include `blockHash`

**Other changes**:
* Change build system from CMake to bazel

0.11.0.2

**Starknet**:
* Declaring Cairo 1.0 contract classes using the CLI:
* Allow specifying the Sierra->Casm compiler in `starknet declare` using `--compiler_dir` to override the use of the default compiler
* The value should point to a directory containing the `starknet-sierra-compile` executable, which can be obtained by building the [Cairo 1.0 compiler](https://github.com/starkware-libs/cairo) (via running `cargo build --release` from the root folder of the compiler)
* Allow specifying the compiler's arguments using `--compiler_args` (when using this flag, be sure to include `--add-pythonic-hints` in the compiler arguments)
* web3.py v6.0.0 support in the python package
* Rename the old (Cairo 0) `starknet-compile` executable to `starknet-compile-deprecated`

0.11.0.1

Minor bug fix in the `starknet` CLI

0.11.0

**Starknet**:
* Initial support of Cairo 1.0 contracts:
* New declare transaction version for declaring Cairo 1.0 contracts
* Deploy and invoke are supported for Cairo 1.0 contract
* The Cairo 1.0 ABI is not supported yet, so using `starknet invoke` requires omitting the `--abi` argument
* New API: `get_compiled_class_by_class_hash` - returns the compiled class (CASM) of the given contract class
* Changes to on-chain data format. Include the Cairo1.0 declared classes and changes to the class hash of a given contract instance. See more information [here](https://github.com/starkware-libs/cairo-lang/blob/v0.11.0-pre/src/starkware/starknet/core/os/state.cairo)
* Support for Poseidon hash (only in Cairo0 contracts)
* New syscall: `replace_class` - replaces the class of the contract calling it. This syscall can replace the proxy mechanism for upgradable contracts
* Mandatory message fees for messages from L1 to L2
* version-0 `INVOKE` and `DECLARE` transactions will no longer be supported in Starknet Alpha v0.11.0 (this unrelated to the continued support of Cairo 0 contracts)

**Cairo**:
* New builtins:
* Poseidon hash function (efficient, STARK-friendly hash function)
* Keccak hash function (currently, the keccak builtin cannot be used in Starknet)

0.11.0pre3

**Starknet**:
* Initial support of Cairo1.0 contracts:
* New declare transaction version for declaring Cairo1.0 contracts
* Changes to on-chain data format. Include the Cairo1.0 declared classes and changes to the class hash of a given contract instance. See more information [here](https://github.com/starkware-libs/cairo-lang/blob/v0.11.0-pre/src/starkware/starknet/core/os/state.cairo)
* Support for Poseidon hash (only in Cairo0 contracts)

**Cairo**:
* New builtins:
* Poseidon hash function (efficient, STARK-friendly hash function)
* Keccak hash function (currently, the keccak builtin cannot be used in Starknet)

0.11.0pre2

**Starknet**:
* Initial support of Cairo1.0 contracts:
* New declare transaction version for declaring Cairo1.0 contracts
* Changes to on-chain data format. Include the Cairo1.0 declared classes and changes to the class hash of a given contract instance. See more information [here](https://github.com/starkware-libs/cairo-lang/blob/v0.11.0-pre/src/starkware/starknet/core/os/state.cairo)
* Support for Poseidon hash (only in Cairo0 contracts)

**Cairo**:
* New builtins:
* Poseidon hash function (efficient, STARK-friendly hash function)
* Keccak hash function (currently, the keccak builtin cannot be used in Starknet)

Page 5 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.