Skip to main content

Import

Usage

Make sure you have followed the Getting Started guide to get the collection address and chainId.

Example

Example of implementing the make offer functionality using the useMakeOfferModal hook:

Parameters

The hook accepts an optional callbacks object with the following properties:

Return Type

The hook returns an object with the following methods:

Methods

show

(args: ShowMakeOfferModalArgs) => void Opens the make offer modal with the specified parameters.

OrderbookKind Values

You can import the OrderbookKind type from the marketplace SDK:

close

() => void Closes the make offer modal.

Notes

The useMakeOfferModal hook provides a convenient way to manage the make offer modal interface for creating offers on collectibles. It handles:
  • Opening and closing the modal
  • Managing the offer creation flow state
  • Token approval for the offer currency (if required)
  • Error handling and success callbacks
  • Support for different marketplace orderbooks
  • Offer expiration date management (defaults to 7 days)
  • Currency selection and price input validation
The modal allows users to:
  • Select the offer price and currency
  • Set the offer quantity (for ERC-1155 tokens)
  • Choose an expiration date for the offer
  • Complete the necessary blockchain transactions (approval + offer creation)