Getting Started
1
Import Dependencies
2
Create Relayer Client
To create an API Key, visit the Gelato App and navigate to
Relayer > API Keys.3
Send Sync Transaction
Submit a transaction and wait for the final result:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chainId | number | Yes | Target chain ID |
to | Address | Yes | Target contract address |
data | Hex | Yes | Transaction calldata |
payment | Payment | Yes | sponsored(), token(addr), or native() |
timeout | number | Yes | Max wait time in milliseconds |
authorizationList | Authorization[] | No | EIP-7702 authorizations |
context | unknown | No | Optional context (e.g., from fee quote) |
Return Type: TerminalStatus
The sync method returns aTerminalStatus object:
| Code | Value | Description |
|---|---|---|
Included | 200 | Transaction successfully included on-chain |
Rejected | 400 | Transaction rejected by relayer |
Reverted | 500 | Transaction reverted on-chain |
Async vs Sync Comparison
- Async (sendTransaction)
- Sync (sendTransactionSync)
Additional Resources
- Sync Methods Overview - Feature overview
- Payment Methods - Available payment options
- Tracking Requests - How to track transaction status