Skip to content

Commit

Permalink
chore: deleted wait receipt
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed May 3, 2024
1 parent ccf759a commit 9b2040c
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions p2p/pkg/contracts/preconf/preconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,6 @@ func (p *preconfContract) StoreEncryptedCommitment(
return common.Hash{}, err
}

// todo: delete after testing
receipt, err := p.client.WaitForReceipt(ctx, txnHash)
if err != nil {
return common.Hash{}, err
}

p.logger.Info("preconf contract storeEncryptedCommitment successful", "txnHash", txnHash)
eventTopicHash := p.preconfABI.Events["EncryptedCommitmentStored"].ID

for _, log := range receipt.Logs {
if len(log.Topics) > 0 && log.Topics[0] == eventTopicHash {
commitmentIndex := log.Topics[1]
p.logger.Info("Encrypted commitment stored", "commitmentIndex", commitmentIndex.Hex())

return txnHash, nil
}
}

return txnHash, nil
}

Expand Down

0 comments on commit 9b2040c

Please sign in to comment.