-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: stadolf <[email protected]>
- Loading branch information
1 parent
c448adb
commit 60ccc4f
Showing
3 changed files
with
21 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,29 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
# Wait for Transaction Receipts for AA (Safe) wallets | ||
|
||
## Getting Started | ||
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. | ||
|
||
First, run the development server: | ||
[![npm version](https://badge.fury.io/js/@moleculexyz%2Fwagmi-safe-wait-for-tx.svg)](https://badge.fury.io/js/@moleculexyz%2Fwagmi-safe-wait-for-tx) | ||
![GitHub deployments](https://img.shields.io/github/deployments/moleculeprotocol/test-wagmi-safe-privy/github-pages?label=demo%20deployed&link=https%3A%2F%2Fmoleculeprotocol.github.io%2Ftest-wagmi-safe-privy%2F) | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
## available hooks | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
- `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<TransactionReceipt>`` | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
## install | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
```bash | ||
yarn add @moleculexyz/wagmi-safe-wait-for-tx | ||
``` | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
## Docs | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
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 | ||
|
||
## Deploy on Vercel | ||
## Original Issues | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
https://ethereum.stackexchange.com/questions/155384/how-to-get-receipt-in-wagmi-viem-for-a-transaction-issued-with-safe-on-walletc | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. | ||
Copyright (c) 2023 by [Molecule AG](https://molecule.xyz) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters