Skip to content

Info about Token Exchange

You can retrieve a variety of information about a token exchange using the methods provided by the TokenExchangeContract and TokenExchange1155Contract classes. Here are the details you can access:

  1. Refutation Details: You can retrieve the details of refutation events, including exchange refutations and refutation nullifications, using the refutationDetails method.

  2. Refutations Timeline: The refutationsTimeline method fetches the refutation timeline based on ExchangeRefuted and RefutationNullified events.

  3. Balances: To check the balance of a specific address, you can use the getBalance method.

  4. Tokens Involved: The getTokens method fetches balances for all token ID and address pairs from TransferSingle and TransferBatch events.

  5. Exchange Type: The getExchangeType method retrieves the current exchange type for the contract.

  6. Exchange Request Details: The exchangeRequestDetail method retrieves details of all completed exchange requests associated with the sales order.

  7. Owner Details: The getOwner method retrieves the owner details of the exchange.

  8. Base Token Information: The getBaseTokenAddress and getBaseTokenId methods retrieve the base token address and ID of the token exchange.

  9. Quote Token Information: The getQuoteTokenAddress and getQuoteTokenId methods retrieve the quote token address and ID.

  10. Exchange Ratio: The getRatio method retrieves the exchange ratio as a string.

  11. Exchange Window: The getExchangeWindow method retrieves the exchange window details of the token exchange.

  12. Refutation Window: The getRefutationWindow method retrieves the refutation window details of the exchange.

  13. URI: The getUri method retrieves the URI associated with the token exchange.

  14. General Details: The getDetails method retrieves all relevant details of the token exchange.

These methods provide comprehensive information about the token exchange, including its refutation details, balances, tokens involved, and other relevant parameters.