buildUserOperation method

  1. @override
UserOperation buildUserOperation(
  1. {required Uint8List callData,
  2. BigInt? customNonce,
  3. BigInt? callGasLimit,
  4. BigInt? verificationGasLimit,
  5. BigInt? preVerificationGas,
  6. BigInt? maxFeePerGas,
  7. BigInt? maxPriorityFeePerGas}
)
override

Builds a UserOperation based on provided parameters.

This method creates a UserOperation with the given call data and optional parameters. The resulting UserOperation can be used for various operations on the Smart Wallet.

Implementation

@override
UserOperation buildUserOperation({
  required Uint8List callData,
  BigInt? customNonce,
  BigInt? callGasLimit,
  BigInt? verificationGasLimit,
  BigInt? preVerificationGas,
  BigInt? maxFeePerGas,
  BigInt? maxPriorityFeePerGas,
}) {
  return UserOperation.partial(
    callData: hexlify(callData),
    sender: _walletAddress,
    nonce: customNonce,
    callGasLimit: callGasLimit,
    verificationGasLimit: verificationGasLimit,
    preVerificationGas: preVerificationGas,
    maxFeePerGas: maxFeePerGas,
    maxPriorityFeePerGas: maxPriorityFeePerGas,
  );
}