flashbots / ethers-provider-flashbots-bundle

Flashbots provider for ethers.js
543 stars 212 forks source link

Error "unable to decode txs" #95

Closed kapisolec closed 1 year ago

kapisolec commented 1 year ago

Hello, I'm trying to submit a very simple transfer transaction as a bundle but I get {"error":"unable to decode txs"} in the body. This is my code:

const tx = {
        to: txWallet.address,
        data: "0x",
        gasPrice: ethers.utils.parseUnits('40', 'gwei'),
        gasLimit: 200000,
    }

    const fullTxBundle = [{
        transaction: tx,
        signer: txWallet
    }]
    const signedTransactions = await flashbotsProvider.signBundle(fullTxBundle)

    const currentblockNumber = await provider.getBlockNumber();
    const simulation = await flashbotsProvider.simulate(signedTransactions, currentblockNumber + 1, currentblockNumber + 5)