Beta
an instance of a Marketplace contract
a mutation object that can be used to make a bid on an auction listing
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: makeBid,
isLoading,
error,
} = useMakeBid(contract);
if (error) {
console.error("failed to make a bid", error);
}
return (
<button
disabled={isLoading}
onClick={() => makeBid({ listingId: 1, bid: 2 })}
>
Bid!
</button>
);
};
Generated using TypeDoc
Make a bid on an auction listing