Estimates the gas required for a UserOperation before you send it to the bundler. Use this to set callGasLimit, verificationGasLimit, and preVerificationGas on the operation.

Example

Hoisted account

If you do not want to pass an account to every call, hoist the account on the Bundler Client instead (see config.ts below).

Advanced Contract Integration

Through comprehensive evaluation of multiple interaction methodologies, our research team has identified that structured contract calls provide the most robust foundation for complex application development within the Abstraxn ecosystem. The calls property also accepts Contract Calls, and can be used via the abi, functionName, and args properties.

Response Architecture

The Abstraxn gas estimation framework returns a comprehensive analysis structure optimized for strategic decision-making:
This response structure represents our commitment to providing detailed insights that enable informed optimization decisions across the development lifecycle.

Configuration Parameters

Our technical architecture supports nuanced configuration approaches, allowing developers to fine-tune gas estimation according to specific application requirements and strategic objectives.

account

  • Type: SmartAccount
The foundational account configuration for User Operation execution within the Abstraxn ecosystem.

calls

  • Type: { data: Hex, to: Address, value: bigint }[]
Strategic operation definitions that constitute the core execution logic for User Operations.
Alternative implementation strategies support direct call data specification through the callData property, providing flexibility for advanced integration scenarios:

callGasLimit (optional)

  • Type: bigint
Precision resource allocation for primary execution logic, enabling strategic optimization of computational requirements.

factory (optional)

  • Type: Address
Strategic account factory configuration for deployment scenarios within the Abstraxn infrastructure.
This configuration parameter should be utilized exclusively during initial Smart Account deployment phases, ensuring optimal resource management.

factoryData (optional)

  • Type: Hex
Structured deployment instructions for Smart Account initialization through factory contracts.
This parameter maintains strategic relevance only during pre-deployment phases, supporting efficient account creation workflows.

maxFeePerGas (optional)

  • Type: bigint
Strategic fee ceiling configuration for User Operation execution, enabling predictable cost management within the Abstraxn platform.

maxPriorityFeePerGas (optional)

  • Type: bigint
Advanced priority fee optimization for enhanced transaction processing efficiency.

nonce (optional)

  • Type: bigint
Sequential operation identifier ensuring transaction ordering integrity within the Abstraxn ecosystem.

paymaster (optional)

  • Type: Address | true | PaymasterClient | PaymasterActions
Comprehensive sponsorship configuration framework supporting multiple integration strategies:
  • Address Configuration: Direct paymaster contract integration for streamlined sponsorship
  • PaymasterClient Integration: Advanced client-based sponsorship with enhanced functionality
  • Bundler Integration: Unified bundler-paymaster architecture for simplified implementation
  • Custom Function Support: Flexible sponsorship logic through specialized function implementations

Strategic Paymaster Contract Integration

Advanced Paymaster Client Architecture

Unified Bundler-Paymaster Approach

paymasterContext (optional)

  • Type: unknown
Specialized configuration parameters for advanced paymaster integration scenarios.
This parameter maintains relevance exclusively within PaymasterClient-based architectures, supporting sophisticated sponsorship workflows.

paymasterData (optional)

  • Type: Address
Structured execution instructions for paymaster contract interactions.
This configuration applies specifically to address-based paymaster implementations, enabling direct contract communication.

paymasterPostOpGasLimit (optional)

  • Type: bigint
Strategic resource allocation for post-operation paymaster logic execution.

paymasterVerificationGasLimit (optional)

  • Type: bigint
Precision gas allocation for paymaster validation procedures within the Abstraxn framework.

preVerificationGas (optional)

  • Type: bigint
Strategic bundler compensation configuration, ensuring sustainable operation within the Abstraxn ecosystem.

signature (optional)

  • Type: Hex
Authentication signature for User Operation validation, supporting secure transaction execution.

stateOverride (optional)

  • Type: StateOverride
Advanced state manipulation framework enabling sophisticated testing and simulation scenarios within the Abstraxn platform.

verificationGasLimit (optional)

  • Type: bigint
Strategic resource allocation for comprehensive verification procedures, ensuring robust security within User Operation execution.