0

I need account abstraction for users using their email/phone number and letting them be able to execute gasless transactions with my smart contract.

For now, I have:

  • Implemented Web3Auth Core Kit, not the plug-and-play version because I needed to be able to fully customize the user login flow.
  • Implemented Gelato Relay SDK off-chain and made my smart contract able to work with SyncFee.

The next step is to implement Safe AA but I'm not sure about the approach.

I saw multiple resources about it:

As you can see, I have the 3 dependencies but I'm not sure how to glue them all together.

Just one additional question: Users will have to pay gas fees to create a safe from their web3auth account? If yes, can it be gasless too using Gelato? The idea is to be gasless from the start to the end of the registration flow.

2 Answers 2

0

We currently only support the plug-and-play version (i.e. opens a modal fully managed by SafeAuth). If this is not a problem for you, you could use Safe{Core} SDK to ask your users to log in and then prepare a transaction to relay for them. You can find a full example (login and relay) in our demo application. If you do need to keep control of the user flow, you will have to come up with your own auth implementation, and then use the Safe Relay kit to relay your transactions.

Regarding your other question, as for now you can't sponsor the deployment of a safe from the SDK. We have released a seedless onboarding screen on our app, which will deploy a safe for free on Gnosis Chain just with a few clicks. We are currently working on making this feature available for all networks, as well as from within the SDK, but we can't at this stage give you an estimate of when this will ship. In the meantime your users will have to pay for the transaction fees of safe creation.

Hope it helps! Good luck for your implementation, and please let me know if I can help any further 🙏

0

For anyone passing here, the possible solution was to keep the Web3Auth Core Kit standalone, use the Safe Protocol Kit to create the Safe, and then use the Safe Relay Kit to use that safe with Gelato.

The main idea is that if you do not want to use the PnP version of Web3Auth (because you do not want the UI/UX of it and want full control of the login flow), you can not use Safe Auth Kit in its current state. (as said by @louis)

However, we won't even do that stack because you can not use Gelato to create the Safe of the user and we do not want our users to pay gas fees during the onboarding/registration flow.

That made us think about the need for Safe in our stack. As long as we already have an account created for the user with Web3Auth and no need for the multi-sig functionality from Safe, we concluded that it was not required to use it in our specific process (except if we miss some advantage/requirement that we will discover later during the development phase).

Ultimately, we chose to stay with Web3Auth Core Kit / Gelato Relay SDK without Safe, and maybe later, with the evolution of each SDK and new arguments, we could migrate to a stack with Safe included.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.