omnia_decodeTransaction

Returns the Transaction.data field of an Ethereum transaction.

Parameters

  1. DATA, 20 bytes - contract_address. The address of the smart contract called.

  2. DATA, variable length- data. Transaction.data field to be decoded. REQUIRED

  3. DATA, 20 bytes - signer. Address corresponding to the signer of the transaction.

Note: contract_address and signer parameters are not required, but providing them might help to recover more details about the decoded input.

Returns

Object with following details:

Example

Request

curl --request POST \
     --url https://endpoints.omniatech.io/v1/RPC_ENDPOINT \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "omnia_decodeTransaction",
    "params": [
        {
            "contract_address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
            "data": "0x095ea7b30000000000000000000000009901bac880caecad999e292811db9c1db3e86f8a000000000000000000000000000000000000000000000000000000000001951b",
            "signer": "0x822FC93407C81BA1401838Cb2991130D2bE36a94"
        }
    ]
}
'

Response

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "method": "approve",
        "risk": null,
        "params": [
            {
                "type": "address",
                "name": "spender",
                "input": "0x9901bac880caecad999e292811db9c1db3e86f8a",
                "struct": null,
                "tuple": null,
                "address_info": {
                    "standard": "OTHER",
                    "symbol": null,
                    "name": null,
                    "contract_name": null,
                    "malicious_address": 0,
                    "is_contract": 1
                }
            },
            {
                "type": "uint256",
                "name": "amount",
                "input": "103707",
                "struct": null,
                "tuple": null,
                "address_info": null
            }
        ],
        "contract_name": null,
        "contract_description": null,
        "malicious_contract": null,
        "signature_detail": null,
        "risky_signature": null
    }
}

Last updated