LensGovernable

Git Source

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

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 override onlyGov;

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 override;

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.

setTreasury

Sets the treasury address.

function setTreasury(address newTreasury) external override onlyGov;

Parameters

NameTypeDescription
newTreasuryaddressThe new treasury address to set.

setTreasuryFee

Sets the treasury fee.

function setTreasuryFee(uint16 newTreasuryFee) external override onlyGov;

Parameters

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

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

getGovernance

EXTERNAL VIEW FUNCTIONS ///

function getGovernance() external view override returns (address);

Returns

NameTypeDescription
<none>addressaddress The address of the currently configured governance.

getState

Returns the current protocol state.

function getState() external view override returns (Types.ProtocolState);

Returns

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

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 override returns (address);

Returns

NameTypeDescription
<none>addressaddress The treasury address.

getTreasuryFee

Returns the treasury fee.

function getTreasuryFee() external view override 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 override returns (address, uint16);

Returns

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