Skip to content

Commit

Permalink
explicit warning comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-schultz committed Sep 21, 2023
1 parent cf97a39 commit 53f3833
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions messages/teleporter/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ func UnpackMessageReceivedResult(result []byte) (bool, error) {
return success, err
}

// PackSendCrossChainMessageEvent packs the SendCrossChainMessage event type. PackEvent is documented as not supporting struct types, so this should be used
// with caution. Here, we only use it for testing purposes. In a real setting, the Teleporter contract should pack the event.
// CAUTION: PackEvent is documented as not supporting struct types, so this should only be used for testing puposes.
// In a real setting, the Teleporter contract should pack the event.
// PackSendCrossChainMessageEvent packs the SendCrossChainMessage event type.
func PackSendCrossChainMessageEvent(destinationChainID common.Hash, message TeleporterMessage) ([]byte, error) {
_, hashes, err := EVMTeleporterContractABI.PackEvent("SendCrossChainMessage", destinationChainID, message.MessageID, message)
return hashes, err
Expand Down

0 comments on commit 53f3833

Please sign in to comment.