Skip to content

Commit

Permalink
Bugfix/rbac implement boundedvec (#205)
Browse files Browse the repository at this point in the history
* integrated BoundedVec changes from rbac pallet

* introduce rbac bounded storage

* reset rbac deps branch

* updated BoundedDataLen in all runtimes
  • Loading branch information
talhadaar authored Mar 12, 2024
1 parent 3ca8191 commit bd521d3
Showing 5 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions precompiles/peaq-rbac/src/lib.rs
Original file line number Diff line number Diff line change
@@ -42,6 +42,8 @@ pub fn err2str(error: &RbacError) -> &str {
RbacError { typ: RbacErrorType::AssignmentDoesNotExist, .. } =>
"RbacError.AssignmentDoesNotExist",
RbacError { typ: RbacErrorType::NameExceedMaxChar, .. } => "RbacError.NameExceedMaxChar",
RbacError { typ: RbacErrorType::StorageExceedsMaxBounds, .. } =>
"RbacError.StorageExceedsMaxBounds",
}
}

1 change: 1 addition & 0 deletions runtime/agung/src/lib.rs
Original file line number Diff line number Diff line change
@@ -886,6 +886,7 @@ parameter_types! {
impl peaq_pallet_rbac::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type EntityId = RbacEntityId;
type BoundedDataLen = ConstU32<262144>;
type WeightInfo = peaq_pallet_rbac::weights::WeightInfo<Runtime>;
}

1 change: 1 addition & 0 deletions runtime/krest/src/lib.rs
Original file line number Diff line number Diff line change
@@ -883,6 +883,7 @@ parameter_types! {
impl peaq_pallet_rbac::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type EntityId = RbacEntityId;
type BoundedDataLen = ConstU32<262144>;
type WeightInfo = peaq_pallet_rbac::weights::WeightInfo<Runtime>;
}

1 change: 1 addition & 0 deletions runtime/peaq-dev/src/lib.rs
Original file line number Diff line number Diff line change
@@ -894,6 +894,7 @@ parameter_types! {
impl peaq_pallet_rbac::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type EntityId = RbacEntityId;
type BoundedDataLen = ConstU32<262144>;
type WeightInfo = peaq_pallet_rbac::weights::WeightInfo<Runtime>;
}

1 change: 1 addition & 0 deletions runtime/peaq/src/lib.rs
Original file line number Diff line number Diff line change
@@ -882,6 +882,7 @@ parameter_types! {
impl peaq_pallet_rbac::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type EntityId = RbacEntityId;
type BoundedDataLen = ConstU32<262144>;
type WeightInfo = peaq_pallet_rbac::weights::WeightInfo<Runtime>;
}

0 comments on commit bd521d3

Please sign in to comment.