Implementation
static XdrTransactionMetaV3 decode(XdrDataInputStream stream) {
XdrLedgerEntryChanges txChangesBefore =
XdrLedgerEntryChanges.decode(stream);
int operationsSize = stream.readInt();
List<XdrOperationMeta> operations =
List<XdrOperationMeta>.empty(growable: true);
for (int i = 0; i < operationsSize; i++) {
operations.add(XdrOperationMeta.decode(stream));
}
XdrLedgerEntryChanges txChangesAfter = XdrLedgerEntryChanges.decode(stream);
int eventsSize = stream.readInt();
List<XdrOperationEvents> events =
List<XdrOperationEvents>.empty(growable: true);
for (int i = 0; i < eventsSize; i++) {
events.add(XdrOperationEvents.decode(stream));
}
XdrTransactionResult txResult = XdrTransactionResult.decode(stream);
int hashesSize = 3; //stream.readInt();
List<XdrHash> hashes = List<XdrHash>.empty(growable: true);
for (int i = 0; i < hashesSize; i++) {
hashes.add(XdrHash.decode(stream));
}
int diagnosticEventsSize = stream.readInt();
List<XdrOperationDiagnosticEvents> diagnosticEvents =
List<XdrOperationDiagnosticEvents>.empty(growable: true);
for (int i = 0; i < diagnosticEventsSize; i++) {
diagnosticEvents.add(XdrOperationDiagnosticEvents.decode(stream));
}
return XdrTransactionMetaV3(txChangesBefore, operations, txChangesAfter,
events, txResult, hashes, diagnosticEvents);
}