useTransferName
Transfers a name to another account. Signature, options, result and examples for useTransferName in @ensforge/react. Includes examples.
Write hookstable
Since v1.0.0View source
Transfers a name to another account. Preset of useWrite(Actions.name.transfer).
It wraps name.transfer: the same options, result and errors.
Signature
function useTransferName(config?: Parameters<typeof useWrite>[1]): WriteResult< Parameters<typeof Actions.name.transfer>[1], Actions.name.transfer.ReturnType, Actions.name.transfer.ErrorType >Examples
import { useTransferName } from "@ensforge/react"
function Send() {
const { mutate, isPending } = useTransferName()
return <button disabled={isPending} onClick={() => mutate({ name: "alice.eth", to: recipient })}>Send</button>
}See also
- The hook types:
ReadResult,WriteResultandReadConfig.
Was this page helpful?