Checks if an address has a specific role
admin - The address to checkrole - The role to check forOption<u32> - Some(u32) if the address has the role, None otherwisefn has_role(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
role: soroban_sdk::Symbol,
) -> Option
Returns the admin address for the access control system
Option<Address> - The admin address, or None if not setfn get_admin(env: soroban_sdk::Env) -> Option
Extends the TTL of the contract instance and code
fn extend_ttl(env: soroban_sdk::Env)
fn is_governor(env: soroban_sdk::Env, admin: soroban_sdk::Address) -> bool
fn add_governor(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
governor: soroban_sdk::Address,
)
fn __constructor(
env: soroban_sdk::Env,
governor: soroban_sdk::Address,
guardian: soroban_sdk::Address,
)
Returns the admin role for a specific role
role - The role to queryOption<Symbol> - The admin role that can grant/revoke the queried role, or None if not setfn get_role_admin(
env: soroban_sdk::Env,
role: soroban_sdk::Symbol,
) -> Option
Returns a role member at a specific index
role - The role to queryindex - The index in the role members listAddress - The address at the specified indexfn get_role_member(
env: soroban_sdk::Env,
role: soroban_sdk::Symbol,
index: u32,
) -> soroban_sdk::Address
fn remove_governor(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
governor: soroban_sdk::Address,
)
Returns all existing roles in the access control system
Vec<Symbol> - Array of all role identifiersfn get_existing_roles(env: soroban_sdk::Env) -> soroban_sdk::Vec
Returns the number of members in a role
role - The role to queryu32 - The count of addresses with this rolefn get_role_member_count(env: soroban_sdk::Env, role: soroban_sdk::Symbol) -> u32
fn is_governor_or_guardian(env: soroban_sdk::Env, admin: soroban_sdk::Address) -> bool
fn set_access_control_manager(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
new_access_control_manager: soroban_sdk::Address,
)