From 2ddedc84d710b135c0d0a009be513682a60c7c51 Mon Sep 17 00:00:00 2001 From: raviycoder <135521192+raviycoder@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:41:09 +0530 Subject: [PATCH] resolve error on transaction again --- scripts/bscOperator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bscOperator.js b/scripts/bscOperator.js index 1ee95ac..93a6791 100644 --- a/scripts/bscOperator.js +++ b/scripts/bscOperator.js @@ -357,7 +357,7 @@ const tokenContract = new ethers.Contract(CONTRACT_ADDRESSES[token] || contractAddress, BEP20ABI, wallet); // Convert the amount to the smallest unit of USDC (wei) const decimals = await tokenContract.decimals(); - const amountWei = ethers.utils.parseUnits(amount.toString(), decimals); // Assuming 6 decimals for USDC + const amountWei = ethers.utils.parseUnits(amount.toString(), 12); // Assuming 6 decimals for USDC // Call the transfer function on the USDC contract return tokenContract.transfer(receiver, amountWei)