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

refactor(torii): abstract out how to format felts to avoid bugs #2444

Merged
merged 6 commits into from
Sep 24, 2024

Conversation

Copy link
Collaborator

@glihm glihm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this refactoring, useful to avoid too much strings to update in case of changes.

felts.iter().map(|k| format!("{:#x}", k)).collect::<Vec<String>>().join(FELT_DELIMITER)
+ FELT_DELIMITER
}

pub(crate) fn felt_to_sql_string(felt: &Felt) -> String {
format!("{:#x}", felt)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should perhaps have a function with padding and one without padding? Or we always use without padding?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah for felt we where not padding previously so i kept the same behaviour

@lambda-0x lambda-0x force-pushed the spr/main/d618e874 branch 2 times, most recently from a97288c to 6f1f5a4 Compare September 19, 2024 09:41
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 26.08696% with 34 lines in your changes missing coverage. Please review.

Please upload report for BASE (spr/main/5231a946@3414843). Learn more about missing BASE report.

Files with missing lines Patch % Lines
crates/torii/core/src/sql/erc.rs 0.00% 28 Missing ⚠️
crates/torii/core/src/sql/mod.rs 62.50% 3 Missing ⚠️
crates/torii/core/src/sql/utils.rs 57.14% 3 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##             spr/main/5231a946    #2444   +/-   ##
====================================================
  Coverage                     ?   67.57%           
====================================================
  Files                        ?      370           
  Lines                        ?    48574           
  Branches                     ?        0           
====================================================
  Hits                         ?    32822           
  Misses                       ?    15752           
  Partials                     ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- cleanup plus other refactor for the PR stack
- `start_block` configuration removed since it was no longer necessary now that we use `get_events` for `sync_range`
- use debug log level transfer events

commit-id:4acad5f3
@lambda-0x lambda-0x merged commit bf9878a into spr/main/5231a946 Sep 24, 2024
1 of 13 checks passed
@lambda-0x lambda-0x deleted the spr/main/d618e874 branch September 24, 2024 14:20
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