-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add dune support #35
Conversation
namn-grg
commented
Jun 24, 2024
•
edited
Loading
edited
- Add feature to upload the data to dune periodically
consumer/dune.go
Outdated
const ( | ||
duneAPIKey = "" | ||
namespace = "" | ||
tableName = "validators_location" | ||
apiURL = "http://localhost:8080/validators" | ||
createEndpoint = "https://api.dune.com/api/v1/table/create" | ||
clearEndpoint = "https://api.dune.com/api/v1/table/%s/%s/clear" | ||
insertEndpoint = "https://api.dune.com/api/v1/table/%s/%s/insert" | ||
contentType = "application/x-ndjson" | ||
) |
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 can add these as CLI options too but I felt its not really needed
consumer/dune.go
Outdated
const ( | ||
duneAPIKey = "" | ||
namespace = "" | ||
tableName = "validators_location" |
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.
Nit: validator_metadata
consumer/dune.go
Outdated
t := time.Unix(unixTimestamp, 0) | ||
|
||
// Format the time.Time object to a readable date string | ||
return t.Format("2006-01-02") |
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.
Can we make it more granular here? I.e. show HH:MM:SS
chore: improve validator tracker
This reverts commit 5c25a18.