-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index Messaging Contracts with Explorer #255
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #255 +/- ##
===================================================
+ Coverage 34.68253% 35.13068% +0.44814%
===================================================
Files 372 379 +7
Lines 38492 38798 +306
Branches 84 84
===================================================
+ Hits 13350 13630 +280
- Misses 23449 23462 +13
- Partials 1693 1706 +13 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall
SourceChainID *big.Int `gorm:"column:source_chain_id;type:UInt256"` | ||
|
||
// Status is the status of the event. | ||
Status sql.NullString `gorm:"column:status"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are your thoughts on making this an enum? You can see us doing that here:
res, err := synapseCommon.EnumScan(src) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was considering it, but i thought it would reduce the data conversions down the line if it was just a string like when doing SQL queries. might be wrong about it though.
// TxHash is the transaction hash of the event | ||
TxHash string `gorm:"column:tx_hash"` | ||
// EventType is the type of the event | ||
EventType uint8 `gorm:"column:event_type"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See neum comment below
} else { | ||
case c.messageAddress: | ||
eventParser = c.messageParser | ||
default: | ||
if c.swapParsers[log.Address] == nil { | ||
logger.Warnf("no parser found for contract %s", log.Address.Hex()) | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this err?
Description
Add indexing for message contracts (
MessageBusUpgradeable.sol
) to explorer.Additional context
Messaging!