wagmi-extended 2.0.2 → 2.1.1

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 CHANGED
@@ -74,102 +74,187 @@ Each hook is documented with detailed JSDoc comments (including usage examples)
74
74
 
75
75
  ## Hooks explanations and examples
76
76
 
77
- ### useERC20ApproveX Hook
77
+ ### useContractWriteX Hook
78
78
 
79
- The `useERC20ApproveX` hook simplifies ERC20 token approvals by checking the allowance and handling the transaction to approve transfers.
79
+ The `useContractWriteX` hook wraps Wagmi’s `useWriteContract` with extra features:
80
80
 
81
- Example:
81
+ - **Receipt waiting**: always waits for the transaction receipt before resolving.
82
+ - **Logging control**: disable console logging if you wish.
83
+ - **Query invalidation**: automatically invalidates queries after receipt, either by explicit keys or by predicate.
82
84
 
83
- ```bash
84
- import { useERC20ApproveX } from "wagmi-extended";
85
+ #### Original `writeContractAsync`
85
86
 
86
- function ApproveButton(amountToApprove: number) {
87
- const tokenAddress = "0xTokenAddress"; // Replace with your token address
88
- const spenderAddress = "0xSpenderAddress"; // Replace with the spender address
87
+ ```ts
88
+ const { writeContractAsync, isPending, errorMessage } = useContractWriteX({
89
+ queriesToInvalidate: [["userBalance"], ["userActivity"]],
90
+ onSuccess: (txHash) => console.log("✅", txHash),
91
+ onError: (err) => console.error("❌", err),
92
+ });
89
93
 
90
- const { isApproved, isApproving, approveAsync } = useERC20ApproveX(
91
- tokenAddress,
92
- spenderAddress,
93
- parseUnits(amountToApprove.toString(), 18),
94
- );
94
+ // will wait for the receipt, then invalidate `userBalance` & `userActivity`
95
+ await writeContractAsync({
96
+ address: "0xContractAddress",
97
+ abi: MyContractAbi,
98
+ functionName: "executeFunction",
99
+ args: [
100
+ /* ... */
101
+ ],
102
+ });
103
+ ```
95
104
 
96
- return (
97
- <button onClick={approveAsync} disabled={isApproving || isApproved}>
98
- {isApproving ? "Approving..." : isApproved ? "Approved" : "Approve Token"}
99
- </button>
100
- );
101
- }
105
+ #### New `writeContractX` method
106
+
107
+ Use `writeContractX` if you need control over the simulation step:
108
+
109
+ ```ts
110
+ const { writeContractX, isPending, errorMessage } = useContractWriteX({
111
+ onSuccess: (tx) => console.log("✔ Receipt confirmed:", tx),
112
+ onError: (e) => console.error("✖ Failed:", e),
113
+ });
114
+
115
+ // simulate + send:
116
+ await writeContractX(
117
+ {
118
+ address: "0xContractAddress",
119
+ abi: MyContractAbi,
120
+ functionName: "executeFunction",
121
+ args: [
122
+ /* ... */
123
+ ],
124
+ account: myAddress,
125
+ chain: myChain,
126
+ value: 0n,
127
+ },
128
+ /* disableSimulation? */ false
129
+ );
130
+
131
+ // send immediately without simulation:
132
+ await writeContractX(params, /* disableSimulation= */ true);
102
133
  ```
103
134
 
104
- ### useContractWriteX hook
135
+ - **`writeContractAsync`** = always runs the built-in dry-run, then write.
136
+ - **`writeContractX`** = you can pass a boolean to skip the simulation step.
105
137
 
106
- The `useContractWriteX` hook wraps the contract-writing functionality from Wagmi with additional features like `receipt` waiting, `logging` control, and `query invalidation` after receipt is successfully fetched.
138
+ ---
107
139
 
108
- Example:
140
+ ### useSendTransactionX Hook
109
141
 
110
- ```bash
111
- function MyTransactionComponent() {
112
- const { writeContractAsync, isPending, errorMessage } = useContractWriteX({
113
- queriesToInvalidate: [["userBalance"], ["userActivity"]],
114
- {
115
- // use calbacks here in writeContractAsync or in useContractWriteX
116
- onSuccess: (txHash) => console.log("Transaction successful:", txHash),
117
- onError: (error) => console.error("Transaction error:", error),
118
- }
119
- });
142
+ The `useSendTransactionX` hook wraps Wagmi’s `useSendTransaction` with the same lifecycle features:
120
143
 
121
- const handleWrite = async () => {
122
- try {
123
- const txHash = await writeContractAsync({
124
- address: "0xContractAddress",
125
- abi: [], // Provide your contract ABI
126
- functionName: "executeFunction",
127
- args: [/* function arguments */],
128
- });
129
- console.log("Received txHash:", txHash);
130
- } catch (err) {
131
- console.error("Failed writing transaction:", err);`
132
- }
133
- };
144
+ - **`sendTransaction`** = Wagmi’s raw send
145
+ - **`sendTransactionX`** = optionally simulate (contract call) or just `eth_call`, then `sendTransaction` + receipt waiting + invalidations.
134
146
 
135
- return (
136
- <div>
137
- <button onClick={handleWrite} disabled={isPending}>
138
- {isPending ? "Processing..." : "Write Transaction"}
139
- </button>
140
- {errorMessage && <p>Error: {errorMessage}</p>}
141
- </div>
147
+ ```ts
148
+ const {
149
+ sendTransaction, // raw
150
+ sendTransactionX, // wrapped
151
+ isPending,
152
+ errorMessage,
153
+ } = useSendTransactionX({
154
+ queriesToInvalidate: [["ethBalance"]],
155
+ onSuccess: (tx) => console.log("🎉 Tx sent & confirmed:", tx),
156
+ onError: (e) => console.error("🚫 Simulation or send failed:", e),
157
+ });
158
+
159
+ // simulate & send an ETH transfer:
160
+ await sendTransactionX(
161
+ { to: recipient, value: 1n * 10n ** 18n, account: myAddress, chain: myChain },
162
+ // for contract calls, pass simulation params:
163
+ { abi: MyAbi, functionName: "deposit", args: [1000n], chain: myChain }
142
164
  );
143
- }
165
+
166
+ // or just raw send (no simulationParams):
167
+ await sendTransactionX({ to, value, account });
144
168
  ```
145
169
 
146
- **Important:** To ensure transaction receipts are awaited correctly, **all settings and callbacks must be passed inside the hook itself**, not inside `mutate` or `mutateAsync` calls.
170
+ ---
171
+
172
+ ## Transaction mutation settings
147
173
 
148
- Example of correct usage:
174
+ In all “X” hooks you pass a `WriteExtendedAsyncParams` object:
149
175
 
150
176
  ```ts
151
- const { writeContractAsync } = useContractWriteX({
152
- queriesToInvalidate: [["userBalance"]],
153
- onSuccess: (txHash) => console.log("Tx success:", txHash),
154
- onError: (err) => console.error("Tx error:", err),
155
- });
177
+ export type WriteExtendedAsyncParams = {
178
+ onSuccess?: (txHash: Address) => void;
179
+ onError?: (e: any) => void;
180
+ onSettled?: () => void;
181
+ onSuccessAsync?: (txHash: Address) => Promise<void>;
182
+ onErrorAsync?: (e: any) => Promise<void>;
183
+ onSettledAsync?: () => Promise<void>;
184
+
185
+ /** simple list of query keys to invalidate after receipt */
186
+ queriesToInvalidate?: (QueryKey | undefined)[];
187
+
188
+ /** predicate-based invalidation:
189
+ any active query where `predicate(query)` returns true
190
+ will be invalidated after the tx settles. */
191
+ invalidatePredicate?: (query: Query<unknown, unknown>) => boolean;
192
+
193
+ disableLogging?: boolean;
194
+ disableWaitingForReceipt?: boolean;
195
+ };
156
196
  ```
157
197
 
158
- **Avoid passing callbacks like this:**
198
+ ---
199
+
200
+ ### useFetchERC4626DataX Hook
201
+
202
+ Fetch summary data from an ERC-4626 vault (total assets, shares, allowances, balances, etc.):
159
203
 
160
204
  ```ts
161
- await writeContractAsync(config, {
162
- onSuccess: () => {}, // ❌ This will NOT guarantee receipt handling!
163
- });
205
+ import { useFetchERC4626DataX } from "wagmi-extended";
206
+
207
+ function VaultInfo({ vaultAddress, user, spender }) {
208
+ const { data, isLoading, error } = useFetchERC4626DataX({
209
+ vault,
210
+ user,
211
+ spender,
212
+ });
213
+
214
+ if (isLoading) return <p>Loading vault data…</p>;
215
+ if (error) return <p>Error: {error.message}</p>;
216
+
217
+ return (
218
+ <div>
219
+ <p>Total assets: {data.totalAssets}</p>
220
+ <p>Current shares: {data.shares}</p>
221
+ <p>Your balance: {data.userBalance}</p>
222
+ <p>Your allowance: {data.allowance}</p>
223
+ </div>
224
+ );
225
+ }
164
226
  ```
165
227
 
166
- This design ensures that `wagmi-extended` can properly track and wait for the transaction receipt, giving your app reliable post-transaction state.
228
+ ---
167
229
 
168
- ### useSendTransactionX Hook
230
+ ### useFetchERC20DataX Hook
231
+
232
+ Fetch summary data for a generic ERC-20 token (decimals, name, symbol, balances, allowances):
233
+
234
+ ```ts
235
+ import { useFetchERC20DataX } from "wagmi-extended";
169
236
 
170
- The `useSendTransactionX` hook wraps the transaction-sending functionality from Wagmi with additional features like `receipt` waiting, `logging` control, and `query invalidation` after receipt is successfully fetched.
237
+ function TokenInfo({ token, user, spender }) {
238
+ const { data, isLoading, error } = useFetchERC20DataX({
239
+ address: token,
240
+ user,
241
+ spender,
242
+ });
171
243
 
172
- Very similar to useContractWriteX, see [playground](https://codesandbox.io/p/sandbox/5jr3lg) for example.
244
+ if (isLoading) return <p>Loading token info…</p>;
245
+ if (error) return <p>Error: {error.message}</p>;
246
+
247
+ return (
248
+ <div>
249
+ <p>Name: {data.name}</p>
250
+ <p>Symbol: {data.symbol}</p>
251
+ <p>Decimals: {data.decimals}</p>
252
+ <p>Your balance: {data.balance}</p>
253
+ <p>Your allowance: {data.allowance}</p>
254
+ </div>
255
+ );
256
+ }
257
+ ```
173
258
 
174
259
  ### useTokenX Hook
175
260
 
@@ -1,66 +1,30 @@
1
1
  import { WriteExtendedAsyncParams } from "./useHandleTransactionMutationX.js";
2
2
  import { Address } from "viem";
3
3
  /**
4
- * Custom hook for writing to a smart contract using Wagmi.
4
+ * Custom hook for writing to a smart contract using Wagmi with optional simulation.
5
5
  *
6
- * This hook provides functionality for writing a contract using Wagmi, handling the asynchronous nature of the operation, waiting for the transaction receipt, and error handling.
7
- *
8
- * @param {WriteExtendedAsyncParams} [settings] - Optional settings for the write operation.
9
- * @param {boolean} [settings.disableWaitingForReceipt] - Disables waiting for the transaction receipt.
10
- * @param {boolean} [settings.disableLogging] - Disables logging the result of the transaction.
11
- * @param {Function} [settings.onSuccess] - Callback function to be called on successful transaction.
12
- * @param {Function} [settings.onError] - Callback function to be called on transaction error.
13
- * @param {Function} [settings.onSettled] - Callback function to be called after the transaction settles (whether success or failure).
14
- * @param {QueryKey[]} [settings.queriesToInvalidate] - Array of query keys to invalidate after the transaction receives a receipt.
15
- * @returns {Object} Object containing the following properties:
16
- * - {boolean} isPending - Indicates whether the transaction is pending.
17
- * - {string|undefined} errorMessage - The error message, if an error occurred during the transaction.
18
- * - {Function} writeContractAsync - Function to trigger the write operation.
19
- *
20
- /**
21
- * Custom hook for writing a contract using Wagmi with extended functionality.
22
- *
23
- * This hook wraps Wagmi’s `useContractWriteX` with additional handling for
24
- * waiting for a transaction receipt, logging control, and invalidation of specified queries.
25
- *
26
- * @param {WriteExtendedAsyncParams} [settings] - Optional settings for handling the transaction.
6
+ * @param {WriteExtendedAsyncParams} settings - Settings for handling transaction lifecycle:
7
+ * @param {boolean} [settings.disableWaitingForReceipt] - Disable waiting for receipt.
8
+ * @param {boolean} [settings.disableLogging] - Disable logging.
9
+ * @param {Function} [settings.onSuccess] - Callback invoked on successful transaction receipt.
10
+ * @param {Function} [settings.onError] - Callback invoked on simulation or transaction error.
11
+ * @param {Function} [settings.onSettled] - Callback invoked after transaction settles.
12
+ * @param {Array<import('@tanstack/query-core').QueryKey>} [settings.queriesToInvalidate] - Query keys to invalidate after receipt.
27
13
  * @returns {Object} An object containing:
28
- * - `isPending`: {boolean} indicating if the transaction is in progress.
29
- * - `errorMessage`: {string|undefined} a potential error message.
30
- * - `writeContractAsync`: {Function} a function to trigger the transaction.
14
+ * - writeContract: Wagmi's writeContract function.
15
+ * - writeContractX: Wrapped writeContract with optional simulation.
16
+ * - isPending: Boolean indicating if transaction is in progress.
17
+ * - errorMessage: Error message if one occurred.
31
18
  *
32
19
  * @example
33
- * // In your component:
34
- * function MyTransactionComponent() {
35
- * const { writeContractAsync, isPending, errorMessage } = useContractWriteX({
36
- * queriesToInvalidate: [["userBalance"], ["userActivity"]],
37
- * });
38
- *
39
- * const handleWrite = async () => {
40
- * try {
41
- * const txHash = await writeContractAsync({ transaction params here.. }, {
42
- * // use calbacks here in writeContractAsync or in useContractWriteX
43
- * onSuccess: (txHash) => console.log("Transaction successful:", txHash),
44
- * onError: (error) => console.error("Transaction error:", error),
45
- * });
46
- * console.log("Received txHash:", txHash);
47
- * } catch (err) {
48
- * console.error("Failed writing transaction:", err);`
49
- * }
50
- * };
51
- *
52
- * return (
53
- * <div>
54
- * <button onClick={handleWrite} disabled={isPending}>
55
- * {isPending ? "Processing..." : "Write Transaction"}
56
- * </button>
57
- * {errorMessage && <p>Error: {errorMessage}</p>}
58
- * </div>
59
- * );
60
- * }
20
+ * const { writeContractX, isPending, errorMessage } = useContractWriteX({ onSuccess: ..., onError: ... });
21
+ * await writeContractX(
22
+ * { abi, address, functionName, args, account, chain, value },
23
+ * disable simulation? = false
24
+ * );
61
25
  */
62
26
  export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
63
- simulateAsyncAndWriteContract: (params: Parameters<import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>>[0]) => Promise<void>;
27
+ writeContractX: (params: Parameters<import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>>[0], disableSimulation?: boolean) => Promise<void>;
64
28
  isPending: boolean;
65
29
  errorMessage: string | undefined;
66
30
  error: null;
@@ -79,7 +43,7 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
79
43
  writeContract: import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>;
80
44
  writeContractAsync: import("wagmi/query").WriteContractMutateAsync<import("wagmi").Config, void>;
81
45
  } | {
82
- simulateAsyncAndWriteContract: (params: Parameters<import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>>[0]) => Promise<void>;
46
+ writeContractX: (params: Parameters<import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>>[0], disableSimulation?: boolean) => Promise<void>;
83
47
  isPending: boolean;
84
48
  errorMessage: string | undefined;
85
49
  error: null;
@@ -223,7 +187,7 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
223
187
  writeContract: import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>;
224
188
  writeContractAsync: import("wagmi/query").WriteContractMutateAsync<import("wagmi").Config, void>;
225
189
  } | {
226
- simulateAsyncAndWriteContract: (params: Parameters<import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>>[0]) => Promise<void>;
190
+ writeContractX: (params: Parameters<import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>>[0], disableSimulation?: boolean) => Promise<void>;
227
191
  isPending: boolean;
228
192
  errorMessage: string | undefined;
229
193
  error: import("@wagmi/core").WriteContractErrorType;
@@ -367,7 +331,7 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
367
331
  writeContract: import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>;
368
332
  writeContractAsync: import("wagmi/query").WriteContractMutateAsync<import("wagmi").Config, void>;
369
333
  } | {
370
- simulateAsyncAndWriteContract: (params: Parameters<import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>>[0]) => Promise<void>;
334
+ writeContractX: (params: Parameters<import("wagmi/query").WriteContractMutate<import("wagmi").Config, void>>[0], disableSimulation?: boolean) => Promise<void>;
371
335
  isPending: boolean;
372
336
  errorMessage: string | undefined;
373
337
  error: null;
@@ -11,7 +11,6 @@ export type WriteExtendedAsyncParams = {
11
11
  queriesToInvalidate?: (QueryKey | undefined)[];
12
12
  /** a predicate to decide which queries to invalidate */
13
13
  invalidatePredicate?: (query: Query<unknown, unknown>) => boolean;
14
- simulationOverrideAbis?: any;
15
14
  disableLogging?: boolean;
16
15
  disableWaitingForReceipt?: boolean;
17
16
  };
@@ -1,56 +1,33 @@
1
1
  import { WriteExtendedAsyncParams } from "./useHandleTransactionMutationX.js";
2
2
  import { writeContract } from "wagmi/actions";
3
3
  /**
4
- * Custom hook for sending a transaction using Wagmi.
4
+ * Custom hook for sending a transaction using Wagmi with optional simulation.
5
5
  *
6
- * This hook provides functionality for sending a transaction using Wagmi, handling the asynchronous nature of the operation, waiting for the transaction receipt, and error handling.
6
+ * @param {WriteExtendedAsyncParams} [settings] - Settings for handling transaction lifecycle:
7
+ * @param {boolean} [settings.disableWaitingForReceipt] - Disable waiting for receipt.
8
+ * @param {boolean} [settings.disableLogging] - Disable logging.
9
+ * @param {Function} [settings.onSuccess] - Callback on success.
10
+ * @param {Function} [settings.onError] - Callback on error.
11
+ * @param {Function} [settings.onSettled] - Callback after settlement.
12
+ * @param {Array<import('@tanstack/query-core').QueryKey>} [settings.queriesToInvalidate] - Query keys to invalidate after receipt.
13
+ * @returns {Object} An object containing:
14
+ * - sendTransaction: Wagmi's sendTransaction function.
15
+ * - sendTransactionX: Wrapped sendTransaction with optional simulation.
16
+ * - isPending: Boolean indicating if transaction is in progress.
17
+ * - errorMessage: Error message if one occurred.
7
18
  *
8
- * @param {WriteExtendedAsyncParams} [settings] - Optional settings for the write operation.
9
- * @param {boolean} [settings.disableWaitingForReceipt] - Disables waiting for the transaction receipt.
10
- * @param {boolean} [settings.disableLogging] - Disables logging the result of the transaction.
11
- * @param {Function} [settings.onSuccess] - Callback function to be called on successful transaction.
12
- * @param {Function} [settings.onError] - Callback function to be called on transaction error.
13
- * @param {Function} [settings.onSettled] - Callback function to be called after the transaction settles (whether success or failure).
14
- * @param {QueryKey[]} [settings.queriesToInvalidate] - Array of query keys to invalidate after the transaction receives a receipt.
15
- * @returns {Object} Object containing the following properties:
16
- * - {boolean} isPending - Indicates whether the transaction is pending.
17
- * - {string|undefined} errorMessage - The error message, if an error occurred during the transaction.
18
- * - {Function} sendTransactionAsync - Function to trigger the send transaction mutation.
19
-
20
19
  * @example
21
- * // In your component:
22
- * function MyTransactionComponent() {
23
- * const { sendTransactionAsync, isPending, errorMessage } = useSendTransactionX({
24
- * // use calbacks here in useContractWriteX or in writeContractAsync
25
- * onSuccess: (txHash) => console.log("Transaction successful:", txHash),
26
- * onError: (error) => console.error("Transaction error:", error),
27
- * queriesToInvalidate: [["userBalance"], ["userActivity"]],
28
- * });
29
- *
30
- * const handleSend = async () => {
31
- * try {
32
- * const txHash = await sendTransactionAsync({ transaction params here.. });
33
- * console.log("Received txHash:", txHash);
34
- * } catch (err) {
35
- * console.error("Failed sending transaction:", err);`
36
- * }
37
- * };
38
- *
39
- * return (
40
- * <div>
41
- * <button onClick={handleSend} disabled={isPending}>
42
- * {isPending ? "Processing..." : "Send Transaction"}
43
- * </button>
44
- * {errorMessage && <p>Error: {errorMessage}</p>}
45
- * </div>
46
- * );
47
- * }
20
+ * const { sendTransactionX, isPending, errorMessage } = useSendTransactionX({ onSuccess: ..., onError: ... });
21
+ * await sendTransactionX(
22
+ * { to, value, data, account, chain },
23
+ * { abi, functionName, args, chain }
24
+ * );
48
25
  */
49
26
  export declare function useSendTransactionX(settings?: WriteExtendedAsyncParams): {
50
27
  isPending: boolean;
51
28
  errorMessage: string | undefined;
52
29
  sendTransaction: import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>;
53
- simulateAsyncAndSendTransaction: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams: Parameters<typeof writeContract>[1]) => Promise<void>;
30
+ sendTransactionX: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams?: Parameters<typeof writeContract>[1]) => Promise<void>;
54
31
  error: null;
55
32
  status: "idle";
56
33
  data: undefined;
@@ -69,7 +46,7 @@ export declare function useSendTransactionX(settings?: WriteExtendedAsyncParams)
69
46
  isPending: boolean;
70
47
  errorMessage: string | undefined;
71
48
  sendTransaction: import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>;
72
- simulateAsyncAndSendTransaction: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams: Parameters<typeof writeContract>[1]) => Promise<void>;
49
+ sendTransactionX: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams?: Parameters<typeof writeContract>[1]) => Promise<void>;
73
50
  error: null;
74
51
  status: "pending";
75
52
  data: undefined;
@@ -88,7 +65,7 @@ export declare function useSendTransactionX(settings?: WriteExtendedAsyncParams)
88
65
  isPending: boolean;
89
66
  errorMessage: string | undefined;
90
67
  sendTransaction: import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>;
91
- simulateAsyncAndSendTransaction: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams: Parameters<typeof writeContract>[1]) => Promise<void>;
68
+ sendTransactionX: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams?: Parameters<typeof writeContract>[1]) => Promise<void>;
92
69
  error: import("wagmi/actions").SendTransactionErrorType;
93
70
  status: "error";
94
71
  data: undefined;
@@ -107,7 +84,7 @@ export declare function useSendTransactionX(settings?: WriteExtendedAsyncParams)
107
84
  isPending: boolean;
108
85
  errorMessage: string | undefined;
109
86
  sendTransaction: import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>;
110
- simulateAsyncAndSendTransaction: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams: Parameters<typeof writeContract>[1]) => Promise<void>;
87
+ sendTransactionX: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams?: Parameters<typeof writeContract>[1]) => Promise<void>;
111
88
  error: null;
112
89
  status: "success";
113
90
  data: `0x${string}`;