-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(storage)!: store deprecated classes in a file (#1309)
- Loading branch information
1 parent
f4885fe
commit 61f0b23
Showing
5 changed files
with
86 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
use indexmap::IndexMap; | ||
use serde::{Deserialize, Serialize}; | ||
use starknet_api::block::BlockNumber; | ||
use starknet_api::core::ClassHash; | ||
use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContractClass; | ||
use starknet_api::state::ContractClass; | ||
|
||
use crate::mmap_file::LocationInFile; | ||
|
||
pub type DeclaredClasses = IndexMap<ClassHash, ContractClass>; | ||
pub type DeprecatedDeclaredClasses = IndexMap<ClassHash, DeprecatedContractClass>; | ||
|
||
/// Data structs that are serialized into the database. | ||
|
||
#[derive(Debug, Default, Clone, Eq, PartialEq, Deserialize, Serialize)] | ||
#[derive(Debug, Clone, Eq, PartialEq)] | ||
pub(crate) struct IndexedDeprecatedContractClass { | ||
pub block_number: BlockNumber, | ||
pub contract_class: DeprecatedContractClass, | ||
pub location_in_file: LocationInFile, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters