Skip to main content

IResearcherRules

IResearcherRules​

Interface for the voting-related query functionalities of the ResearcherRules contract.

getResearcher​

function getResearcher(address account) external view returns (struct Researcher)

Retrieves the full Researcher struct for a given account.

Parameters​

NameTypeDescription
accountaddressThe address of the researcher.

Return Values​

NameTypeDescription
[0]struct ResearcherThe Researcher struct containing the user's data.

getCalculatorItem​

function getCalculatorItem(uint64 id) external view returns (struct CalculatorItem)

Retrieves the full calculatorItem struct for a given id.

Parameters​

NameTypeDescription
iduint64The id of the calculatorItem.

Return Values​

NameTypeDescription
[0]struct CalculatorItemThe Calculator item struct containing the item'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 researcher, uint64 researchId) external returns (uint256)

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

Parameters​

NameTypeDescription
researcheraddressThe address of the researcher receiving the penalty.
researchIduint64The ID of the research item related to the penalty.

Return Values​

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

maxPenalties​

function maxPenalties() external view returns (uint8)

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

Return Values​

NameTypeDescription
[0]uint8The maximum penalty count as a uint8.

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

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

As specified, this function does not return a value and takes a single uint256 for the level.

Parameters​

NameTypeDescription
researcheraddressThe address of the researcher.

canSendInvite​

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

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

Parameters​

NameTypeDescription
accountaddressThe address of the researcher account to check.

Return Values​

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