I need to calculate estimate gas fee for the swap function using wagmi
import { useEstimateGas } from 'wagmi'
import { parseEther } from 'viem'
import { config } from './config'
function App() {
const result = useEstimateGas({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
value: parseEther('0.01'),
})
}
I tried with this hook , but using this unable to fetch the estimate gas fee for the swap function.