roleAddresses
map[string].uverse.address- OID
- 0908dd…54bb:32
roleAddresses details
init.1
func()- OID
- 0908dd…54bb:4
init.1 details
SetRoleAddress
func(roleName string, roleAddress .uverse.address)SetRoleAddress sets or updates a role's address. It trims surrounding whitespace from roleName, creates missing roles, and replaces the address for an existing role. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm - roleName: role identifier; surrounding whitespace is ignored and an empty name panics - roleAddress: non-empty, valid address to associate with roleName Only callable by the RBAC contract.
- OID
- 0908dd…54bb:6
SetRoleAddress details
setRoleAddress
func(roleName string, roleAddress .uverse.address) .uverse.errorsetRoleAddress is the internal implementation of SetRoleAddress. Separated for testability.
- OID
- 0908dd…54bb:7
setRoleAddress details
RemoveRole
func(roleName string)RemoveRole removes a role from the system after trimming its name. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm - roleName: role identifier to trim and remove; an empty or unknown name panics Only callable by the RBAC contract.
- OID
- 0908dd…54bb:8
RemoveRole details
IsAuthorized
func(role string, caller .uverse.address) boolIsAuthorized reports whether caller is the address currently mapped to role. Parameters: - role: role name to trim and look up - caller: address to compare with the mapped role address Returns: - authorized: true when role exists and caller matches its address; false when the role is absent or does not match
- OID
- 0908dd…54bb:9
IsAuthorized details
GetAddress
func(role string) (.uverse.address, bool)- OID
- 0908dd…54bb:10
GetAddress details
GetRoleAddresses
func() map[string].uverse.addressGetRoleAddresses returns an independent map copy of all stored role addresses. Returns: - roleAddresses: map from normalized role names to their configured addresses
- OID
- 0908dd…54bb:11
GetRoleAddresses details
MustGetAddress
func(role string) .uverse.address- OID
- 0908dd…54bb: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/v1"
AssertIsRlmCurrent
func(int, rlm .uverse.realm)AssertIsRlmCurrent panics if the realm token is not the current crossing frame. Parameters: - \_: leading realm-call discriminator; callers pass 0 - rlm: realm context token that must represent the current crossing frame
- OID
- 0908dd…54bb:13
AssertIsRlmCurrent details
AssertIsAdminOrGovernance
func(caller .uverse.address)AssertIsAdminOrGovernance panics unless caller is the configured admin or governance address. Parameters: - caller: address whose authorization is checked against the admin and governance roles
- OID
- 0908dd…54bb:15
AssertIsAdminOrGovernance details
AssertIsAdmin
func(caller .uverse.address)AssertIsAdmin panics unless caller is the configured admin address. Parameters: - caller: address whose authorization is checked against the admin role
- OID
- 0908dd…54bb:16
AssertIsAdmin details
AssertIsGovernance
func(caller .uverse.address)AssertIsGovernance panics unless caller is the configured governance address. Parameters: - caller: address whose authorization is checked against the governance role
- OID
- 0908dd…54bb:17
AssertIsGovernance details
AssertIsGovStaker
func(caller .uverse.address)AssertIsGovStaker panics unless caller is the configured governance-staker address. Parameters: - caller: address whose authorization is checked against the governance-staker role
- OID
- 0908dd…54bb:18
AssertIsGovStaker details
AssertIsRouter
func(caller .uverse.address)AssertIsRouter panics unless caller is the configured router address. Parameters: - caller: address whose authorization is checked against the router role
- OID
- 0908dd…54bb:19
AssertIsRouter details
AssertIsPool
func(caller .uverse.address)AssertIsPool panics unless caller is the configured pool address. Parameters: - caller: address whose authorization is checked against the pool role
- OID
- 0908dd…54bb:20
AssertIsPool details
AssertIsPosition
func(caller .uverse.address)AssertIsPosition panics unless caller is the configured position address. Parameters: - caller: address whose authorization is checked against the position role
- OID
- 0908dd…54bb:21
AssertIsPosition details
AssertIsStaker
func(caller .uverse.address)AssertIsStaker panics unless caller is the configured staker address. Parameters: - caller: address whose authorization is checked against the staker role
- OID
- 0908dd…54bb:22
AssertIsStaker details
AssertIsLaunchpad
func(caller .uverse.address)AssertIsLaunchpad panics unless caller is the configured launchpad address. Parameters: - caller: address whose authorization is checked against the launchpad role
- OID
- 0908dd…54bb:23
AssertIsLaunchpad details
AssertIsEmission
func(caller .uverse.address)AssertIsEmission panics unless caller is the configured emission address. Parameters: - caller: address whose authorization is checked against the emission role
- OID
- 0908dd…54bb:24
AssertIsEmission details
AssertIsProtocolFee
func(caller .uverse.address)AssertIsProtocolFee panics unless caller is the configured protocol-fee address. Parameters: - caller: address whose authorization is checked against the protocol-fee role
- OID
- 0908dd…54bb:25
AssertIsProtocolFee details
AssertIsGovXGNS
func(caller .uverse.address)AssertIsGovXGNS panics unless caller is the configured xGNS governance address. Parameters: - caller: address whose authorization is checked against the xGNS governance role
- OID
- 0908dd…54bb:26
AssertIsGovXGNS details
AssertIsAuthorized
func(roleName string, caller .uverse.address)AssertIsAuthorized panics if caller does not have the specified role or if the role is absent. Parameters: - roleName: role identifier whose configured address is required - caller: address that must match the configured address for roleName
- OID
- 0908dd…54bb:27
AssertIsAuthorized details
AssertHasAnyRole
func(caller .uverse.address, roleNames []string)AssertHasAnyRole checks roleNames in order and panics unless caller matches one. It panics immediately if a checked role is absent, even if a later role might match. Parameters: - caller: address compared against each configured role address - roleNames: ordered role identifiers to check; each missing role causes a panic
- OID
- 0908dd…54bb:28
AssertHasAnyRole details
AssertIsValidAddress
func(addr .uverse.address)AssertIsValidAddress panics if addr is not a valid address. Parameters: - addr: address value to validate
- OID
- 0908dd…54bb:29
AssertIsValidAddress details
assertIsRBAC
func(caller .uverse.address)assertIsRBAC panics if the caller is not the RBAC contract. Used internally to protect role management functions.
- OID
- 0908dd…54bb:30
assertIsRBAC details
errSpoofedRealm
untyped stringValue
"rlm does not match the current crossing frame"
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"