Relay gasless transactions

Relay gasless
transactions

Available on all major EVM compatible networks
to supercharge your Web3 UX

Introduction
How it works
  • Off chain
  • On chain
  • 0
  • 1
  • 2
  • Users sign a message off-chain to interact with your Web3 app.

Easy to integrate

Import the Gelato Relay SDK
into your application

1

Make your target contract compatible with ERC2771

Solidity
import {
    ERC2771Context
} from "@gelatonetwork/relay-context/contracts/vendor/ERC2771Context.sol";

contract GaslessCounter is ERC2771Context {
    mapping(address => uint256) public counter;

    constructor(address trustedForwarder) ERC2771Context(trustedForwarder) {}
    
    // Target function 🎯
    function increment() external {
        counter[_msgSender()]++;
    }
}
2

Using Gelato Relay SDK, call your target function gaslessly with user signature authentication

Javascript
import { GelatoRelaySDK } from "@gelatonetwork/relay-sdk";

const counter = "0x...";
const abi = ["function increment()"];
const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = provider.getSigner();
const user = signer.getAddress();

const contract = new ethers.Contract(counter, abi, signer);
const { payload } = await contract.populateTransaction.increment();

const relayRequest = {
  chainId: provider.network.chainId;
  target: counter;
  data: payload;
  user: user;
};

const apiKey = "stracciatella";

// Get user signature and send relay request to Gelato Relay
const relayResponse =
  await GelatoRelaySDK.relayWithSponsoredCallERC2771(relayRequest, provider, apiKey);

console.log(relayResponse);

1Balance System

Pay for all of your gasless transactions on all EVM chains with a single balance

Scalable

Gelato adapts to your needs, whether you have 10 or 1,000,000 users

Reliable
Transactions are mined within a couple of blocks, eliminating network reliability issues without sacrificing decentralization
Flexible payments
A variety of whitelisted ERC-20 tokens are accepted as either prepayments or in-execution payments
Multichain
Gelato supports all major networks for gasless transactions, including cross-chain bridging

Explore

Use Cases

Bridge
Gasless Cross-Chain Asset Bridging
Connext
Hyperlane
Kinetex
NFT
NFT Limit Orders
NFTrade
nftperp
Social Media
Gasless Social Media Experience
Koru DAO
Gaming
Gasless Minting of NFTs
Zora
Flair
R3NLT
Fantium
Used by
Safe

Safe

Connext

Connext

NFTrade

NFTrade

Pudgy Penguins

Pudgy Penguins

Supported Networks
Gelato Web3 Functions are available on more than 30 networks, with new networks added every week
Interested in adding Gelato to your network?
If you operate an EVM-compatible network, deploy our market-leading middleware solution for your developers.