Hi, Guys. Do you know how to fix the issue shown by viem.
I am trying to read value from getter function using read contract hook. It throws am error
"The contract function"X" reverted with following reason: internal error

Contract call:
Address: 0x123
Function: X
args: 0x456
"

Meanwhile the values are showing on etherscan easily.

Const {data: getUserTreasuresList} = useContractRead (
...contract config
functionName: "X",
args: [address || deadAddress],
watch:true,
});


PS. This issue was not before yesterday, don't know why it stopped working.

Interestingly testnet works well. On mainnet it causes this issue(despite all config is correct and mainnet contract works well)

Nov 3, 2023, 3:15 AM

© 2024 Draquery.com All rights reserved.