Skip to main content

Governance.sol

Git Source

State Variables

governance

Address that owns the smart contract.

address public governance;

Functions

onlyGovernance

modifier onlyGovernance();

_checkGovernance

Checks if the msg sender is the governance.

function _checkGovernance() internal view virtual;

constructor

constructor(address _governance);

transferGovernance

Sets a new address as the governance of the contract.

Throws if the caller is not current governance.

function transferGovernance(address _newGovernance) external virtual onlyGovernance;

Parameters

NameTypeDescription
_newGovernanceaddressThe new governance address.

Events

GovernanceTransferred

Emitted when the governance address is updated.

event GovernanceTransferred(address indexed previousGovernance, address indexed newGovernance);