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

rbac source realm

Variables 1

var EMISSION_ADDR, POOL_ADDR, POSITION_ADDR, ROUTER_ADDR, STAKER_ADDR, PROTOCOL_FEE_ADDR, COMMUNITY_POOL_ADDR, GOV_GOVERNANCE_ADDR, GOV_STAKER_ADDR, GOV_XGNS_ADDR, LAUNCHPAD_ADDR

 1var (
 2	EMISSION_ADDR       = chain.PackageAddress("gno.land/r/gnoswap/emission")
 3	POOL_ADDR           = chain.PackageAddress("gno.land/r/gnoswap/pool")
 4	POSITION_ADDR       = chain.PackageAddress("gno.land/r/gnoswap/position")
 5	ROUTER_ADDR         = chain.PackageAddress("gno.land/r/gnoswap/router")
 6	STAKER_ADDR         = chain.PackageAddress("gno.land/r/gnoswap/staker")
 7	PROTOCOL_FEE_ADDR   = chain.PackageAddress("gno.land/r/gnoswap/protocol_fee")
 8	COMMUNITY_POOL_ADDR = chain.PackageAddress("gno.land/r/gnoswap/community_pool")
 9	GOV_GOVERNANCE_ADDR = chain.PackageAddress("gno.land/r/gnoswap/gov/governance")
10	GOV_STAKER_ADDR     = chain.PackageAddress("gno.land/r/gnoswap/gov/staker")
11	GOV_XGNS_ADDR       = chain.PackageAddress("gno.land/r/gnoswap/gov/xgns")
12	LAUNCHPAD_ADDR      = chain.PackageAddress("gno.land/r/gnoswap/launchpad")
13)
source

Derived package addresses — computed deterministically from deployment paths so they stay correct if packages are renamed or re-deployed.

Functions 7

func AcceptOwnership

crossing Action
1func AcceptOwnership(cur realm)
source

AcceptOwnership completes the ownership transfer process. Only callable by pending owner.

func IsOwner

Action
1func IsOwner(addr address) bool
source

IsOwner returns true if addr is the current owner.

func RegisterRole

crossing Action
1func RegisterRole(cur realm, roleName string, roleAddress address)
source

RegisterRole registers a new role in the RBAC system.

Parameters:

  • roleName: name of the role to register
  • roleAddress: address to assign to the role

Only callable by admin or governance.

func RemoveRole

crossing Action
1func RemoveRole(cur realm, roleName string)
source

RemoveRole removes a role from the RBAC system.

Parameters:

  • roleName: name of the role to remove

Only callable by admin or governance.

func TransferOwnership

crossing Action
1func TransferOwnership(cur realm, addr address)
source

TransferOwnership initiates the ownership transfer process.

Parameters:

  • addr: address to transfer ownership to

Only callable by current owner.

func UpdateRoleAddress

crossing Action
1func UpdateRoleAddress(cur realm, roleName string, addr address)
source

UpdateRoleAddress updates the address assigned to a role.

Parameters:

  • roleName: name of the role
  • addr: new address for the role

Only callable by admin or governance.

Imports 5

Source Files 7