Skip to content

Commit

Permalink
feat(torii): index whitelisted erc20/erc721 (#2494)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
lambda-0x authored Oct 9, 2024
1 parent d039c6d commit e591364
Show file tree
Hide file tree
Showing 50 changed files with 2,923 additions and 433 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ justfile
spawn-and-move-db
types-test-db
examples/spawn-and-move/manifests/saya/**
**/*.log

artifacts/
55 changes: 35 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ members = [
"crates/torii/server",
"crates/torii/types-test",
"examples/spawn-and-move",
"scripts/verify_db_balances",
"xtask/generate-test-db",
]

Expand Down
Loading

1 comment on commit e591364

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.

Benchmark suite Current: e591364 Previous: d039c6d Ratio
Concurrent.Simulate/Blockifier.1000 3794068727 ns/iter (± 794625682) 2540876259 ns/iter (± 257892649) 1.49

This comment was automatically generated by workflow using github-action-benchmark.

CC: @kariy @glihm @tarrencev

Please sign in to comment.