Skip to content

Latest commit

 

History

History
293 lines (260 loc) · 9.52 KB

AdminRole.md

File metadata and controls

293 lines (260 loc) · 9.52 KB

AdminRole.sol

View Source: contracts/utils/AdminRole.sol

↗ Extends: Ownable ↘ Derived Contracts: GenericTokenSender, LiquidityMiningStorage, VestingCreator, VestingRegistryStorage

AdminRole contract

Contract Members

Constants & Variables

mapping(address => bool) public admins;

Events

event AdminAdded(address  admin);
event AdminRemoved(address  admin);

Modifiers

onlyAuthorized

Throws if called by any account other than the owner or admin. or on our own overriding sovrynOwnable.

modifier onlyAuthorized() internal

Functions


addAdmin

Add account to ACL.

function addAdmin(address _admin) public nonpayable onlyOwner 

Arguments

Name Type Description
_admin address The addresses of the account to grant permissions.
Source Code
function addAdmin(address _admin) public onlyOwner {
        admins[_admin] = true;
        emit AdminAdded(_admin);
    }

removeAdmin

Remove account from ACL.

function removeAdmin(address _admin) public nonpayable onlyOwner 

Arguments

Name Type Description
_admin address The addresses of the account to revoke permissions.
Source Code
function removeAdmin(address _admin) public onlyOwner {
        admins[_admin] = false;
        emit AdminRemoved(_admin);
    }

Contracts