Skip to content

Commit 51bc4a8

Browse files
committed
digest -> opHash
1 parent 7c402ea commit 51bc4a8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

receipts/fetch.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
// FetchReceipts looks up the transaction that emitted Call* events for the given
1616
// digest and returns all decoded Sequence receipts along with the native receipt.
17-
func FetchReceipts(ctx context.Context, digest common.Hash, provider *ethrpc.Provider, fromBlock, toBlock *big.Int) (Receipts, *types.Receipt, error) {
17+
func FetchReceipts(ctx context.Context, opHash common.Hash, provider *ethrpc.Provider, fromBlock, toBlock *big.Int) (Receipts, *types.Receipt, error) {
1818
if provider == nil {
1919
return Receipts{}, nil, fmt.Errorf("no provider")
2020
}
@@ -24,7 +24,7 @@ func FetchReceipts(ctx context.Context, digest common.Hash, provider *ethrpc.Pro
2424
ToBlock: toBlock,
2525
Topics: [][]common.Hash{
2626
{sequence.V3CallSucceeded, sequence.V3CallFailed, sequence.V3CallAborted, sequence.V3CallSkipped},
27-
{digest},
27+
{opHash},
2828
},
2929
}
3030

@@ -41,7 +41,7 @@ func FetchReceipts(ctx context.Context, digest common.Hash, provider *ethrpc.Pro
4141
}
4242
}
4343

44-
log, err := findDigestLog(logs, digest)
44+
log, err := findDigestLog(logs, opHash)
4545
if err != nil {
4646
return Receipts{}, nil, err
4747
}
@@ -56,9 +56,9 @@ func FetchReceipts(ctx context.Context, digest common.Hash, provider *ethrpc.Pro
5656
return Receipts{}, receipt, fmt.Errorf("unable to decode transaction receipt %v: %w", receipt.TxHash, err)
5757
}
5858

59-
receipts := decoded.Find(digest)
59+
receipts := decoded.Find(opHash)
6060
if receipts == nil {
61-
return Receipts{}, receipt, fmt.Errorf("decoded receipts do not include digest %v", digest)
61+
return Receipts{}, receipt, fmt.Errorf("decoded receipts do not include digest %v", opHash)
6262
}
6363

6464
return *receipts, receipt, nil

0 commit comments

Comments
 (0)