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
Estimate First
Estimate First
Always estimate gas before setting the limit:
Add a Buffer
Add a Buffer
Add 10-20% buffer to handle minor variations:
Don't Over-estimate
Don't Over-estimate
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
ThemaxFeePerGas is the absolute maximum you’re willing to pay per gas unit.
Recommended Strategy
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
- Low Priority
- Standard Priority
- High Priority
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
- EIP-1559 (Recommended)
- Legacy
Type 2 Transactions
Modern transaction type with better fee market:- More predictable fees
- Better UX (only pay actual base fee)
- Automatic refunds for overpayment
Complete Transaction Example
SendOptimizedTransaction.ts
Network-Specific Considerations
HyperPaxeer Specifics
Fee Estimation Formula
Error Prevention
Next Steps
Transaction Fees
Understand fee components
Cost Estimates
Estimate transaction costs
Troubleshooting
Fix transaction issues
Examples
View code examples