Commonly used Hooks

Most Commonly Used Hooks

In our application, we frequently utilize a set of custom hooks to streamline various functionalities. Becoming familiar with these hooks will provide a deeper understanding of the app's core operations.

  • useActiveWeb3React: Returns the active account, chain ID, provider, and connector.

  • useSupportedChainId: Verifies whether the active chain ID is supported.

  • useMarket: Retrieves the marketId and returns relevant market information.

  • useActiveMarket: Returns information about the currently active market on the website.

  • useTradePage: Provides stored variables related to the trade section, such as balance and user-inputted amounts.

  • useWebSocketStatus: Checks the status of the WebSocket connection.

  • useActiveAccountAddress: Returns the active user's account address.

  • useQuoteDetail: Returns selected quote information.

  • useSingleContractMultipleMethods: Executes multiple methods within a single contract using multicall.

Last updated