wagmi-extended 1.0.5 → 1.0.6

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 +13 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -104,14 +104,19 @@ const { writeContractAsync, isPending, errorMessage } = useContractWriteX({
104
104
 
105
105
  const handleWrite = async () => {
106
106
  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);
107
+ const txHash = await writeContractAsync({
108
+ address: "0xContractAddress",
109
+ abi: [], // Provide your contract ABI
110
+ functionName: "executeFunction",
111
+ args: [/* function arguments */],
112
+ }, {
113
+ // use calbacks here in writeContractAsync or in useContractWriteX
114
+ onSuccess: (txHash) => console.log("Transaction successful:", txHash),
115
+ onError: (error) => console.error("Transaction error:", error),
116
+ });
117
+ console.log("Received txHash:", txHash);
113
118
  } catch (err) {
114
- console.error("Failed writing transaction:", err);`
119
+ console.error("Failed writing transaction:", err);`
115
120
  }
116
121
  };
117
122
 
@@ -146,12 +151,7 @@ function TransactionButton() {
146
151
  const handleTransaction = async () => {
147
152
  try {
148
153
  // 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
- });
154
+ const txHash = await sendTransactionAsync({ transaction params here.. });
155
155
  console.log("Transaction hash:", txHash);
156
156
  } catch (error) {
157
157
  console.error(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wagmi-extended",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
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",