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

fix(eventindexer): remove nft metadata indexing, far too slowy and bug ridden right now #18126

Merged
merged 8 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading