Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Version 6] provider.lookupAddress is throwing Error when result is null #3782

Closed
kenryu42 opened this issue Feb 15, 2023 · 3 comments
Closed
Assignees
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6

Comments

@kenryu42
Copy link

kenryu42 commented Feb 15, 2023

Ethers Version

6.0.3

Search Terms

lookupaddress, TEMP Error

Describe the Problem

provider.lookupAddress is throwing Error when the result is null.
This only happens when using the version 6.
However the error does not stop the program, it is more like a console error.
Is it an expected behavior?

Code Snippet

import "dotenv/config";
import { ethers } from "ethers";

const provider = new ethers.AlchemyProvider(
    "homestead",
    process.env.ALCHEMY_API_KEY
);

const address = "0xC53D7d41d1b1E51adAC2440C3c4351cDb427608c";

(async () => {
    const res = await provider.lookupAddress(address);

    console.log(res);
})();

Contract ABI

No response

Errors

TEMP Error: could not decode result data (value="0x", info={ "method": "name", "signature": "name(bytes32)" }, code=BAD_DATA, version=6.0.3)

Environment

node.js (v12 or newer)

Environment (Other)

No response

@kenryu42 kenryu42 added the investigate Under investigation and may be a bug. label Feb 15, 2023
@ricmoo
Copy link
Member

ricmoo commented Feb 15, 2023

Thanks! I’ll look into this right away.

@ricmoo ricmoo added the on-deck This Enhancement or Bug is currently being worked on. label Feb 15, 2023
@kenryu42 kenryu42 changed the title [Version 6.0.3] provider.lookupAddress is throwing Error when result is null [Version 6] provider.lookupAddress is throwing Error when result is null Feb 16, 2023
@ricmoo ricmoo added bug Verified to be an issue. v6 Issues regarding v6 and removed investigate Under investigation and may be a bug. labels Feb 16, 2023
@ricmoo
Copy link
Member

ricmoo commented Feb 16, 2023

This should be tied in v6.0.4. Try it out and let me know.

@kenryu42
Copy link
Author

Thank you for your quick response and fixing the bug! I can confirm that it is now working as expected.

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Feb 23, 2023
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants