IOrderbookFactory
This Solidity smart contract defines an interface for the Orderbook Factory contract. Let's break down the variables, events, and functions present in this contract:
Variables
PriceLinkedList
(struct)
PriceLinkedList
(struct)A struct containing the addresses of the base and quote assets.
base
address
The address of the base asset in the trading pair.
quote
address
The address of the quote asset in the trading pair.
Functions
createBook
createBook
Creates a new orderbook contract with the specified bid asset, ask asset, and engine.
Parameters
bid_
address
The address of the bid asset.
ask_
address
The address of the ask asset.
engine_
address
The address of the engine contract.
Returns
orderbook
address
The address of the created orderbook contract.
getBook
getBook
Retrieves the orderbook contract address associated with the specified book ID.
Parameters
bookId_
uint256
The ID of the orderbook.
Returns
orderbook
address
The address of the orderbook contract.
getBookByPair
getBookByPair
Retrieves the orderbook contract address associated with the specified base and quote assets.
Parameters
base
address
The address of the base asset.
quote
address
The address of the quote asset.
Returns
book
address
The address of the orderbook contract.
getBaseQuote
getBaseQuote
Retrieves the base and quote assets associated with the specified orderbook contract.
Parameters
orderbook
address
The address of the orderbook contract.
Returns
base
address
The address of the base asset.
quote
address
The address of the quote asset.
engine()
engine()
Retrieves the address of the engine contract.
Returns
engine
address
The address of the engine contract.
getPairs
getPairs
Retrieves an array of pairs (base and quote assets) within the specified range.
Parameters
start
uint
The start index of the range.
end
uint
The end index of the range.
Returns
pairs
Pair[] memory
An array of pairs (base and quote assets).
Last updated