Skip to main content

OrderId

OrderId

OrderIdLibrary

encode

function encode(BookId bookId, Tick tick, uint40 index) internal pure returns (OrderId id)

Encode the order id.

Parameters

NameTypeDescription
bookIdBookIdThe book id.
tickTickThe tick.
indexuint40The index.

Return Values

NameTypeDescription
idOrderIdThe order id.

decode

function decode(OrderId id) internal pure returns (BookId bookId, Tick tick, uint40 index)

getBookId

function getBookId(OrderId id) internal pure returns (BookId bookId)

getTick

function getTick(OrderId id) internal pure returns (Tick tick)

getIndex

function getIndex(OrderId id) internal pure returns (uint40 index)