Skip to content

Commit

Permalink
fix: reused getContractResultWithRetry for getContractResults
Browse files Browse the repository at this point in the history
Signed-off-by: Logan Nguyen <[email protected]>

Revert "fix: reused getContractResultWithRetry for getContractResults"

This reverts commit 0d14958.

Reapply "fix: reused getContractResultWithRetry for getContractResults"

This reverts commit 24bd5813e701649ae73cf27b2b7750c80d8e8b60.
  • Loading branch information
quiet-node committed Dec 22, 2024
1 parent d97250d commit b173a17
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions packages/relay/src/lib/eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1922,13 +1922,17 @@ export class EthImpl implements Eth {
transactionIndex: string,
requestDetails: RequestDetails,
): Promise<Transaction | null> {
const contractResults = await this.mirrorNodeClient.getContractResults(
const contractResults = await this.mirrorNodeClient.getContractResultWithRetry(
this.mirrorNodeClient.getContractResults.name,
[
requestDetails,
{
[blockParam.title]: blockParam.value,
transactionIndex: Number(transactionIndex),
},
undefined,
],
requestDetails,
{
[blockParam.title]: blockParam.value,
transactionIndex: Number(transactionIndex),
},
undefined,
);

if (!contractResults[0]) return null;
Expand Down Expand Up @@ -2540,10 +2544,11 @@ export class EthImpl implements Eth {
if (blockResponse == null) return null;
const timestampRange = blockResponse.timestamp;
const timestampRangeParams = [`gte:${timestampRange.from}`, `lte:${timestampRange.to}`];
const contractResults = await this.mirrorNodeClient.getContractResults(

const contractResults = await this.mirrorNodeClient.getContractResultWithRetry(
this.mirrorNodeClient.getContractResults.name,
[requestDetails, { timestamp: timestampRangeParams }, undefined],
requestDetails,
{ timestamp: timestampRangeParams },
undefined,
);
const gasUsed = blockResponse.gas_used;
const params = { timestamp: timestampRangeParams };
Expand Down

0 comments on commit b173a17

Please sign in to comment.