Skip to content

Commit ef3d783

Browse files
author
colinlyguo
committed
add a nil check
1 parent 798a0ab commit ef3d783

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rollup/internal/controller/relayer/l2_relayer_sanity.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ import (
1717
// transaction data (calldata and blobs) by parsing them and comparing against database records.
1818
// This ensures the constructed transaction data is correct and consistent with the database state.
1919
func (r *Layer2Relayer) sanityChecksCommitBatchCodecV7CalldataAndBlobs(calldata []byte, blobs []*kzg4844.Blob) error {
20+
if r.l1RollupABI == nil {
21+
return fmt.Errorf("l1RollupABI is nil: cannot parse commitBatches calldata")
22+
}
2023
calldataInfo, err := parseCommitBatchesCalldata(r.l1RollupABI, calldata)
2124
if err != nil {
2225
return fmt.Errorf("failed to parse calldata: %w", err)

0 commit comments

Comments
 (0)