Can I use a wallet client to read from a contract? #1703
richardryangarcia
started this conversation in
General
Replies: 1 comment 5 replies
-
Check here: https://viem.sh/docs/clients/wallet#optional-extend-with-public-actions |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed that when creating a contract instance with a wallet client, the
read
function is not accessible. Its only when you use a public client that you have access to read.Similarly, when trying to use the clients directly, public clients have the
readContract
option while wallet clients do not.I would like to read a contract with the caller address in scope (not the public client). Is there a way to do this using Viem? I feel like Ive seen that working before but now digging through the docs (and types) it doesnt seem to be possible but hopefully Im just missing something.
Thanks for the help yall!
Beta Was this translation helpful? Give feedback.
All reactions