Beta
an instance of a Marketplace contract
a mutation object that can be used to buy out an auction listing
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: buyNow,
isLoading,
error,
} = useBuyNow(contract);
if (error) {
console.error("failed to buyout listing", error);
}
return (
<button
disabled={isLoading}
onClick={() => buyNow({listingId: 1, type: ListingType.Auction})}
>
Buy listing!
</button>
);
};
Generated using TypeDoc
Buy out an auction listing