Skip to main content

Import

Usage

Return Type: UseERC1155SaleContractCheckoutReturnType

The hook returns an object with the following properties:

Properties

openCheckoutModal

() => void Function to open the checkout modal with the configured ERC-1155 purchase.

closeCheckoutModal

() => void Function to close the checkout modal.

selectPaymentSettings

SelectPaymentSettings | undefined
The current payment settings configuration for the modal.

isLoading

boolean Whether the contract data is still loading.

isError

boolean Whether there was an error loading the contract data.

Parameters

The hook accepts a configuration object with the following properties:

Notes

This hook simplifies the process of purchasing ERC-1155 tokens by automatically:
  • Fetching price information from the sale contract
  • Determining payment options (crypto, credit card, etc.)
  • Generating the proper transaction data
  • Opening and managing the checkout modal

Deprecation Notice

The useERC1155SaleContractPaymentModal hook is deprecated. Use useERC1155SaleContractCheckout instead.