web3dart_get_fee_data 1.0.0 copy "web3dart_get_fee_data: ^1.0.0" to clipboard
web3dart_get_fee_data: ^1.0.0 copied to clipboard

A Dart package for getting Ethereum fee data, including support for EIP-1559 transactions. Provides an easy-to-use API similar to ethers.js getFeeData().

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.0 - 2024-12-19 #

Added #

  • ✨ Initial release of web3dart_get_fee_data package
  • 🎯 getFeeData() function to retrieve current Ethereum fee data
  • πŸ“Š FeeData class supporting both legacy and EIP-1559 transactions
  • πŸ”„ Automatic detection of EIP-1559 vs legacy network support
  • πŸ›‘οΈ Comprehensive error handling for network and RPC errors
  • πŸ“š Full API documentation with dartdoc comments
  • βœ… Comprehensive test suite with real network integration tests
  • 🎨 ethers.js compatible API design
  • 🌐 Support for all Ethereum-compatible networks (Mainnet, Polygon, Arbitrum, etc.)

Features #

  • EIP-1559 Support: Returns maxFeePerGas and maxPriorityFeePerGas for supported networks
  • Legacy Compatibility: Automatic fallback to traditional gasPrice for older networks
  • Type Safety: Full Dart type safety with nullable types for optional parameters
  • Network Agnostic: Works with any Ethereum-compatible network via Web3Client

Dependencies #

  • web3dart: ^3.0.1 - Core Ethereum client functionality
  • http: ^1.4.0 - HTTP client for RPC calls

Example Usage #

final client = Web3Client('https://eth.llamarpc.com', Client());
final feeData = await getFeeData(client);

if (feeData.maxFeePerGas != null) {
  // EIP-1559 network
  print('Max Fee: ${feeData.maxFeePerGas} wei');
  print('Priority Fee: ${feeData.maxPriorityFeePerGas} wei');
} else {
  // Legacy network
  print('Gas Price: ${feeData.gasPrice} wei');
}

[Unreleased] #

Planned #

  • πŸ”§ Add gas estimation helpers
  • πŸ“ˆ Add fee history analysis
  • ⚑ Add caching mechanism for fee data
  • 🎯 Add network-specific optimizations

Release Notes #

1.0.0 - Initial Public Release #

This is the first stable release of web3dart_get_fee_data. The package provides a simple, reliable way to get current Ethereum fee data with full support for both EIP-1559 and legacy transactions.

Key Features:

  • Simple API mirroring ethers.js getFeeData()
  • Automatic EIP-1559 detection and fallback
  • Comprehensive documentation and examples
  • Well-tested with real network integration

Compatibility:

  • Dart SDK: ^3.8.1
  • All Ethereum-compatible networks
  • Both EIP-1559 and legacy transaction types

For more information, see the README.md and API documentation.

0
likes
0
points
34
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package for getting Ethereum fee data, including support for EIP-1559 transactions. Provides an easy-to-use API similar to ethers.js getFeeData().

Repository (GitHub)
View/report issues

Topics

#ethereum #web3 #blockchain #gas #eip-1559

License

unknown (license)

Dependencies

http, wallet, web3dart

More

Packages that depend on web3dart_get_fee_data