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

use safe sdk to get onchain tx hash from safeTxHash #416

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

dekanbro
Copy link
Contributor

@dekanbro dekanbro commented Sep 11, 2023

GitHub Issue

fixes #415

Changes

In the TransactionNotFoundError catch the safeTxHash and retrieve the on chain tx hash on the receipet from the Safe service. Rerun the function with the correct txhash and let it flow back into the transaction lifecycles.

Packages Added

Brief list of any packages added, and if folks need to rerun yarn install to run locally
NA

Checks

Before making your PR, please check the following:

  • [ X] Critical lint errors are resolved
  • [ X] App runs locally
  • [ X] App builds locally (run the build command for any impacted package and check for any errors before the PR)

Notes

safe sdk docs
https://github.com/safe-global/safe-apps-sdk/tree/main/packages/safe-apps-sdk

example api endpoint
https://safe-transaction-goerli.safe.global/api/v1/multisig-transactions/0x7a42aae71eb296b74720273aa6bdcc7b0358f132eeb807e77695f65aa15ded2e/

reference wevm/wagmi#2461

@dekanbro
Copy link
Contributor Author

further handles #414

When a transaction is made from a Safe connection it returns a safeTxHash instead of the onchain txHash. So on error it will check the Safe API for the associated onchain tx hash and rerun execute until it passes. If Safe url returns an error this should do the previous workaround.

@dekanbro dekanbro marked this pull request as ready for review September 11, 2023 23:13
@skuhlmann skuhlmann merged commit 5e10b4a into develop Sep 12, 2023
1 check passed
@skuhlmann skuhlmann deleted the feat/txbuilder-safeTxHash branch September 14, 2023 15:46
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.

viem walletClient.writeContract returning wrong transaction hash
2 participants