5 如何根据eth的tx详情数据判断该交易的类型?

根据节点rpc接口eth_getTransactionByHash返回的交易数据,怎么判断这笔交易是以下哪种类型:

  1. eth普通转账交易
  2. erc-20转账交易
  3. uniswap的dex交易或者其他deif协议的交易
  4. nft相关的交易

例如数据:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xc2d61bdefce88a4db47c4f9687a903f4dd552f23266359c49f46dd965c0c2e53",
        "blockNumber": "0x3bcf69",
        "from": "0xc352b534e8b987e036a93539fd6897f53488e56a",
        "gas": "0x2f1ba",
        "gasPrice": "0xba43b7400",
        "hash": "0x65579455ac3227e7b3db72b4e359e988bb16cae6d26c88818d1a6991b478b274",
        "input": "0x8264fe980000000000000000000000000000000000000000000000000000000000000c3e",
        "nonce": "0xfd",
        "r": "0xefa4d38bb59e3aed21bbc2086056da4836e058f7371730471c42c7d1b7cc7a37",
        "s": "0x2b1194517f0c0cfbaf884841f0de07a28d768b6608cf12b8bda3b8c0c078ce3a",
        "to": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
        "transactionIndex": "0x27",
        "type": "0x0",
        "v": "0x25",
        "value": "0x2386f26fc10000"
    }
}
请先 登录 后评论

3 个回答

pan
请先 登录 后评论
Tiny熊
  擅长:智能合约,以太坊
请先 登录 后评论
永不止步
请先 登录 后评论
  • 3 关注
  • 0 收藏,5827 浏览
  • 永不止步 提出于 2022-01-11 01:04