-
Notifications
You must be signed in to change notification settings - Fork 375
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
Script for reading leaderboard data into database #1810
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1810 +/- ##
========================================
Coverage 74.77% 74.77%
========================================
Files 280 280
Lines 7826 7826
Branches 974 690 -284
========================================
Hits 5852 5852
Misses 1858 1858
Partials 116 116
Continue to review full report at Codecov.
|
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.
small changes for env vars
I've ran it locally and it seems to work with a graphql query:
query AddresessOrderedByBalance {
leaderboard {
points
address
identity
}
}
which responds:
{
"data": {
"leaderboard": [
{
"address": "0x47E172F6CFB6C7D01C1574FA3E2BE7CC73269D95",
"identity": "CLabs Validator #0 on testing",
"points": 1.4878347512330449e+26
},
{
"address": "0x19A22C25A9C1C14AFE2E792F71FD639540D052E0",
"identity": "account-0x19a22c25a9c1c14Afe2e792F71fd639540d052E0",
"points": 1.2e+24
},
{
"address": "0xA42C9B0D1A30722AEA8B81E72957134897E7A11A",
"identity": "CLabs Validator #2 on testing",
"points": 7.920946203704226e+22
},
{
"address": "0xA0AF2E71CECC248F4A7FD606F203467B500DD53B",
"identity": "CLabs Validator #1 on testing",
"points": 6.600856324429959e+22
}
]
}
}
for my test sheet
Some additional questions:
- Is this meant to run as a cronjob?
- how to test exchange rates?
Also, does a competitor only show up if she's on the spreadsheet? |
it also needs mentioning that this script has to run where there's access to the blockscout DB (within blockscout container or so) |
Description
A script for reading data needed to calculate leaderboard score
Reads the following things:
SortedOracles
contract (probably should be moved into blockscout)Tested
Only manual testing so far. Needs credentials to access Google sheets.
Other changes
Related issues
Backwards compatibility