Releases: starkware-libs/cairo-lang
Releases · starkware-libs/cairo-lang
v0.5.1
v0.5.0
StarkNet
- Contract constructors
- Identify transactions by their hash (replacing transaction id)
storage_ptr
was merged intosyscall_ptr
(you should now usesyscall_ptr
to access storage)- Separate signature information from the transaction calldata
- Change the way contract addresses are computed
- Support arrays in return values of external functions
- Local testing infrastructure:
- Support passing structs
- Allow specifying caller address
- Support L1<->L2 messages
- Expose the transaction's required resources
- Technical modifications:
- Data availability format includes constructor arguments
- The format of the contract definition hash has changed
- Add L1 events when L1<->L2 messages are consumed
Cairo
- Improve compilation time
- Add a syntax for short strings (strings that fits into a single
felt
) - Remove the python literal syntax (
%[ ... %]
) to allow safer compilation
v0.4.2
v0.4.1
v0.4.0
StarkNet (Alpha 2)
- Moved from Ropsten to Goerli
- Contract interaction - contracts can invoke external functions of other L2 contracts
- L2 contract interface
- Get caller address system call
- Bitwise builtin is now supported in StarkNet
- Testing framework for StarkNet contract unit tests
- Patricia tree
Note: The StarkEx2.0 Cairo code was removed from the repo in this version. You may read it from a previous commit.
v0.3.1
StarkNet
- CLI can now invoke transactions with arrays (thanks, @kobigurk)
- New uint256 arithmetic functions.
- Bug fix: finialize_default_dict can now be used in StarkNet
SHARP
- Bitwise builtin can be used in SHARP (soon in StarkNet)
- SHARP testnet was moved from Ropsten to Goerli
v0.3.0
StarkNet
- A new release - Alpha 1:
- L1 <-> L2 interaction using messages
- On-chain data for storage changes
- Storage variables can be a tuple of felts
- Calldata arguments may be dynamically-sized arrays.
- Starknet CLI
- New commands:
get_transaction
andget_contract_addresses
- New
--contract argument
for tx_status to get location information for errors
- New commands:
range_check
is now required for storage vars- StarkNet OS source code (only Cairo. Hints are not functional yet)
Cairo language
- Uninitialized tempvars
- Hint expressions (for example,
tempvar x = nondet %{ y %}
) - Power operator (for example,
2**3
. Only for constants) - Hex numbers (for example,
0x1234
) - Multiple hints per instruction
cairo-reconstruct-traceback
command
v0.2.0
StarkNet:
- StarkNet contract compiler and StarkNet CLI (command line interface)
@external
,@view
and@storage_var
decorators
Cairo language:
- Remove-unused-functions optimization
- Dot operator (e.g.,
(x + 1).y
) and the subscript operator (x[3]
). - Tuples (
(2, 3, 4)
) - Struct data-constructors (
let t = T(x=1, y=2)
) - Compare structs (
assert a = b
, wherea
andb
are of typeT
)
Cairo architecture:
- Safe call (the Cairo CPU ensures that each
call
instruction returns).
v0.1.0
Language:
- Implicit arguments
- No offsets in struct definition
return (...)
is replaced withreturn foo()
- Additional type checks
Compiler and runner:
- Call & return push optimization
- Memory holes are allowed (continuity restriction is removed)
Standard library:
- New dict functions: dict_read(), dict_write()
- New default_dict functions
- Dict keys are no longer restricted to 128 bit integers