Skip to main content

IContributorRules

IContributorRules​

Interface for the ContributorRules contract, defining rules and conditions specific to Contributor users.

canSendInvite​

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

Checks if a contributor is currently eligible to send an invitation.

Parameters​

NameTypeDescription
accountaddressThe address of the contributor account to check.

Return Values​

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

getContributor​

function getContributor(address account) external view returns (struct Contributor)

Retrieves the full Contributor struct for a given account.

Parameters​

NameTypeDescription
accountaddressThe address of the contributor.

Return Values​

NameTypeDescription
[0]struct ContributorThe Contributor struct containing the user's data.

totalActiveLevels​

function totalActiveLevels() external view returns (uint256)

Returns the total number of activeLevels from non-denied users.

Return Values​

NameTypeDescription
[0]uint256The total count of totalActiveLevels.

addPenalty​

function addPenalty(address contributor, uint64 reportId) external returns (uint256)

Adds a penalty to a contributor and returns their new total penalty count.

Parameters​

NameTypeDescription
contributoraddressThe address of the contributor receiving the penalty.
reportIduint64The ID of the report related to the penalty.

Return Values​

NameTypeDescription
[0]uint256The new total number of penalties for the contributor.

maxPenalties​

function maxPenalties() external view returns (uint8)

Returns the maximum number of penalties a contributor can have before being denied.

Return Values​

NameTypeDescription
[0]uint8The maximum penalty count.

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 contributor) external

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

As specified, this function does not return a value.

Parameters​

NameTypeDescription
contributoraddressThe address of the contributor.