LensGovernable
Inherits: ILensGovernable
Functions
onlyGov
This modifier reverts if the caller is not the configured governance address.
modifier onlyGov();
setGovernance
GOV FUNCTIONS ///
function setGovernance(address newGovernance) external override onlyGov;
Parameters
Name | Type | Description |
---|---|---|
newGovernance | address | The new governance address to set. |
setEmergencyAdmin
Sets the emergency admin, which is a permissioned role able to set the protocol state.
function setEmergencyAdmin(address newEmergencyAdmin) external override onlyGov;
Parameters
Name | Type | Description |
---|---|---|
newEmergencyAdmin | address | The new emergency admin address to set. |
setState
Sets the protocol state to either a global pause, a publishing pause or an unpaused state.
function setState(Types.ProtocolState newState) external override;
Parameters
Name | Type | Description |
---|---|---|
newState | Types.ProtocolState | The state to set. It can be one of the following: - Unpaused: The protocol is fully operational. - PublishingPaused: The protocol is paused for publishing, but it is still operational for others operations. - Paused: The protocol is paused for all operations. |
setTreasury
Sets the treasury address.
function setTreasury(address newTreasury) external override onlyGov;
Parameters
Name | Type | Description |
---|---|---|
newTreasury | address | The new treasury address to set. |
setTreasuryFee
Sets the treasury fee.
function setTreasuryFee(uint16 newTreasuryFee) external override onlyGov;
Parameters
Name | Type | Description |
---|---|---|
newTreasuryFee | uint16 | The new treasury fee to set. |
whitelistProfileCreator
Adds or removes a profile creator from the whitelist.
function whitelistProfileCreator(address profileCreator, bool whitelist) external override onlyGov;
Parameters
Name | Type | Description |
---|---|---|
profileCreator | address | The profile creator address to add or remove from the whitelist. |
whitelist | bool | Whether or not the profile creator should be whitelisted. |
getGovernance
EXTERNAL VIEW FUNCTIONS ///
function getGovernance() external view override returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | address The address of the currently configured governance. |
getState
Returns the current protocol state.
function getState() external view override returns (Types.ProtocolState);
Returns
Name | Type | Description |
---|---|---|
<none> | Types.ProtocolState | ProtocolState The Protocol state, an enum, where: 0: Unpaused 1: PublishingPaused 2: Paused |
isProfileCreatorWhitelisted
Returns whether or not a profile creator is whitelisted.
function isProfileCreatorWhitelisted(address profileCreator) external view override returns (bool);
Parameters
Name | Type | Description |
---|---|---|
profileCreator | address | The address of the profile creator to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | bool True if the profile creator is whitelisted, false otherwise. |
getTreasury
Returns the treasury address.
function getTreasury() external view override returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | address The treasury address. |
getTreasuryFee
Returns the treasury fee.
function getTreasuryFee() external view override returns (uint16);
Returns
Name | Type | Description |
---|---|---|
<none> | uint16 | uint16 The treasury fee. |
getTreasuryData
Returns the treasury address and treasury fee in a single call.
function getTreasuryData() external view override returns (address, uint16);
Returns
Name | Type | Description |
---|---|---|
<none> | address | tuple First, the treasury address, second, the treasury fee. |
<none> | uint16 |