Function sway_libs::admin::revoke_admin
pub fn revoke_admin(old_admin: Identity)
Expand description
Removes an administrator.
Arguments
old_admin
: [Identity] - TheIdentity
which the administrator status is to be removed.
Reverts
- When the caller is not the contract owner.
Number of Storage Accesses
- Reads:
1
- Writes:
1
Examples
use sway_libs::admin::{revoke_admin, is_admin};
fn foo(old_admin: Identity) {
revoke_admin(old_admin);
assert(!is_admin(old_admin));
}