Safe Account Abstraction
The Safe{Core} Account Abstraction (AA) SDK aims to bring Account Abstraction to life by integrating Safe with Gelato Relay. This SDK helps developers to abstract the complexity of setting up a smart contract account.
Account Abstraction Kit The AA kit helps user ot create predeterministic smart contract wallets and execute gasless transactions with the Gelato Relay. The safe will only be deployed when the first transaction is sent.
Protocol Kit The Protocol Kit helps interact with the Safe contracts. It enables the creation of new Safe accounts, updating their configuration, and signing and executing transactions, among other features.
Relay Kit The Relay Kit relays Safe transactions, allowing you to get them sponsored by a third party or paid with any supported ERC-20 token.
Safe AA SDKs
As part of the Gelato Raas AA offerings, we have deployed a custom safe-sdk creating following packages
Package | SDK |
---|---|
Safe Protocol Kit | gelato-raas-protocol-kit |
Safe AA Kit | gelato-raas-account-abstraction-kit |
Safe Relay Kit | gelato-raas-relay-kit |
This project showcase how to send Gasless Transactions through a Safe sponsoring the gas with 1Balance
In following examples examples, it will be called the increment()
method on this simple counter contract deployed on unreal https://unreal.blockscout.com/address/0xEEeBe2F778AA186e88dCf2FEb8f8231565769C27
Quick Start
Clone the safe repo
Install project dependencies:
in the package.json we have already included gelato-raas-protocol-kit, gelato-raas-account-abstraction-kit and gelato-raas-relay-kit
Create a .env file with your private config:
You will need to input your Private Key PK and GELATO_RELAY_API_KEY for sponsored transactions, you can get it at https://app.gelato.network
Call the method:
Using 1Balance
Using 1Balance
Output
UI integration together with Web3Auth
Please visit the deployed react mini site on https://gelato-raas-aa.web.app/?network=unreal with a live implementation of web3Auth and safe on unreal
The code can be found at https://github.com/gelatodigital/gelato-raas-aa-ui