OpenZeppelin / cairo-contracts

OpenZeppelin Contracts written in Cairo for Starknet, a decentralized ZK Rollup
https://docs.openzeppelin.com/contracts-cairo
MIT License
800 stars 322 forks source link

Update edition to 2023_10 #866

Open ArielElp opened 5 months ago

ArielElp commented 5 months ago

Cairo v2.4.0 introduced the notion of editions. New editions add new features but may include breaking changes. Editions are linearly increasing, i.e. if we have edition x<y<z, then we cannot upgrade to z without taking y's changes as well.

This PR adds edition to the project's Scarb.toml and makes the necessary changes so that the package compiles successfully. Edition 2023_10 narrows the part of the corelib which is available by default. To compile with this edition, this PR adds a bunch of use statements (mostly for zeroable and panic_with_felt252) for functionality that is no longer part of the prelude.

PR Checklist