Learn how to check the status of your relay request
When submitting your Gelato Relay requests, you’ll receive a taskId in response. This taskId allows you to track the status of your request in two primary ways:
Websocket Subscriptions: This is the recommended and most efficient method. By subscribing via websocket, the Gelato backend will automatically push updates for all your tasks to your Relay SDK client. To start receiving these updates, you must register a callback function which will be triggered every time one of your tasks gets updated.
Polling for Updates: Alternatively, you can periodically query the Gelato task status API for updates. If you’re using the Gelato Relay SDK, the getTaskStatus method makes this easy.
For both methods, if you aren’t using the Gelato Relay SDK package, you can still interact directly with the websocket or REST APIs, as detailed in the documentation linked here.
Support for Websocket Subscriptions was introduced in Gelato Relay SDK version 5.5.0, make sure to update your package.You can subscribe to websocket updates by registering a callback handler function like this:
The error message in this case refers to the target contract reverting with the message “root already sent” when being called by Gelato Relay’s sponsoredCall function. If you get something similar and you are stuck on troubleshooting, then try:
For those who prefer to troubleshoot issues independently, you can use our API endpoint to fetch detailed execution logs. Ensure you have a Tenderly account, as this will allow you to access direct simulations of your tasks on Tenderly, providing deeper insights into what may have gone wrong during execution. This tool is especially useful for developers looking to quickly identify and rectify errors in their smart contract interactions. Head over to Debug Endpoint to learn more about the API.If you don’t want to make use of tenderly, you can copy the data returned from the API to either foundry or a simulation software of your choice.Otherwise, please get in touch with us via Discord and ask in the relay channel! We will be sure to figure out what’s going on.