Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sub-interface metadata to the TransactionRecord for PBJ #253

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion services/transaction_record.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,46 +40,62 @@ message TransactionRecord {
/**
* The status (reach consensus, or failed, or is unknown) and the ID of any new
* account/file/instance created.
*
* <<<pbj.super_interface_suffix = "Base">>>
*/
TransactionReceipt receipt = 1;

/**
* The hash of the Transaction that executed (not the hash of any Transaction that failed for
* having a duplicate TransactionID)
*
* <<<pbj.super_interface_suffix = "Base">>>
*/
bytes transactionHash = 2;

/**
* The consensus timestamp (or null if didn't reach consensus yet)
*
* <<<pbj.super_interface_suffix = "Base">>>
*/
Timestamp consensusTimestamp = 3;

/**
* The ID of the transaction this record represents
*
* <<<pbj.super_interface_suffix = "Base">>>
*/
TransactionID transactionID = 4;

/**
* The memo that was submitted as part of the transaction (max 100 bytes)
*
* <<<pbj.super_interface_suffix = "Base">>>
*/
string memo = 5;

/**
* The actual transaction fee charged, not the original transactionFee value from
* TransactionBody
*
* <<<pbj.super_interface_suffix = "Crypto">>>
*/
uint64 transactionFee = 6;

oneof body {
/**
* Record of the value returned by the smart contract function (if it completed and didn't
* fail) from ContractCallTransaction
*
* <<<pbj.super_interface_suffix = "SmartContract">>>
*/
ContractFunctionResult contractCallResult = 7;

/**
* Record of the value returned by the smart contract constructor (if it completed and
* didn't fail) from ContractCreateTransaction
*
* <<<pbj.super_interface_suffix = "SmartContract">>>
*/
ContractFunctionResult contractCreateResult = 8;
}
Expand All @@ -88,68 +104,92 @@ message TransactionRecord {
* All hbar transfers as a result of this transaction, such as fees, or transfers performed by
* the transaction, or by a smart contract it calls, or by the creation of threshold records
* that it triggers.
*
* <<<pbj.super_interface_suffix = "Crypto">>>
*/
TransferList transferList = 10;

/**
* All Token transfers as a result of this transaction
*
* <<<pbj.super_interface_suffix = "Token">>>
*/
repeated TokenTransferList tokenTransferLists = 11;

/**
* Reference to the scheduled transaction ID that this transaction record represent
*
* <<<pbj.super_interface_suffix = "Scheduled">>>
*/
ScheduleID scheduleRef = 12;

/**
* All custom fees that were assessed during a CryptoTransfer, and must be paid if the
* transaction status resolved to SUCCESS
*
* <<<pbj.super_interface_suffix = "Token">>>
*/
repeated AssessedCustomFee assessed_custom_fees = 13;

/**
* All token associations implicitly created while handling this transaction
*
* <<<pbj.super_interface_suffix = "Token">>>
*/
repeated TokenAssociation automatic_token_associations = 14;

/**
* In the record of an internal transaction, the consensus timestamp of the user
* transaction that spawned it.
*
* <<<pbj.super_interface_suffix = "Base">>>
*/
Timestamp parent_consensus_timestamp = 15;

/**
* In the record of a CryptoCreate transaction triggered by a user transaction with a
* (previously unused) alias, the new account's alias.
* (previously unused) alias, the new account's alias.
*
* <<<pbj.super_interface_suffix = "Crypto">>>
*/
bytes alias = 16;

/**
* The keccak256 hash of the ethereumData. This field will only be populated for
* EthereumTransaction.
*
* <<<pbj.super_interface_suffix = "SmartContract">>>
*/
bytes ethereum_hash = 17;

/**
* List of accounts with the corresponding staking rewards paid as a result of a transaction.
*
* <<<pbj.super_interface_suffix = "Crypto">>>
*/
repeated AccountAmount paid_staking_rewards = 18;

oneof entropy {
/**
* In the record of a UtilPrng transaction with no output range, a pseudorandom 384-bit string.
*
* <<<pbj.super_interface_suffix = "Prng">>>
*/
bytes prng_bytes = 19;

/**
* In the record of a PRNG transaction with an output range, the output of a PRNG whose input was a 384-bit string.
*
* <<<pbj.super_interface_suffix = "Prng">>>
*/
int32 prng_number = 20;
}

/**
* The new default EVM address of the account created by this transaction.
* This field is populated only when the EVM address is not specified in the related transaction body.
*
* <<<pbj.super_interface_suffix = "SmartContract">>>
*/
bytes evm_address = 21;
}