createCollectionOffer

Action for creating a collection offer.

Import

import { createCollectionOffer } from '@arkproject/core'

Usage

import { createCollectionOffer } from '@arkproject/core'
import { config, account, brokerAddress } from './config'

const { offerHash } = await createCollectionOffer(config, {
  account,
  brokerAddress,
  tokenAddress:
    '0x02acee8c430f62333cf0e0e7a94b2347b5513b4c25f699461dd8d7b23c072478',
  amount: BigInt(1000),
})

Returns

CreateCollectionOfferResult

The result of the create collection offer action, including the offer hash.

Parameters

  • Name
    account
    Type
    AccountInterface
    Description

    The account responsible for executing the transaction.

  • Name
    brokerAddress
    Type
    string
    Description

    The address of the broker contract.

  • Name
    tokenAddress
    Type
    string
    Description

    The contract address of the token.

  • Name
    currencyAddress (optional)
    Type
    string
    Description

    The currency address for the offer. Defaults to ETH.

  • Name
    amount
    Type
    bigint
    Description

    The amount of the offer.

  • Name
    startDate (optional)
    Type
    number
    Description

    The start date of the auction.

  • Name
    endDate (optional)
    Type
    number
    Description

    The end date of the auction.

  • Name
    waitForTransaction (optional)
    Type
    boolean
    Description

    If false, the function will return immediately after sending the transaction. Defaults to true.