Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v1 state

Back to all declarations

roleAddresses

map[string].uverse.address
Open
OID
0908dd…54bb:32
roleAddresses details

Inspect map

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.

Open
OID
0908dd…54bb:6
SetRoleAddress details

Inspect func

setRoleAddress

func(roleName string, roleAddress .uverse.address) .uverse.error

setRoleAddress is the internal implementation of SetRoleAddress. Separated for testability.

Open
OID
0908dd…54bb:7
setRoleAddress details

Inspect func

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.

Open
OID
0908dd…54bb:8
RemoveRole details

Inspect func

IsAuthorized

func(role string, caller .uverse.address) bool

IsAuthorized 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

Open
OID
0908dd…54bb:9
IsAuthorized details

Inspect func

GetAddress

func(role string) (.uverse.address, bool)
Open
OID
0908dd…54bb:10
GetAddress details

Inspect func

GetRoleAddresses

func() map[string].uverse.address

GetRoleAddresses returns an independent map copy of all stored role addresses. Returns: - roleAddresses: map from normalized role names to their configured addresses

Open
OID
0908dd…54bb:11
GetRoleAddresses details

Inspect func

MustGetAddress

func(role string) .uverse.address
Open
OID
0908dd…54bb:12
MustGetAddress details

Inspect func

rbacPackagePath

untyped string

rbacPackagePath 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

Open
OID
0908dd…54bb:13
AssertIsRlmCurrent details

Inspect func

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

Open
OID
0908dd…54bb:15
AssertIsAdminOrGovernance details

Inspect func

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

Open
OID
0908dd…54bb:16
AssertIsAdmin details

Inspect func

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

Open
OID
0908dd…54bb:17
AssertIsGovernance details

Inspect func

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

Open
OID
0908dd…54bb:18
AssertIsGovStaker details

Inspect func

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

Open
OID
0908dd…54bb:19
AssertIsRouter details

Inspect func

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

Open
OID
0908dd…54bb:20
AssertIsPool details

Inspect func

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

Open
OID
0908dd…54bb:21
AssertIsPosition details

Inspect func

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

Open
OID
0908dd…54bb:22
AssertIsStaker details

Inspect func

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

Open
OID
0908dd…54bb:23
AssertIsLaunchpad details

Inspect func

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

Open
OID
0908dd…54bb:24
AssertIsEmission details

Inspect func

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

Open
OID
0908dd…54bb:25
AssertIsProtocolFee details

Inspect func

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

Open
OID
0908dd…54bb:26
AssertIsGovXGNS details

Inspect func

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

Open
OID
0908dd…54bb:27
AssertIsAuthorized details

Inspect func

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

Open
OID
0908dd…54bb:28
AssertHasAnyRole details

Inspect func

AssertIsValidAddress

func(addr .uverse.address)

AssertIsValidAddress panics if addr is not a valid address. Parameters: - addr: address value to validate

Open
OID
0908dd…54bb:29
AssertIsValidAddress details

Inspect func

assertIsRBAC

func(caller .uverse.address)

assertIsRBAC panics if the caller is not the RBAC contract. Used internally to protect role management functions.

Open
OID
0908dd…54bb:30
assertIsRBAC details

Inspect func

errSpoofedRealm

untyped string

Value

"rlm does not match the current crossing frame"

errInvalidAddress

untyped string

Value

"invalid address for role %s: %s"

errRoleNotFound

untyped string

Value

"role %s not found"

errUnauthorized

untyped string

Value

"unauthorized: caller %s is not %s"

errUnauthorizedAdminOrGov

untyped string

Value

"unauthorized: caller %s is not admin or governance"

errUnauthorizedAnyRole

untyped string

Value

"unauthorized: caller %s is not any of the roles %v"

errUnauthorizedRBAC

untyped string

Value

"unauthorized: caller %s is not rbac"

errInvalidAddressShort

untyped string

Value

"invalid address: %s"
roleAddresses : map[string].uverse.address Inspect
init.1 : func() Inspect
SetRoleAddress : func(roleName string, roleAddress .uverse.address) Inspect
setRoleAddress : func(roleName string, roleAddress .uverse.address) .uverse.error Inspect
RemoveRole : func(roleName string) Inspect
IsAuthorized : func(role string, caller .uverse.address) bool Inspect
GetAddress : func(role string) (.uverse.address, bool) Inspect
GetRoleAddresses : func() map[string].uverse.address Inspect
MustGetAddress : func(role string) .uverse.address Inspect
rbacPackagePath : untyped string ="gno.land/r/gnoswap/rbac/v1"
AssertIsRlmCurrent : func(int, rlm .uverse.realm) Inspect
AssertIsAdminOrGovernance : func(caller .uverse.address) Inspect
AssertIsAdmin : func(caller .uverse.address) Inspect
AssertIsGovernance : func(caller .uverse.address) Inspect
AssertIsGovStaker : func(caller .uverse.address) Inspect
AssertIsRouter : func(caller .uverse.address) Inspect
AssertIsPool : func(caller .uverse.address) Inspect
AssertIsPosition : func(caller .uverse.address) Inspect
AssertIsStaker : func(caller .uverse.address) Inspect
AssertIsLaunchpad : func(caller .uverse.address) Inspect
AssertIsEmission : func(caller .uverse.address) Inspect
AssertIsProtocolFee : func(caller .uverse.address) Inspect
AssertIsGovXGNS : func(caller .uverse.address) Inspect
AssertIsAuthorized : func(roleName string, caller .uverse.address) Inspect
AssertHasAnyRole : func(caller .uverse.address, roleNames []string) Inspect
AssertIsValidAddress : func(addr .uverse.address) Inspect
assertIsRBAC : func(caller .uverse.address) Inspect
errSpoofedRealm : untyped string ="rlm does not match the current crossing frame"
errInvalidAddress : untyped string ="invalid address for role %s: %s"
errRoleNotFound : untyped string ="role %s not found"
errUnauthorized : untyped string ="unauthorized: caller %s is not %s"
errUnauthorizedAdminOrGov : untyped string ="unauthorized: caller %s is not admin or governance"
errUnauthorizedAnyRole : untyped string ="unauthorized: caller %s is not any of the roles %v"
errUnauthorizedRBAC : untyped string ="unauthorized: caller %s is not rbac"
errInvalidAddressShort : untyped string ="invalid address: %s"