pub fn is_admin(admin: Identity) -> bool 
Expand description

Returns whether admin is an administrator.

Arguments

  • admin: [Identity] - The Identity of which to check the administrator status.

Returns

  • [bool] - true if the admin is an administrator, otherwise false.

Number of Storage Accesses

  • Reads: 1

Examples

use sway_libs::admin::{is_admin};

fn foo(admin: Identity) {
    assert(is_admin(admin));
}