Params for "balanceOf" WETH

const { runContractFunction: getACHBalance } = useWeb3Contract({
        abi: achieverAbi,
        contractAddress: achieverAddress,
        functionName: "balanceOf",
        params: {
            account: account,
        }
    })

    const { runContractFunction: getWETHBalance } = useWeb3Contract({
        abi: wethAbi,
        contractAddress: wethAddress,
        functionName: "balanceOf",
        params: {
            
        }
    })

I had no issue getting the balance of (whose function name’s argument is account (address)) a standard ERC20 token, but when attempting to do the same for WETH (whose function name’s argument is (address)), what should I do with its params, or do anything else to make it work? Leaving it empty wouldn’t work. Thanks.

Do you know what parameters are required for the balanceOf function?

If there are no parameters then you can remove the params.

The parameter is " (address). I think it is due to this being a mapping. I will probably try retrieving it via a return from view function. Thanks for replying.

You can have such instead of using a view function.
Having your abi as such:

[
  {
    "constant": true,
    "inputs": [{ "name": "userAddress", "type": "address" }],
    "name": "balanceOf",
    "outputs": [{ "name": "balance", "type": "uint256" }],
    "payable": false,
    "stateMutability": "view",
    "type": "function"
  }
]

And have your params as such:

params: {
    userAddress: THE_ADDRESS_TO_CHECK_FOR    
}

Wow, thanks for this amazing community. It works wonder.

I already have the wethAbi imported from my constant folder, and apparently, simply putting an empty string resolves the issue too, but your suggestion is more verbose though.

const { runContractFunction: getWETHBalance } = useWeb3Contract({
        abi: wethAbi,
        contractAddress: wethAddress,
        functionName: "balanceOf",
        params: {
            "": account,
        }
    })

You will have to use his method of editing the ABI if you come across a function that has more than one unnamed parameters.

Precisely. qudusayo’s method prompts me looking into the WETH abi. That’s where I found the root cause. Thanks all for helping out.