LogoLogo
  • Core contracts
    • CMPVault
    • Oracle
      • FAQ
  • Pheriphery contracts
    • Operatable
      • PermissionControl
  • Deployments
    • Ethereum Mainnet
  • User Documentation
Powered by GitBook
On this page
  • Initialization
  • constructor
  • Write Methods
  • setOperator
  • View Methods
  • operators
  • Modifiers
  • onlyOperators
  • Events
  • OperatorChanged
  • Errors
  • NotAllowedOperator
  1. Pheriphery contracts

Operatable

PreviousFAQNextPermissionControl

Last updated 1 year ago

Extends

Initialization

constructor

constructor()

Description

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

Write Methods

setOperator

function setOperator(address operator, bool status) external onlyOwner

Description

Allows owner to add/remove operators.

Parameters

Name
Type
Description

operator

address

The operator's address.

status

bool

The status to set to operator.

Emits

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

Events

OperatorChanged

event OperatorChanged(address indexed, bool)

Parameters

Name
Type
Index?

operator

address

Yes

status

bool

No

Errors

NotAllowedOperator

error NotAllowedOperator()

BoringOwnable
operators
OperatorChanged
NotAllowedOperator