Practical overview
When it fits
Use Gsn when an Ethereum application needs a relayer-backed way to sponsor contract transaction fees and its developers can implement recipient support and decide how sponsorship is funded and governed.
Who it is for
- Ethereum dApp developers adding sponsored transactions to contract interactions.
- Teams designing onboarding flows that let users interact without holding ETH for transaction fees.
- Developers integrating a relayer-backed flow with Web3.js or Ethers.js providers.
Documented uses
- Route outgoing Ethereum transactions from an application through a Relay Provider.
- Let a relay server submit transactions and pay gas up front.
- Configure a Paymaster to define when application funds cover relayer costs.
- Adapt a target Solidity contract to accept forwarded calls through a trusted forwarder.
Requirements & limits
The project is documented in a public GitHub repository. The README provides a Yarn installation command for the provider package.
- The documented components are a Node.js relay server, a TypeScript Relay Provider and GSN smart contracts.
- The Relay Provider wraps an existing Ethereum provider and routes outgoing transactions through GSN.
- A recipient contract must support ERC2771Recipient and be configured with a trusted forwarder.
- The application's Paymaster determines which transactions it will cover, and its RelayHub balance funds reimbursement.
- The repository identifies AcceptEverythingPaymaster as a testing-only example that may be drained on a real network.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up the GSN provider and recipient contract
Add the documented GSN client provider and ERC-2771 recipient support to an Ethereum application.
Before you start
- An application using an existing Web3.js or Ethers provider.
- A Paymaster address for the provider configuration.
- A target Solidity contract that can inherit ERC2771Recipient and be configured with a trusted forwarder.
Steps
Install the client package with
yarn add @opengsn/provider.Initialize RelayProvider where the application normally initializes its Ethereum provider, using the paymaster address in its configuration.
Use the documented Web3.js provider method or the relevant Ethers.js provider method to create the GSN provider.
Add ERC2771Recipient to the target contract and set its trusted forwarder.
Expected outcome
The application has a GSN-wrapped provider and a recipient contract configured for the documented forwarded-transaction pattern.
Guide limitations
- This setup does not define the application's Paymaster eligibility policy or fund its RelayHub balance.
- The repository says Paymaster samples may not match a project's needs; AcceptEverythingPaymaster is for testing and may be drained on a real network.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- opengsn/gsn · Official homepage title · retained in its source language

