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

Adding waitForUserOperationReceipt #1175

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

archit2407
Copy link
Collaborator

@archit2407 archit2407 commented Nov 27, 2024

Pull Request Checklist


PR-Codex overview

This PR focuses on improving the functionality for waiting on user operation receipts in a smart account context. It introduces a new method for handling transaction receipts and refactors existing logic to streamline the process.

Detailed summary

  • Added waitForUserOperationReceipt function to handle user operation receipts.
  • Introduced _waitForUserOperationTransaction for fetching transaction receipts with retries.
  • Refactored waitForUserOperationTransaction to utilize _waitForUserOperationTransaction.
  • Added error handling and logging for receipt fetching failures.
  • Removed redundant retry logic from waitForUserOperationTransaction.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ❌ Failed (Inspect) Nov 27, 2024 3:52pm
aa-sdk-ui-demo ❌ Failed (Inspect) Nov 27, 2024 3:52pm

Copy link

graphite-app bot commented Nov 27, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “graphite-merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@@ -0,0 +1,56 @@
import type { Chain, Client, Hex, Transport } from "viem";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'Hex' is defined but never used.

@@ -0,0 +1,56 @@
import type { Chain, Client, Hex, Transport } from "viem";
import type {WaitForUserOperationTxParameters} from "../types";
import {isBaseSmartAccountClient} from "../../../client/isSmartAccountClient";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <import/extensions> reported by reviewdog 🐶
Missing file extension for "../../../client/isSmartAccountClient"

import type { Chain, Client, Hex, Transport } from "viem";
import type {WaitForUserOperationTxParameters} from "../types";
import {isBaseSmartAccountClient} from "../../../client/isSmartAccountClient";
import {IncompatibleClientError} from "../../../errors/client";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <import/extensions> reported by reviewdog 🐶
Missing file extension for "../../../errors/client"

import type {WaitForUserOperationTxParameters} from "../types";
import {isBaseSmartAccountClient} from "../../../client/isSmartAccountClient";
import {IncompatibleClientError} from "../../../errors/client";
import {Logger} from "../../../logger";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <import/extensions> reported by reviewdog 🐶
Missing file extension for "../../../logger"

import {isBaseSmartAccountClient} from "../../../client/isSmartAccountClient";
import {IncompatibleClientError} from "../../../errors/client";
import {Logger} from "../../../logger";
import {FailedToFindTransactionError} from "../../../errors/transaction";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'FailedToFindTransactionError' is defined but never used.

import {IncompatibleClientError} from "../../../errors/client";
import {Logger} from "../../../logger";
import {FailedToFindTransactionError} from "../../../errors/transaction";
import {UserOperationReceipt} from "../../../types";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <import/extensions> reported by reviewdog 🐶
Missing file extension for "../../../types"


import type {Client, Chain, Transport} from "viem";
import type {WaitForUserOperationTxParameters} from "./types";
import {UserOperationReceipt} from "../../types";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <import/extensions> reported by reviewdog 🐶
Missing file extension for "../../types"

import type {Client, Chain, Transport} from "viem";
import type {WaitForUserOperationTxParameters} from "./types";
import {UserOperationReceipt} from "../../types";
import {_waitForUserOperationTransaction} from "./internal/waitForUserOperation";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <import/extensions> reported by reviewdog 🐶
Missing file extension for "./internal/waitForUserOperation"

import type {WaitForUserOperationTxParameters} from "./types";
import {UserOperationReceipt} from "../../types";
import {_waitForUserOperationTransaction} from "./internal/waitForUserOperation";
import {FailedToFindTransactionError} from "../../errors/transaction";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <import/extensions> reported by reviewdog 🐶
Missing file extension for "../../errors/transaction"

@@ -5,6 +5,7 @@ import { IncompatibleClientError } from "../../errors/client.js";
import { FailedToFindTransactionError } from "../../errors/transaction.js";
import { Logger } from "../../logger.js";
import type { WaitForUserOperationTxParameters } from "./types.js";
import {_waitForUserOperationTransaction} from "./internal/waitForUserOperation";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <import/extensions> reported by reviewdog 🐶
Missing file extension for "./internal/waitForUserOperation"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants