I just started with blockchain programming, I tried experimenting with ethers.js and BSC. While using Token_contract.balanceOf("address") some contacts are giving wrong values, Example correct value is 34.81 while contract returns .000000000034818073, nine zeros added before real value .I am getting this value after correcting the format Wei to Eth const balanceFormatted = ethers.utils.formatUnits(tokholdings, 18); however most of the contract gives exact values after format corrected What could be the reason ?
I am using same abi for all contacts .
const Genabi = [ "constructor(string symbol, string name)", "function transferFrom(address from, address to, uint value)", "function balanceOf(address owner) view returns (uint balance)", "event Transfer(address indexed from, address indexed to, address value)" ];
HFS /FEG contracts have this issue. While fomo /waultx gives correct balance