IGovernable

Git Source

Contract module that provides a basic access control mechanism, with a governor that can be granted exclusive access to specific functions. The inheriting contract must set the initial governor in the constructor.

Functions

governor

The address of the governor account or contract.

function governor() external view returns (address governor_);

transferGovernor

Transfers the contract governor to a new address.

Notes:

  • Does not revert if the governor is the same.

  • This function can potentially leave the contract without an governor, thereby removing any functionality that is only available to the governor.

Requirements:

  • msg.sender must be the contract governor.

function transferGovernor(address newGovernor) external;

Parameters

Events

TransferGovernor

Emitted when the governor is transferred.

event TransferGovernor(address indexed oldGovernor, address indexed newGovernor);

Parameters

Last updated