Sprawdź saldo tokenu adresu za pomocą Web3

const minABI = [
  {
    constant: true,

    inputs: [{ name: "_owner", type: "address" }],

    name: "balanceOf",

    outputs: [{ name: "balance", type: "uint256" }],

    type: "function",
  },
];

const web3client = new Web3(new Web3.providers.HttpProvider(provider));

const getBalance = async (client, contractAddress, walletAddress) => {
  const contract = new client.eth.Contract(minABI, contractAddress);
  const result = await contract.methods.balanceOf(walletAddress).call();
  const format = client.utils.fromWei(result);
};
Xlassix Xx