wagmi-extended 2.3.2 → 2.3.3
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.
- package/README.md +12 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,6 +108,7 @@ await writeContractAsync({
|
|
|
108
108
|
|
|
109
109
|
#### New `writeContractX` method
|
|
110
110
|
|
|
111
|
+
Use `writeContract` if you don't want simulation to happen
|
|
111
112
|
Use `writeContractX` if you need control over the simulation step:
|
|
112
113
|
|
|
113
114
|
```ts
|
|
@@ -117,20 +118,17 @@ const { writeContractX, isPending, errorMessage } = useContractWriteX({
|
|
|
117
118
|
})
|
|
118
119
|
|
|
119
120
|
// simulate + send:
|
|
120
|
-
await writeContractX(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
/* disableSimulation? */ false
|
|
133
|
-
)
|
|
121
|
+
await writeContractX({
|
|
122
|
+
address: "0xContractAddress",
|
|
123
|
+
abi: MyContractAbi,
|
|
124
|
+
functionName: "executeFunction",
|
|
125
|
+
args: [
|
|
126
|
+
/* ... */
|
|
127
|
+
],
|
|
128
|
+
account: myAddress,
|
|
129
|
+
chain: myChain,
|
|
130
|
+
value: 0n,
|
|
131
|
+
})
|
|
134
132
|
|
|
135
133
|
// send immediately without simulation:
|
|
136
134
|
await writeContractX(params, /* disableSimulation= */ true)
|