radix_engine/object_modules/role_assignment/
substates.rs1use crate::internal_prelude::*;
2use radix_blueprint_schema_init::*;
3use radix_engine_interface::blueprints::resource::*;
4use radix_engine_interface::types::*;
5
6#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor)]
7#[sbor(transparent)]
8pub struct OwnerRoleSubstate {
9 pub owner_role_entry: OwnerRoleEntry,
10}
11
12declare_native_blueprint_state! {
13 blueprint_ident: RoleAssignment,
14 blueprint_snake_case: role_assignment,
15 features: {
16 },
17 fields: {
18 owner: {
19 ident: Owner,
20 field_type: {
21 kind: StaticSingleVersioned,
22 },
23 condition: Condition::Always,
24 },
25 },
26 collections: {
27 role_assignment: KeyValue {
28 entry_ident: AccessRule,
29 key_type: {
30 kind: Static,
31 content_type: ModuleRoleKey,
32 },
33 value_type: {
34 kind: StaticSingleVersioned,
35 },
36 allow_ownership: false,
37 },
38 }
39}
40
41pub type RoleAssignmentOwnerV1 = OwnerRoleSubstate;
42pub type RoleAssignmentAccessRuleV1 = AccessRule;