Skip to main content

Template & Examples

Gasless SDK Examples

Check out the full example code for implementing the Gasless SDK.
Note: The examples are pre-configured for baseSepolia, but you can easily switch to other supported networks.

Setup Instructions

1

Clone the Repository

2

Set Up Environment Variables

3

Generate a API Key

Create a API Key using the Gelato App. Paste the key into your .env file. Check out the How-To Guides here.
4

Add Your Private Key (Optional)

You can either include your private key in the .env file, or leave it empty—example files will automatically generate a random private key if none is provided.
5

Install Dependencies

6

Run Example Use Cases

Sponsored Transactions:
ERC20 Gas Payments:
Native Gas Payments:
Estimate Gas:
Kernel Smart Account Transactions:
Safe Smart Account Transactions:
Not using templates? Prefer a step-by-step approach? Up next: How-To Guides for implementing the Gasless SDK use cases step-by-step.

Installation

Gelato Smart Wallets SDK

Check out the NPM package for the Gelato Smart Wallets SDK.
Depending on your target use case, choose from the guides below that best match your desired destination or integration flow.