How to get a returned value from a function call using useContractWrite? #1455
Unanswered
pablohpsilva
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Unfortunately, you can't retrieve the return value from a contract write directly in wagmi right now. You may want to do this directly via the ethers const contract = useContract({ address, abi })
const result = contract.callStatic.myFunc() |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On my contract level I have a function like:
In my application, I have a useContractWrite that will call that function, like:
Calling this hook will return a bunch of data, except the string
"uuid1234"
which should come as a return value from the function called in my contract.Here's an example output from the
useMyFunction
hook whenwrite
is called:How can I get this value from the contract ?
Beta Was this translation helpful? Give feedback.
All reactions