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): inmemory cache for erc and handle contract type at runtime #2483

Merged
merged 8 commits into from
Sep 30, 2024

Conversation

lambda-0x
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 43.38235% with 231 lines in your changes missing coverage. Please review.

Project coverage is 67.83%. Comparing base (ae41d8c) to head (9b7f59f).
Report is 12 commits behind head on feat/torii/ercs.

Files with missing lines Patch % Lines
crates/torii/core/src/sql/erc.rs 0.00% 106 Missing ⚠️
scripts/verify_db_balances/src/main.rs 0.00% 84 Missing ⚠️
...torii/core/src/processors/erc20_legacy_transfer.rs 0.00% 10 Missing ⚠️
crates/torii/core/src/processors/erc20_transfer.rs 0.00% 10 Missing ⚠️
crates/torii/core/src/sql/utils.rs 94.03% 9 Missing ⚠️
crates/torii/core/src/engine.rs 83.33% 6 Missing ⚠️
crates/torii/graphql/src/object/erc/erc_balance.rs 0.00% 4 Missing ⚠️
...orii/core/src/processors/erc721_legacy_transfer.rs 0.00% 1 Missing ⚠️
...rates/torii/core/src/processors/erc721_transfer.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           feat/torii/ercs    #2483      +/-   ##
===================================================
- Coverage            68.64%   67.83%   -0.82%     
===================================================
  Files                  372      382      +10     
  Lines                48441    49629    +1188     
===================================================
+ Hits                 33251    33664     +413     
- Misses               15190    15965     +775     

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

@lambda-0x lambda-0x marked this pull request as ready for review September 28, 2024 13:32
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.

We might change the scripts folder with some sub-folders in the future to better organize the utilities scripts. Those one are also more test oriented. 👍

@glihm glihm merged commit 77fe36e into feat/torii/ercs Sep 30, 2024
13 of 15 checks passed
@glihm glihm deleted the opt-ercs branch September 30, 2024 15:58
glihm pushed a commit that referenced this pull request Oct 9, 2024
* feat(torii): index whitelisted erc20/erc721

commit-id:5231a946

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

commit-id:d618e874

* feat(torii): implement graphql for erc

commit-id:10465a00

* opt(torii): reuse token metadata from db for ERC721

commit-id:3bfe5955

* opt(torii): fetch block timestamp in parallel

commit-id:923dbba6

* refactor(torii/processor): use contract type info to select processor

- 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

* feat(torii): add a script to verify data

commit-id:c6195721

* refactor(torii): inmemory cache for erc and handle contract type at runtime (#2483)

* refactor(torii): handle normal and legacy erc contract type at runtime

* refactor(torii): use inmemory cache to speedup erc indexing

* fix lints

* add script to verify balances in torii db by quering rpc

* fix(torii/graphql): return only actual token_id in graphql response

* add debug statement for shouldn't reach state

* add tests for I256 type

* update torii toml file

* adapt script to verify erc721 balances

* refactor(torii): move cache into Sql struct

* improve compare script

* refactor(torii): load token_id into cache on startup

* execute queue when new token is registered

* Merge branch 'main' into feat/torii/ercs

* move diff apply logic to executor

* add more tests

* simplify implementation of i256 type

* send query only when required

* update script to compare erc_transfers table properly
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