Beta
an instance of a Marketplace contract
a mutation object that can be used to accept an offer on a direct listing
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: executeAuctionSale,
isLoading,
error,
} = useExecuteAuctionSale(contract);
if (error) {
console.error("failed to execute sale", error);
}
return (
<button
disabled={isLoading}
onClick={() => executeAuctionSale({ listingId: 1 })}
>
Execute sale
</button>
);
};
Generated using TypeDoc
Execute an auction sale. Can only be executed once the auction has ended and the auction has a winning bid.