Using Gelato Relay, we relay your user's transactions on-chain, enabling secure gasless transactions for an ultra-smooth UX for your app. This allows for a variety of new web3 experiences, as the user can now pay by only signing a message, or their transaction costs can be sponsored by the developer. As long as the gas costs are covered in one of the multiple payment methods that Gelato supports, we handle the rest reliably, quickly and securely.
Install the Gelato Relay SDK
yarn add @gelatonetwork/relay-sdk
At this point, you will need to answer the following questions, which will determine the method to use when calling the Gelato Relay.
msg.sender
through _msgSender()
, please see additional info here.When relaying a transaction, Gelato Nodes cover the gas fees upfront. There are two ways to reimburse these fees:
More details can be found here.
If you require user authentication and you want to pay the transactions with a 1Balance account, the method to use is the sponsoredCallERC2771
.