Contract 76cb15cdae479d33e7ecb80f1f78cf446d4de23827be987cd1dc7ade705bb35b

← Back to Index 📥 Download WASM

Meta

cliver 25.1.0#
rssdkver 23.4.1#e671b396f8bacf1370925f722df158b31c0baae5
rsver 1.95.0

Instances

  • CAR3NNFV3EGHJQ34OIEAFFHZDTZIJCKP5YBNXBMEEHSLELUZURSBGAA5

Interface

Checks if an address has a specific role

Arguments

  • admin - The address to check
  • role - The role to check for

Returns

  • Option<u32> - Some(u32) if the address has the role, None otherwise
fn has_role(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    role: soroban_sdk::Symbol,
) -> Option

Returns the admin address for the access control system

Returns

  • Option<Address> - The admin address, or None if not set
fn get_admin(env: soroban_sdk::Env) -> Option

Extends the TTL of the contract instance and code

Notes

  • Callable by anyone — keeping the contract alive is a public good
  • Extends instance storage (which includes all Instance entries and the contract code)
  • Persistent entries (roles, members) are managed by the stellar-access crate and have their TTL extended individually when accessed
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

Arguments

  • role - The role to query

Returns

  • Option<Symbol> - The admin role that can grant/revoke the queried role, or None if not set
fn get_role_admin(
    env: soroban_sdk::Env,
    role: soroban_sdk::Symbol,
) -> Option
fn 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

Returns

  • Vec<Symbol> - Array of all role identifiers
fn get_existing_roles(env: soroban_sdk::Env) -> soroban_sdk::Vec
fn get_role_member_count(env: soroban_sdk::Env, role: soroban_sdk::Symbol) -> u32
fn is_compatible_successor(
    env: soroban_sdk::Env,
    new_access_control_manager: soroban_sdk::Address,
) -> bool
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,
)

Imports

WebAssembly Text (WAT) ▶