Skip to content

Commit

Permalink
resolve error on transaction again
Browse files Browse the repository at this point in the history
  • Loading branch information
raviycoder committed Jul 22, 2024
1 parent 30e2996 commit 2ddedc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/bscOperator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2ddedc8

Please sign in to comment.