From 3c87383313de13130b4da2048c827cc201b94172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Piwo=C5=84ski?= Date: Thu, 16 Nov 2023 15:50:50 +0100 Subject: [PATCH 1/2] Call `initFlashbots` when spam command is run with `--sendTo=flashbots` --- cli/src/commands/spam/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/src/commands/spam/index.ts b/cli/src/commands/spam/index.ts index 1a34fd8..e678511 100644 --- a/cli/src/commands/spam/index.ts +++ b/cli/src/commands/spam/index.ts @@ -52,6 +52,9 @@ export default class Spam extends Command { this.log(`connected to ${flags.rpcUrl} with wallet ${wallet.address}`) const txStrategy = flags.revert ? TxStrategy.UniV2Reverting : TxStrategy.UniV2 const sendTo = flags.sendTo.toLowerCase() + if (sendTo === 'flashbots') + flood.initFlashbots(wallet) + await spam.spamLoop(flood, wallet, { txsPerBundle: flags.txsPerBundle, From 18e200a090a4faa255f250871090593f7ac548b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Piwo=C5=84ski?= Date: Thu, 16 Nov 2023 15:55:43 +0100 Subject: [PATCH 2/2] Lint --- cli/src/commands/spam/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/cli/src/commands/spam/index.ts b/cli/src/commands/spam/index.ts index e678511..b8daddd 100644 --- a/cli/src/commands/spam/index.ts +++ b/cli/src/commands/spam/index.ts @@ -55,7 +55,6 @@ export default class Spam extends Command { if (sendTo === 'flashbots') flood.initFlashbots(wallet) - await spam.spamLoop(flood, wallet, { txsPerBundle: flags.txsPerBundle, sendRoute: sendTo === 'flashbots' ? SendRoute.Flashbots : (sendTo === 'mevshare' ? SendRoute.MevShare : SendRoute.Mempool),