ILensGovernable
Author: Lens Protocol
This is the interface for the Lens Protocol main governance functions.
Functions
setGovernance
Sets the privileged governance role.
function setGovernance(address newGovernance) external;
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;
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;
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. |
whitelistProfileCreator
Adds or removes a profile creator from the whitelist.
function whitelistProfileCreator(address profileCreator, bool whitelist) external;
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. |
setTreasury
Sets the treasury address.
function setTreasury(address newTreasury) external;
Parameters
Name | Type | Description |
---|---|---|
newTreasury | address | The new treasury address to set. |
setTreasuryFee
Sets the treasury fee.
function setTreasuryFee(uint16 newTreasuryFee) external;
Parameters
Name | Type | Description |
---|---|---|
newTreasuryFee | uint16 | The new treasury fee to set. |
getGovernance
Returns the currently configured governance address.
function getGovernance() external view returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | address The address of the currently configured governance. |
getState
Gets the state currently set in the protocol. It could be a global pause, a publishing pause or an unpaused state.
function getState() external view returns (Types.ProtocolState);
Returns
Name | Type | Description |
---|---|---|
<none> | Types.ProtocolState | Types.ProtocolState The state currently set in the protocol. |
isProfileCreatorWhitelisted
Returns whether or not a profile creator is whitelisted.
function isProfileCreatorWhitelisted(address profileCreator) external view 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 returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | address The treasury address. |
getTreasuryFee
Returns the treasury fee.
function getTreasuryFee() external view 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 returns (address, uint16);
Returns
Name | Type | Description |
---|---|---|
<none> | address | tuple First, the treasury address, second, the treasury fee. |
<none> | uint16 |