From 32e060f6ebb8977db1b0311816df28a55e0a19df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phan=20Ph=C3=BA=20Th=C3=A0nh?= Date: Thu, 12 Sep 2024 17:11:11 +0700 Subject: [PATCH] =?UTF-8?q?refactor:=20=E2=99=BB=EF=B8=8F=20mev:=20SetStat?= =?UTF-8?q?eBlockNumber=20based=20on=20sender=20type=20(#83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: thanhpp --- pkg/mev/bundle_sender.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/mev/bundle_sender.go b/pkg/mev/bundle_sender.go index b842cee..02a587e 100644 --- a/pkg/mev/bundle_sender.go +++ b/pkg/mev/bundle_sender.go @@ -192,7 +192,10 @@ func (s *Client) sendBundle( JSONRPC: JSONRPC2, Method: method, } - p := new(SendBundleParams).SetBlockNumber(blockNumber).SetTransactions(txs...).SetStateBlockNumber("latest") + p := new(SendBundleParams).SetBlockNumber(blockNumber).SetTransactions(txs...) + if s.senderType == BundleSenderTypeFlashbot { + p = p.SetStateBlockNumber("latest") + } if uuid != nil { p.SetUUID(*uuid, s.senderType) }