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

fix: client.getEnsName not fetching Ens Data #34

Open
RafaDSan opened this issue Apr 12, 2024 · 1 comment
Open

fix: client.getEnsName not fetching Ens Data #34

RafaDSan opened this issue Apr 12, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed hot task Doubled points in the reward table

Comments

@RafaDSan
Copy link
Collaborator

Bug Report

Ponder version

0.3.10

Current behavior

We are using Viem through Ponder to make the communication with the Swaplace Smart Contract deployed on Sepolia to fetch Ens information about a user, but whenever the function is called, it always returns the same error Error resolving ENS for address AnyAddressHere: TypeError: Cannot read properties of undefined (reading 'toLowerCase').

Expected behavior

When running the script npm run dev the ponder should execute and do not bring any errors for address that are corrected passed.

Steps to reproduce

Run the command npm run dev as it's in the ponder branch, it will show the error previously presented.

Related code

export async function getEnsData(client: any, address: any) {
  try {
    const primaryName = await client.getEnsName(address);
    return primaryName;
  } catch (error) {
    console.error(`Error resolving ENS for address ${address}:`, error);
    throw error;
  }
}

Other information

Despite what the error is implying, the parameter being passed to the function is a correct address, an owner parameter that is also passed in other functions inside the same scope, and it works fine, meaning that the client.getEnsName(address); might be the problem.

In communication with the Ponder team, they've told us that they've realized a fix for the problem in version 0.3.10, but it could still be holding the error, so it needs further investigation.

We suggest working with the Ponder team to fix this error.

Ponder Telegram -> https://t.me/ponder_sh

Related code

getEns.ts
Swaplace.ts

@RafaDSan RafaDSan added the bug Something isn't working label Apr 12, 2024
@RafaDSan RafaDSan self-assigned this Apr 12, 2024
@0xneves 0xneves added help wanted Extra attention is needed hot task Doubled points in the reward table labels Apr 17, 2024
@0xneves
Copy link
Member

0xneves commented Apr 17, 2024

We are leaving this issue on standby as we couldn't solve on our side. I'm also setting this as a Hot Task, doubling the rewards for community rewards.

Please help us :X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed hot task Doubled points in the reward table
Projects
Status: 💡 Ideas
Development

No branches or pull requests

2 participants