ILensGovernable

Git Source

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

NameTypeDescription
newGovernanceaddressThe 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

NameTypeDescription
newEmergencyAdminaddressThe 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

NameTypeDescription
newStateTypes.ProtocolStateThe 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

NameTypeDescription
profileCreatoraddressThe profile creator address to add or remove from the whitelist.
whitelistboolWhether or not the profile creator should be whitelisted.

setTreasury

Sets the treasury address.

function setTreasury(address newTreasury) external;

Parameters

NameTypeDescription
newTreasuryaddressThe new treasury address to set.

setTreasuryFee

Sets the treasury fee.

function setTreasuryFee(uint16 newTreasuryFee) external;

Parameters

NameTypeDescription
newTreasuryFeeuint16The new treasury fee to set.

getGovernance

Returns the currently configured governance address.

function getGovernance() external view returns (address);

Returns

NameTypeDescription
<none>addressaddress 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

NameTypeDescription
<none>Types.ProtocolStateTypes.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

NameTypeDescription
profileCreatoraddressThe address of the profile creator to check.

Returns

NameTypeDescription
<none>boolbool True if the profile creator is whitelisted, false otherwise.

getTreasury

Returns the treasury address.

function getTreasury() external view returns (address);

Returns

NameTypeDescription
<none>addressaddress The treasury address.

getTreasuryFee

Returns the treasury fee.

function getTreasuryFee() external view returns (uint16);

Returns

NameTypeDescription
<none>uint16uint16 The treasury fee.

getTreasuryData

Returns the treasury address and treasury fee in a single call.

function getTreasuryData() external view returns (address, uint16);

Returns

NameTypeDescription
<none>addresstuple First, the treasury address, second, the treasury fee.
<none>uint16