ots
ots_getTransactionError
Returns the revert reason for a failed transaction, if available.
Returns the revert reason for a failed transaction, if available.
Parameters
| # | Type | Description |
|---|---|---|
| 1 | string | Transaction hash of a reverted transaction. |
Returns
| Type | Description |
|---|---|
string | ABI-encoded revert reason (hex), or 0x if no revert data. |
The revert data can be decoded as Error(string) (selector 0x08c379a0) for standard Solidity revert messages.
Example
curl -s -X POST https://rpc.pulsechain.box \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"ots_getTransactionError","params":["0x5a9e14d0806ab9e1d031755dfcab5e808da0b4c7933bc9c055f70614cc11903d"],"id":1}'
TRY IT
Notes
- Returns
0xfor successful transactions or transactions that reverted without a reason string. - Used by Otterscan to display human-readable revert reasons.
ots_getBlockDetailsByHash
Returns extended block details by block hash, including transaction count and uncle count. Like ots_getBlockDetails but addressed by hash instead of number.
ots_hasCode
Checks whether an address contains contract code at the specified block. This is a lightweight alternative to calling eth_getCode and checking if the result is empty.
