pub fn is_admin(admin: Identity) -> bool
Expand description
Returns whether admin
is an administrator.
Arguments
admin
: [Identity] - TheIdentity
of which to check the administrator status.
Returns
- [bool] -
true
if theadmin
is an administrator, otherwisefalse
.
Number of Storage Accesses
- Reads:
1
Examples
use sway_libs::admin::{is_admin};
fn foo(admin: Identity) {
assert(is_admin(admin));
}