EVM - Troubleshooting "Reverted" with "trace_transaction"
When using the trace_transaction
method on Ethereum (or other EVM chains) through Tatum, the response may indicate that the transaction trace contains errors marked as "Reverted
."
However, when the transaction is inspected using other providers and blockchain explorers, the transaction could appear as if all is fine. Example from Etherscan HERE
Request example:
curl --location 'https://ethereum-mainnet.gateway.tatum.io' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
"jsonrpc":"2.0",
"method":"trace_transaction",
"params":[
"0x794049ab30d41424167f25e531abb6768ee74dc51c11df86ec7f54c042569e49"
],
"id":1
}'
//Response:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"action": {
"from": "0xff70e5d3649a5f88f2230e7a6433711b00980f78",
"callType": "call",
"gas": "0x3fed3",
"input": "0x88676cad0000000000000000000000000000000000000000000000000000000000000001",
"to": "0x7ff28a9ee157865b1327302ab5c7ebad50ec6576",
"value": "0x0"
},
"blockHash": "0xe319ccb7ae9dfb8dc1fc0e77618baa8c65a2cfe6b5bbdc126cbb048e9f5b095c",
"blockNumber": 21412091,
"error": "Reverted",
"result": {
"gasUsed": "0x8bb8",
"output": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000038456967656e506f642e676574506172656e74426c6f636b526f6f743a20696e76616c696420626c6f636b20726f6f742072657475726e65640000000000000000"
},
"subtraces": 2,
"traceAddress": [],
"transactionHash": "0x794049ab30d41424167f25e531abb6768ee74dc51c11df86ec7f54c042569e49",
"transactionPosition": 80,
"type": "call"
},
{
"action": {
"from": "0x7ff28a9ee157865b1327302ab5c7ebad50ec6576",
"callType": "staticcall",
"gas": "0x3dc13",
"input": "0x5c60da1b",
"to": "0x5a2a4f2f3c18f09179b6703e63d9edd165909073",
"value": "0x0"
},
"blockHash": "0xe319ccb7ae9dfb8dc1fc0e77618baa8c65a2cfe6b5bbdc126cbb048e9f5b095c",
"blockNumber": 21412091,
"result": {
"gasUsed": "0x904",
"output": "0x0000000000000000000000006d225e974fa404d25ffb84ed6e242ffa18ef6430"
},
"subtraces": 0,
"traceAddress": [
0
],
"transactionHash": "0x794049ab30d41424167f25e531abb6768ee74dc51c11df86ec7f54c042569e49",
"transactionPosition": 80,
"type": "call"
},
{
"action": {
"from": "0x7ff28a9ee157865b1327302ab5c7ebad50ec6576",
"callType": "delegatecall",
"gas": "0x3c82b",
"input": "0x88676cad0000000000000000000000000000000000000000000000000000000000000001",
"to": "0x6d225e974fa404d25ffb84ed6e242ffa18ef6430",
"value": "0x0"
},
"blockHash": "0xe319ccb7ae9dfb8dc1fc0e77618baa8c65a2cfe6b5bbdc126cbb048e9f5b095c",
"blockNumber": 21412091,
"error": "Reverted",
"result": {
"gasUsed": "0x6438",
"output": "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000038456967656e506f642e676574506172656e74426c6f636b526f6f743a20696e76616c696420626c6f636b20726f6f742072657475726e65640000000000000000"
},
"subtraces": 2,
"traceAddress": [
1
],
"transactionHash": "0x794049ab30d41424167f25e531abb6768ee74dc51c11df86ec7f54c042569e49",
"transactionPosition": 80,
"type": "call"
},
{
"action": {
"from": "0x7ff28a9ee157865b1327302ab5c7ebad50ec6576",
"callType": "staticcall",
"gas": "0x3a4e8",
"input": "0x5ac86ab70000000000000000000000000000000000000000000000000000000000000006",
"to": "0x91e677b07f7af907ec9a428aafa9fc14a0d3a338",
"value": "0x0"
},
"blockHash": "0xe319ccb7ae9dfb8dc1fc0e77618baa8c65a2cfe6b5bbdc126cbb048e9f5b095c",
"blockNumber": 21412091,
"result": {
"gasUsed": "0x266e",
"output": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"subtraces": 1,
"traceAddress": [
1,
0
],
"transactionHash": "0x794049ab30d41424167f25e531abb6768ee74dc51c11df86ec7f54c042569e49",
"transactionPosition": 80,
"type": "call"
},
{
"action": {
"from": "0x91e677b07f7af907ec9a428aafa9fc14a0d3a338",
"callType": "delegatecall",
"gas": "0x37a59",
"input": "0x5ac86ab70000000000000000000000000000000000000000000000000000000000000006",
"to": "0x731a0ad160e407393ff662231add6dd145ad3fea",
"value": "0x0"
},
"blockHash": "0xe319ccb7ae9dfb8dc1fc0e77618baa8c65a2cfe6b5bbdc126cbb048e9f5b095c",
"blockNumber": 21412091,
"result": {
"gasUsed": "0x9d7",
"output": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"subtraces": 0,
"traceAddress": [
1,
0,
0
],
"transactionHash": "0x794049ab30d41424167f25e531abb6768ee74dc51c11df86ec7f54c042569e49",
"transactionPosition": 80,
"type": "call"
},
{
"action": {
"from": "0x7ff28a9ee157865b1327302ab5c7ebad50ec6576",
"callType": "staticcall",
"gas": "0x35fb7",
"input": "0x00000000000000000000000000000000000000000000000000000000675f9023",
"to": "0x000f3df6d732807ef1319fb7b8bb8522d0beac02",
"value": "0x0"
},
"blockHash": "0xe319ccb7ae9dfb8dc1fc0e77618baa8c65a2cfe6b5bbdc126cbb048e9f5b095c",
"blockNumber": 21412091,
"error": "Reverted",
"result": {
"gasUsed": "0x89c",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [
1,
1
],
"transactionHash": "0x794049ab30d41424167f25e531abb6768ee74dc51c11df86ec7f54c042569e49",
"transactionPosition": 80,
"type": "call"
}
]
}
Next Steps
- Inspect the VM Trace:
Example from Etherscan VM Trace HERE to analyze the trace in detail. This can help pinpoint the exact reason for the revert. - Check Smart Contract Logic:
If you have access to the contract code, review the logic to determine the failure point. - Use Alternative Tracing Tools:
Validate the transaction trace with another provider to compare results.
Updated 5 days ago