🕵
Tracking your Relay Request
Learn how to check the status of your relay request
For the initial rollout of Gelato Relay, we have a basic way to keep track of your relay requests. This status tracking system is currently undergoing a lot of upgrades so expect the system to be a lot more informative, flexible and robust in the near future.
https://api.gelato.digital/tasks/status/:taskId
For example, if your
taskId
returned from your relay response is:taskId: 0x93a3defc618ff97c32a37bdd567b15c50748a5c3e8e858bca67f0c967b74a7fe
then the URL to go to is:
https://api.gelato.digital/tasks/status/0x93a3defc618ff97c32a37bdd567b15c50748a5c3e8e858bca67f0c967b74a7fe
For this
taskId
, here is the returned task information:{
"task": {
"chainId": 5,
"taskId": "0x93a3defc618ff97c32a37bdd567b15c50748a5c3e8e858bca67f0c967b74a7fe",
"taskState": "ExecSuccess",
"creationDate": "2022-10-10T10:15:03.932Z",
"executionDate": "2022-10-10T10:15:28.718Z",
"transactionHash": "0x9d260d1bbe075be0cda52a3271df062748f3182ede91b3aae5cd115f7b26552b",
"blockNumber": 7744557
}
}
The first thing to look at is the
taskState
key:For the
taskState
key, these are the possible values:CheckPending
: the relay request has been received by Gelato Relay (pending simulation).ExecPending
: the relay task is executable and is awaiting inclusion into the blockchain.WaitingForConfirmation
: the task was included into the blockchain but is still awaiting the required amount of blocks confirmations.ExecSuccess
: the task has been successfully executed.Cancelled
: the task has been cancelled due to failed simulations or other errors.- In the case of
Cancelled
: the error message will be shown in thelastChecked
key.
ExecReverted
: the task transaction has been reverted.
If your task is cancelled, you can find your error message under the
lastCheckMessage
key, for example:{
"task": {
"chainId": 56,
"taskId": "0x5f0200652404f9f113a757b4208984f7f4ca25754ddd5c49ca28330e72160c12",
"taskState": "Cancelled",
"creationDate": "2023-03-03T14:01:14.327Z",
"lastCheckDate": "2023-03-03T14:01:44.128Z",
"lastCheckMessage": "Execution error: GelatoRelay.sponsoredCall:root already sent"
}
}
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, 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.- 1.Clone the repo and enter the directory:
git clone https://github.com/gelatodigital/relay-docs-examples && cd relay-docs-examples
2. Install dependencies
npm install && npm install -g ts-node
OR
yarn install && yarn global add ts-node
3. Run an example script - in this case, we are running a script which submits a relay request which triggers the
emitBalance
event on the MyDummyWallet
contract on Goerli.ts-node src/examples/relayWithSyncFee/emitBalance.ts goerli
4. Read the terminal logs
Sending Gelato Relay request with parameters:
* Requested network: goerli
* Target contract: 0xA045eb75e78f4988d42c3cd201365bDD5D76D406
* Data: 0xa9cc0927
* FeeToken: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
🍦--------------------------------------------------------------------------🍦
🎉 Request sent successfully 🎉, your relay task ID is 0x93a3defc618ff97c32a37bdd567b15c50748a5c3e8e858bca67f0c967b74a7fe
Click here to see more details from our status API:
* https://api.gelato.digital/tasks/status/0x93a3defc618ff97c32a37bdd567b15c50748a5c3e8e858bca67f0c967b74a7fe/
🍦--------------------------------------------------------------------------🍦
Click here to see your relayed message on-chain!:
https://goerli.etherscan.io/address/0xA045eb75e78f4988d42c3cd201365bDD5D76D406/#events
Command + double click on the links above if you are on MacOS!
Last modified 4mo ago