https://github.com/moleculeprotocol/test-wagmi-safe-privy
demonstrates usage / event logging issues between wagmi/viem - privy - safe
https://github.com/moleculeprotocol/test-wagmi-safe-privy
gnosis-safe viem wagmi-hooks web3
Last synced: about 2 months ago
JSON representation
demonstrates usage / event logging issues between wagmi/viem - privy - safe
- Host: GitHub
- URL: https://github.com/moleculeprotocol/test-wagmi-safe-privy
- Owner: moleculeprotocol
- Created: 2023-10-08T21:48:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-19T16:11:12.000Z (about 1 year ago)
- Last Synced: 2024-09-23T19:07:46.854Z (9 months ago)
- Topics: gnosis-safe, viem, wagmi-hooks, web3
- Language: TypeScript
- Homepage: https://moleculeprotocol.github.io/test-wagmi-safe-privy/
- Size: 1.46 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
[](https://badge.fury.io/js/@moleculexyz%2Fwagmi-safe-wait-for-tx)
## 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
```bash
yarn add @moleculexyz/wagmi-safe-wait-for-tx
```## Docs
See [the library Readme](./packages/wagmi-safe-wait-for-tx/README.md).
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](https://molecule.xyz)