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

Retrieve TxHash From UserOpHash #2

Closed
bh2smith opened this issue Jun 14, 2024 · 1 comment · Fixed by #12
Closed

Retrieve TxHash From UserOpHash #2

bh2smith opened this issue Jun 14, 2024 · 1 comment · Fixed by #12

Comments

@bh2smith
Copy link
Collaborator

bh2smith commented Jun 14, 2024

The bundler request sendUserOperation returns only a UserOpHash which is not sufficient to identify the mined transaction hash. #1 outlines a function call to the bundler endpoint eth_getUserOperationReceipt that ideally returns information containing the mined txHash. However, one must wait, presumably, until the transaction is mined before this endpoint will return the receipt.

We could keep polling this endpoint with some exponential backoff... not sure they best approach, but we definitely need to wait some time for it to become available.

https://github.com/bh2smith/nearly-safe/blob/6b10b0aa6accd094e0f70eae425d93ba3e65bbc3/index.ts#L259-L262

bh2smith added a commit that referenced this issue Jun 14, 2024
This PR adds NearEthAdapter and Signature producing.

Some Encounterd Issues & Resolutions:

Solved (kinda): Conflicting Import Formats in Dependencies
Solved: Invalid Request Payload for sendUserOp
Solved: Entry Point Not Supported.
Solved: Reverted or Out of Gas [Likely Reverted]
Solved: AA24 signature error
Solved: Safe Address retrieval after deployment
Solved: Safe already exists for nonce > 0.

Unresolved/Open Issues (For Future PRs)

- UserOpHash is returned from sendUserOp, not the TxHash. There are endpoints to get the a receipt (containing the txHash), but they are not immediately available... should we sleep or continue requesting until its available? #2

- Gas Fee Fetching is naive (bundler suggests using theirs). #3
- Integrate Paymaster #4

Bonus: Recovery: AddOwnerWithThreashold at or after Setup.

Co-authored-by: Nicholas Rodrigues Lordello <[email protected]>
@bh2smith
Copy link
Collaborator Author

Looks like Safe Docs suggest the same thing:

https://docs.safe.global/sdk/relay-kit/guides/4337-safe-sdk#check-the-transaction-status

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 a pull request may close this issue.

1 participant