Skip to content

Commit

Permalink
Fix: receiving class abi
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Jun 11, 2024
1 parent d228a6c commit 1a8abab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"time"

"github.com/dipdup-io/starknet-go-api/pkg/data"
api "github.com/dipdup-io/starknet-go-api/pkg/rpc"
"github.com/dipdup-io/starknet-indexer/internal/starknet"
models "github.com/dipdup-io/starknet-indexer/internal/storage"
"github.com/dipdup-io/starknet-indexer/internal/storage/postgres"
Expand Down Expand Up @@ -492,6 +493,9 @@ func (indexer *Indexer) fixClassAbi(ctx context.Context) error {
hash := data.NewFeltFromBytes(classes[i].Hash)
class, err := indexer.receiver.GetClass(ctx, hash.String())
if err != nil {
if e, ok := err.(*api.Error); ok && e.Code == 28 {
continue
}
return tx.HandleError(ctx, err)
}
classes[i].Abi = models.Bytes(class.RawAbi)
Expand Down

0 comments on commit 1a8abab

Please sign in to comment.