Transaction helpers
Bookmark

cosmpy.aerial.tx_helpers

Transaction helpers.

MessageLog Objects

@dataclass
class MessageLog()

Message MessageLog.

TxResponse Objects

@dataclass
class TxResponse()

Transaction response.

Raises:

  • OutOfGasError: out of gas error.
  • InsufficientFeesError: insufficient fees.
  • BroadcastError: broadcast exception.

is_successful

def is_successful() -> bool

Checks if transaction is is_successful.

Raises:

  • OutOfGasError: out of gas error.
  • InsufficientFeesError: insufficient fees.
  • BroadcastError: broadcast exception.

SubmittedTx Objects

class SubmittedTx()

Submitted transaction.

init

def __init__(client: "LedgerClient", tx_hash: str)

Init the submitted transaction.

Arguments:

  • client: ledger Client.
  • tx_hash: transaction hash.

tx_hash

@property
def tx_hash() -> str

Returns:

Transaction hash.

response

@property
def response() -> Optional[TxResponse]

Get the transaction response.

Returns:

Response.

contract_code_id

@property
def contract_code_id() -> Optional[int]

Get the contract code id.

Returns:

Return contract code id if exists, else None.

contract_address

@property
def contract_address() -> Optional[Address]

Get the contract address.

Returns:

Return contract address if it exists, else return None.

wait_to_complete

def wait_to_complete(
    timeot: Optional[Union[int, float, timedelta]] = None,
    poll_period: Optional[Union[int, float, timedelta]] = None
) -> "SubmittedTx"

Wait to complete the transaction.

Arguments:

  • timeout: timeout, defaults to None.
  • poll_period: poll period, defaults to None.

Returns:

Submitted transaction.

Was this page helpful?

Bookmark