useMutation
Callable
Type parameters
- TAction: (builder: Chains) => Transaction<any, any, any, any>
- TChainId: ChainId
Parameters
action: TAction
The function to create the transaction
optionaloptions: ChainHookOptions<TChainId> & { signer?: PolkadotSigner; txOptions?: Partial<void extends ReturnType<TAction> extends Transaction<_Args, _Pallet, _Tx, Asset> ? Asset : void ? {} : {}> }
Additional options
Returns [event: AsyncValue<TResult, TError>, submit: (...args: [options?: Partial<void extends ReturnType<TAction> extends Transaction<_Args, _Pallet, _Tx, Asset> ? Asset : void ? {} : {}> & { signer: PolkadotSigner }]) => void]
The current transaction state & submit function
Hook for sending transactions to chains.