Skip to content

Commit

Permalink
fix msgbody
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Feb 14, 2024
1 parent e75d6f9 commit 11ac131
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ func filterInvalidDestinationCallers(registeredDomains map[types.Domain]types.Ch
}

func filterLowTransfers(cfg *types.Config, logger log.Logger, msg *types.MessageState) bool {
bm, err := new(cctptypes.BurnMessage).Parse(msg.MsgSentBytes)
bm, err := new(cctptypes.BurnMessage).Parse(msg.MsgBody)
if err != nil {
logger.Error("Error parsing burn message", "err", err)
logger.Info("This is not a burn message", "err", err)
return true
}

Expand Down
1 change: 1 addition & 0 deletions noble/message_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func txToMessageState(tx *ctypes.ResultTx) ([]*types.MessageState, error) {
Nonce: msg.Nonce,
SourceTxHash: tx.Hash.String(),
MsgSentBytes: rawMessageSentBytes,
MsgBody: msg.MessageBody,
DestinationCaller: msg.DestinationCaller,
Created: now,
Updated: now,
Expand Down
2 changes: 2 additions & 0 deletions types/message_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type MessageState struct {
SourceTxHash string
DestTxHash string
MsgSentBytes []byte // bytes of the MessageSent message transmitter event
MsgBody []byte // bytes of the MessageBody
DestinationCaller []byte // address authorized to call transaction
Channel string // "channel-%d" if a forward, empty if not a forward
Created time.Time
Expand Down Expand Up @@ -68,6 +69,7 @@ func EvmLogToMessageState(abi abi.ABI, messageSent abi.Event, log *ethtypes.Log)
DestDomain: Domain(message.DestinationDomain),
SourceTxHash: log.TxHash.Hex(),
MsgSentBytes: rawMessageSentBytes,
MsgBody: message.MessageBody,
DestinationCaller: message.DestinationCaller,
Nonce: message.Nonce,
Created: time.Now(),
Expand Down

0 comments on commit 11ac131

Please sign in to comment.