- useWriteContract<TContract, TFunctionName>(contract: null | Contract | TContract, functionName: TFunctionName, options?: { confirmations?: number; onConfirmation?: any; onError?: any; onResponse?: any }): { error: null | Error; response: undefined | ContractTransaction; mutate: any }
Type parameters
Parameters
contract: null | Contract | TContract
functionName: TFunctionName
optionaloptions: { confirmations?: number; onConfirmation?: any; onError?: any; onResponse?: any }
Returns { error: null | Error; response: undefined | ContractTransaction; mutate: any }
error: null | Error
response: undefined | ContractTransaction
mutate: function
- mutate(...args: Parameters<ContractFunctions<TContract>[TFunctionName]>): Promise<void>
Parameters
Returns Promise<void>
Write to a contract