pub fn add_admin(new_admin: Identity) 
Expand description

Arguments

  • new_admin: [Identity] - The Identity which is to receive administrator status.

Reverts

  • When the caller is not the contract owner.

Number of Storage Accesses

  • Reads: 1
  • Writes: 1

Examples

use sway_libs::admin::{add_admin, is_admin};

fn foo(new_admin: Identity) {
    add_admin(new_admin);
    assert(is_admin(new_admin));
}