Skip to content

packages.valory.skills.transaction_settlement_abci.payload_tools

Tools for payload serialization and deserialization.

VerificationStatus Objects

class VerificationStatus(Enum)

Tx verification status enumeration.

PayloadDeserializationError Objects

class PayloadDeserializationError(Exception)

Exception for payload deserialization errors.

__init__

def __init__(*args: Any) -> None

Initialize the exception.

Arguments:

  • args: extra arguments to pass to the constructor of Exception.

tx_hist_payload_to_hex

def tx_hist_payload_to_hex(verification: VerificationStatus,
                           tx_hash: Optional[str] = None) -> str

Serialise history payload to a hex string.

tx_hist_hex_to_payload

def tx_hist_hex_to_payload(
        payload: str) -> Tuple[VerificationStatus, Optional[str]]

Decode history payload.

hash_payload_to_hex

def hash_payload_to_hex(safe_tx_hash: str,
                        ether_value: int,
                        safe_tx_gas: int,
                        to_address: str,
                        data: bytes,
                        operation: int = SafeOperation.CALL.value,
                        base_gas: int = 0,
                        safe_gas_price: int = 0,
                        gas_token: str = NULL_ADDRESS,
                        refund_receiver: str = NULL_ADDRESS,
                        use_flashbots: bool = False,
                        gas_limit: int = 0,
                        raise_on_failed_simulation: bool = False) -> str

Serialise to a hex string.

skill_input_hex_to_payload

def skill_input_hex_to_payload(payload: str) -> dict

Decode payload.