Skip to main content

RolesAdmin

The RolesAdmin Policy grants and revokes Roles in the ROLES module.

Methods

ROLES

function ROLES() external view returns (contract ROLESv1)

Returns

NameTypeDescription
_0contract ROLESv1undefined

admin

function admin() external view returns (address)

Special role that is responsible for assigning policy-defined roles to addresses.

Returns

NameTypeDescription
_0addressundefined

changeKernel

function changeKernel(contract Kernel newKernel_) external nonpayable

Function used by kernel when migrating to a new kernel.

Parameters

NameTypeDescription
newKernel_contract Kernelundefined

configureDependencies

function configureDependencies() external nonpayable returns (Keycode[] dependencies)

Define module dependencies for this policy.

Returns

NameTypeDescription
dependenciesKeycode[]- Keycode array of module dependencies.

grantRole

function grantRole(bytes32 role_, address wallet_) external nonpayable

Parameters

NameTypeDescription
role_bytes32undefined
wallet_addressundefined

isActive

function isActive() external view returns (bool)

Easily accessible indicator for if a policy is activated or not.

Returns

NameTypeDescription
_0boolundefined

kernel

function kernel() external view returns (contract Kernel)

Returns

NameTypeDescription
_0contract Kernelundefined

newAdmin

function newAdmin() external view returns (address)

Proposed new admin. Address must call pullRolesAdmin to become the new roles admin.

Returns

NameTypeDescription
_0addressundefined

pullNewAdmin

function pullNewAdmin() external nonpayable

pushNewAdmin

function pushNewAdmin(address newAdmin_) external nonpayable

Parameters

NameTypeDescription
newAdmin_addressundefined

requestPermissions

function requestPermissions() external view returns (struct Permissions[] requests)

Function called by kernel to set module function permissions.

Returns

NameTypeDescription
requestsPermissions[]- Array of keycodes and function selectors for requested permissions.

revokeRole

function revokeRole(bytes32 role_, address wallet_) external nonpayable

Parameters

NameTypeDescription
role_bytes32undefined
wallet_addressundefined

Events

NewAdminPulled

event NewAdminPulled(address indexed newAdmin_)

Parameters

NameTypeDescription
newAdmin_ indexedaddressundefined

NewAdminPushed

event NewAdminPushed(address indexed newAdmin_)

Parameters

NameTypeDescription
newAdmin_ indexedaddressundefined

Errors

KernelAdapter_OnlyKernel

error KernelAdapter_OnlyKernel(address caller_)

Parameters

NameTypeDescription
caller_addressundefined

OnlyAdmin

error OnlyAdmin()

OnlyNewAdmin

error OnlyNewAdmin()

Policy_ModuleDoesNotExist

error Policy_ModuleDoesNotExist(Keycode keycode_)

Parameters

NameTypeDescription
keycode_Keycodeundefined