Skip to content


Fee options object type used by the SmartAccountClient during the gas fee calculation middlewares when constructing the user operation to send.

For example, if the below example UserOperationFeeOptions is set on the client upon initialization, the maxPriorityFeePerGas field on the user operation will be set as the max value between the 50% buffered maxPriorityFeePerGas estimate and the min maxPriorityFeePerGas value specified here, 100_000_000n.

type UserOperationFeeOptions {
  maxFeePerGas?: UserOperationFeeOptionsField,
  maxPriorityFeePerGas?: UserOperationFeeOptionsField,
  callGasLimit?: UserOperationFeeOptionsField,
  verificationGasLimit?: UserOperationFeeOptionsField,
  preVerificationGas?: UserOperationFeeOptionsField,


const chain = polygonMumbai;
const signer: SmartAccountSigner = LocalAccountSigner.mnemonicToAccountSigner(
const rpcTransport = http("");
const userOperationFeeOptions: UserOperationFeeOptions = {
  maxPriorityFeePerGas: {
    min: 100_000_000n,
    multiplier: 1.5,
export const smartAccountClient = createSmartAccountClient({
  transport: rpcTransport,
  account: await createMultiOwnerModularAccount({
    transport: rpcTransport,
  opts: {
    feeOptions: userOperationFeeOptions,