@@ -7,12 +7,17 @@ import {
77 DecodeEventLogReturnType ,
88} from 'viem' ;
99
10- import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator' ;
10+ import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator/v3.2' ;
11+ import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator/v3.1' ;
1112import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from './contracts/RollupCreator/v2.1' ;
1213
1314import { CoreContracts } from './types/CoreContracts' ;
1415
1516function findRollupCreatedEventLog ( txReceipt : TransactionReceipt ) : Log < bigint , number > {
17+ // v3.2
18+ const v3Dot2EventSelector = getEventSelector (
19+ getAbiItem ( { abi : rollupCreatorV3Dot2ABI , name : 'RollupCreated' } ) ,
20+ ) ;
1621 // v3.1
1722 const v3Dot1EventSelector = getEventSelector (
1823 getAbiItem ( { abi : rollupCreatorV3Dot1ABI , name : 'RollupCreated' } ) ,
@@ -24,7 +29,11 @@ function findRollupCreatedEventLog(txReceipt: TransactionReceipt): Log<bigint, n
2429
2530 const log = txReceipt . logs . find ( ( log ) => {
2631 const topic = log . topics [ 0 ] ;
27- return topic === v3Dot1EventSelector || topic === v2Dot1EventSelector ;
32+ return (
33+ topic === v3Dot2EventSelector ||
34+ topic === v3Dot1EventSelector ||
35+ topic === v2Dot1EventSelector
36+ ) ;
2837 } ) ;
2938
3039 if ( typeof log === 'undefined' ) {
@@ -37,6 +46,8 @@ function findRollupCreatedEventLog(txReceipt: TransactionReceipt): Log<bigint, n
3746}
3847
3948type DecodeRollupCreatedEventLogReturnType = DecodeEventLogReturnType <
49+ // v3.2
50+ | typeof rollupCreatorV3Dot2ABI
4051 // v3.1
4152 | typeof rollupCreatorV3Dot1ABI
4253 // v2.1 and v1.1 are the same, so we only need to handle v2.1
@@ -51,6 +62,8 @@ function decodeRollupCreatedEventLog(
5162
5263 // try parsing from multiple RollupCreator versions
5364 [
65+ // v3.2
66+ rollupCreatorV3Dot2ABI ,
5467 // v3.1
5568 rollupCreatorV3Dot1ABI ,
5669 // v2.1 and v1.1 are the same, so we only need to handle v2.1
0 commit comments