Skip to content

Commit

Permalink
Integrate schema-accounts with registries
Browse files Browse the repository at this point in the history
Signed-off-by: Shreevatsa N <[email protected]>
  • Loading branch information
vatsa287 committed Oct 19, 2024
1 parent fcfe70b commit 391701c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion pallets/registries/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ pub type RegistryBlobOf<T> = BoundedVec<u8, MaxRegistryBlobSizeOf<T>>;
pub type RegistryAuthorizationOf<T> =
RegistryAuthorization<RegistryIdOf, RegistryCreatorOf<T>, Permissions>;
/// Type of Registry Details
pub type RegistryDetailsOf<T> = RegistryDetails<RegistryCreatorOf<T>, StatusOf, RegistryHashOf<T>, SchemaIdOf>;
pub type RegistryDetailsOf<T> =
RegistryDetails<RegistryCreatorOf<T>, StatusOf, RegistryHashOf<T>, SchemaIdOf>;

#[frame_support::pallet]
pub mod pallet {
Expand Down
2 changes: 1 addition & 1 deletion pallets/registries/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ parameter_types! {
pub const MaxEncodedSchemaLength: u32 = 15_360;
}

impl pallet_schema_accounts::Config for Test{
impl pallet_schema_accounts::Config for Test {
type RuntimeEvent = RuntimeEvent;
type MaxEncodedSchemaLength = MaxEncodedSchemaLength;
type WeightInfo = ();
Expand Down
2 changes: 1 addition & 1 deletion pallets/registries/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use super::*;
use crate::mock::*;
use codec::Encode;
use frame_support::{assert_err, assert_ok};
use sp_runtime::traits::Hash;
use pallet_schema_accounts::{InputSchemaOf, SchemaHashOf};
use sp_runtime::traits::Hash;
use sp_std::prelude::*;

pub fn generate_registry_id<T: Config>(digest: &RegistryHashOf<T>) -> RegistryIdOf {
Expand Down
4 changes: 1 addition & 3 deletions pallets/registries/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ impl Default for Permissions {
}
}


/// Details of an on-chain registry.
///
/// This struct stores metadata about a registry, including information about
Expand All @@ -79,12 +78,11 @@ impl Default for Permissions {
pub struct RegistryDetails<RegistryCreatorOf, StatusOf, RegistryHashOf, SchemaIdOf> {
pub creator: RegistryCreatorOf,
pub revoked: StatusOf,
pub archived: StatusOf,
pub archived: StatusOf,
pub digest: RegistryHashOf,
pub schema_id: Option<SchemaIdOf>,
}


/// Authorization details for a registry delegate.
///
/// This structure defines the permissions granted to a delegate within a registry,
Expand Down

0 comments on commit 391701c

Please sign in to comment.