rolemanagement

class RoleManagement

Bases: object

A class used to represent the RoleManagement native contract.

Check out Neo’s Documentation to learn more about the RoleManagement class.

hash: UInt160
classmethod get_designated_by_role(role: Role, index: int) ECPoint

Gets the list of nodes for the specified role.

>>> RoleManagement.get_designated_by_role(Role.ORACLE, 0)
[]
Parameters:
  • role (Role) – the type of the role

  • index (int) – the index of the block to be queried

Returns:

the public keys of the nodes

Return type:

ECPoint

class Role(value)

Bases: IntFlag

Represents the roles in the NEO system. They are the permission types of the native contract RoleManagement.

STATE_VALIDATOR

The validators of state. Used to generate and sign the state root.

ORACLE

The nodes used to process Oracle requests.

NEO_FS_ALPHABET_NODE

NeoFS Alphabet nodes.