Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
updated bidder_registry event parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed Apr 15, 2024
1 parent c835490 commit 4574dd7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/contracts/bidder_registry/bidder_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,15 @@ func (r *bidderRegistryContract) PrepayAllowance(ctx context.Context, amount *bi
}

var bidderRegistered struct {
Bidder string
Bidder common.Address
PrepaidAmount *big.Int
WindowNumber *big.Int
}
for _, log := range receipt.Logs {
r.logger.Info("bidder registry log", "logData", log.Data)
if len(log.Topics) > 1 {
bidderRegistered.Bidder = common.HexToAddress(log.Topics[1].Hex())
}

err := r.bidderRegistryABI.UnpackIntoInterface(&bidderRegistered, "BidderRegistered", log.Data)
if err != nil {
r.logger.Debug("Failed to unpack event", "err", err)
Expand Down

0 comments on commit 4574dd7

Please sign in to comment.