Skip to content

Commit

Permalink
Fix: cache abi
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Jun 3, 2024
1 parent 375622a commit 69441fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/indexer/parser/resolver/state_updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func (resolver *Resolver) parseDeployedContracts(ctx context.Context, block *sto
if err != nil {
return errors.Wrap(err, contracts[i].ClassHash.String())
}
resolver.cache.SetAbiByAddress(class, contracts[i].Address.Bytes())
}

key := data.NewFeltFromBytes(contracts[i].Address.Bytes())
Expand All @@ -121,7 +122,6 @@ func (resolver *Resolver) parseDeployedContracts(ctx context.Context, block *sto
if class, ok := addrs[h]; ok && addresses[i].ClassID == nil {
addresses[i].ClassID = &class.ID
resolver.addAddress(&addresses[i])
resolver.cache.SetAbiByAddress(class, addresses[i].Hash)
delete(addrs, h)
}
}
Expand Down

0 comments on commit 69441fa

Please sign in to comment.