Skip to content

Commit

Permalink
fix(eventindexer): remove nft metadata indexing, far too slowy and bu…
Browse files Browse the repository at this point in the history
…g ridden right now (#18126)

Co-authored-by: David <david@taiko.xyz>
  • Loading branch information
2 people authored and dantaik committed Sep 18, 2024
1 parent 256f637 commit ef76028
Show file tree
Hide file tree
Showing 27 changed files with 24 additions and 767 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
with:
access_token: ${{ github.token }}

- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
Expand Down
6 changes: 0 additions & 6 deletions packages/eventindexer/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ func InitFromConfig(ctx context.Context, api *API, cfg *Config) error {
return err
}

nftMetadataRepository, err := repo.NewNFTMetadataRepository(db)
if err != nil {
return err
}

ethClient, err := ethclient.Dial(cfg.RPCUrl)
if err != nil {
return err
Expand All @@ -89,7 +84,6 @@ func InitFromConfig(ctx context.Context, api *API, cfg *Config) error {
srv, err := http.NewServer(http.NewServerOpts{
EventRepo: eventRepository,
NFTBalanceRepo: nftBalanceRepository,
NFTMetadataRepo: nftMetadataRepository,
ERC20BalanceRepo: erc20BalanceRepository,
ChartRepo: chartRepository,
Echo: echo.New(),
Expand Down
4 changes: 0 additions & 4 deletions packages/eventindexer/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ var (
"ERR_NO_NFT_BALANCE_REPOSITORY",
"NFTBalanceRepository is required",
)
ErrNoNFTMetadataRepository = errors.Validation.NewWithKeyAndDetail(
"ERR_NO_NFT_METADATA_REPOSITORY",
"NFTMetadataRepository is required",
)
ErrNoStatRepository = errors.Validation.NewWithKeyAndDetail(
"ERR_NO_STAT_REPOSITORY",
"StatRepository is required",
Expand Down
180 changes: 0 additions & 180 deletions packages/eventindexer/indexer/fetch_nft_metadata.go

This file was deleted.

2 changes: 1 addition & 1 deletion packages/eventindexer/indexer/index_erc20_transfers.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (i *Indexer) indexERC20Transfers(
}

// isERC20Transfer determines whether a given log is a valid ERC20 transfer event
func (i *Indexer) isERC20Transfer(ctx context.Context, vLog types.Log) bool {
func (i *Indexer) isERC20Transfer(_ context.Context, vLog types.Log) bool {
// malformed event
if len(vLog.Topics) == 0 {
return false
Expand Down
Loading

0 comments on commit ef76028

Please sign in to comment.