-
Notifications
You must be signed in to change notification settings - Fork 2
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
update missing prices script #15
Conversation
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.
Great job Ben!
Left one minor comment and a discussion comment for the future. Other than LGTM!
if token["address"].lower() in coins: | ||
paprika_data = coins[token["address"].lower()] | ||
dune_row = ( | ||
str(paprika_data["id"]), | ||
"ethereum", | ||
str(paprika_data["symbol"]), | ||
str(paprika_data["address"].lower()), | ||
int(token["decimals"]), | ||
) | ||
res.append(dune_row) |
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.
Also for the future we might wanna look into https://marshmallow.readthedocs.io/en/stable/ for easier object serialization/deserialization . What's your take on that?
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.
Yes I would very much like to do that.
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 am just not so sure how well it will jive with the Ethereum Types. I have been having quite some difficulty with that lately.
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.
Awesome! We should definitely give it a go and see how we can work with it.
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 will create an issue for this and link it to the TODO about removing Any above.
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.
Used to generate: duneanalytics/spellbook#1639
Note that it requires having downloaded the query results of https://dune.com/queries/1317238 and saving them to "out/missing-token-prices.csv".
Note this is a total hack and could easily be cleaned up (with types instead of dicts).
Test Plan