Hooks
useAuctionSettings

useAuctionSettings

Hook for querying a the auction settings of a DAO.

import { useAuctionSettings } from '@public-assembly/builder-utils'

Usage

import { useAuctionSettings } from '@public-assembly/builder-utils'
 
function App() {
  const { auctionSettings } = useAuctionSettings()
 
  return (
    <>
      <p>Minimum bid increment: {auctionSettings?.[0]}</p>
      <p>Reserve price: {auctionSettings?.[1]}</p>
      <p>Auction duration: {auctionSettings?.[2]}</p>
    </>
  )
}

Returns

{
  auctionSettings: ({
      error: Error;
      result?: undefined;
      status: "failure";
  } | {
      error?: undefined;
      result: unknown;
      status: "success";
  })[] | undefined
}