Skip to main content
Gelato is deprecating the Relay SDK (@gelatonetwork/relay-sdk) in favor of the new Gasless SDK (@gelatocloud/gasless). The new SDK only supports sponsored transactions. ERC-2771 and SyncFee methods are no longer supported.

What’s Being Deprecated?

The following packages and patterns will no longer be supported:
  • @gelatonetwork/relay-sdk package
  • GelatoRelay class and all its methods
  • sponsoredCall() method
  • sponsoredCallERC2771() method — no longer supported, see ERC-2771 Migration Guide
  • callWithSyncFee() and callWithSyncFeeERC2771() methods — no longer supported, see SyncFee Migration Guide

What’s Supported in the Gasless SDK?

The Gasless SDK only supports sponsored transactions (Gas Tank). The following legacy methods have no equivalent in the new SDK:

Migration Overview

Migration Steps

1

Update Dependencies

Remove the old SDK and install the new one:
2

Update Imports

Before (Relay SDK):
After (Gasless SDK):
3

Update Client Initialization

Before (Relay SDK):
After (Gasless SDK):
4

Update Sponsored Call

Before (Relay SDK):
After (Gasless SDK):
5

Update Status Tracking

Before (Relay SDK):
After (Gasless SDK):
Or use the synchronous method that waits automatically:

Key Differences

API Key Configuration

Before: API key passed with every call
After: API key configured once at client creation

Request Format

Before:
After:

Complete Migration Example

Migrating from ERC-2771 or SyncFee?

If you were using sponsoredCallERC2771, callWithSyncFee, or callWithSyncFeeERC2771, these methods are not available in the new Gasless SDK. See the dedicated migration guides:

ERC-2771 Migration

Migrate from trusted forwarders to your own forwarder

SyncFee Migration

Migrate from SyncFee to sponsored transactions

Migration Checklist

  • Uninstall @gelatonetwork/relay-sdk
  • Install @gelatocloud/gasless and viem
  • Replace new GelatoRelay() with createGelatoEvmRelayerClient()
  • Replace sponsoredCall() with sendTransaction({ chainId, to, data })
  • Update target field to to in request
  • Replace manual polling with waitForReceipt() or use sendTransactionSync()
  • If using ERC-2771 or SyncFee, follow the dedicated migration guides above
  • Test on testnet
  • Deploy to production

Need Help?

If you have questions about migrating from the Relay SDK, please reach out through our GitHub.