View Facet

Changes:

Added Utility View Functions

getPositionsFilteredByPartyB()

Description: Fetches positions where Party B is involved, filtered by Party B.

function getPositionsFilteredByPartyB(
    address partyB,
    uint256 start,
    uint256 size
) external view returns (Quote[] memory)

Parameters:

  • partyB - Address of Party B (the solver/hedger).

  • start - Starting index.

  • size - Number of positions to retrieve.

Returns: An array of Quote structs representing positions for Party B.

getOpenPositionsFilteredByPartyB()

Description: Fetches open positions where Party B is involved, filtered by Party B.

Parameters:

  • partyB - Address of Party B (the solver/hedger).

  • start - Starting index.

  • size - Number of open positions to retrieve.

Returns: An array of Quote structs representing open positions for Party B.

getActivePositionsFilteredByPartyB()

Description: Fetches active positions where Party B is involved, filtered by Party B.

Parameters:

  • partyB - Address of Party B (the solver/hedger).

  • start - Starting index.

  • size - Number of active positions to retrieve.

Returns: An array of Quote structs representing active positions for Party B.

getQuotesWithBitmap()

Description: Fetches quotes using a bitmap filter.

Parameters:

  • bitmap - A Bitmap struct used to filter the quotes.

    • Bitmap struct:

      • size - Size of the bitmap.

      • elements - Array of BitmapElement structs.

    • BitmapElement struct:

      • offset - Offset of the bitmap element.

      • bitmap - The bitmap value.

  • gasNeededForReturn - The amount of gas needed for the function to return the quotes.

Returns: An array of Quote structs representing the filtered quotes.

Updated ForceClose View Functions

getDeallocateDebounceTime()

Explanation: Returns the current deallocate debounce time.

forceCloseCooldowns()

Explanation: Returns the first and second cooldown periods for force closing.

deallocateCooldown()

Explanation: Returns the current deallocate cooldown period.

getBridgeTransaction()

Explanation: Returns the details of a bridge transaction specified by transactionId.

getNextBridgeTransactionId()

Explanation: Returns the ID for the next bridge transaction.

getQuoteCloseId()

Explanation: Returns the close ID associated with a specified quote ID.

Changed Function Signatures

pauseState

Before:

After:

Explanation: Added internalTransferPaused to the return values to indicate if internal transfers are paused.

Last updated