const ethers = require("ethers.js");
} = require("@flashbots/ethers-provider-bundle");
const provider = new ethers.providers.JsonRpcProvider({
url: "https://eth-mainnet.alchemyapi.io/v2/your-api-key", // Our app HTTP URL
const authSigner = new ethers.Wallet(
"ETHEREUM_PRIVATE_KEY" // Our Ethereum Private Key
const flashbotsProvider = await FlashbotsBundleProvider.create(
const signedBundle = await flashbotsProvider.signBundle([
signer: "SIGNER_TO_SEND_FROM", // Signer adddress to send the transaction from
transaction: "TRANSACTION_TO_SEND", // The transaction to be sent
const bundleReceipt = await flashbotsProvider.sendRawBundle(
"TARGET_BLOCK_NUMBER" // The target block number