Etherscan Priority Fee Calculator | 以太坊优先费用计算器

在Etherscan交易页面显示实际的Priority Fee (小费) 计算结果,支持EIP-1559交易

Author
weiwei dai
Daily installs
0
Total installs
0
Ratings
0 0 0
Version
1.0.0
Created
2025-05-14
Updated
2025-05-14
Size
5.22 KB
License
MIT
Applies to

# Etherscan Priority Fee Calculator

A Tampermonkey userscript that enhances Etherscan transaction pages by displaying actual Priority Fee (tips) calculations for EIP-1559 transactions.

## Features

- Real-time Priority Fee calculation for EIP-1559 transactions
- Displays fees in both Gwei and ETH units
- Clean and intuitive UI integration with Etherscan
- Supports all Etherscan subdomains
- Automatic calculation upon page load

## Usage

1. Visit any Ethereum transaction page on Etherscan (e.g., https://etherscan.io/tx/[transaction-hash])
2. The script will automatically calculate and display the actual Priority Fee below the transaction title
3. The fee will be shown in both Gwei and ETH units for convenience

## Technical Implementation

The script works by:
1. Fetching transaction data using JSON-RPC calls
2. Retrieving block data and transaction receipts
3. Calculating the actual Priority Fee using the formula:
```javascript
actualPriorityFee = min(maxPriorityFeePerGas, maxFeePerGas - baseFeePerGas) * gasUsed
```
4. Converting values between Wei, Gwei, and ETH units
5. Displaying results in a clean, styled container on the page

## Support

For issues, feature requests, or contributions, please visit the [GitHub repository](https://github.com/yuouiu/etherscan-priority-fee-calculator).