useContractMutation()
function useContractMutation<TAction>(action, options?): [AsyncValue<TxEvent, MutationError>, (...args) => Observable];
Defined in: packages/react/src/hooks/use-contract-mutation.ts:37
Hook for mutating (writing to) a contract.
Type Parameters
| Type Parameter |
|---|
TAction extends (builder, variables) => MaybePromise<GenericTransaction> |
Parameters
| Parameter | Type | Description |
|---|---|---|
action | TAction | The function to create the transaction |
options? | Partial<ChainOptions<string | number | undefined>> & object | Additional options |
Returns
[AsyncValue<TxEvent, MutationError>, (...args) => Observable]
The current transaction state & submit function