stream.output.transaction_result.proto Maven / Gradle / Ivy
/**
* # Transaction Result
* The result of a transaction, sometimes called a receipt.
*
* ### Keywords
* The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
* "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
* document are to be interpreted as described in
* [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in
* [RFC8174](https://www.ietf.org/rfc/rfc8174).
*/
syntax = "proto3";
package com.hedera.hapi.block.stream.output;
/*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
option java_package = "com.hedera.hapi.block.stream.output.protoc";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;
import "basic_types.proto";
//import "custom_fees.proto";
import "exchange_rate.proto";
import "response_code.proto";
import "timestamp.proto";
/**
* While we have the state changes as part of the block stream,
* we may not have the full data set needed. To surface information
* such as staking rewards, fees, etc. we need to include some of the
* data from the original TransactionRecord.
*
* > REVIEW NOTE
* >> Should we have custom fees here, and remove that from the
* >> CryptoTransfer output message? That would make more sense, as I believe
* >> TokenTransfer output would also need custom fees, and we may wish
* >> to add custom fees to other transactions in the future.
*/
message TransactionResult {
/**
* A response code.
*
* This value SHALL indicate the status of this transaction.
* This code SHALL indicate success or a specific failure.
*/
proto.ResponseCodeEnum status = 1;
/**
* A consensus timestamp.
*
* The time index, agreed by all network nodes, when this transaction
* reached consensus.
* This field SHALL be set for all transactions.
*/
proto.Timestamp consensus_timestamp = 2;
/**
* A consensus timestamp.
*
* The time index, agreed by all network nodes, when the "parent"
* transaction, if any, for this transaction reached consensus.
* This SHALL NOT be set on a user-submitted transaction.
* This SHALL be set on an internal "child" transaction initiated as
* part of completing a user-submitted transaction.
*/
proto.Timestamp parent_consensus_timestamp = 3;
/**
* An exchange rate set.
*
* This field SHALL describe the exchange rates in effect when this
* transaction reached consensus.
*/
proto.ExchangeRateSet exchange_rate = 4;
/**
* A schedule that executed this transaction, if this transaction
* was scheduled.
*
* This value SHALL NOT be set unless this transaction result represents
* the result of a _scheduled_ child transaction.
*/
proto.ScheduleID schedule_ref = 5;
/**
* An amount, in tinybar, charged for this transaction.
*
* This SHALL be the actual transaction fee charged, and SHALL NOT be the
* transactionFee value from TransactionBody.
*/
uint64 transaction_fee_charged = 6;
/**
* A list of HBAR transfers, in double-entry form.
*
* This SHALL include all HBAR transfers completed as a result
* of this transaction.
* This MUST include, at least,
*
* - Each source and recipient of transaction fees
* - All transfers directly performed by this transaction
* - All transfers due to staking rewards paid as a result of
* this transaction
* - Any transfers performed by a smart contract call associated
* with this transaction
* - Any transfers caused by the creation of threshold records
*
*
* This transfer list is exposed in the Mirror Node API (MAPI) and in use
* by clients of the MAPI. Additionally, there are some transfers that
* are mingled with transactions and only split out here.
*/
proto.TransferList transfer_list = 7;
/**
* A list of _non-HBAR_ token transfers, in single-entry form.
*
* This SHALL include all _non-HBAR_ token transfers completed as a
* result of this transaction.
* This MUST include, at least,
*
* - Each source and recipient of custom fees
* - All transfers directly performed by this transaction
* - Any transfers performed by a smart contract call associated
* with this transaction
*
*/
repeated proto.TokenTransferList token_transfer_lists = 8;
/**
* A list of token associations.
*
* This field SHALL list all token associations created automatically
* while handling this transaction.
*/
repeated proto.TokenAssociation automatic_token_associations = 9;
/**
* A list of accounts and amounts.
*
* This SHALL list all accounts paid staking rewards as a result
* of this transaction.
* Each entry SHALL contain both the account and the amount paid.
*/
repeated proto.AccountAmount paid_staking_rewards = 10;
/**
* A congestion pricing multiplier.
*
* This SHALL be the multiplier that is applied to the transaction
* fees charged for this transaction.
*/
uint64 congestion_pricing_multiplier = 11;
}