Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

[BUG] Failed to deserialize etherscan response: data did not match any variant of untagged enum ResponseData #2612

Closed
stephanebiscosi opened this issue Sep 22, 2023 · 2 comments · Fixed by #2614
Labels
bug Something isn't working

Comments

@stephanebiscosi
Copy link

stephanebiscosi commented Sep 22, 2023

Version
2.0.10

Platform
Mac 64 bit (Intel)

Description
I get this error
Error: data did not match any variant of untagged enum ResponseData

With the following code

let params = TxListParams::new(17672412, 99999999, 1, 0, Sort::Asc);
let normal_transactions = etherscan_client.get_transactions(&"0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13".parse().unwrap(), Some(params)).await?;

After some investigations it seems that some particular transactions are causing the trouble. These transactions are flagged by Etherscan UI as "Transfer*" with the following message "This transaction inludes data in the Input Data field which may indicate a message in UTF8". Not sure if this is related to the error...

As an example the following one causes the error if included in a response bundle: https://etherscan.io/tx/0x95983231acd079498b7628c6b6dd4866f559a23120fbce590c5dd7f10c7628af

To reproduce the error with this particular tx use these params:
let params = TxListParams::new(0, 18185184, page, 1, Sort::Desc);

Issue might be related to this one #2324

@stephanebiscosi stephanebiscosi added the bug Something isn't working label Sep 22, 2023
@mattsse
Copy link
Collaborator

mattsse commented Sep 22, 2023

could you please attach the full json response of the call

@stephanebiscosi
Copy link
Author

Here is the full json for tx 0x95983231acd079498b7628c6b6dd4866f559a23120fbce590c5dd7f10c7628af

{
  "status": "1",
  "message": "OK",
  "result": [
    {
      "blockNumber": "18185184",
      "timeStamp": "1695310607",
      "hash": "0x95983231acd079498b7628c6b6dd4866f559a23120fbce590c5dd7f10c7628af",
      "nonce": "1325609",
      "blockHash": "0x61e106aa2446ba06fe0217eb5bd9dae98a72b56dad2c2197f60a0798ce9f0dc6",
      "transactionIndex": "45",
      "from": "0xae2fc483527b8ef99eb5d9b44875f005ba1fae13",
      "to": "0x6b75d8af000000e20b7a7ddf000ba900b4009a80",
      "value": "23283064365",
      "gas": "107142",
      "gasPrice": "15945612744",
      "isError": "0",
      "txreceipt_status": "1",
      "input": "0xe061",
      "contractAddress": "",
      "cumulativeGasUsed": "3013734",
      "gasUsed": "44879",
      "confirmations": "28565",
      "methodId": "0xe061",
      "functionName": ""
    }
  ]
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants