From f7cfe3e7b6792acb824ba344d4c63f9853a58fc6 Mon Sep 17 00:00:00 2001 From: Mathieu <60658558+enitrat@users.noreply.github.com> Date: Fri, 25 Oct 2024 18:05:38 +0200 Subject: [PATCH] chore: bump cairo edition (#2562) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #2561 ## Introduced changes - Bumps the default CAIRO_EDITION to the latest version ## Checklist - [x] Linked relevant issue - [x] Updated relevant documentation - [ ] Added relevant tests - [x] Performed self-review of the code - [x] Added changes to `CHANGELOG.md` --------- Co-authored-by: Artur MichaƂek <52135326+cptartur@users.noreply.github.com> --- CHANGELOG.md | 6 ++++++ crates/forge/src/lib.rs | 2 +- starknet_forge_template/src/lib.cairo | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62d55906e5..0384033ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - When using test name filter with `--exact` flag, forge will try to compile only the selected test. +### Forge + +#### Changed + +- Cairo Edition in `snforge init` template set to `2024_07` + ## [0.31.0] - 2024-09-26 ### Cast diff --git a/crates/forge/src/lib.rs b/crates/forge/src/lib.rs index f82f24f150..20bc93eec2 100644 --- a/crates/forge/src/lib.rs +++ b/crates/forge/src/lib.rs @@ -18,7 +18,7 @@ mod shared_cache; pub mod test_filter; mod warn; -pub const CAIRO_EDITION: &str = "2023_11"; +pub const CAIRO_EDITION: &str = "2024_07"; #[derive(Parser, Debug)] #[command( diff --git a/starknet_forge_template/src/lib.cairo b/starknet_forge_template/src/lib.cairo index e45edbbcd9..8f5ae7d9a4 100644 --- a/starknet_forge_template/src/lib.cairo +++ b/starknet_forge_template/src/lib.cairo @@ -11,6 +11,8 @@ pub trait IHelloStarknet { /// Simple contract for managing balance. #[starknet::contract] mod HelloStarknet { + use core::starknet::storage::{StoragePointerReadAccess, StoragePointerWriteAccess}; + #[storage] struct Storage { balance: felt252,