What’s Being Deprecated?
The following packages and patterns will no longer be supported:@gelatonetwork/relay-sdkpackageGelatoRelayclass and all its methodssponsoredCall()methodsponsoredCallERC2771()method — no longer supported, see ERC-2771 Migration GuidecallWithSyncFee()andcallWithSyncFeeERC2771()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 callRequest Format
Before:Complete Migration Example
- Before (Relay SDK)
- After (Gasless SDK)
Migrating from ERC-2771 or SyncFee?
If you were usingsponsoredCallERC2771, 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/gaslessandviem - Replace
new GelatoRelay()withcreateGelatoEvmRelayerClient() - Replace
sponsoredCall()withsendTransaction({ chainId, to, data }) - Update
targetfield totoin request - Replace manual polling with
waitForReceipt()or usesendTransactionSync() - If using ERC-2771 or SyncFee, follow the dedicated migration guides above
- Test on testnet
- Deploy to production