POST
/
evm
ots_getTransactionError
curl --request POST \
  --url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "ots_getTransactionError",
  "params": [
    "0xf94f3d2ed5b59aefb6a0e566af8e86552014d84f6ed2f38a1366dedffe723381"
  ],
  "id": 1
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "execution reverted: insufficient balance"
}
The ots_getTransactionError JSON-RPC method retrieves the raw revert reason for failed transactions on the Hyperliquid EVM blockchain. This Otterscan-specific method provides detailed error messages from smart contract failures, helping developers debug transaction issues.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  1. transaction hash (string, required): The hash of the failed transaction to analyze

Response

The method returns the raw error data from the failed transaction, or null if the transaction succeeded or error data is unavailable.

Response structure

  • result — hex-encoded error message from the revert reason, or null if not available

Usage example

Shell
curl -X POST https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "ots_getTransactionError",
    "params": ["0xf94f3d2ed5b59aefb6a0e566af8e86552014d84f6ed2f38a1366dedffe723381"],
    "id": 1
  }'

Example response (with error)

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e496e73756666696369656e742062616c616e636520666f72207472616e736665720000000000000000000000000000000000000000000000000000000000"
}

Example response (no error)

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Decoding error messages

The returned hex data typically contains an ABI-encoded error message. Common patterns:
  • 0x08c379a0... — Standard revert with string message
  • Custom error selectors — Contract-specific error codes
To decode the message, remove the function selector (first 4 bytes) and ABI-decode the remaining data as a string.

Use cases

The ots_getTransactionError method is essential for:
  • Smart contract debugging: Understand why transactions failed
  • User experience: Display meaningful error messages to users
  • Testing automation: Validate expected failure conditions
  • Error monitoring: Track and categorize contract failures
  • Support tools: Help users understand transaction failures
  • Development workflow: Debug contract interactions during development
  • Audit trails: Document failure reasons for compliance
  • Gas optimization: Identify operations that consistently fail
  • Integration testing: Verify error handling in dApps
  • Customer support: Quickly diagnose user transaction issues
This method is particularly valuable during smart contract development and when providing support for dApp users experiencing transaction failures.

Body

application/json

Response

200 - application/json

Successful response with transaction error details

The response is of type object.