Skip to content

NicoAcosta/admins-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiple admins contract

Inherits from @OpenZeppelin's Ownable contract.

run npm install

Modifier

onlyAdmins

Reverts if sender is not an admin.

Events

NewAdmin

event NewAdmin(address indexed _sender, address indexed _newAdmin)

AdminRemoval

event AdminRemoval(address indexed _sender, address indexed _removedAdmin)

Constructor

Sets sender as admin.

External functions

addAdmin

function addAdmin(address newAdmin) external onlyOwner

addAdmins

function addAdmins(address[] memory newAdmins) external onlyOwner

removeAdmin

function removeAdmin(address admin) external onlyOwner

isAdmin (sender)

function isAdmin() external view returns (bool)

isAdminAddress

function isAdminAddress(address someAddress) external view onlyAdmins returns (bool)