Skip to main content

ConfigOperatorSingleStep

Git Source

Inherits: IConfigOperator

Title: Config Operator Single Step

Reusable single-step configuration-operator storage and rotation.

The operator starts unset. Implementations must explicitly override _authorizeSetConfigOperator to permit rotation; the default implementation denies every caller. An authorized rotation to the current operator, including an unset zero address, reverts with ConfigOperator_Unchanged. Product setters remain responsible for composing operator authority with any other accepted authority.

State Variables​

configOperator​

Returns the address allowed to execute delegated configuration changes.

address public override configOperator;

Returns

NameTypeDescription
<none>addressConfig operator, or zero when delegated access is revoked.

Functions​

setConfigOperator​

The zero address revokes delegated configuration access. Authorization is checked before rejecting an operator that is already configured.

Reverts if:

  • The authorization check of the implementation denies the caller or reverts.
  • The requested operator is the one already configured, which includes the zero address while no operator is set.
function setConfigOperator(address configOperator_) public virtual override;

Parameters

NameTypeDescription
configOperator_addressNew config operator address.

_authorizeSetConfigOperator​

Validates a caller before an immediate operator rotation or revocation.

Returns false by default. Implementations must explicitly override this hook to grant authority and may revert while applying lifecycle or role checks.

function _authorizeSetConfigOperator() internal view virtual returns (bool authorized);

Returns

NameTypeDescription
authorizedboolTrue when the caller may set the config operator.

_isConfigOperator​

Returns whether an account is the current non-zero config operator.

function _isConfigOperator(address account_) internal view returns (bool authorized);

Parameters

NameTypeDescription
account_addressAccount to check.

Returns

NameTypeDescription
authorizedboolTrue when account_ is the current non-zero config operator.