Operatable

Extends

BoringOwnable

Initialization

constructor

constructor()

Description

Initializes a new Operatable instance (adding msg.sender to operators).

Write Methods

setOperator

function setOperator(address operator, bool status) external onlyOwner

Description

Allows owner to add/remove operators.

Parameters

NameTypeDescription

operator

address

The operator's address.

status

bool

The status to set to operator.

Emits

OperatorChanged

View Methods

operators

mapping(address => bool) public operators;

Description

Maps each active operator's address to true.

Modifiers

onlyOperators

modifier onlyOperators()

Description

Checks if msg.sender is an operator.

Throws

NotAllowedOperator

Events

OperatorChanged

event OperatorChanged(address indexed, bool)

Parameters

NameTypeIndex?

operator

address

Yes

status

bool

No

Errors

NotAllowedOperator

error NotAllowedOperator()

Last updated