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.