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

access state

Back to all declarations

roleAddresses

map[string].uverse.address
Open
OID
00d3a4…8c16:32
roleAddresses details

Inspect map

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.

Open
OID
00d3a4…8c16: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
00d3a4…8c16:7
setRoleAddress details

Inspect func

RemoveRole

func(roleName string)

RemoveRole removes a role from the system. Parameters: - roleName: name of the role to remove Only callable by RBAC contract.

Open
OID
00d3a4…8c16:8
RemoveRole details

Inspect func

IsAuthorized

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

IsAuthorized checks if caller has the specified role. Parameters: - role: role name to check - caller: address to verify Returns true if authorized, false otherwise.

Open
OID
00d3a4…8c16:9
IsAuthorized details

Inspect func

GetAddress

func(role string) (.uverse.address, bool)
Open
OID
00d3a4…8c16:10
GetAddress details

Inspect func

GetRoleAddresses

func() map[string].uverse.address

GetRoleAddresses returns a copy of all role addresses.

Open
OID
00d3a4…8c16:11
GetRoleAddresses details

Inspect func

MustGetAddress

func(role string) .uverse.address
Open
OID
00d3a4…8c16: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"

AssertIsAdminOrGovernance

func(caller .uverse.address)

AssertIsAdminOrGovernance panics if the caller is not admin or governance. Used for functions that require elevated privileges.

Open
OID
00d3a4…8c16:13
AssertIsAdminOrGovernance details

Inspect func

AssertIsAdmin

func(caller .uverse.address)

AssertIsAdmin panics if the caller is not admin. Used for admin-only functions.

Open
OID
00d3a4…8c16:15
AssertIsAdmin details

Inspect func

AssertIsGovernance

func(caller .uverse.address)

AssertIsGovernance panics if the caller is not governance. Used for governance-only functions.

Open
OID
00d3a4…8c16:16
AssertIsGovernance details

Inspect func

AssertIsGovStaker

func(caller .uverse.address)

AssertIsGovStaker panics if the caller is not governance staker. Used for governance staking functions.

Open
OID
00d3a4…8c16:17
AssertIsGovStaker details

Inspect func

AssertIsRouter

func(caller .uverse.address)

AssertIsRouter panics if the caller is not router. Used for router-only functions.

Open
OID
00d3a4…8c16:18
AssertIsRouter details

Inspect func

AssertIsPool

func(caller .uverse.address)

AssertIsPool panics if the caller is not pool. Used for pool-only functions.

Open
OID
00d3a4…8c16:19
AssertIsPool details

Inspect func

AssertIsPosition

func(caller .uverse.address)

AssertIsPosition panics if the caller is not position. Used for position-only functions.

Open
OID
00d3a4…8c16:20
AssertIsPosition details

Inspect func

AssertIsStaker

func(caller .uverse.address)

AssertIsStaker panics if the caller is not staker. Used for staker-only functions.

Open
OID
00d3a4…8c16:21
AssertIsStaker details

Inspect func

AssertIsLaunchpad

func(caller .uverse.address)

AssertIsLaunchpad panics if the caller is not launchpad. Used for launchpad-only functions.

Open
OID
00d3a4…8c16:22
AssertIsLaunchpad details

Inspect func

AssertIsEmission

func(caller .uverse.address)

AssertIsEmission panics if the caller is not emission. Used for emission-only functions.

Open
OID
00d3a4…8c16:23
AssertIsEmission details

Inspect func

AssertIsProtocolFee

func(caller .uverse.address)

AssertIsProtocolFee panics if the caller is not protocol fee. Used for protocol fee management functions.

Open
OID
00d3a4…8c16:24
AssertIsProtocolFee details

Inspect func

AssertIsGovXGNS

func(caller .uverse.address)

AssertIsGovXGNS panics if the caller is not xGNS governance. Used for xGNS governance functions.

Open
OID
00d3a4…8c16:25
AssertIsGovXGNS details

Inspect func

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.

Open
OID
00d3a4…8c16:26
AssertIsAuthorized details

Inspect func

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.

Open
OID
00d3a4…8c16:27
AssertHasAnyRole details

Inspect func

AssertIsValidAddress

func(addr .uverse.address)

AssertIsValidAddress panics if the provided address is invalid.

Open
OID
00d3a4…8c16:28
AssertIsValidAddress details

Inspect func

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.

Open
OID
00d3a4…8c16:29
AssertIsUser 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
00d3a4…8c16:30
assertIsRBAC details

Inspect func

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"

errCallerNotUser

untyped string

Value

"caller is not user"
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"
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
AssertIsUser : func(int, rlm .uverse.realm) Inspect
assertIsRBAC : func(caller .uverse.address) Inspect
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"
errCallerNotUser : untyped string ="caller is not user"