Skip to main content

BeaconController

Git Source

Inherits: IBeaconController, AccessControl

State Variables​

ADMIN_ROLE​

bytes32 public constant ADMIN_ROLE = AccessControl.DEFAULT_ADMIN_ROLE;

MULTISIG_ROLE​

bytes32 public constant MULTISIG_ROLE = keccak256('MULTISIG_ROLE');

ADMIN_OR_MULTISIG_ROLE​

bytes32 public constant ADMIN_OR_MULTISIG_ROLE = keccak256('ADMIN_OR_MULTISIG_ROLE');

upgradeableBeacon​

UpgradeableBeacon public immutable upgradeableBeacon;

_allowedIndex​

mapping(address => uint256) private _allowedIndex;

_allowedList​

address[] private _allowedList;

Functions​

constructor​

constructor(address timelock, address multisig, address initialImpl, address[] memory initialAllowed);

upgradeTo​

function upgradeTo(
address implementation
) external onlyRole(ADMIN_ROLE);

upgradeToAllowed​

function upgradeToAllowed(
address impl
) external onlyRole(MULTISIG_ROLE);

allowedList​

function allowedList() external view returns (address[] memory);

isAllowed​

function isAllowed(
address impl
) public view returns (bool);

addToAllowedList​

function addToAllowedList(
address implementation
) external onlyRole(ADMIN_ROLE);

removeFromAllowedList​

function removeFromAllowedList(
address implementation
) external onlyRole(ADMIN_OR_MULTISIG_ROLE);

_addToAllowedList​

function _addToAllowedList(
address impl
) private;

_removeFromAllowedList​

function _removeFromAllowedList(
address impl
) private;

Events​

AllowedAdded​

event AllowedAdded(address indexed implementation, address indexed by);

AllowedRemoved​

event AllowedRemoved(address indexed implementation, address indexed by);

Errors​

ZERO_ADDRESS​

error ZERO_ADDRESS();

NOT_ALLOWED​

error NOT_ALLOWED();

ALREADY_ALLOWED​

error ALREADY_ALLOWED();