Skip to content

Helpful code snippets to interact with Safe Smart Accounts using Gelato’s bundler service and the permissionless.js library. This project includes scripts for gas estimation and sending transactions with Safe Smart Accounts.

Notifications You must be signed in to change notification settings

gelatodigital/gelato-bundler-safe-permissionless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safe Gelato Bundler using permissionless.js

Helpful code snippets to interact with Safe Smart Accounts using Gelato’s bundler service and the permissionless.js library. This project includes scripts for gas estimation and sending transactions with Safe Smart Accounts.

Setup

  1. Install dependencies:
pnpm install
  1. Create a .env file with the following variables:
GELATO_API_KEY=your_gelato_api_key
PRIVATE_KEY=your_private_key
RPC_URL=your_rpc_url

Scripts

Gas Estimation

To estimate gas for a transaction:

pnpm tsx src/estimate.ts

Send Transaction

To send a transaction using Safe Smart Account:

pnpm tsx src/sendTxn.ts

Features

  • Safe Smart Account integration
  • Gas estimation for UserOperations
  • Transaction sending through Gelato's bundler service
  • Support for Polygon mainnet (chainId: 137)

Project Structure

├── src/
│   ├── estimate.ts    # Gas estimation script
│   └── sendTxn.ts     # Transaction sending script
├── .env              # Environment variables (not tracked in git)
├── .gitignore       # Git ignore file
└── package.json     # Project dependencies

Dependencies

  • @safe-global/protocol-kit
  • @safe-global/safe-core-sdk-types
  • @gelatonetwork/relay-sdk
  • ethers
  • dotenv
  • permissionless
  • viem

About

Helpful code snippets to interact with Safe Smart Accounts using Gelato’s bundler service and the permissionless.js library. This project includes scripts for gas estimation and sending transactions with Safe Smart Accounts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •