From bd44f910883dc5149320eab9fa2f9ad35afa2b0e Mon Sep 17 00:00:00 2001 From: Gil Ben-Shachar <111221618+gilbens-starkware@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:37:25 +0300 Subject: [PATCH] Change mutable_* to *_mut. (#6028) --- corelib/src/starknet/storage.cairo | 10 +- .../contracts/with_erc20_mini.cairo | 2 +- .../contracts/with_ownable_mini.cairo | 2 +- .../plugin_test_data/components/component | 10 +- .../plugin_test_data/components/embeddable_as | 8 +- .../plugin_test_data/contracts/diagnostics | 96 +++++++++---------- .../plugin_test_data/contracts/dispatcher | 24 ++--- .../plugin_test_data/contracts/embedded_impl | 32 +++---- .../plugin/plugin_test_data/contracts/events | 2 +- .../plugin_test_data/contracts/hello_starknet | 8 +- .../plugin_test_data/contracts/interfaces | 16 ++-- .../plugin_test_data/contracts/mintable | 8 +- .../contracts/multi_component | 8 +- .../contracts/new_storage_interface | 16 ++-- .../plugin/plugin_test_data/contracts/storage | 2 +- .../contracts/storage_accesses | 12 +-- .../contracts/upgradable_counter | 8 +- .../contracts/user_defined_types | 2 +- .../contracts/with_erc20_mini | 4 +- .../contracts/with_ownable_mini | 4 +- .../src/plugin/storage_node.rs | 18 ++-- 21 files changed, 146 insertions(+), 146 deletions(-) diff --git a/corelib/src/starknet/storage.cairo b/corelib/src/starknet/storage.cairo index be660141026..b6c6b4400ef 100644 --- a/corelib/src/starknet/storage.cairo +++ b/corelib/src/starknet/storage.cairo @@ -368,7 +368,7 @@ impl StorageNodeDeref> of core::ops::Deref> { /// A mutable version of `StorageNode`, works the same way, but on `Mutable`. pub trait MutableStorageNode { type NodeType; - fn mutable_storage_node(self: StoragePath>) -> Self::NodeType; + fn storage_node_mut(self: StoragePath>) -> Self::NodeType; } /// This makes the storage node members directly accessible from a path to the parent struct. @@ -377,7 +377,7 @@ impl MutableStorageNodeDeref< > of core::ops::Deref>> { type Target = MutableStorageNode::::NodeType; fn deref(self: StoragePath>) -> Self::Target { - self.mutable_storage_node() + self.storage_node_mut() } } @@ -404,7 +404,7 @@ pub trait MutableSubPointers { /// The type of the storage pointers, generated for the struct T. type SubPointersType; /// Creates a sub pointers struct for the given storage pointer to a struct T. - fn mutable_sub_pointers(self: StoragePointer>) -> Self::SubPointersType; + fn sub_pointers_mut(self: StoragePointer>) -> Self::SubPointersType; } /// This makes the sub-pointers members directly accessible from a pointer to the parent struct. @@ -413,7 +413,7 @@ impl MutableSubPointersDeref< > of core::ops::Deref>> { type Target = MutableSubPointers::::SubPointersType; fn deref(self: StoragePointer>) -> Self::Target { - self.mutable_sub_pointers() + self.sub_pointers_mut() } } @@ -622,7 +622,7 @@ struct MutableU256SubPointers { impl MutableU256SubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableU256SubPointers; - fn mutable_sub_pointers( + fn sub_pointers_mut( self: starknet::storage::StoragePointer> ) -> MutableU256SubPointers { let base_address = self.address; diff --git a/crates/cairo-lang-starknet/cairo_level_tests/contracts/with_erc20_mini.cairo b/crates/cairo-lang-starknet/cairo_level_tests/contracts/with_erc20_mini.cairo index 918a49831f1..020e642b853 100644 --- a/crates/cairo-lang-starknet/cairo_level_tests/contracts/with_erc20_mini.cairo +++ b/crates/cairo-lang-starknet/cairo_level_tests/contracts/with_erc20_mini.cairo @@ -28,7 +28,7 @@ mod erc20_mini_contract { fn storage_mut( ref self: ContractState ) -> MutableStorageNode::::NodeType { - self.erc20_token.as_path().mutable_storage_node() + self.erc20_token.as_path().storage_node_mut() } } diff --git a/crates/cairo-lang-starknet/cairo_level_tests/contracts/with_ownable_mini.cairo b/crates/cairo-lang-starknet/cairo_level_tests/contracts/with_ownable_mini.cairo index 5c610414b53..53d8e2fac03 100644 --- a/crates/cairo-lang-starknet/cairo_level_tests/contracts/with_ownable_mini.cairo +++ b/crates/cairo-lang-starknet/cairo_level_tests/contracts/with_ownable_mini.cairo @@ -28,7 +28,7 @@ mod ownable_mini_contract { fn storage_mut( ref self: ContractState ) -> MutableStorageNode::::NodeType { - self.ownable.as_path().mutable_storage_node() + self.ownable.as_path().storage_node_mut() } } diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/components/component b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/components/component index 7d1ce6ffc56..8889d5f963f 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/components/component +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/components/component @@ -168,7 +168,7 @@ struct MutableMyTypeSubPointers { } impl MutableMyTypeSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableMyTypeSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableMyTypeSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableMyTypeSubPointers { let base_address = self.address; let mut current_offset = self.offset; let x_value = starknet::storage::StoragePointer { @@ -451,7 +451,7 @@ struct MutableMyTraitDispatcherSubPointers { } impl MutableMyTraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableMyTraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableMyTraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableMyTraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -545,7 +545,7 @@ struct MutableMyTraitLibraryDispatcherSubPointers { } impl MutableMyTraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableMyTraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableMyTraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableMyTraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -639,7 +639,7 @@ struct MutableMyTraitSafeLibraryDispatcherSubPointers { } impl MutableMyTraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableMyTraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableMyTraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableMyTraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -733,7 +733,7 @@ struct MutableMyTraitSafeDispatcherSubPointers { } impl MutableMyTraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableMyTraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableMyTraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableMyTraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/components/embeddable_as b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/components/embeddable_as index 5b6a48126a9..56e59d534d2 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/components/embeddable_as +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/components/embeddable_as @@ -223,7 +223,7 @@ struct MutableMyTraitDispatcherSubPointers { } impl MutableMyTraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableMyTraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableMyTraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableMyTraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -317,7 +317,7 @@ struct MutableMyTraitLibraryDispatcherSubPointers { } impl MutableMyTraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableMyTraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableMyTraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableMyTraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -411,7 +411,7 @@ struct MutableMyTraitSafeLibraryDispatcherSubPointers { } impl MutableMyTraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableMyTraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableMyTraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableMyTraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -505,7 +505,7 @@ struct MutableMyTraitSafeDispatcherSubPointers { } impl MutableMyTraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableMyTraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableMyTraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableMyTraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/diagnostics b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/diagnostics index 2f1a1ca4aa2..4275bc2c976 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/diagnostics +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/diagnostics @@ -2891,7 +2891,7 @@ struct MutableInterfaceTraitDispatcherSubPointers { } impl MutableInterfaceTraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceTraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceTraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceTraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -2985,7 +2985,7 @@ struct MutableInterfaceTraitLibraryDispatcherSubPointers { } impl MutableInterfaceTraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceTraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceTraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceTraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -3079,7 +3079,7 @@ struct MutableInterfaceTraitSafeLibraryDispatcherSubPointers { } impl MutableInterfaceTraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceTraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceTraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceTraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -3173,7 +3173,7 @@ struct MutableInterfaceTraitSafeDispatcherSubPointers { } impl MutableInterfaceTraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceTraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceTraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceTraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -4154,7 +4154,7 @@ struct MutableIContractDispatcherSubPointers { } impl MutableIContractDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -4248,7 +4248,7 @@ struct MutableIContractLibraryDispatcherSubPointers { } impl MutableIContractLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -4342,7 +4342,7 @@ struct MutableIContractSafeLibraryDispatcherSubPointers { } impl MutableIContractSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -4436,7 +4436,7 @@ struct MutableIContractSafeDispatcherSubPointers { } impl MutableIContractSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -4711,7 +4711,7 @@ struct MutableIContractDispatcherSubPointers { } impl MutableIContractDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -4805,7 +4805,7 @@ struct MutableIContractLibraryDispatcherSubPointers { } impl MutableIContractLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -4899,7 +4899,7 @@ struct MutableIContractSafeLibraryDispatcherSubPointers { } impl MutableIContractSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -4993,7 +4993,7 @@ struct MutableIContractSafeDispatcherSubPointers { } impl MutableIContractSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -5234,7 +5234,7 @@ struct MutableIContractDispatcherSubPointers { } impl MutableIContractDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -5328,7 +5328,7 @@ struct MutableIContractLibraryDispatcherSubPointers { } impl MutableIContractLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -5422,7 +5422,7 @@ struct MutableIContractSafeLibraryDispatcherSubPointers { } impl MutableIContractSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -5516,7 +5516,7 @@ struct MutableIContractSafeDispatcherSubPointers { } impl MutableIContractSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -5764,7 +5764,7 @@ struct MutableIContractDispatcherSubPointers { } impl MutableIContractDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -5858,7 +5858,7 @@ struct MutableIContractLibraryDispatcherSubPointers { } impl MutableIContractLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -5952,7 +5952,7 @@ struct MutableIContractSafeLibraryDispatcherSubPointers { } impl MutableIContractSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -6046,7 +6046,7 @@ struct MutableIContractSafeDispatcherSubPointers { } impl MutableIContractSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -6540,7 +6540,7 @@ struct MutableInterfaceDispatcherSubPointers { } impl MutableInterfaceDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -6634,7 +6634,7 @@ struct MutableInterfaceLibraryDispatcherSubPointers { } impl MutableInterfaceLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -6728,7 +6728,7 @@ struct MutableInterfaceSafeLibraryDispatcherSubPointers { } impl MutableInterfaceSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -6822,7 +6822,7 @@ struct MutableInterfaceSafeDispatcherSubPointers { } impl MutableInterfaceSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -7292,7 +7292,7 @@ struct MutableInterfaceDispatcherSubPointers { } impl MutableInterfaceDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -7386,7 +7386,7 @@ struct MutableInterfaceLibraryDispatcherSubPointers { } impl MutableInterfaceLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -7480,7 +7480,7 @@ struct MutableInterfaceSafeLibraryDispatcherSubPointers { } impl MutableInterfaceSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -7574,7 +7574,7 @@ struct MutableInterfaceSafeDispatcherSubPointers { } impl MutableInterfaceSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterfaceSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterfaceSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterfaceSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -8713,7 +8713,7 @@ struct MutableComp3TraitDispatcherSubPointers { } impl MutableComp3TraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableComp3TraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableComp3TraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableComp3TraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -8807,7 +8807,7 @@ struct MutableComp3TraitLibraryDispatcherSubPointers { } impl MutableComp3TraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableComp3TraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableComp3TraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableComp3TraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -8901,7 +8901,7 @@ struct MutableComp3TraitSafeLibraryDispatcherSubPointers { } impl MutableComp3TraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableComp3TraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableComp3TraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableComp3TraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -8995,7 +8995,7 @@ struct MutableComp3TraitSafeDispatcherSubPointers { } impl MutableComp3TraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableComp3TraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableComp3TraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableComp3TraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -9922,7 +9922,7 @@ struct MutableComp3TraitDispatcherSubPointers { } impl MutableComp3TraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableComp3TraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableComp3TraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableComp3TraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -10016,7 +10016,7 @@ struct MutableComp3TraitLibraryDispatcherSubPointers { } impl MutableComp3TraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableComp3TraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableComp3TraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableComp3TraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -10110,7 +10110,7 @@ struct MutableComp3TraitSafeLibraryDispatcherSubPointers { } impl MutableComp3TraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableComp3TraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableComp3TraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableComp3TraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -10204,7 +10204,7 @@ struct MutableComp3TraitSafeDispatcherSubPointers { } impl MutableComp3TraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableComp3TraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableComp3TraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableComp3TraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -10984,7 +10984,7 @@ struct MutableContractTraitDispatcherSubPointers { } impl MutableContractTraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -11078,7 +11078,7 @@ struct MutableContractTraitLibraryDispatcherSubPointers { } impl MutableContractTraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -11172,7 +11172,7 @@ struct MutableContractTraitSafeLibraryDispatcherSubPointers { } impl MutableContractTraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -11266,7 +11266,7 @@ struct MutableContractTraitSafeDispatcherSubPointers { } impl MutableContractTraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -11792,7 +11792,7 @@ struct MutableContractTraitDispatcherSubPointers { } impl MutableContractTraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -11886,7 +11886,7 @@ struct MutableContractTraitLibraryDispatcherSubPointers { } impl MutableContractTraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -11980,7 +11980,7 @@ struct MutableContractTraitSafeLibraryDispatcherSubPointers { } impl MutableContractTraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -12074,7 +12074,7 @@ struct MutableContractTraitSafeDispatcherSubPointers { } impl MutableContractTraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -12831,7 +12831,7 @@ struct MutableContractTraitDispatcherSubPointers { } impl MutableContractTraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -12925,7 +12925,7 @@ struct MutableContractTraitLibraryDispatcherSubPointers { } impl MutableContractTraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -13019,7 +13019,7 @@ struct MutableContractTraitSafeLibraryDispatcherSubPointers { } impl MutableContractTraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -13113,7 +13113,7 @@ struct MutableContractTraitSafeDispatcherSubPointers { } impl MutableContractTraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableContractTraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableContractTraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/dispatcher b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/dispatcher index 1d1f0c84a9e..8f2dd503231 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/dispatcher +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/dispatcher @@ -274,7 +274,7 @@ struct MutableIContractDispatcherSubPointers { } impl MutableIContractDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -368,7 +368,7 @@ struct MutableIContractLibraryDispatcherSubPointers { } impl MutableIContractLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -462,7 +462,7 @@ struct MutableIContractSafeLibraryDispatcherSubPointers { } impl MutableIContractSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -556,7 +556,7 @@ struct MutableIContractSafeDispatcherSubPointers { } impl MutableIContractSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -797,7 +797,7 @@ struct MutableIContractDispatcherSubPointers { } impl MutableIContractDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -891,7 +891,7 @@ struct MutableIContractLibraryDispatcherSubPointers { } impl MutableIContractLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -985,7 +985,7 @@ struct MutableIContractSafeLibraryDispatcherSubPointers { } impl MutableIContractSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1079,7 +1079,7 @@ struct MutableIContractSafeDispatcherSubPointers { } impl MutableIContractSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -1400,7 +1400,7 @@ struct MutableIContractDispatcherSubPointers { } impl MutableIContractDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -1494,7 +1494,7 @@ struct MutableIContractLibraryDispatcherSubPointers { } impl MutableIContractLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1588,7 +1588,7 @@ struct MutableIContractSafeLibraryDispatcherSubPointers { } impl MutableIContractSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1682,7 +1682,7 @@ struct MutableIContractSafeDispatcherSubPointers { } impl MutableIContractSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIContractSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIContractSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/embedded_impl b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/embedded_impl index 11944bd5cf6..30383d37376 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/embedded_impl +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/embedded_impl @@ -394,7 +394,7 @@ struct MutableOutsideTraitDispatcherSubPointers { } impl MutableOutsideTraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -488,7 +488,7 @@ struct MutableOutsideTraitLibraryDispatcherSubPointers { } impl MutableOutsideTraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -582,7 +582,7 @@ struct MutableOutsideTraitSafeLibraryDispatcherSubPointers { } impl MutableOutsideTraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -676,7 +676,7 @@ struct MutableOutsideTraitSafeDispatcherSubPointers { } impl MutableOutsideTraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -1399,7 +1399,7 @@ struct MutableOutsideTraitWithDestructDispatcherSubPointers { } impl MutableOutsideTraitWithDestructDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithDestructDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDestructDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDestructDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -1493,7 +1493,7 @@ struct MutableOutsideTraitWithDestructLibraryDispatcherSubPointers { } impl MutableOutsideTraitWithDestructLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithDestructLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDestructLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDestructLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1587,7 +1587,7 @@ struct MutableOutsideTraitWithDestructSafeLibraryDispatcherSubPointers { } impl MutableOutsideTraitWithDestructSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithDestructSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDestructSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDestructSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1681,7 +1681,7 @@ struct MutableOutsideTraitWithDestructSafeDispatcherSubPointers { } impl MutableOutsideTraitWithDestructSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithDestructSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDestructSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDestructSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -1775,7 +1775,7 @@ struct MutableOutsideTraitWithPanicDestructDispatcherSubPointers { } impl MutableOutsideTraitWithPanicDestructDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithPanicDestructDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithPanicDestructDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithPanicDestructDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -1869,7 +1869,7 @@ struct MutableOutsideTraitWithPanicDestructLibraryDispatcherSubPointers { } impl MutableOutsideTraitWithPanicDestructLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithPanicDestructLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithPanicDestructLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithPanicDestructLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1963,7 +1963,7 @@ struct MutableOutsideTraitWithPanicDestructSafeLibraryDispatcherSubPointers { } impl MutableOutsideTraitWithPanicDestructSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithPanicDestructSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithPanicDestructSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithPanicDestructSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -2057,7 +2057,7 @@ struct MutableOutsideTraitWithPanicDestructSafeDispatcherSubPointers { } impl MutableOutsideTraitWithPanicDestructSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithPanicDestructSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithPanicDestructSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithPanicDestructSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -2673,7 +2673,7 @@ struct MutableOutsideTraitWithDropDispatcherSubPointers { } impl MutableOutsideTraitWithDropDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithDropDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDropDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDropDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -2767,7 +2767,7 @@ struct MutableOutsideTraitWithDropLibraryDispatcherSubPointers { } impl MutableOutsideTraitWithDropLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithDropLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDropLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDropLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -2861,7 +2861,7 @@ struct MutableOutsideTraitWithDropSafeLibraryDispatcherSubPointers { } impl MutableOutsideTraitWithDropSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithDropSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDropSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDropSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -2955,7 +2955,7 @@ struct MutableOutsideTraitWithDropSafeDispatcherSubPointers { } impl MutableOutsideTraitWithDropSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOutsideTraitWithDropSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDropSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOutsideTraitWithDropSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/events b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/events index e1c69d89e1a..57c83d6463e 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/events +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/events @@ -189,7 +189,7 @@ struct MutableASubPointers { } impl MutableASubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableASubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableASubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableASubPointers { let base_address = self.address; let mut current_offset = self.offset; let x_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/hello_starknet b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/hello_starknet index e98ecbc35cd..ceed84d4dd7 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/hello_starknet +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/hello_starknet @@ -412,7 +412,7 @@ struct MutableHelloStarknetTraitDispatcherSubPointers { } impl MutableHelloStarknetTraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableHelloStarknetTraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -492,7 +492,7 @@ struct MutableHelloStarknetTraitLibraryDispatcherSubPointers { } impl MutableHelloStarknetTraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableHelloStarknetTraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -572,7 +572,7 @@ struct MutableHelloStarknetTraitSafeLibraryDispatcherSubPointers { } impl MutableHelloStarknetTraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableHelloStarknetTraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -652,7 +652,7 @@ struct MutableHelloStarknetTraitSafeDispatcherSubPointers { } impl MutableHelloStarknetTraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableHelloStarknetTraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/interfaces b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/interfaces index afa7fbaaa83..60e3c0bd813 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/interfaces +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/interfaces @@ -346,7 +346,7 @@ struct MutableInterface1DispatcherSubPointers { } impl MutableInterface1DispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterface1DispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterface1DispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterface1DispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -440,7 +440,7 @@ struct MutableInterface1LibraryDispatcherSubPointers { } impl MutableInterface1LibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterface1LibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterface1LibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterface1LibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -534,7 +534,7 @@ struct MutableInterface1SafeLibraryDispatcherSubPointers { } impl MutableInterface1SafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterface1SafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterface1SafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterface1SafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -628,7 +628,7 @@ struct MutableInterface1SafeDispatcherSubPointers { } impl MutableInterface1SafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterface1SafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterface1SafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterface1SafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -722,7 +722,7 @@ struct MutableInterface2DispatcherSubPointers { } impl MutableInterface2DispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterface2DispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterface2DispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterface2DispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -816,7 +816,7 @@ struct MutableInterface2LibraryDispatcherSubPointers { } impl MutableInterface2LibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterface2LibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterface2LibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterface2LibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -910,7 +910,7 @@ struct MutableInterface2SafeLibraryDispatcherSubPointers { } impl MutableInterface2SafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterface2SafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterface2SafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterface2SafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1004,7 +1004,7 @@ struct MutableInterface2SafeDispatcherSubPointers { } impl MutableInterface2SafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableInterface2SafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableInterface2SafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableInterface2SafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/mintable b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/mintable index 1950d8d6c11..0e75474aa63 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/mintable +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/mintable @@ -560,7 +560,7 @@ struct MutableGetSupplyDispatcherSubPointers { } impl MutableGetSupplyDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableGetSupplyDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableGetSupplyDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableGetSupplyDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -640,7 +640,7 @@ struct MutableGetSupplyLibraryDispatcherSubPointers { } impl MutableGetSupplyLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableGetSupplyLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableGetSupplyLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableGetSupplyLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -720,7 +720,7 @@ struct MutableGetSupplySafeLibraryDispatcherSubPointers { } impl MutableGetSupplySafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableGetSupplySafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableGetSupplySafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableGetSupplySafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -800,7 +800,7 @@ struct MutableGetSupplySafeDispatcherSubPointers { } impl MutableGetSupplySafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableGetSupplySafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableGetSupplySafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableGetSupplySafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/multi_component b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/multi_component index 9b0c30fb24d..2ccccb9d995 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/multi_component +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/multi_component @@ -615,7 +615,7 @@ struct MutableGetSupplyDispatcherSubPointers { } impl MutableGetSupplyDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableGetSupplyDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableGetSupplyDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableGetSupplyDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -695,7 +695,7 @@ struct MutableGetSupplyLibraryDispatcherSubPointers { } impl MutableGetSupplyLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableGetSupplyLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableGetSupplyLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableGetSupplyLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -775,7 +775,7 @@ struct MutableGetSupplySafeLibraryDispatcherSubPointers { } impl MutableGetSupplySafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableGetSupplySafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableGetSupplySafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableGetSupplySafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -855,7 +855,7 @@ struct MutableGetSupplySafeDispatcherSubPointers { } impl MutableGetSupplySafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableGetSupplySafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableGetSupplySafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableGetSupplySafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/new_storage_interface b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/new_storage_interface index a0bc10e9fd0..3763e425cd4 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/new_storage_interface +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/new_storage_interface @@ -1278,7 +1278,7 @@ struct MutableBalancePairStorageNode { } impl MutableBalancePairStorageNodeImpl of starknet::storage::MutableStorageNode { type NodeType = MutableBalancePairStorageNode; - fn mutable_storage_node(self: starknet::storage::StoragePath>) -> MutableBalancePairStorageNode { + fn storage_node_mut(self: starknet::storage::StoragePath>) -> MutableBalancePairStorageNode { let balance1_value = starknet::storage::PendingStoragePathTrait::new( @self, @@ -1384,7 +1384,7 @@ struct MutableSlicedBalanceTrioSubPointers { } impl MutableSlicedBalanceTrioSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableSlicedBalanceTrioSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableSlicedBalanceTrioSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableSlicedBalanceTrioSubPointers { let base_address = self.address; let mut current_offset = self.offset; let balance1_value = starknet::storage::StoragePointer { @@ -1492,7 +1492,7 @@ struct MutableSlicedBalancePairSubPointers { } impl MutableSlicedBalancePairSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableSlicedBalancePairSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableSlicedBalancePairSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableSlicedBalancePairSubPointers { let base_address = self.address; let mut current_offset = self.offset; let balance1_value = starknet::storage::StoragePointer { @@ -1547,7 +1547,7 @@ struct MutableLinkedListStorageNode { } impl MutableLinkedListStorageNodeImpl of starknet::storage::MutableStorageNode { type NodeType = MutableLinkedListStorageNode; - fn mutable_storage_node(self: starknet::storage::StoragePath>) -> MutableLinkedListStorageNode { + fn storage_node_mut(self: starknet::storage::StoragePath>) -> MutableLinkedListStorageNode { let value_value = starknet::storage::PendingStoragePathTrait::new( @self, @@ -1645,7 +1645,7 @@ struct MutableHelloStarknetTraitDispatcherSubPointers { } impl MutableHelloStarknetTraitDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableHelloStarknetTraitDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -1739,7 +1739,7 @@ struct MutableHelloStarknetTraitLibraryDispatcherSubPointers { } impl MutableHelloStarknetTraitLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableHelloStarknetTraitLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1833,7 +1833,7 @@ struct MutableHelloStarknetTraitSafeLibraryDispatcherSubPointers { } impl MutableHelloStarknetTraitSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableHelloStarknetTraitSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1927,7 +1927,7 @@ struct MutableHelloStarknetTraitSafeDispatcherSubPointers { } impl MutableHelloStarknetTraitSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableHelloStarknetTraitSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableHelloStarknetTraitSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage index ef7ec991ec3..dc73c702cb5 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage @@ -155,7 +155,7 @@ struct MutableOuterTypeSubPointers { } impl MutableOuterTypeSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableOuterTypeSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableOuterTypeSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableOuterTypeSubPointers { let base_address = self.address; let mut current_offset = self.offset; let x_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage_accesses b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage_accesses index 9057ca289b2..8a6b2ded86d 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage_accesses +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage_accesses @@ -1342,7 +1342,7 @@ struct MutableUserInfoSubPointers { } impl MutableUserInfoSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableUserInfoSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableUserInfoSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableUserInfoSubPointers { let base_address = self.address; let mut current_offset = self.offset; let name_value = starknet::storage::StoragePointer { @@ -1402,7 +1402,7 @@ struct MutableTransactionInfoStorageNode { } impl MutableTransactionInfoStorageNodeImpl of starknet::storage::MutableStorageNode { type NodeType = MutableTransactionInfoStorageNode; - fn mutable_storage_node(self: starknet::storage::StoragePath>) -> MutableTransactionInfoStorageNode { + fn storage_node_mut(self: starknet::storage::StoragePath>) -> MutableTransactionInfoStorageNode { let balances_value = starknet::storage::PendingStoragePathTrait::new( @self, @@ -1486,7 +1486,7 @@ struct MutableIERC20DispatcherSubPointers { } impl MutableIERC20DispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIERC20DispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIERC20DispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIERC20DispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -1566,7 +1566,7 @@ struct MutableIERC20LibraryDispatcherSubPointers { } impl MutableIERC20LibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIERC20LibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIERC20LibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIERC20LibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1646,7 +1646,7 @@ struct MutableIERC20SafeLibraryDispatcherSubPointers { } impl MutableIERC20SafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIERC20SafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIERC20SafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIERC20SafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -1726,7 +1726,7 @@ struct MutableIERC20SafeDispatcherSubPointers { } impl MutableIERC20SafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableIERC20SafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableIERC20SafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableIERC20SafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/upgradable_counter b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/upgradable_counter index d85e6b0335d..d54f33c6cea 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/upgradable_counter +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/upgradable_counter @@ -692,7 +692,7 @@ struct MutableICounterContractDispatcherSubPointers { } impl MutableICounterContractDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableICounterContractDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableICounterContractDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableICounterContractDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { @@ -772,7 +772,7 @@ struct MutableICounterContractLibraryDispatcherSubPointers { } impl MutableICounterContractLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableICounterContractLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableICounterContractLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableICounterContractLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -852,7 +852,7 @@ struct MutableICounterContractSafeLibraryDispatcherSubPointers { } impl MutableICounterContractSafeLibraryDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableICounterContractSafeLibraryDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableICounterContractSafeLibraryDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableICounterContractSafeLibraryDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let class_hash_value = starknet::storage::StoragePointer { @@ -932,7 +932,7 @@ struct MutableICounterContractSafeDispatcherSubPointers { } impl MutableICounterContractSafeDispatcherSubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableICounterContractSafeDispatcherSubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableICounterContractSafeDispatcherSubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableICounterContractSafeDispatcherSubPointers { let base_address = self.address; let mut current_offset = self.offset; let contract_address_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/user_defined_types b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/user_defined_types index b71b363415b..d33a7b4fdf7 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/user_defined_types +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/user_defined_types @@ -289,7 +289,7 @@ struct MutableWrappedFelt252SubPointers { } impl MutableWrappedFelt252SubPointersImpl of starknet::storage::MutableSubPointers { type SubPointersType = MutableWrappedFelt252SubPointers; - fn mutable_sub_pointers(self: starknet::storage::StoragePointer>) -> MutableWrappedFelt252SubPointers { + fn sub_pointers_mut(self: starknet::storage::StoragePointer>) -> MutableWrappedFelt252SubPointers { let base_address = self.address; let mut current_offset = self.offset; let value_value = starknet::storage::StoragePointer { diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_erc20_mini b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_erc20_mini index eb6fd4e48b5..f0b4136ac3a 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_erc20_mini +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_erc20_mini @@ -37,7 +37,7 @@ mod erc20_mini_contract { fn storage_mut( ref self: ContractState ) -> MutableStorageNode::::NodeType { - self.erc20_token.as_path().mutable_storage_node() + self.erc20_token.as_path().storage_node_mut() } } @@ -254,7 +254,7 @@ impl ContractStorageBaseMutCopy of core::traits::Copy::; fn storage_mut( ref self: ContractState ) -> MutableStorageNode::::NodeType { - self.erc20_token.as_path().mutable_storage_node() + self.erc20_token.as_path().storage_node_mut() } } diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_ownable_mini b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_ownable_mini index 97ec5f03988..d2ddd4091f0 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_ownable_mini +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_ownable_mini @@ -37,7 +37,7 @@ mod ownable_mini_contract { fn storage_mut( ref self: ContractState ) -> MutableStorageNode::::NodeType { - self.ownable.as_path().mutable_storage_node() + self.ownable.as_path().storage_node_mut() } } @@ -275,7 +275,7 @@ impl ContractStorageBaseMutCopy of core::traits::Copy::; fn storage_mut( ref self: ContractState ) -> MutableStorageNode::::NodeType { - self.ownable.as_path().mutable_storage_node() + self.ownable.as_path().storage_node_mut() } } diff --git a/crates/cairo-lang-starknet/src/plugin/storage_node.rs b/crates/cairo-lang-starknet/src/plugin/storage_node.rs index a98dfbee449..fb9d4d6c8e1 100644 --- a/crates/cairo-lang-starknet/src/plugin/storage_node.rs +++ b/crates/cairo-lang-starknet/src/plugin/storage_node.rs @@ -131,13 +131,13 @@ impl StorageNodeInfo { None } } - /// Returns the mutable prefix of snakecase names. - fn mutable_snakecase(&self) -> String { - if self.is_mutable { "mutable_".to_string() } else { "".to_string() } - } /// Returns the mutable prefix of camelcase names. - fn mutable_camelcase(&self) -> String { - if self.is_mutable { "Mutable".to_string() } else { "".to_string() } + fn mutable_camelcase(&self) -> &'static str { + if self.is_mutable { "Mutable" } else { "" } + } + /// Returns the mutable suffix for functions. + fn mutable_suffix(&self) -> &'static str { + if self.is_mutable { "_mut" } else { "" } } /// Returns a mutable type with a given generic arg. fn mutable_type(&self, inner_type: &str) -> String { @@ -180,10 +180,10 @@ impl StorageNodeInfo { } /// Returns the name of the function that initializes the storage node. fn node_init_function_name(&self) -> String { - let mutable_prefix = self.mutable_snakecase(); + let mutable_suffix = self.mutable_suffix(); match self.node_type { - StorageNodeType::StorageNode => format!("{mutable_prefix}storage_node"), - StorageNodeType::SubPointers => format!("{mutable_prefix}sub_pointers"), + StorageNodeType::StorageNode => format!("storage_node{mutable_suffix}",), + StorageNodeType::SubPointers => format!("sub_pointers{mutable_suffix}",), } } /// Returns the name of the type that the storage node originates from.