Skip to main content
createSelfAndGasless() keeps custody with the trader EOA but submits trades through a Safe smart account.
  • the trader EOA owns USDC and positions
  • the trader EOA signs the underlying trade action
  • the trader’s Safe submits the transaction as a sponsored user operation

When to use it

  • consumer apps that want a gasless UX
  • embedded trading flows where the user should not need ETH after setup
  • client-side apps that already have a Safe execution path

One-time setup

The trader must do two EOA-signed transactions once:
After that, trading calls can be sent gaslessly through the Safe.

Submit-capable client

If you already know the Safe address for this trader key and chain, pass safeAddress to skip the SDK’s smart-account derivation call during construction:

Build-only client

In build-only mode, get*Tx() returns a Safe-style request with safeAddress and calls.

Parameters

Plus the shared options (testnet, slippageBps, builder, subgraphUrl, builderApiUrl, alchemyApiKey). See Client Configuration.