Hedera.Receipt (Hedera v0.2.0)

Copy Markdown View Source

A parsed Hedera TransactionReceipt — the consensus outcome of a transaction. For Consensus Service submits this carries the topic's new sequence number and running hash; for Token Service it carries the new token_id (on create) and the token's new_total_supply (on mint/burn).

Summary

Functions

Has the receipt reached a final (non-UNKNOWN) status?

Parse a TransactionReceipt protobuf message (decoded by Hedera.Pb).

Did the transaction succeed (status SUCCESS)?

Types

t()

@type t() :: %Hedera.Receipt{
  contract_id: Hedera.ContractId.t() | nil,
  file_id: Hedera.FileId.t() | nil,
  new_total_supply: non_neg_integer() | nil,
  schedule_id: Hedera.ScheduleId.t() | nil,
  serial_numbers: [integer()],
  status: non_neg_integer(),
  token_id: Hedera.TokenId.t() | nil,
  topic_id: Hedera.TopicId.t() | nil,
  topic_running_hash: binary() | nil,
  topic_sequence_number: non_neg_integer() | nil
}

Functions

final?(receipt)

@spec final?(t()) :: boolean()

Has the receipt reached a final (non-UNKNOWN) status?

parse(bytes)

@spec parse(binary()) :: t()

Parse a TransactionReceipt protobuf message (decoded by Hedera.Pb).

success?(receipt)

@spec success?(t()) :: boolean()

Did the transaction succeed (status SUCCESS)?