Skip to main content

IActivistRules

IActivistRules

Interface for the ActivistRules contract.

addRegeneratorLevel

function addRegeneratorLevel(address regenerator, uint256 totalInspections) external

Adds a level Activist when invited user completes 3 totalInspections.

Called by InspectionRules after a Inspector completes/realize a inspection.

Parameters

NameTypeDescription
regeneratoraddressThe address of the Regenerator receiving the inspection.
totalInspectionsuint256The new regenerator totalInspections.

addInspectorLevel

function addInspectorLevel(address inspector, uint256 totalInspections) external

Adds a level Activist when invited user completes 3 totalInspections.

Called by InspectionRules after a Inspector completes/realize a inspection.

Parameters

NameTypeDescription
inspectoraddressThe address of the Inspector realizing the inspection.
totalInspectionsuint256The new inspector totalInspections.

canSendInvite

function canSendInvite(address account) external view returns (bool)

Checks if an activist is currently eligible to send an invitation.

Parameters

NameTypeDescription
accountaddressThe address of the activist account to check.

Return Values

NameTypeDescription
[0]booltrue if the activist can send an invite, false otherwise.

poolCurrentEra

function poolCurrentEra() external view returns (uint256)

Returns the current era of the related pool.

Return Values

NameTypeDescription
[0]uint256The current era number.

removePoolLevels

function removePoolLevels(address activist) external

Removes a specified level from a activist's pool configuration.

As specified, this function does not return a value.

Parameters

NameTypeDescription
activistaddressThe address of the activist.

getActivist

function getActivist(address account) external view returns (struct Activist)

Retrieves the full Activist struct for a given account.

Parameters

NameTypeDescription
accountaddressThe address of the activist.

Return Values

NameTypeDescription
[0]struct ActivistThe Activist struct containing the user's data.

totalActiveLevels

function totalActiveLevels() external view returns (uint256)

Returns the number of approved invites from non-denied users.

Return Values

NameTypeDescription
[0]uint256The total count of totalActiveLevels.