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

The contract function "balanceOf" returned no data ("0x") #4088

Closed
1 task done
dspoonia7 opened this issue Jun 26, 2024 · 2 comments
Closed
1 task done

The contract function "balanceOf" returned no data ("0x") #4088

dspoonia7 opened this issue Jun 26, 2024 · 2 comments
Labels
Needs Reproduction Misc: Needs Reproduction

Comments

@dspoonia7
Copy link

dspoonia7 commented Jun 26, 2024

Check existing issues

Describe the bug

Getting this error with default wagmi provided boilerplate:

"The contract function "balanceOf" returned no data ("0x").

This could be due to any of the following:
- The contract does not have the function "balanceOf",
- The parameters passed to the contract function may be invalid, or
- The address is not a contract.

Contract Call:
address:   0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2
function:  balanceOf(address owner)
args:               (0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC)

Docs: https://viem.sh/docs/contract/multicall
Version: viem@2.6.1"

Link to Minimal Reproducible Example

No response

Steps To Reproduce

  1. Clone and install wagmi-v2-example locally
  2. npm install
  3. add active project ID to WC_PROJECT_ID in .env.local

What Wagmi package(s) are you using?

wagmi

Wagmi Version

2.5.4

Viem Version

2.6.1

TypeScript Version

^5.2.2

Anything else?

Getting these errors in useReadContract and useReadContracts hooks.

Error stack trace:

ContractFunctionExecutionError
    at getContractError (getContractError.js:34:12)
    at readContract (readContract.js:67:98)
 Caused by: ContractFunctionZeroDataError
    at eval (getContractError.js:22:20)
    at getContractError (getContractError.js:33:7)
    at readContract (readContract.js:67:98)
@tmm tmm added the Needs Reproduction Misc: Needs Reproduction label Jun 26, 2024
Copy link
Contributor

Hello @dspoonia7.

Please provide a minimal reproduction using StackBlitz, TypeScript Playground (for type issues), or a separate minimal GitHub repository.

Minimal reproductions are required as they save us a lot of time reproducing your config/environment and issue, and allow us to help you faster.

Once a minimal reproduction is added, a team member will confirm it works, then re-open the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2024
Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Wagmi version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs Reproduction Misc: Needs Reproduction
Projects
None yet
Development

No branches or pull requests

2 participants