Skip to content

Commit

Permalink
Support enumeration (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo authored Jan 15, 2024
1 parent db176c7 commit ce56d1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion contracts/xc-regions/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mod tests;
// NOTE: This should be the collection ID of the underlying region collection.
const REGIONS_COLLECTION_ID: u32 = 42;

#[openbrush::implementation(PSP34)]
#[openbrush::implementation(PSP34, PSP34Enumerable)]
#[openbrush::contract(env = environment::ExtendedEnvironment)]
pub mod xc_regions {
use crate::{
Expand Down Expand Up @@ -54,6 +54,8 @@ pub mod xc_regions {
pub struct XcRegions {
#[storage_field]
psp34: psp34::Data,
#[storage_field]
enumerable: enumerable::Data,
/// A mapping that links RawRegionId to its corresponding region metadata.
pub regions: Mapping<RawRegionId, Region>,
/// A mapping that keeps track of the metadata version for each region.
Expand Down
2 changes: 1 addition & 1 deletion primitives/src/coretime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl From<CoreMask> for u128 {
#[derive(scale::Decode, scale::Encode, Default, Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "std", derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout))]
pub struct RegionId {
/// The timeslice at which the reigon starts.
/// The timeslice at which the region starts.
pub begin: Timeslice,
/// The index of the relay chain Core on which this Region will be scheduled.
pub core: CoreIndex,
Expand Down

0 comments on commit ce56d1f

Please sign in to comment.