We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1af046f commit 4221c4dCopy full SHA for 4221c4d
contracts/access_control/traits.rs
@@ -5,6 +5,12 @@ use ink_env::{
5
6
use crate::{access_control::HAS_ROLE_SELECTOR, roles::Role};
7
8
+/// Convenience trait for contracts that have methods that need to be under access control
9
+///
10
+/// Such contracts should implement this trait and pass their error enum as associated type:
11
+/// impl AccessControlled for MyContract {
12
+/// type ContractError = MyContractError;
13
+/// }
14
pub trait AccessControlled {
15
type ContractError;
16
0 commit comments