{"id":15982845,"url":"https://github.com/shekohex/ethers-etherscan-issue","last_synced_at":"2026-04-25T19:31:20.370Z","repository":{"id":232897320,"uuid":"623936982","full_name":"shekohex/ethers-etherscan-issue","owner":"shekohex","description":"Reproducing an issue with ethers-rs Etherscan's API","archived":false,"fork":false,"pushed_at":"2023-04-13T17:09:24.000Z","size":53,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-11T23:56:48.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/gakonst/ethers-rs/issues/2324","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shekohex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-05T12:03:08.000Z","updated_at":"2023-04-05T12:04:33.000Z","dependencies_parsed_at":"2024-04-12T05:56:38.181Z","dependency_job_id":"5e5b04af-78ae-481b-83a9-9debfb1bc9c1","html_url":"https://github.com/shekohex/ethers-etherscan-issue","commit_stats":null,"previous_names":["shekohex/ethers-etherscan-issue"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shekohex/ethers-etherscan-issue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shekohex%2Fethers-etherscan-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shekohex%2Fethers-etherscan-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shekohex%2Fethers-etherscan-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shekohex%2Fethers-etherscan-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shekohex","download_url":"https://codeload.github.com/shekohex/ethers-etherscan-issue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shekohex%2Fethers-etherscan-issue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32274981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T01:22:40.979Z","updated_at":"2026-04-25T19:31:20.353Z","avatar_url":"https://github.com/shekohex.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"### ethers-rs Etherscan API issue\n\nAn issue with etherscan API while using `ethers@2.0.2` crate.\n\n### Steps to Reproduce\n\n1. Clone the repo: `git clone https://github.com/shekohex/ethers-etherscan-issue.git`\n2. Set `ETHERSCAN_API_KEY` env variable with your etherscan API key. (for our case, use Polygon API key)\n3. Set `CHAIN` env variable with the chain you want to use (for our case `polygon`).\n4. Run `cargo run`\n\n### Expected Behavior\n\nThe program should print the Gas Oracle data.\n\n### Actual Behavior\n\n**It Returns an error**\n\n```rs\n  ERROR etherscan: Failed to deserialize response: data did not match any variant of untagged enum ResponseData, res: \"{\\\"status\\\":\\\"1\\\",\\\"message\\\":\\\"OK\\\",\\\"result\\\":{\\\"LastBlock\\\":\\\"41171167\\\",\\\"SafeGasPrice\\\":\\\"119.9\\\",\\\"ProposeGasPrice\\\":\\\"141.9\\\",\\\"FastGasPrice\\\":\\\"142.9\\\",\\\"suggestBaseFee\\\":\\\"89.82627877\\\",\\\"gasUsedRatio\\\":\\\"0.399191166666667,0.4847166,0.997667533333333,0.538075133333333,0.343416033333333\\\",\\\"UsdPrice\\\":\\\"1.15\\\"}}\"\n    at /home/shady/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ethers-etherscan-2.0.2/src/lib.rs:205\n\n   INFO ethers_etherscan_issue: Gas Oracle Info, gas_oracle: Err(Serde(Error(\"data did not match any variant of untagged enum ResponseData\", line: 0, column: 0)))\n    at src/main.rs:39\n```\n\n**JSON Response**\n\n```json\n{\n  \"status\": \"1\",\n  \"message\": \"OK\",\n  \"result\": {\n    \"LastBlock\": \"41171167\",\n    \"SafeGasPrice\": \"119.9\",\n    \"ProposeGasPrice\": \"141.9\",\n    \"FastGasPrice\": \"142.9\",\n    \"suggestBaseFee\": \"89.82627877\",\n    \"gasUsedRatio\": \"0.399191166666667,0.4847166,0.997667533333333,0.538075133333333,0.343416033333333\",\n    \"UsdPrice\": \"1.15\"\n  }\n}\n```\n\n### Environment\n\n- Operating System: `Linux workstation 5.15.104-2-MANJARO #1 SMP PREEMPT Thu Mar 23 01:40:42 UTC 2023 x86_64 GNU/Linux`\n- Ethers Version: `2.0.2`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshekohex%2Fethers-etherscan-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshekohex%2Fethers-etherscan-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshekohex%2Fethers-etherscan-issue/lists"}