packages.valory.skills.abstract_round_abci.behaviours
This module contains the behaviours for the 'abstract_round_abci' skill.
_MetaRoundBehaviour Objects
class _MetaRoundBehaviour(ABCMeta)
A metaclass that validates AbstractRoundBehaviour's attributes.
__new__
def __new__(mcs, name: str, bases: Tuple, namespace: Dict,
**kwargs: Any) -> Type
Initialize the class.
PendingOffencesBehaviour Objects
class PendingOffencesBehaviour(BaseBehaviour)
A behaviour responsible for checking whether there are any pending offences.
round_sequence
@property
def round_sequence() -> RoundSequence
Get the round sequence from the shared state.
pending_offences
@property
def pending_offences() -> Set[PendingOffense]
Get the pending offences from the round sequence.
has_pending_offences
def has_pending_offences() -> bool
Check if there are any pending offences.
async_act
def async_act() -> Generator
Checks the pending offences.
This behaviour simply checks if the set of pending offences is not empty. When it is not empty, it pops the offence from the set, and sends it to the rest of the agents via a payload
Returns:
None
AbstractRoundBehaviour Objects
class AbstractRoundBehaviour( # pylint: disable=too-many-instance-attributes
Behaviour,
ABC,
Generic[EventType],
metaclass=_MetaRoundBehaviour)
This behaviour implements an abstract round behaviour.
background_behaviours_cls
type: ignore
__init__
def __init__(**kwargs: Any) -> None
Initialize the behaviour.
instantiate_behaviour_cls
def instantiate_behaviour_cls(behaviour_cls: BehaviourType) -> BaseBehaviour
Instantiate the behaviours class.
setup
def setup() -> None
Set up the behaviours.
teardown
def teardown() -> None
Tear down the behaviour
act
def act() -> None
Implement the behaviour.