Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.72 KB

README.md

File metadata and controls

29 lines (18 loc) · 1.72 KB

Wait for Transaction Receipts for AA (Safe) wallets

This library is compatible to wagmi hooks & viem publicProviders. It allows waiting for transaction receipts for Safe transactions. This is helpful when your users are connecting their Safe accounts using Walletconnect. A transaction submitted on that connection will return the safeTx hash of the Safe's infrastructure. To wait for a regular transaction receipt, you first must resolve the onchain transaction that has been executed by the respective relayer or submitted by the final signer.

npm version GitHub deployments

available hooks

  • useIsSafeWallet(address: Address): boolean|undefined figures out whether address is a Safe account
  • useSafeWaitForTransaction(writeResult: WriteContractResult | undefined) a drop in replacement for useWaitForTransaction
  • safeWaitForTransactionReceipt(publicClient, {hash, address}) plain viem usage: takes a public client & an address and returns `Promise``

install

yarn add @moleculexyz/wagmi-safe-wait-for-tx

Docs

See the library Readme.
NPM package https://www.npmjs.com/package/@moleculexyz/wagmi-safe-wait-for-tx

Original Issues

https://ethereum.stackexchange.com/questions/155384/how-to-get-receipt-in-wagmi-viem-for-a-transaction-issued-with-safe-on-walletc

Copyright (c) 2023 by Molecule AG