wagmi-extended 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +36 -20
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,9 +1,12 @@
1
1
  # wagmi-extended
2
2
 
3
- `wagmi-extended` is a library that provides extended hooks and helper functions on top of [Wagmi](https://wagmi.sh/), [Viem](https://viem.sh/), and [TanStack Query](https://tanstack.com/query/v5) for Ethereum and blockchain development with React.
4
- <br />
5
- <br />
6
- It simplifies common tasks such as fetching token metadata, approving ERC20 token transfers, sending transactions, writing contracts, waiting for receipt and more—with configurable behavior via global defaults.
3
+ `wagmi-extended` is a powerful library that builds on [Wagmi](https://wagmi.sh/), [Viem](https://viem.sh/), and [TanStack Query](https://tanstack.com/query/v5) to deliver extended hooks and helper functions for Ethereum and blockchain development with React.
4
+ <br /><br />
5
+ It simplifies tasks like fetching token metadata, handling ERC20 approvals, sending transactions, writing contracts and getting user friendly error message.
6
+ <br /><br />
7
+ Our library adheres to one core principle: **always wait for a transaction receipt**. This guarantees that your dApps capture transaction outcomes reliably—no manual state management or race conditions required.
8
+ <br /><br />
9
+ Whether you're building a DeFi platform, a governance system, or any blockchain solution, `wagmi-extended` offers a consistent, reliable, and developer-friendly interface, trusted in production with over $500M in volume.
7
10
 
8
11
  ## Table of Contents
9
12
 
@@ -16,6 +19,7 @@ It simplifies common tasks such as fetching token metadata, approving ERC20 toke
16
19
  - [useSendTransactionX Hook](#usesendtransactionx-hook)
17
20
  - [useTokenX Hook](#usetokenx-hook)
18
21
  - [Non-hook functions setup](#non-hook-functions-setup)
22
+ - [Contributing](#contributing)
19
23
  - [Donations](#support--donations)
20
24
  - [License](#license)
21
25
 
@@ -104,14 +108,19 @@ const { writeContractAsync, isPending, errorMessage } = useContractWriteX({
104
108
 
105
109
  const handleWrite = async () => {
106
110
  try {
107
- const txHash = await writeContractAsync({ transaction params here.. }, {
108
- // use calbacks here in writeContractAsync or in useContractWriteX
109
- onSuccess: (txHash) => console.log("Transaction successful:", txHash),
110
- onError: (error) => console.error("Transaction error:", error),
111
- });
112
- console.log("Received txHash:", txHash);
111
+ const txHash = await writeContractAsync({
112
+ address: "0xContractAddress",
113
+ abi: [], // Provide your contract ABI
114
+ functionName: "executeFunction",
115
+ args: [/* function arguments */],
116
+ }, {
117
+ // use calbacks here in writeContractAsync or in useContractWriteX
118
+ onSuccess: (txHash) => console.log("Transaction successful:", txHash),
119
+ onError: (error) => console.error("Transaction error:", error),
120
+ });
121
+ console.log("Received txHash:", txHash);
113
122
  } catch (err) {
114
- console.error("Failed writing transaction:", err);`
123
+ console.error("Failed writing transaction:", err);`
115
124
  }
116
125
  };
117
126
 
@@ -146,12 +155,7 @@ function TransactionButton() {
146
155
  const handleTransaction = async () => {
147
156
  try {
148
157
  // Replace with actual transaction parameters
149
- const txHash = await sendTransactionAsync({
150
- address: "0xContractAddress",
151
- abi: [], // Provide your contract ABI
152
- functionName: "executeFunction",
153
- args: [/* function arguments */],
154
- });
158
+ const txHash = await sendTransactionAsync({ transaction params here.. });
155
159
  console.log("Transaction hash:", txHash);
156
160
  } catch (error) {
157
161
  console.error(error);
@@ -191,7 +195,7 @@ function TokenDisplay({ tokenAddress }: { tokenAddress: Address }) {
191
195
  }
192
196
  ```
193
197
 
194
- ## Non-hook functions setup
198
+ ### Non-hook functions setup
195
199
 
196
200
  **Feel free to skip Setup-section if using only hooks - no fetch methods directly**
197
201
  <br />
@@ -225,7 +229,19 @@ ReactDOM.createRoot(document.getElementById("root")!).render(
225
229
  );
226
230
  ```
227
231
 
228
- ### Support & Donations
232
+ ## Contributing
233
+
234
+ This project is open source and we welcome contributions from the community! If you have ideas, improvements, or bug fixes, please feel free to open pull requests or file issues. Your help makes this project better for everyone.
235
+
236
+ - **Open Issues & PRs:**
237
+ You can report bugs or request features by opening an issue on [GitHub Issues](https://github.com/WingsDevelopment/wagmi-extended/issues). Similarly, feel free to open a pull request (PR) with your changes.
238
+
239
+ - **Star the Project:**
240
+ If you like `wagmi-extended` or find it useful, please consider starring the repository on [GitHub](https://github.com/WingsDevelopment/wagmi-extended). It helps the project gain visibility and motivates further development.
241
+
242
+ Thank you for your support and contributions!
243
+
244
+ ## Support & Donations
229
245
 
230
246
  If you enjoy this project and would like to support its ongoing development, please consider donating!
231
247
 
@@ -237,7 +253,7 @@ If you enjoy this project and would like to support its ongoing development, ple
237
253
 
238
254
  Any donation, no matter how small, is greatly appreciated!
239
255
 
240
- ### License
256
+ ## License
241
257
 
242
258
  This is free and unencumbered software released into the public domain.
243
259
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wagmi-extended",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "type": "module",
5
5
  "description": "A library providing extended hooks on top of Wagmi with additional features.",
6
6
  "main": "dist/index.cjs.js",