an instance of a Marketplace contract
a mutation object that can be used to create a new direct listing
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: createDirectListing,
isLoading,
error,
} = useCreateDirectListing(contract);
if (error) {
console.error("failed to create direct listing", error);
}
return (
<button
disabled={isLoading}
onClick={() => createDirectListing(directListingData)}
>
Create Direct Listing!
</button>
);
};
DirectListings
Generated using TypeDoc
Create a new direct listing