Stake Subject Gateway
StakeSubjectGateway
Formerly FortaStakingParameters.
This contract manages the relationship between the staking contracts and the several affected staking subjects, who hold the responsibility of defining staking thresholds, managed subjects, and related particularities.
NonIDelegatedSubjectHandler
version
setStakeSubject
Sets stake subject for subject type.
unsetStakeSubject
getStakeSubject
maxStakeFor
Get max stake for that subjectType
and subject
Name | Type | Description |
---|---|---|
[0] | uint256 | if subject is DIRECT, returns stakeThreshold.max, if not MAX_UINT. If subject not set, it will return 0. |
minStakeFor
Get min stake for that subjectType
and subject
Name | Type | Description |
---|---|---|
[0] | uint256 | if subject is DIRECT, returns stakeThreshold.min, if not 0. If subject not set, it will return MAX_UINT. |
maxManagedStakeFor
minManagedStakeFor
totalManagedSubjects
isStakeActivatedFor
Get if staking is activated for that subjectType
and subject
. If not set, will return false.
activeStakeFor
Gets active stake (amount of staked tokens) on subject
id for subjectType
totalStakeFor
Gets active and inactive stake (amount of staked tokens) on subject
id for subjectType
isRegistered
Checks if subject, subjectType is registered
canManageAllocation
function canManageAllocation(uint8 subjectType, uint256 subject, address allocator) external view returns (bool)
Returns true if allocator owns the subject, or is the subject contract itself