Open wozailashi94 opened 6 months ago
Yeah, i also got this error. Here my code.
const transaction = {
from: signer.address,
to: "0x4429B1e0BE0Af0dFFB3CAb40285CBBb631EE5656",
data: "0x",
value: ethers.parseEther("0.01"),
maxFeePerGas: ethers.parseUnits("3", "gwei"),
maxPriorityFeePerGas: ethers.parseUnits("2", "gwei"),
gasLimit: 21000,
chainId: 97
}
const transactionBundle = [
{
signer: signer, // ethers signer
transaction: transaction // ethers populated transaction object
}
]
const simulation = await flashbotsProvider.simulate(signedTransactions, targetBlockNumber)
Error sending bundle with Flashbots: Error: Request failed with status 400 (URL: https://relay.flashbots.net): {"error":"unable to decode txs"} getting this error and so far i don't think anything i'm doing differently
Oh, my God, no matter how much I debug, it shows this.
Here is the part of my code
const flashbotsProvider = await FlashbotsBundleProvider.create(provider, sendWallet);
const bnbTx = { chainId: 56, type: 2, to: Wallet2.address, value: ethers.parseEther('0.001'), maxFeePerGas: ethers.parseUnits("3", "gwei"), maxPriorityFeePerGas: ethers.parseUnits("2", "gwei"), gasLimit: 21000, data: "0x", }; const usdtTx = { chainId: 56, type: 2, to: "Contract address", data: '0xa9059cbb000000000000000000000000' + receivingWallet.address.substring(2) + ethers.toBeHex(ethers.parseUnits('1', 18), 32).substr(2), maxFeePerGas: ethers.parseUnits("3", "gwei"), maxPriorityFeePerGas: ethers.parseUnits("2", "gwei"), gasLimit: 21000, value:ethers.parseUnits("0", 18), };
Package two transactions and submit them to the same block, but in the transaction are two different wallets
May God bless you. You can help me. God will bless you. I swear.