useContractWrite
Mke a write call to your contract
Example
const { contract } = useContract("{{contract_address}}");
const {
mutate: myFunction,
isLoading,
error,
} = useContractWrite(contract, "myFunction");
// the function can be called as follows:
// myFunction(["param 1", "param 2", ...])
Parameters
Returns
a response object that includes the write function to call