getOrder
Action for fetching order infos.
Import
import { getOrder } from '@arkproject/core'
Usage
import { getOrder } from '@arkproject/core'
import { config } from './config'
const { order } = await getOrder(config, {
orderHash: '...',
})
Parameters
import { type GetOrderParameters } from "@arkproject/core"
orderHash
bigint
Orderhash to get order infos for.
Function Description
getOrder
begins by extracting the order hash from the provided parameters. It then retrieves the ABI of the orderbook contract using the Starknet provider. If the ABI is undefined, an error is thrown. The function creates a Contract
instance with the orderbook contract's ABI and address, and calls the get_order
method with the compiled order hash. It returns the retrieved order details.