createAuction
Action for creating an auction.
Import
import { createAuction } from '@arkproject/core'
Usage
import { createAuction } from '@arkproject/core'
import { config, account, brokerAddress } from './config'
const { orderHash } = await createAuction(config, {
account,
brokerAddress,
tokenAddress:
'0x02acee8c430f62333cf0e0e7a94b2347b5513b4c25f699461dd8d7b23c072478',
tokenId: BigInt(1),
startAmount: BigInt(1000),
endAmount: BigInt(10000),
})
Returns
The result of the create auction action.
Parameters
- Name
account
- Type
- AccountInterface
- Description
The account responsible for executing the transaction.
- Name
brokerAddress
- Type
- string
- Description
The address of the broker.
- Name
tokenAddress
- Type
- string
- Description
The contract address of the token.
- Name
tokenId
- Type
- bigint
- Description
The ID of the token.
- Name
startAmount
- Type
- bigint
- Description
The starting amount of the auction.
- Name
endAmount (optional)
- Type
- bigint
- Description
The end amount (reserve price) of the auction.
- 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 totrue
.