-
Notifications
You must be signed in to change notification settings - Fork 7
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
Scaffold smart contract event storage #105
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
fb310ee
to
87eaedc
Compare
87eaedc
to
c4246b6
Compare
0f92343
to
dfcdc77
Compare
pkg/indexer/indexer.go
Outdated
continue Retry | ||
} | ||
} | ||
logger.Info("Stored log", zap.Uint64("blockNumber", event.BlockNumber)) | ||
break Retry |
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.
Are the continue/break labels needed here? It seems like we're only breaking out of one loop
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.
Not needed. I kinda like them for clarity, but that's definitely more a question of style than anything else.
|
||
type LogStorageError interface { | ||
error | ||
ShouldRetry() bool |
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.
Love that retries are built in from the beginning
tl;dr
AI Assisted summary
Stop()
method fromLogStreamer
interface, add custom logger name toRpcLogStreamer
.ListenForContractEvent
to improve event handling.LogStorer
.ContractsOptions
into the server options for configuration.