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

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
weiwei dai
今日安裝
0
安裝總數
0
評價
0 0 0
版本
1.0.0
建立日期
2025-05-14
更新日期
2025-05-14
尺寸
5.2 KB
授權條款
MIT
腳本執行於

# 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).