Skip to main content
Gelato is deprecating the SyncFee payment methods. The old callWithSyncFee and GelatoRelayContext patterns will no longer be available, and Gelato will not provide a replacement. To continue collecting fees from users, you must implement token collection as part of your custom contract logic and use sponsored transactions.

Migration Examples Repository

Complete migration examples with contracts, deployment scripts, and step-by-step code.

What’s Being Deprecated?

The following patterns will no longer be supported:
  • callWithSyncFee SDK method
  • GelatoRelayContext contract inheritance
  • _transferRelayFee() function
  • onlyGelatoRelay modifier
  • Automatic fee data encoding in calldata

Use Sponsored Transactions

We recommend migrating to sponsored transactions using the Gas Tank. This provides a better user experience and simpler implementation.

Sponsor Gas with Gas Tank

Learn how to sponsor transactions for your users

Collect Tokens in Your Contract Logic

If you need to collect tokens from users to cover costs, implement this as part of your custom contract logic:
Then sponsor the transaction using Gelato’s Gas Tank:

Migration Steps

1

Update Your Contract

  1. Remove GelatoRelayContext inheritance
  2. Remove _transferRelayFee() calls
  3. Remove onlyGelatoRelay modifier
  4. Add your own token collection logic if needed
2

Update Your Frontend

  1. Replace callWithSyncFee with sendTransaction
  2. If collecting tokens, add the token transfer logic to your contract call
3

Fund Your Gas Tank

Deposit funds in your Gas Tank to sponsor transactions for your users.

Gas Tank

Learn how to manage your Gas Tank

Need Help?

If you have questions about migrating from SyncFee, please reach out through our GitHub.