Skip to content

Decode & Evaluate Transaction

Decode & Evaluate a transaction against whitelisting presets.

Overview

This endpoint accepts a transaction or signing request and presets to evaluate, and returns decoded intent data with an evaluation decision.

Request

POST /evaluate

Request Body

This example evaluates an ERC20 approve() call for the Sky rewards contract to spend USDS tokens.

{
  "protocolPresets": ["sky_core"],
  "request": {
    "method": "eth_sendTransaction",
    "params": [
      {
        "to": "0xdC035D45d973E3EC169d2276DDab16f1e407384F",
        "value": "0x0",
        "data": "0x095ea7b3000000000000000000000000173e314c7635b45322cd8cb14f44b312e079f3af0000000000000000000000000000000000000000000000000de0b6b3a7640000",
        "chainId": "0x1",
        "from": "0x154419d9A2C57FB60e80cc83Fb2180E7e33637e0"
      }
    ]
  }
}

Parameters

FieldTypeRequiredDescription
requestobjectYesStandard JSON-RPC transaction request of the underlying Network
protocolPresetsarrayNoArray of protocol preset IDs to evaluate against

Response

Success Response (EVM)

{
  "data": {
    "action": "eth_sendTransaction",
    "rawPayload": {
      "method": "eth_sendTransaction",
      "params": [
        {
          "chainId": "0x1",
          "data": "0x095ea7b300000000000000000000000010ab606b067c9c461d8893c47c7512472e19e2ce00000000000000000000000000000000000000000000003635c9adc5dea00000",
          "from": "0x154419d9A2C57FB60e80cc83Fb2180E7e33637e0",
          "to": "0xdC035D45d973E3EC169d2276DDab16f1e407384F",
          "value": "0x0",
        },
      ],
    },
    "protocolPresets": [
      {
        "description": "Enables all Sky core operations",
        "id": "sky_core",
        "name": "Sky Core",
      },
    ],
    "whitelisted": true,
    "resolution": {
      "decoding": {
        "descriptor": {
          "inputs": [
            { "name": "spender", "type": "address" },
            { "name": "value", "type": "uint256" },
          ],
          "name": "approve",
          "outputs": [{ "name": "", "type": "bool" }],
          "stateMutability": "nonpayable",
          "type": "function",
        },
        "hexSignature": "0x095ea7b3",
        "error": null
      },
      "display": {
        "intent": "Approve",
        "interpolatedIntent": "Approve SKY Staking Rewards to spend 1000 USDS",
        "interactWith": {
          "contractAddress": "0xdC035D45d973E3EC169d2276DDab16f1e407384F",
          "contractChainId": 1,
          "contractName": "USDS Token",
          "protocolDescription": "Sky (formerly MakerDAO)",
          "protocolId": "sky",
          "protocolName": "Sky",
        },
        "fields": [
          {
            "address": "0x10ab606B067C9C461d8893c47C7512472E19e2Ce",
            "contract": {
              "name": "SKY Staking Rewards",
            },
            "format": "addressName",
            "label": "Spender",
            "token": null,
          },
          {
            "amount": "1000000000000000000000",
            "format": "tokenAmount",
            "label": "Amount",
            "token": {
              "address": "0xdC035D45d973E3EC169d2276DDab16f1e407384F",
              "decimals": 18,
              "name": "USDS Stablecoin",
              "ticker": "USDS",
            },
          },
        ],
        "requiredFields": [],
      },
      "policyEvaluation": {
        "expectedBehavior": true,
        "matchedPresets": [
          {
            "presetId": "sky_core",
            "matchedPolicies": ["permit-usds-approves"]
          }
        ]
      }
    }
 }
}

Response Fields

FieldTypeRequiredDescription
actionstringYesTransaction action type: eth_sendTransaction, personal_sign, eth_signTypedData_v4
whitelistedbooleanYesBoolean indicating if transaction passed evaluation
resolutionobjectYesDecoded resolution data
protocolPresetsarrayNoProtocol presets that were evaluated
attestationobjectNoSignature attestation from the Gatekeeper

Response - Resolution

The resolution includes decoded transaction data and human-readable metadata for display to users.

{
  "resolution": {
    "display": { ... },      // Human-readable display data (ERC-7730)
    "decoding": { ... },     // Technical decoding details (ABI, signature)
    "policyEvaluation": { ... },  // Policy matching results (if policies provided)
    "resolutions": null | [ ... ]     // Nested transactions (if this transaction embeds other transactions)
  }
}
FieldTypeRequiredDescription
displayobjectYesHuman-readable display data based on ERC-7730
decodingobjectNoTechnical decoding details (ABI descriptor, function selector)
policyEvaluationobjectNoPolicy evaluation results (only present if policies provided)
For complete resolution structure and field definitions, see Clear Sign Display Guide.