Is it possible to use the useContractRead hooks to get contract data without the user connecting their wallet? I see no option to do a read without a user connecting first in wagmi.
1 Answer
There is the possibility of using readContract
from wagmi/core
.
import { readContract } from '@wagmi/core'
const data = await readContract({
address: '0xecb504d39723b0be0e3a9aa33d646642d1051ee1',
abi: wagmigotchiABI,
functionName: 'getHunger',
})