Skip to content

Latest commit

 

History

History
123 lines (86 loc) · 2.83 KB

CustomAdmin.md

File metadata and controls

123 lines (86 loc) · 2.83 KB

This contract enables to create multiple contract administrators. (CustomAdmin.sol)

contract CustomAdmin is Ownable

CustomAdmin

Contract Members

Constants & Variables

mapping(address => bool) public admins;

Events

event AdminAdded(address indexed _address);
event AdminRemoved(address indexed _address);

Modifiers

onlyAdmin

Validates if the sender is actually an administrator.

modifier onlyAdmin() internal

Arguments

Name Type Description

Functions

addAdmin

Adds the specified address to the list of administrators.

function addAdmin(address _address) external onlyAdmin

Arguments

Name Type Description
_address address The address to add to the administrator list.

addManyAdmins

Adds multiple addresses to the administrator list.

function addManyAdmins(address[] _accounts) external onlyAdmin

Arguments

Name Type Description
_accounts address[] The wallet addresses to add to the administrator list.

removeAdmin

Removes the specified address from the list of administrators.

function removeAdmin(address _address) external onlyAdmin

Arguments

Name Type Description
_address address The address to remove from the administrator list.

removeManyAdmins

Removes multiple addresses to the administrator list.

function removeManyAdmins(address[] _accounts) external onlyAdmin

Arguments

Name Type Description
_accounts address[] The wallet addresses to remove from the administrator list.

Contracts