Skip to content

Commit

Permalink
add moveresourcev5
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Nov 22, 2024
1 parent 4ba3415 commit 8209e16
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion compatibility/src/version_five/ol_cumulative_deposit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use anyhow::Result;
use move_core_types::{ident_str, identifier::IdentStr};
use serde::{Deserialize, Serialize};

use super::language_storage_v5::CORE_CODE_ADDRESS;
use super::{language_storage_v5::CORE_CODE_ADDRESS, move_resource_v5::MoveResourceV5};

/// Struct that represents a CurrencyInfo resource
#[derive(Debug, Clone, Serialize, Deserialize)]
Expand All @@ -20,6 +20,8 @@ impl MoveStructTypeV5 for CumulativeDepositResource {
const STRUCT_NAME: &'static IdentStr = ident_str!("CumulativeDeposits");
}

impl MoveResourceV5 for CumulativeDepositResource {}

impl CumulativeDepositResource {
///
pub fn struct_tag() -> StructTagV5 {
Expand Down
5 changes: 4 additions & 1 deletion compatibility/src/version_five/ol_receipts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use anyhow::Result;
use move_core_types::{ident_str, identifier::IdentStr};
use serde::{Deserialize, Serialize};

use super::{language_storage_v5::CORE_CODE_ADDRESS, legacy_address_v5::LegacyAddressV5};
use super::{language_storage_v5::CORE_CODE_ADDRESS, legacy_address_v5::LegacyAddressV5, move_resource_v5::MoveResourceV5};

/// Struct that represents a CurrencyInfo resource
#[derive(Debug, Clone, Serialize, Deserialize)]
Expand All @@ -23,6 +23,9 @@ impl MoveStructTypeV5 for ReceiptsResource {
const STRUCT_NAME: &'static IdentStr = ident_str!("UserReceipts");
}

impl MoveResourceV5 for ReceiptsResource {}


impl ReceiptsResource {
///
pub fn struct_tag() -> StructTagV5 {
Expand Down
4 changes: 3 additions & 1 deletion compatibility/src/version_five/ol_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use anyhow::Result;
use move_core_types::{ident_str, identifier::IdentStr};
use serde::{Deserialize, Serialize};

use super::{language_storage_v5::CORE_CODE_ADDRESS, legacy_address_v5::LegacyAddressV5};
use super::{language_storage_v5::CORE_CODE_ADDRESS, legacy_address_v5::LegacyAddressV5, move_resource_v5::MoveResourceV5};

// NOTE: these are legacy structs for v5

Expand Down Expand Up @@ -50,6 +50,8 @@ impl MoveStructTypeV5 for SlowWalletResource {
const STRUCT_NAME: &'static IdentStr = ident_str!("SlowWallet");
}

impl MoveResourceV5 for SlowWalletResource {}

impl SlowWalletResource {
///
pub fn struct_tag() -> StructTagV5 {
Expand Down

0 comments on commit 8209e16

Please sign in to comment.