Function sway_libs::admin::only_owner_or_admin
pub fn only_owner_or_admin()
Expand description
Ensures that the sender is an owner or administrator.
Reverts
- When the caller is not an owner or administrator.
Number of Storage Accesses
- Reads:
2
Examples
use sway_libs::admin::{only_owner_or_admin};
fn foo() {
only_owner_or_admin();
// Only reachable by an owner or administrator
}