HasIndexedBidsAndAsks
HasIndexedBidsAndAsksβ
utilizes the IHasOfferListOfOfferType
contract.
SetLengthβ
event SetLength(uint256 value)
the length of the index has been set. By emitting this data, an indexer will be able to keep track of what length is used.
Parametersβ
Name | Type | Description |
---|---|---|
value | uint256 | the length. |
SetIndexMappingβ
event SetIndexMapping(enum OfferType ba, uint256 index, uint256 offerId)
a new offer of type ba
with offerId
was created at price index
By emitting this data, an indexer will be able to keep track of what offer has what index.
Parametersβ
Name | Type | Description |
---|---|---|
ba | enum OfferType | the offer type |
index | uint256 | the index |
offerId | uint256 | the Mangrove offer id. |
lengthβ
uint256 length
the length of the map.
offerIdOfIndexβ
function offerIdOfIndex(enum OfferType ba, uint256 index) public view returns (uint256 offerId)
maps index of offers to offer id on Mangrove.
Parametersβ
Name | Type | Description |
---|---|---|
ba | enum OfferType | the offer type |
index | uint256 | the index |
Return Valuesβ
Name | Type | Description |
---|---|---|
offerId | uint256 | the Mangrove offer id. |
indexOfOfferIdβ
function indexOfOfferId(enum OfferType ba, uint256 offerId) public view returns (uint256 index)
Maps an offer type and Mangrove offer id to index.
Parametersβ
Name | Type | Description |
---|---|---|
ba | enum OfferType | the offer type |
offerId | uint256 | the Mangrove offer id. |
Return Valuesβ
Name | Type | Description |
---|---|---|
index | uint256 | the index. |
setIndexMappingβ
function setIndexMapping(enum OfferType ba, uint256 index, uint256 offerId) internal
Sets the Mangrove offer id for an index and vice versa.
Parametersβ
Name | Type | Description |
---|---|---|
ba | enum OfferType | the offer type |
index | uint256 | the index |
offerId | uint256 | the Mangrove offer id. |
setLengthβ
function setLength(uint256 length_) internal
sets the length of the map.
Parametersβ
Name | Type | Description |
---|---|---|
length_ | uint256 | the new length. |