GULLY CHAINDocs

Account abstraction

On this page

Gully Chain is building smart accounts in from the start: Safe accounts driven through ERC-4337, with passkey login and gas that can be sponsored, so a new user needs no seed phrase and no ETH for a first transaction.

Parts of this are on the testnet today. The rest is being rolled out.

#What is live

Piece Status Address
EntryPoint v0.7 Deployed 0x0000000071727De22E5E9d8BAf0edAc6f37da032
EntryPoint v0.8 Deployed 0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108
Safe4337Module 0.3.0 Deployed 0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226
SafeModuleSetup 0.3.0 Deployed 0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47
P256 verifier (passkey signatures) Deployed 0xc2b78104907F722DABAc4C69f826a522B2754De4

The EntryPoints are the standard eth-infinitism contracts at their usual addresses. If you run your own ERC-4337 bundler against the public RPC, you can already send UserOperations to them with any ERC-4337 account that has its own factory deployed on the chain.

#What is coming

Coming soon

Not live yet. The pieces below are being rolled out on the testnet. There is no public bundler or paymaster endpoint yet, and the Safe core contracts are not deployed. Do not build against the URLs or flows below until the Status page lists them as live.

Piece What it is
Safe 1.4.1 core contracts The Safe singleton, proxy factory and fallback handler, so Safe accounts can be created on the chain.
Bundler A public ERC-4337 bundler for EntryPoint v0.7 that takes UserOperations and puts them on chain.
Paymaster A verifying paymaster that sponsors gas for approved apps, so users do not need ETH.
Passkey signer factory Safe's WebAuthn signer contracts, so a passkey (Face ID, a security key) can own a Safe.
Safe{Wallet} The Safe web app with Gully Chain listed.

#How it will work

Once the pieces above are live, a sponsored Safe transaction will follow the standard ERC-4337 flow:

  1. The app builds a UserOperation for the user's Safe. If the Safe does not exist yet, the operation includes the data to deploy it through the Safe proxy factory, with the Safe 4337 module enabled.
  2. The paymaster signs it. The app asks the paymaster service to sponsor the operation (ERC-7677 pm_getPaymasterStubData and pm_getPaymasterData). The paymaster checks the app's API key and its policy and returns its signature.
  3. The user signs it with the Safe owner: a normal wallet key, or a passkey through the WebAuthn signer.
  4. The bundler submits it to EntryPoint v0.7. The EntryPoint deploys the Safe if needed, runs the call, and charges the gas to the paymaster's deposit instead of the user.

Libraries that speak ERC-4337 and ERC-7677, such as permissionless.js on top of viem, are expected to work once the endpoints exist. A sketch of what that will look like:

TypeScript
// ILLUSTRATION ONLY: the bundler and paymaster URLs do not exist yet
import { createSmartAccountClient } from "permissionless";
import { toSafeSmartAccount } from "permissionless/accounts";

const account = await toSafeSmartAccount({
  client: publicClient,                 // viem client for Gully Chain (see Quickstart)
  owners: [owner],
  version: "1.4.1",
  entryPoint: { address: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", version: "0.7" },
});

const smartAccountClient = createSmartAccountClient({
  account,
  chain: gullyTestnet,
  bundlerTransport: http(BUNDLER_URL),   // announced when live
  paymaster: paymasterClient,            // ERC-7677 paymaster, announced when live
});

await smartAccountClient.sendTransaction({ to, data, value: 0n });

Exact endpoints, how to get a paymaster API key and the sponsorship policy will be published here when the services go live. Follow @Gully_Labs for the announcement.