diff --git a/pkg/types/pendingtx.go b/pkg/types/pendingtx.go index 6885654..bd3624c 100644 --- a/pkg/types/pendingtx.go +++ b/pkg/types/pendingtx.go @@ -19,6 +19,7 @@ const ( MerkleMempool BlinkV3Mempool BloxRoute + InternalSolver ) type Message struct { @@ -110,6 +111,18 @@ type MinedBlock struct { Transactions []Transaction `json:"transactions"` } +func (m Message) GetLogsFromSimulatedLog() []*types.Log { + logs := make([]*types.Log, 0, len(m.Logs)) + for _, log := range m.Logs { + logs = append(logs, &types.Log{ + Address: log.Address, + Topics: log.Topics, + Data: log.Data, + }) + } + return logs +} + func (m Message) GetAllLogs() []*types.Log { switch m.Source { case FlashbotMempool: @@ -124,10 +137,12 @@ func (m Message) GetAllLogs() []*types.Log { } return results } - case MevBlockerMempool, PublicMempool, BlinkMempool, MerkleMempool, BlinkV3Mempool, BloxRoute: + case MevBlockerMempool, PublicMempool, BlinkMempool, MerkleMempool, BlinkV3Mempool, BloxRoute, InternalSolver: + logs := m.GetLogsFromSimulatedLog() if m.InternalTx != nil { - return m.InternalTx.getLogs() + return append(logs, m.InternalTx.getLogs()...) } + return logs default: return nil }