"The argument of type '0x${string}' is not assignable to the parameter of type 'readonly [0x${string}]'." #1480
Unanswered
silen7-pool
asked this question in
Question
Replies: 1 comment
-
you should pass parameters as array: const balance = await tokenContract.read.balanceOf([wallet]); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I face this issue a lot when using Typescript with viem:
"The argument of type '0x${string}' is not assignable to the parameter of type 'readonly [0x${string}]'."
here is the code for example:
this error refers to the above read method when using wallet as a parameter.
Also,
I had same issue when using a contract address in getContract method:
I had to use
but when I past the raw contract from the variable, there is not problem.
Can someone help?
thank you very much
Beta Was this translation helpful? Give feedback.
All reactions