Skip to content

Commit

Permalink
[goreleaser] docs: add proper documentation for bridge module constants
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] and trajan0x committed Dec 12, 2024
1 parent 9537dbc commit 6378b87
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions services/explorer/graphql/server/graph/queryutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1872,13 +1872,23 @@ func (r *queryResolver) getContractAddressFromType(chainID uint32, contractType
}
}

// Module type constants for bridge event classification.
const (
// ModuleSynapseBridge represents events with type less than 10, indicating standard bridge operations.
ModuleSynapseBridge = 0
// ModuleSynapseCCTP represents CCTP (Cross-Chain Transfer Protocol) bridge events.
ModuleSynapseCCTP = 10
// ModuleSynapseRFQ represents RFQ (Request for Quote) bridge events.
ModuleSynapseRFQ = 12
)

func getBridgeModule(eventType int) string {
switch {
case eventType < 10:
case eventType < ModuleSynapseCCTP:
return "SynapseBridge"
case eventType == 10:
case eventType == ModuleSynapseCCTP:
return "SynapseCCTP"
case eventType == 12:
case eventType == ModuleSynapseRFQ:
return "SynapseRFQ"
default:
return ""
Expand Down

0 comments on commit 6378b87

Please sign in to comment.