forked from 0LNetworkCommunity/libra-framework
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07d5e2e
commit ac5c688
Showing
14 changed files
with
184 additions
and
74 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions
1
compatibility/fixtures/v5/state_ver_119757649.17a8/state.manifest
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":119757649,"root_hash":"d2e6b6c474529cd3c3ea76cf211a528ee28bb13d7bcd8dcbef0ecf4c43bc3703","chunks":[{"first_idx":0,"last_idx":17338,"first_key":"000131122524ba9f4a13bd90a8b13c5d03ab621649c8100c6bbf7846fe8eaf0f","last_key":"fffed52c1dd93cc7aa5b79a8699df0c33eb4d65ab8d2a21bbe79f9d05ad62377","blobs":"state_ver_119757649.17a8/0-.chunk","proof":"state_ver_119757649.17a8/0-17338.proof"}],"proof":"state_ver_119757649.17a8/state.proof"} |
Binary file not shown.
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
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,11 +1,16 @@ | ||
pub mod balance_v5; | ||
pub mod core_account_v5; | ||
pub mod diem_account_v5; | ||
pub mod freezing_v5; | ||
pub mod legacy_address_v5; | ||
pub mod state_snapshot_v5; | ||
// NOTE: the ones below should likely be private always, | ||
// so that they do not get suggested in the place of | ||
// up-to-date structs of the same name. | ||
|
||
mod account_blob_v5; | ||
mod balance_v5; | ||
mod event_v5; | ||
mod freezing_v5; | ||
mod hash_value_v5; | ||
mod language_storage_v5; | ||
mod move_resource_v5; | ||
mod safe_serialize_v5; |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (c) The Diem Core Contributors | ||
// Copyright (c) The Move Contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
use super::{ | ||
language_storage_v5::{StructTagV5, TypeTagV5}, | ||
legacy_address_v5::{LegacyAddressV5, LEGACY_CORE_CODE_ADDRESS}, | ||
}; | ||
use move_core_types::identifier::{IdentStr, Identifier}; | ||
use serde::de::DeserializeOwned; | ||
|
||
pub trait MoveStructTypeV5 { | ||
const ADDRESS: LegacyAddressV5 = LEGACY_CORE_CODE_ADDRESS; | ||
const MODULE_NAME: &'static IdentStr; | ||
const STRUCT_NAME: &'static IdentStr; | ||
|
||
fn module_identifier() -> Identifier { | ||
Self::MODULE_NAME.to_owned() | ||
} | ||
|
||
fn struct_identifier() -> Identifier { | ||
Self::STRUCT_NAME.to_owned() | ||
} | ||
|
||
fn type_params() -> Vec<TypeTagV5> { | ||
vec![] | ||
} | ||
|
||
fn struct_tag() -> StructTagV5 { | ||
StructTagV5 { | ||
address: Self::ADDRESS, | ||
name: Self::struct_identifier(), | ||
module: Self::module_identifier(), | ||
type_params: Self::type_params(), | ||
} | ||
} | ||
} | ||
|
||
pub trait MoveResourceV5: MoveStructTypeV5 + DeserializeOwned { | ||
fn resource_path() -> Vec<u8> { | ||
Self::struct_tag().access_vector() | ||
} | ||
} |
Oops, something went wrong.