Skip to main content

Overview

Setting the right gas parameters ensures your transactions are processed efficiently and cost-effectively on HyperPaxeer.

Gas Parameters

EIP-1559 transactions on HyperPaxeer use these gas parameters:
uint256
required
Maximum amount of gas you’re willing to consume
uint256
required
Maximum total gas price you’re willing to pay (base + priority)
uint256
required
Maximum tip you’re willing to pay to the sequencer

Setting Gas Limit

The gas limit is the maximum amount of gas your transaction can consume.

Best Practices

Always estimate gas before setting the limit:
Add 10-20% buffer to handle minor variations:
While unused gas is refunded, setting the limit too high:
  • Requires more HPX in your wallet upfront
  • May trigger wallet warnings
  • Can indicate poorly optimized contracts

Common Gas Limits

Setting Max Fee Per Gas

The maxFeePerGas is the absolute maximum you’re willing to pay per gas unit.
1

Get Current Base Fee

2

Add Buffer for Base Fee Increases

3

Add Priority Fee

Example Implementation

Setting Priority Fee

The priority fee (tip) incentivizes the sequencer to include your transaction faster.

Priority Levels

When to use: Non-urgent transactions
  • Speed: May take several blocks
  • Cost: Minimal
  • Use case: Batch operations, non-time-sensitive transfers

Legacy vs EIP-1559 Transactions

Complete Transaction Example

SendOptimizedTransaction.ts

Network-Specific Considerations

HyperPaxeer Specifics

Fee Estimation Formula

Error Prevention

Common mistakes to avoid:
  1. Setting gasLimit too low → Transaction fails
  2. Setting maxFeePerGas too low → Transaction stuck in mempool
  3. Not adding buffer to estimates → Transaction may fail
  4. Using stale fee data → Overpaying or stuck transactions

Next Steps

Transaction Fees

Understand fee components

Cost Estimates

Estimate transaction costs

Troubleshooting

Fix transaction issues

Examples

View code examples