Skip to content

Commit

Permalink
Merge pull request #76 from KyberNetwork/feat/message-add-private-mem…
Browse files Browse the repository at this point in the history
…pool-logs

feat: memssage add private mempool logs
  • Loading branch information
vaigay authored Aug 19, 2024
2 parents 2efe42d + dfde40a commit b6c0d14
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
12 changes: 6 additions & 6 deletions pkg/types/flashbot_mevshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
)

type FlashbotMevshareLog struct {
type SimulatedPrivateMempoolLog struct {
// address of the contract that generated the event
Address common.Address `json:"address"`
// list of topics provided by the contract.
Expand All @@ -22,9 +22,9 @@ type FlashbotMevShareTxHint struct {
}

type FlashbotMevshareEvent struct {
Hash common.Hash `json:"hash"`
Logs []FlashbotMevshareLog `json:"logs"`
Txs []FlashbotMevShareTxHint `json:"txs"`
MevGasPrice *hexutil.Big `json:"mevGasPrice,omitempty"`
GasUsed *hexutil.Uint64 `json:"gasUsed,omitempty"`
Hash common.Hash `json:"hash"`
Logs []SimulatedPrivateMempoolLog `json:"logs"`
Txs []FlashbotMevShareTxHint `json:"txs"`
MevGasPrice *hexutil.Big `json:"mevGasPrice,omitempty"`
GasUsed *hexutil.Uint64 `json:"gasUsed,omitempty"`
}
35 changes: 18 additions & 17 deletions pkg/types/pendingtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,24 @@ const (
)

type Message struct {
PendingBlockNumber uint64 `json:"pending_block_number"`
TxHash string `json:"tx_hash"`
SimDebugInfo SimDebugInfo `json:"sim_debug_info"`
InternalTx *CallFrame `json:"internal_txs"`
Prestate *Prestate `json:"prestate_diff"`
BaseFee *big.Int `json:"base_fee"`
CurrentBlockTime uint64 `json:"current_block_time"`
GasFeeCap *big.Int `json:"gas_fee_cap"`
GasPrice *big.Int `json:"gas_price"`
GasTip *big.Int `json:"gas_tip"`
Gas uint64 `json:"gas"`
GasUsed uint64 `json:"gas_used"`
From string `json:"from"`
Nonce uint64 `json:"nonce"`
Source MempoolSource `json:"source"`
Type *big.Int `json:"type"`
FlashbotMevshareEvent *FlashbotMevshareEvent `json:"flashbot_mevshare_event,omitempty"`
PendingBlockNumber uint64 `json:"pending_block_number"`
TxHash string `json:"tx_hash"`
SimDebugInfo SimDebugInfo `json:"sim_debug_info"`
InternalTx *CallFrame `json:"internal_txs"`
Prestate *Prestate `json:"prestate_diff"`
BaseFee *big.Int `json:"base_fee"`
CurrentBlockTime uint64 `json:"current_block_time"`
GasFeeCap *big.Int `json:"gas_fee_cap"`
GasPrice *big.Int `json:"gas_price"`
GasTip *big.Int `json:"gas_tip"`
Gas uint64 `json:"gas"`
GasUsed uint64 `json:"gas_used"`
From string `json:"from"`
Nonce uint64 `json:"nonce"`
Source MempoolSource `json:"source"`
Type *big.Int `json:"type"`
FlashbotMevshareEvent *FlashbotMevshareEvent `json:"flashbot_mevshare_event,omitempty"`
Logs []SimulatedPrivateMempoolLog `json:"logs,omitempty"`
}

type Prestate struct {
Expand Down

0 comments on commit b6c0d14

Please sign in to comment.