你每天都會用到的開發者工具,全都集中在同一個地方。

轉換器、格式化工具、雜湊、驗證器,以及那些你總是一再重開的小工具,都留在一起,不再散落在各個分頁裡。

GitHub
/ 工具
/ 工具搜尋
109 款工具
/ Revert 原因解碼器
輸入方式
常見 Error Selectors
0x08c379a0Error
Error(string)
0x4e487b71Panic
Panic(uint256)
Panic Codes 參考
0x00Generic panic
0x01Assert failed
0x11Arithmetic overflow/underflow
0x12Division or modulo by zero
0x21Invalid enum value
0x22Invalid storage byte array access
0x31Pop on empty array
0x32Array index out of bounds
0x41Out of memory
0x51Invalid internal function call
錯誤類型: Solidity 有三種主要的錯誤類型:
  • require(): 回傳帶有自訂訊息的 Error(string)
  • revert CustomError(): 帶有參數的 custom error(更節省 gas)
  • Panic: 系統錯誤,如溢位、除以零、陣列越界
/ 選定的工具

Revert 原因解碼器 - 免費 Web3 工具

解碼失敗交易的 revert 原因

01

甚麼是 Revert Reason?

當一筆交易在以太坊上失敗時,它會帶著一則錯誤訊息 revert。此錯誤會被編碼為 hex 資料。常見的錯誤類型包括 require() 訊息、自訂錯誤與來自系統故障的 panic 碼。

02

運作原理是甚麼?

錯誤類型:require() 錯誤會回傳帶訊息的 Error(string)。自訂錯誤更節省 gas,但需要 ABI 才能解碼。Panic 錯誤表示系統故障,例如溢位、除以零或陣列越界…

03

範例情境

涵蓋 Require 訊息 - 餘額不足、Panic Code 0x11 - 算術溢位與自訂錯誤 - InsufficientLiquidity,讓你能快速比較常見的輸入與輸出。

/ 相關工具
/ 程式碼

選定工具的原始碼,與右側的即時版本並列顯示。

/ 原始碼
TypeScript
typescript
// Decode revert reasons from failed transactions

// Common error selectors
const ERROR_SELECTOR = "0x08c379a0"; // Error(string)
const PANIC_SELECTOR = "0x4e487b71"; // Panic(uint256)

function decodeRevertReason(errorData: string): string {
  const selector = errorData.slice(0, 10);

  if (selector === ERROR_SELECTOR) {
Buidl Now 圖示

把所有實用工具集中在一處,讓你專注在開發流程中。

挑一個工具、完成檢查、複製你需要的內容,然後回到真正的產品工作上。

為講求快速交付的建構者打造的開發者工具。© 2026 Buidl Now. 保留所有權利。