-
Notifications
You must be signed in to change notification settings - Fork 119
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(examples): implement a jupyter notebook example #186
base: main
Are you sure you want to change the base?
Conversation
" indexed_types.append((parts[0], parts[-1]))\n", | ||
" else:\n", | ||
" data_types.append((parts[0], parts[-1]))\n", |
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.
it will break when the name is not specified (and I think that it's optionnal)
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.
it's not optional in the signature but it's quite cool to have the column renamed to the attribute name
"┌───────────┬───────────┬───────────┬───────────┬───┬───────────┬───────────┬───────────┬──────────┐\n", | ||
"│ id ┆ block_num ┆ transacti ┆ log_index ┆ … ┆ collatera ┆ oracle ┆ irm ┆ lltv │\n", | ||
"│ --- ┆ ber ┆ on_index ┆ --- ┆ ┆ lToken ┆ --- ┆ --- ┆ --- │\n", | ||
"│ str ┆ --- ┆ --- ┆ u32 ┆ ┆ --- ┆ str ┆ str ┆ f64 │\n", |
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.
why collateral etc are str and not addresses
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.
because polars does not handle eth types yet (even though there are bounties for that)
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Withdraw" |
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.
do we really need to do each event?
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 think it's worth it as an example
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.
@peyha, I think that you have a slightly updated version of helper functions right?
Otherwise, you can resolve the open comment that I thumbed up. You should also probably rename the PR with a slightly better name
Motivation
There is no example on how to use Cryo in Python (and subsequently on a notebook)
Solution
Made a short script example to query and to parse data using the Cryo Python module.
PR Checklist