useMutation
Callable
Type parameters
- TAction: (builder: any) => Transaction<any, any, any, any>
- TChainId: any
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 [state: AsyncValue<Value, MutationError>, execute: (...args: [submitOptions?: Partial<void extends ReturnType<TAction> extends Transaction<_Args, _Pallet, _Tx, Asset> ? Asset : void ? {} : {}> & { signer?: PolkadotSigner }]) => Promise<void> | Subscription]
The current transaction state & submit function
Hook for sending transactions to chains.