roleAddresses
map[string].uverse.address- OID
- 00d3a4…8c16:32
roleAddresses details
init.1
func()- OID
- 00d3a4…8c16:4
init.1 details
SetRoleAddress
func(roleName string, roleAddress .uverse.address)SetRoleAddress sets or updates a role's address. Creates the role if it doesn't exist, updates it if it does. Parameters: - cur: current realm - roleName: name of the role - roleAddress: address for the role Only callable by RBAC contract.
- OID
- 00d3a4…8c16:6
SetRoleAddress details
setRoleAddress
func(roleName string, roleAddress .uverse.address) .uverse.errorsetRoleAddress is the internal implementation of SetRoleAddress. Separated for testability.
- OID
- 00d3a4…8c16:7
setRoleAddress details
RemoveRole
func(roleName string)RemoveRole removes a role from the system. Parameters: - roleName: name of the role to remove Only callable by RBAC contract.
- OID
- 00d3a4…8c16:8
RemoveRole details
IsAuthorized
func(role string, caller .uverse.address) boolIsAuthorized checks if caller has the specified role. Parameters: - role: role name to check - caller: address to verify Returns true if authorized, false otherwise.
- OID
- 00d3a4…8c16:9
IsAuthorized details
GetAddress
func(role string) (.uverse.address, bool)- OID
- 00d3a4…8c16:10
GetAddress details
GetRoleAddresses
func() map[string].uverse.addressGetRoleAddresses returns a copy of all role addresses.
- OID
- 00d3a4…8c16:11
GetRoleAddresses details
MustGetAddress
func(role string) .uverse.address- OID
- 00d3a4…8c16:12
MustGetAddress details
rbacPackagePath
untyped stringrbacPackagePath is the package path of the RBAC contract Used to verify that role management functions are called only by RBAC
Value
"gno.land/r/gnoswap/rbac"
AssertIsAdminOrGovernance
func(caller .uverse.address)AssertIsAdminOrGovernance panics if the caller is not admin or governance. Used for functions that require elevated privileges.
- OID
- 00d3a4…8c16:13
AssertIsAdminOrGovernance details
AssertIsAdmin
func(caller .uverse.address)AssertIsAdmin panics if the caller is not admin. Used for admin-only functions.
- OID
- 00d3a4…8c16:15
AssertIsAdmin details
AssertIsGovernance
func(caller .uverse.address)AssertIsGovernance panics if the caller is not governance. Used for governance-only functions.
- OID
- 00d3a4…8c16:16
AssertIsGovernance details
AssertIsGovStaker
func(caller .uverse.address)AssertIsGovStaker panics if the caller is not governance staker. Used for governance staking functions.
- OID
- 00d3a4…8c16:17
AssertIsGovStaker details
AssertIsRouter
func(caller .uverse.address)AssertIsRouter panics if the caller is not router. Used for router-only functions.
- OID
- 00d3a4…8c16:18
AssertIsRouter details
AssertIsPool
func(caller .uverse.address)AssertIsPool panics if the caller is not pool. Used for pool-only functions.
- OID
- 00d3a4…8c16:19
AssertIsPool details
AssertIsPosition
func(caller .uverse.address)AssertIsPosition panics if the caller is not position. Used for position-only functions.
- OID
- 00d3a4…8c16:20
AssertIsPosition details
AssertIsStaker
func(caller .uverse.address)AssertIsStaker panics if the caller is not staker. Used for staker-only functions.
- OID
- 00d3a4…8c16:21
AssertIsStaker details
AssertIsLaunchpad
func(caller .uverse.address)AssertIsLaunchpad panics if the caller is not launchpad. Used for launchpad-only functions.
- OID
- 00d3a4…8c16:22
AssertIsLaunchpad details
AssertIsEmission
func(caller .uverse.address)AssertIsEmission panics if the caller is not emission. Used for emission-only functions.
- OID
- 00d3a4…8c16:23
AssertIsEmission details
AssertIsProtocolFee
func(caller .uverse.address)AssertIsProtocolFee panics if the caller is not protocol fee. Used for protocol fee management functions.
- OID
- 00d3a4…8c16:24
AssertIsProtocolFee details
AssertIsGovXGNS
func(caller .uverse.address)AssertIsGovXGNS panics if the caller is not xGNS governance. Used for xGNS governance functions.
- OID
- 00d3a4…8c16:25
AssertIsGovXGNS details
AssertIsAuthorized
func(roleName string, caller .uverse.address)AssertIsAuthorized panics if the caller does not have the specified role. Also panics if the role does not exist.
- OID
- 00d3a4…8c16:26
AssertIsAuthorized details
AssertHasAnyRole
func(caller .uverse.address, roleNames []string)AssertHasAnyRole panics if the caller does not have any of the specified roles. Also panics if any of the roles do not exist.
- OID
- 00d3a4…8c16:27
AssertHasAnyRole details
AssertIsValidAddress
func(addr .uverse.address)AssertIsValidAddress panics if the provided address is invalid.
- OID
- 00d3a4…8c16:28
AssertIsValidAddress details
AssertIsUser
func(int, rlm .uverse.realm)AssertIsUser panics if the caller is not a user realm. Used to ensure calls come from user accounts, not other contracts.
- OID
- 00d3a4…8c16:29
AssertIsUser details
assertIsRBAC
func(caller .uverse.address)assertIsRBAC panics if the caller is not the RBAC contract. Used internally to protect role management functions.
- OID
- 00d3a4…8c16:30
assertIsRBAC details
errInvalidAddress
untyped stringValue
"invalid address for role %s: %s"
errRoleNotFound
untyped stringValue
"role %s not found"
errUnauthorized
untyped stringValue
"unauthorized: caller %s is not %s"
errUnauthorizedAdminOrGov
untyped stringValue
"unauthorized: caller %s is not admin or governance"
errUnauthorizedAnyRole
untyped stringValue
"unauthorized: caller %s is not any of the roles %v"
errUnauthorizedRBAC
untyped stringValue
"unauthorized: caller %s is not rbac"
errInvalidAddressShort
untyped stringValue
"invalid address: %s"
errCallerNotUser
untyped stringValue
"caller is not user"