Skip to content

packages.valory.skills.abstract_abci.handlers

This module contains the handler for the 'abci' skill.

ABCIHandler Objects

class ABCIHandler(Handler)

Default ABCI handler.

This abstract skill provides a template of an ABCI application managed by an AEA. This abstract Handler replies to ABCI requests with default responses. In another skill, extend the class and override the request handlers to implement a custom behaviour.

setup

def setup() -> None

Set up the handler.

handle

def handle(message: Message) -> None

Handle the message.

Arguments:

  • message: the message.

teardown

def teardown() -> None

Teardown the handler.

log_exception

def log_exception(message: AbciMessage, error_message: str) -> None

Log a response exception.

echo

def echo(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_ECHO performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

info

def info(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_INFO performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

flush

def flush(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_FLUSH performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

set_option

def set_option(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_SET_OPTION performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

init_chain

def init_chain(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_INIT_CHAIN performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

query

def query(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_QUERY performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

check_tx

def check_tx(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_CHECK_TX performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

deliver_tx

def deliver_tx(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_DELIVER_TX performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

begin_block

def begin_block(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_BEGIN_BLOCK performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

end_block

def end_block(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_END_BLOCK performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

commit

def commit(message: AbciMessage, dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_COMMIT performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

list_snapshots

def list_snapshots(message: AbciMessage,
                   dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_LIST_SNAPSHOT performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

offer_snapshot

def offer_snapshot(message: AbciMessage,
                   dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_OFFER_SNAPSHOT performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

load_snapshot_chunk

def load_snapshot_chunk(message: AbciMessage,
                        dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_LOAD_SNAPSHOT_CHUNK performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.

apply_snapshot_chunk

def apply_snapshot_chunk(message: AbciMessage,
                         dialogue: AbciDialogue) -> AbciMessage

Handle a message of REQUEST_APPLY_SNAPSHOT_CHUNK performative.

Arguments:

  • message: the ABCI request.
  • dialogue: the ABCI dialogue.

Returns:

the response.