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’s 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.