Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions pkg/types/pendingtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const (
MerkleMempool
BlinkV3Mempool
BloxRoute
InternalSolver
)

type Message struct {
Expand Down Expand Up @@ -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:
Expand All @@ -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
}
Expand Down
Loading