Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move contracts imports to prelude. #5925

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions corelib/src/prelude/v2023_01.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,9 @@ use core::{zeroable, zeroable::{NonZero, Zeroable}};
#[cfg(test)]
use core::test;
pub use core::ops::Deref;


pub use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait, StoragePointerReadAccess,
StoragePointerWriteAccess
};
5 changes: 5 additions & 0 deletions corelib/src/prelude/v2023_10.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,8 @@ pub use core::traits::Index;
pub use core::traits::IndexView;
pub use core::zeroable::NonZero;
pub use core::ops::Deref;

pub use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait, StoragePointerReadAccess,
StoragePointerWriteAccess
};
Original file line number Diff line number Diff line change
Expand Up @@ -625,10 +625,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down Expand Up @@ -281,10 +277,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down Expand Up @@ -460,10 +452,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down Expand Up @@ -635,10 +623,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down Expand Up @@ -810,10 +794,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down Expand Up @@ -989,10 +969,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down Expand Up @@ -1164,10 +1140,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down Expand Up @@ -1335,10 +1307,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down Expand Up @@ -1518,10 +1486,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down Expand Up @@ -1746,10 +1710,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down Expand Up @@ -1925,10 +1885,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,6 @@ pub fn component_state_for_testing<TContractState>() -> ComponentState<TContract
}


use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ pub fn contract_state_for_testing() -> ContractState {
unsafe_new_contract_state()
}

use starknet::storage::{
StorageMapReadAccessTrait, StorageMapWriteAccessTrait,
StorableStoragePointerReadAccess, StorableStoragePointerWriteAccess
};
// TODO(Gil): This generates duplicate diagnostics because of the plugin system, squash the duplicates into one.
#[deprecated(
feature: "deprecated_legacy_map",
Expand Down
Loading