Skip to content

Commit

Permalink
Merge pull request #492 from multiversx/legacy-results-parser-1
Browse files Browse the repository at this point in the history
Legacy ResultsParser: change access modifier of methods from private to protected
  • Loading branch information
andreibancioiu authored Oct 3, 2024
2 parents 04b3b4b + ea54e78 commit 52f0efb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/smartcontracts/resultsParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class ResultsParser {
throw new ErrCannotParseContractResults(`transaction ${transaction.hash.toString()}`);
}

private parseTransactionMetadata(transaction: ITransactionOnNetwork): TransactionMetadata {
protected parseTransactionMetadata(transaction: ITransactionOnNetwork): TransactionMetadata {
return new TransactionDecoder().getTransactionMetadata({
sender: transaction.sender.bech32(),
receiver: transaction.receiver.bech32(),
Expand All @@ -205,7 +205,7 @@ export class ResultsParser {
});
}

private createBundleOnSimpleMoveBalance(transaction: ITransactionOnNetwork): UntypedOutcomeBundle | null {
protected createBundleOnSimpleMoveBalance(transaction: ITransactionOnNetwork): UntypedOutcomeBundle | null {
let noResults = transaction.contractResults.items.length == 0;
let noLogs = transaction.logs.events.length == 0;

Expand All @@ -220,7 +220,7 @@ export class ResultsParser {
return null;
}

private createBundleOnInvalidTransaction(transaction: ITransactionOnNetwork): UntypedOutcomeBundle | null {
protected createBundleOnInvalidTransaction(transaction: ITransactionOnNetwork): UntypedOutcomeBundle | null {
if (transaction.status.isInvalid()) {
if (transaction.receipt.data) {
return {
Expand All @@ -236,7 +236,7 @@ export class ResultsParser {
return null;
}

private createBundleOnEasilyFoundResultWithReturnData(results: IContractResults): UntypedOutcomeBundle | null {
protected createBundleOnEasilyFoundResultWithReturnData(results: IContractResults): UntypedOutcomeBundle | null {
let resultItemWithReturnData = results.items.find(
(item) => item.nonce.valueOf() != 0 && item.data.startsWith("@"),
);
Expand All @@ -254,7 +254,7 @@ export class ResultsParser {
};
}

private createBundleOnSignalError(logs: ITransactionLogs): UntypedOutcomeBundle | null {
protected createBundleOnSignalError(logs: ITransactionLogs): UntypedOutcomeBundle | null {
let eventSignalError = logs.findSingleOrNoneEvent(WellKnownEvents.OnSignalError);
if (!eventSignalError) {
return null;
Expand All @@ -271,7 +271,7 @@ export class ResultsParser {
};
}

private createBundleOnTooMuchGasWarning(logs: ITransactionLogs): UntypedOutcomeBundle | null {
protected createBundleOnTooMuchGasWarning(logs: ITransactionLogs): UntypedOutcomeBundle | null {
let eventTooMuchGas = logs.findSingleOrNoneEvent(
WellKnownEvents.OnWriteLog,
(event) =>
Expand All @@ -294,7 +294,7 @@ export class ResultsParser {
};
}

private createBundleOnWriteLogWhereFirstTopicEqualsAddress(
protected createBundleOnWriteLogWhereFirstTopicEqualsAddress(
logs: ITransactionLogs,
address: IAddress,
): UntypedOutcomeBundle | null {
Expand Down Expand Up @@ -329,7 +329,7 @@ export class ResultsParser {
return null;
}

private createBundleWithFallbackHeuristics(
protected createBundleWithFallbackHeuristics(
transaction: ITransactionOnNetwork,
transactionMetadata: TransactionMetadata,
): UntypedOutcomeBundle | null {
Expand Down

0 comments on commit 52f0efb

Please sign in to comment.