Subject Type Validator
UNDEFINED_SUBJECT
SCANNER_SUBJECT
AGENT_SUBJECT
SCANNER_POOL_SUBJECT
DELEGATOR_SCANNER_POOL_SUBJECT
SubjectTypeValidator
Defines the types of staking Subject Types, their agency and relationships. There are different types of subject type agency: - MANAGED --> Cannot be staked on directly, allocation of stake is controlled by their manager, a DELEGATED type - DIRECT --> Can be staked on by multiple different stakers - DELEGATED --> Can be staked on by the owner of the relevant Registry entry. Manages MANAGED subjects. - DELEGATOR --> TBD
The current Subject Types and their Agency: - SCANNER_SUBJECT --> MANAGED - AGENT_SUBJECT (detection bots) --> DIRECT - SCANNER_POOL_SUBJECT --> DELEGATED
InvalidSubjectType
ForbiddenForType
error ForbiddenForType(uint8 subjectType, enum SubjectTypeValidator.SubjectStakeAgency provided, enum SubjectTypeValidator.SubjectStakeAgency expected)
onlyValidSubjectType
check if subjectType
belongs to the defined SUBJECT_TYPES
Name | Type | Description |
---|---|---|
subjectType | uint8 | is not an enum because some contracts using subjectTypes are not upgradeable (StakingEscrow) |
onlyAgencyType
notAgencyType
getSubjectTypeAgency
function getSubjectTypeAgency(uint8 subjectType) public pure returns (enum SubjectTypeValidator.SubjectStakeAgency)