Skip to content
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

Merged
merged 31 commits into from
Jun 26, 2024
Merged

feat: add dune support #35

merged 31 commits into from
Jun 26, 2024

Conversation

namn-grg
Copy link
Contributor

@namn-grg namn-grg commented Jun 24, 2024

  • Add feature to upload the data to dune periodically

@namn-grg namn-grg changed the title feat: publish data to dune feat: add dune support Jun 24, 2024
consumer/dune.go Outdated
Comment on lines 12 to 21
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"
)
Copy link
Contributor Author

@namn-grg namn-grg Jun 25, 2024

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

@namn-grg namn-grg requested a review from mempirate June 25, 2024 05:59
consumer/dune.go Outdated
const (
duneAPIKey = ""
namespace = ""
tableName = "validators_location"
Copy link

@mempirate mempirate Jun 25, 2024

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")

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

@mempirate mempirate merged commit 2662d33 into main Jun 26, 2024
@mempirate mempirate deleted the feat/dune branch June 26, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants