Skip to content

Commit 5fa3d92

Browse files
authored
Merge pull request #1353 from onflow/integration-gelato
Smooth out Gelato Tutorial
2 parents 2b18795 + 5a60338 commit 5fa3d92

File tree

1 file changed

+62
-23
lines changed

1 file changed

+62
-23
lines changed

docs/tutorials/integrations/gelato-sw.mdx

Lines changed: 62 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,59 +22,88 @@ import TabItem from '@theme/TabItem';
2222

2323
# Gelato Smart Wallet Integration Guide
2424

25-
You can use Gelato Smart Wallet to enable gasless transactions on Flow EVM. It supports features like: EIP-7702 or ERC-4337 depending on the wallet you use.
25+
Gas fees are one of the biggest barriers to blockchain adoption. Users often need to hold native tokens just to pay for transaction fees, creating friction in onboarding and limiting the types of applications that can be built. Gelato Smart Wallet solves this problem by enabling **gasless transactions** on Flow EVM through sponsored transactions.
26+
27+
With Gelato Smart Wallet, you can:
28+
- **Eliminate gas fees** for your users by sponsoring their transactions
29+
- **Improve user experience** with seamless onboarding that doesn't require users to hold FLOW tokens
30+
- **Support EIP-7702** for enhanced smart wallet functionality
31+
- **Scale your dApp** by removing the cost barrier for user interactions
32+
- **Leverage Flow's low gas costs** to provide affordable sponsored transactions
33+
34+
This tutorial will guide you through setting up Gelato Smart Wallet to enable gasless transactions on Flow EVM. You'll learn how to configure the necessary API keys, fund your sponsorship account, and implement gasless transaction functionality in your applications.
35+
36+
:::info
37+
38+
This tutorial focuses on **EIP-7702** implementation with Gelato Smart Wallet on Flow EVM. EIP-7702 provides a streamlined experience for users by maintaining the same address as their EOA while adding smart wallet capabilities, enabling enhanced features like gasless transactions and improved user experience.
39+
40+
:::
41+
42+
## Objectives
43+
44+
After completing this guide, you'll be able to:
45+
46+
- Configure a Gelato Smart Wallet account with proper API keys and funding setup
47+
- Implement gasless transaction functionality using the Gelato Smart Wallet SDK
48+
- Estimate and execute sponsored transactions on Flow EVM
49+
- Integrate EIP-7702 features for enhanced user experience
50+
- Troubleshoot common issues with Gelato Smart Wallet integration
2651

2752
## Prerequisites of using Gelato Smart Wallet
2853

29-
You need to setup all the followings in the Gelato App to create a Gelato Sponsor API Key.
54+
You need to set up the following in the Gelato App to create a Gelato Sponsor API Key:
3055

3156
### Step 1. Create Your Gelato Account
3257

3358
Sign up on the [Gelato App] to establish an account. This account is the foundation for setting up relay tasks and managing gas sponsorships.
3459

3560
### Step 2. Create a Relay App
3661

37-
Within your Gelato account, create a new Relay App with the Flow EVM network.
62+
Within your Gelato account, create a new _Relay App_ with the Flow EVM network.
3863
For Testnet, you can first allow `Any contract` to call your relay app.
3964

4065
![Create a Relay App](./images/gelato-1.png)
4166

42-
:::note
43-
44-
You can add more smart contract information and its associated chain information later in this App.
45-
When set to a specific contract instead of `Any contract`, the API keys will only allow gasless transactions for calls to the designated methods within the ABI of the contract.
46-
47-
:::
48-
49-
### Step 3. Create/Obtain a Sponsor API Key
67+
:::warning
5068

51-
After creating the relay app, navigate to its dashboard to locate your Sponsor API Key.
69+
You'll need to add more information for your smart contracts at a later date.
5270

53-
![Create a Sponsor API Key](./images/gelato-2.png)
71+
When set to a specific contract instead of `Any contract`, the API keys will only allow sponsored transactions for calls to the designated methods within the ABI of that contract.
5472

55-
This key links your Gelato setup with 1Balance for gas sponsorship.
73+
:::
5674

57-
### Step 4. Deposit Funds into 1Balance
75+
### Step 3. Deposit Funds into 1Balance
5876

59-
To use Gelato sponsoring transactions, you need to deposit funds into 1Balance according to your target environment:
77+
To use Gelato for sponsored transactions, you need to deposit funds into 1Balance according to your target environment:
6078

6179
- Mainnets: Deposit USDC.
6280
- Testnets: Deposit Sepolia ETH.
6381

64-
Here we use Sepolia ETH as the gas fee for Testnet‘s gasless transactions.
82+
Click the `1Balance` tab to deposit `.001` Sepolia ETH testnet funds.
6583

6684
![Deposit Funds into 1Balance](./images/gelato-3.png)
6785

68-
Here are some third party Sepolia ETH faucets you can use:
86+
If you need to fund your account, you can use one of the following third-party faucets:
6987

7088
- [Google Cloud Sepolia Faucet]
7189
- [Alchemy Sepolia Faucet]
7290
- [Chainlink Sepolia Faucet]
7391
- [Metamask Sepolia Faucet]
7492

93+
### Step 4. Create/Obtain an API Key
94+
95+
After creating the Relay App, navigate to its dashboard to locate your Sponsor API Key.
96+
97+
![Create a Sponsor API Key](./images/gelato-2.png)
98+
99+
This key links your Gelato setup with 1Balance for gas sponsorship.
100+
101+
Copy the API key to your clipboard.
102+
75103
## Send Gasless Transactions for your users
76104

77105
After you have created a Sponsor API Key and deposited funds into 1Balance, you can use gasless transactions features for your users.
106+
78107
With the Gelato Smart Wallet SDK, developers can easily set up sponsored transactions for their applications in just a few simple steps, enabling seamless onboarding and interaction without requiring users to hold native tokens.
79108

80109
:::note
@@ -88,22 +117,22 @@ You can find the examples in the [Gelato Smart Wallet SDK] repository.
88117
<Tabs>
89118
<TabItem value="pnpm" label="pnpm" default>
90119
```bash
91-
pnpm add @gelatodigital/smartwallet viem
120+
pnpm add @gelatonetwork/smartwallet viem
92121
```
93122
</TabItem>
94123
<TabItem value="bun" label="bun">
95124
```bash
96-
bun add @gelatodigital/smartwallet viem
125+
bun add @gelatonetwork/smartwallet viem
97126
```
98127
</TabItem>
99128
<TabItem value="yarn" label="yarn">
100129
```bash
101-
yarn add @gelatodigital/smartwallet viem
130+
yarn add @gelatonetwork/smartwallet viem
102131
```
103132
</TabItem>
104133
<TabItem value="npm" label="npm">
105134
```bash
106-
npm install @gelatodigital/smartwallet viem
135+
npm install @gelatonetwork/smartwallet viem
107136
```
108137
</TabItem>
109138
</Tabs>
@@ -242,7 +271,17 @@ results.on("error", (error: Error) => {
242271

243272
## Conclusion
244273

245-
So far, you’ve learned how to send sponsored EIP-7702 transactions using a Gelato Smart Wallet on Flow EVM.
274+
In this tutorial, you successfully integrated Gelato Smart Wallet to enable gasless transactions on Flow EVM. You learned how to set up the necessary infrastructure, configure API keys, fund sponsorship accounts, and implement gasless transaction functionality in your applications. The implementation demonstrates how Flow's low gas costs combined with Gelato's sponsored transaction infrastructure can create seamless user experiences that eliminate the friction of gas fees.
275+
276+
Now that you have completed the tutorial, you should be able to:
277+
278+
- Configure a Gelato Smart Wallet account with proper API keys and funding setup
279+
- Implement gasless transaction functionality using the Gelato Smart Wallet SDK
280+
- Estimate and execute sponsored transactions on Flow EVM
281+
- Integrate EIP-7702 features for enhanced user experience
282+
- Troubleshoot common issues with Gelato Smart Wallet integration
283+
284+
The combination of Flow's efficient gas pricing and Gelato's sponsored transaction infrastructure opens up new possibilities for building user-friendly dApps. By eliminating the need for users to hold native tokens for gas fees, you can create onboarding experiences that rival traditional Web2 applications while maintaining the security and transparency of blockchain technology.
246285

247286
[Gelato App]: https://app.gelato.network/
248287
[Google Cloud Sepolia Faucet]: https://cloud.google.com/application/web3/faucet/ethereum/sepolia

0 commit comments

Comments
 (0)