tenderly_decodeError - World Chain


Summary

Heuristically decodes custom errors. Use for unverified contracts.

Parameters

1. Error Data Bytes

Custom error data from output
Example: 0xa9059cbb00000000000000000000000011223344551122334455112233445511223344550000000000000000000000000000000000000000000000000000000000000999

Response JSON Schema

{
  "$schema": "https://tenderly.co/schemas/tenderlyDecoderResponse",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "confidence": {
      "type": "number"
    },
    "decodedArguments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "value": {},
          "name": {
            "type": "string"
          },
          "indexed": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "value",
          "name"
        ]
      }
    }
  },
  "required": [
    "name",
    "decodedArguments"
  ]
}

Code Examples

tenderly_decodeError request
curl https://worldchain-mainnet.gateway.tenderly.co/$TENDERLY_NODE_ACCESS_KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
  "jsonrpc": "2.0",
  "id": 0,
  "method": "tenderly_decodeError",
  "params": [
    "0xe450d38c000000000000000000000000112233445511223344551122334455112233445500000000000000000000000000000000000000000000000000000000000001c800000000000000000000000000000000000000000000000000000000000001f4"
  ]
}'
tenderly_decodeError response
{
  "id": 0,
  "jsonrpc": "2.0",
  "result": {
    "name": "ERC20InsufficientBalance",
    "decodedArguments": [
      {
        "value": "0x1122334455112233445511223344551122334455",
        "type": "address",
        "name": "arg0"
      },
      {
        "value": "456",
        "type": "uint256",
        "name": "arg1"
      },
      {
        "value": "500",
        "type": "uint256",
        "name": "arg2"
      }
    ]
  }
}