diff --git a/index.html b/index.html
index 74dc707..3aa3247 100644
--- a/index.html
+++ b/index.html
@@ -1120,7 +1120,6 @@
if (/^[0-9a-fA-F]{64}$/.test(keyToConvert)) {
keyToConvert = coinjs.privkey2wif(keyToConvert);
}
- console.log("lkkkk", keyToConvert);
const ethPrivateKey = coinjs.wif2privkey(keyToConvert).privkey;
BSCAddress = floEthereum.ethAddressFromPrivateKey(ethPrivateKey);
floAddress = keyToConvert.startsWith("R")
diff --git a/scripts/bscOperator.js b/scripts/bscOperator.js
index b464e80..7f06adc 100644
--- a/scripts/bscOperator.js
+++ b/scripts/bscOperator.js
@@ -335,25 +335,18 @@
try {
const provider = getProvider();
const signer = new ethers.Wallet(privateKey, provider);
-
- // Assuming CONTRACT_ADDRESSES[token] is defined elsewhere
- const token = 'usdc'; // or 'usdt' or 'bsc'
- const contractAddress = CONTRACT_ADDRESSES[token];
- const contract = new ethers.Contract(contractAddress, BEP20ABI, signer);
- const limit = await estimateGas({ privateKey, receiver, amount });
- const decimals = await contract.decimals();
-
- // Creating and sending the transaction object
- return signer.sendTransaction({
+ // Creating and sending the transaction object for BNB
+ return await signer.sendTransaction({
to: receiver,
- value: ethers.utils.parseUnits(amount.toString(), decimals),
- gasLimit: limit,
+ value: ethers.utils.parseUnits(amount.toString(), "ether"),
+ gasLimit: ethers.utils.hexlify(21000), // Standard gas limit for BNB transfer
nonce: await signer.getTransactionCount(),
maxPriorityFeePerGas: ethers.utils.parseUnits("2", "gwei"),
});
} catch (e) {
- throw new Error(e);
+ console.error("BNB Transaction Error:", e);
+ throw new Error("Failed to send BNB transaction");
}
};